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
Cell constructor through the coordinates
public Cell(int posX, int posY) { this.posX = posX; this.posY = posY; this.level = 0; this.currWorker = null; this.dome = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Cell(){}", "public Cell(int col, int row){ // constructor\n this.col = col;\n this.row = row;\n }", "public Coordinate() { row = col = -1; }", "public Cell(int row, int column){\r\n this.row = row;\r\n this.column = column;\r\n }", "public Cell()\n\t{\n\t}", "public BoardCell(int x, int y){\n xCor=x;\n yCor=y;\n }", "public Cell(int i, int j){\n this.i = i;\n this.j = j;\n }", "public Cell(int x,int y){\r\n this.x = x;\r\n this.y = y;\r\n level = 0;\r\n occupiedBy = null;\r\n }", "public Cell(int row, int col, int startingState, int[] neighborRowIndexes,\n int[] neighborColIndexes) {\n myState = startingState;\n myRow = row;\n myCol = col;\n neighborRowIndex = neighborRowIndexes;\n if (hexagon) {\n neighborEvenColIndex = new int[]{-1, -1, 0, 1, 0, -1};\n neighborOddColIndex = new int[]{-1, 0, 1, 1, 1, 0};\n neighborRowIndex = new int[]{0, -1, -1, 0, 1, 1};\n } else {\n neighborEvenColIndex = neighborColIndexes;\n neighborOddColIndex = neighborColIndexes;\n }\n }", "public Coordinate(final Coordinate c) { row = c.row; col = c.col; }", "public Cell(String state, int x, int y) {\n this.state = state;\n this.nextState = state;\n this.coordinate = new Point(x, y);\n }", "public Cell(int x, int y){\n\t\tif((x<0 || x>7) || (y<0 || y>7)){\n\t\t\tSystem.out.println(\"The provided coordinates for the cell are out of range.\");\n\t\t\treturn;\n\t\t}\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t\tthis.placedPiece = null;\n\t}", "public Cell(int row, int col)\n\t{\n\t\tthis.row = row;\n\t\tthis.col = col;\n\t}", "public Cell ()\n {\n cellStatus = false;\n xCoordinate = 0;\n yCoordinate = 0;\n button = new JButton();\n }", "protected GridCell(int x, int y, GridDomain parent) {\n\t\tcoord = new GridCoord(x, y);\n\t\tthis.parent = parent;\n\t\tcelltype = GridCellType.getDefault();\n\t\tcellCost = celltype.cost;\n\t}", "public Cell(boolean cellStatus, int xCoordinate, int yCoordinate)\n {\n this.cellStatus = cellStatus;\n\n if (xCoordinate >= 0)\n {\n this.xCoordinate = xCoordinate;\n }\n else \n {\n this.xCoordinate = 0;\n }// end of if (xCoordinate >= 0)\n\n if (yCoordinate >= 0)\n {\n this.yCoordinate = yCoordinate;\n }\n else \n {\n this.yCoordinate = 0;\n } // end of if (yCoordinate >= 0)\n\n button = new JButton();\n }", "public Cell(int row, int col) {\n\t\talive = false;\n\t\tmyRow = row;\n\t\tmyCol = col;\n\t\tneighbors = new ArrayList<>();\n\t}", "public abstract void initCell(\r\n int row,\r\n int col,\r\n double valueToInitialise);", "public DataCell() {\n super();\n }", "public SubCell(int x, int y) {\n this.x = Math.floorMod(x, COLUMNS);\n this.y = Math.floorMod(y, ROWS);\n }", "public Coordinate(final int r, final int c) { row = r; col = c; }", "public Couple cellContent(int x, int y);", "public MapCell(int row, int column){\n\t\tsetPosition(row, column);\n\t}", "public Board()\r\n\t{\r\n\t\tfor(int x = 0; x < 9; x++)\r\n\t\t\tfor(int y = 0 ; y < 9; y++)\r\n\t\t\t{\r\n\t\t\t\tboard[x][y] = new Cell();\r\n\t\t\t\tboard[x][y].setBoxID( 3*(x/3) + (y)/3+1);\r\n\t\t\t}\r\n\t}", "public Cell()\n\t{\n\t\tthis.alive = 0;\n\t\tthis.neighbors = 0;\n\t}", "public NotebookCell() {}", "public CellCoord(int column, int row) {\n if (row <= 0 || column <= 0 || row > SpreadSheet.MAX_ROWS || column > SpreadSheet.MAX_COLUMNS) {\n valid = false;\n } else {\n this.column = column;\n this.row = row;\n }\n\n }", "public Cell(int state) {\n \t\tthis.state = state;\n \t}", "public void init(CellImpl cell);", "public ZonaFasciculataCells() {\r\n\r\n\t}", "@SuppressWarnings(\"unused\")\n public Coordinate() {}", "public Cell(T val)\n {\n _value = val;\n _visited = false;\n }", "public Coordinate(int row, int col) {\n\t\tthis.row = row;\n\t\tthis.col = col;\n\t}", "public Cell(DCEL_Face face) {\n\t\tthis(face, -1);\n\n\t}", "private GridNode(Grid grid, GridCoord coord, float x, float y, float z) {\n this(grid, coord);\n point = new Point(x, y, z);\n }", "private Environment(int rows, int columns)\r\n\t{\r\n\t\tthis.rows = rows;\r\n\t\tthis.columns = columns;\r\n\t\tcells = new Cell[rows][columns];\r\n\t\tfor (int i = 0; i < rows; i++)\r\n\t\t\tfor (int j = 0; j < columns; j++)\r\n\t\t\t\tcells[i][j] = new Cell();\r\n\t}", "@Override\n\tpublic void createCellStructure() {\n\t\t\n\t}", "@Override\n\tpublic Cell createCell(int arg0, int arg1) {\n\t\treturn null;\n\t}", "public HorizontalCoords() {\n }", "public BoardCell(int rowNum, int colNum) {\t\t\t\t\t\t\t\t\t// Constructor with row and column parameters passed into it\n\t\tthis.row = rowNum;\t\t\t\t\t\t\t\t\t\t\t\t\t\t// setting the row of the cell to the row parameter\n\t\tthis.column = colNum;\t\t\t\t\t\t\t\t\t\t\t\t\t// setting the column of the cell to the column parameter\n\t}", "@Override\n\tpublic Cell makeCell(int x, int y, int start, Grid g,\n\t\t\tMap<String, Double> map) {\n\t\tmyGrid = g;\n\t\tGameOfLifeCell c = new GameOfLifeCell(x, y, start, this);\n\t\treturn c;\n\t}", "public Cell(){\n \tthis.shot=false;\n }", "public Cell(int row, int col, char c) throws IllegalArgumentEvent {\r\n\t\tif(row < 0 || col < 0){\r\n\t\t\tthrow new IllegalArgumentEvent(\"row or column value below 0\");\r\n\t\t}\r\n\t\tthis.row = row;\r\n\t\tthis.col = col;\r\n\t\t\r\n\t\tsetCell(c);\r\n\t}", "public Cell(int i, int j, Type type, Entity entity, char goalLetter){\n this.i = i;\n this.j = j;\n this.type = type;\n this.entity = entity;\n this.goalLetter = goalLetter;\n }", "public GridNode(Grid grid, GridCoord coord) {\n this.coord = coord;\n }", "public Cell(DCEL_Face face, Point dualPoint) {\n\t\tthis.face = face;\n\t\tthis.label = 0;\n\t\tthis.dualPoint = dualPoint;\n\n\t}", "private Cell(E data) {\n Cell.this.data = data;\n }", "private Cell()\n\t{\n\t\tsupplied = false;\n\t\tconnections = new boolean[4];\n\t\t\n\t\tfor(int i = 0; i < 4; ++i)\n\t\t\tconnections[i] = false;\n\t}", "Cell getCellAt(Coord coord);", "public GameBoard(){\r\n boardCells = new GameCell[NUMBER_OF_CELLS];\r\n for( int i= 0; i< NUMBER_OF_CELLS; i++ ){\r\n boardCells[i] = new GameCell(i);//\r\n }\r\n }", "public Gridder()\n\t{\n grid = new Cell[MapConstant.MAP_X][MapConstant.MAP_Y];\n for (int row = 0; row < grid.length; row++) {\n for (int col = 0; col < grid[0].length; col++) {\n grid[row][col] = new Cell(row, col);\n\n // Set the virtual walls of the arena\n if (row == 0 || col == 0 || row == MapConstant.MAP_X - 1 || col == MapConstant.MAP_Y - 1) {\n grid[row][col].setVirtualWall(true);\n }\n }\n }\n\t}", "@Override\n\tpublic Cell createCell()\n\t{\n\t\treturn derivedColumn.createCell();\n\t}", "public Coordinate(double x, double y) {\r\n this(x, y, Double.NaN, Double.NaN);\r\n }", "Cell(int x, int y, Color color, boolean flooded) {\r\n this.x = x;\r\n this.y = y;\r\n this.color = color;\r\n this.flooded = flooded;\r\n this.left = null;\r\n this.top = null;\r\n this.right = null;\r\n this.bottom = null;\r\n }", "Cell(int x, int y, Color color, boolean flooded, ACell left, ACell top, ACell right,\r\n ACell bottom) {\r\n this.x = x;\r\n this.y = y;\r\n this.color = color;\r\n this.flooded = flooded;\r\n this.left = left;\r\n this.top = top;\r\n this.right = right;\r\n this.bottom = bottom;\r\n }", "public Coordinate(int x,int y)\n {\n this.x = x;\n this.y = y;\n }", "public Cell() {\n\t\tthis.alive = false; // Initially dead\n\t\tthis.age = 0; // Initially age of 0\n\t}", "protected GridCell(int x, int y, GridDomain parent,\n\t\t\tGridCellType defaultterrain) {\n\t\tcoord = new GridCoord(x, y);\n\t\tthis.parent = parent;\n\t\tcelltype = defaultterrain;\n\t\tif (celltype == null) celltype = GridCellType.getDefault();\n\t\tcellCost = celltype.cost;\n\t}", "public Coordinate() {\n this.xCoordinate = -1;\n this.yCoordinate = -1;\n }", "public TwoDimensionalGrid()\r\n {\r\n cellGrid = new Cell[LOWER_BOUND][RIGHT_BOUND];\r\n\r\n for (int columns = 0; columns < LOWER_BOUND; columns ++)\r\n {\r\n for (int rows = 0; rows < RIGHT_BOUND; rows ++)\r\n {\r\n cellGrid[columns][rows] = new Cell(true);\r\n } // end of for (int rows = 0; rows < RIGHT_BOUND; rows ++)\r\n System.out.print(\"\\n\");\r\n } // end of for (int columns = 0; columns < LOWER_BOUND; columns ++)\r\n }", "public void initialize() {\n\t\t// set seed, if defined\n\t\tif (randomSeed > Integer.MIN_VALUE) {\n\t\t\tapp.randomSeed(randomSeed);\n\t\t}\n\n\t\tfor (int x = 0; x < gridX; x++) {\n\t\t\tfor (int y = 0; y < gridY; y++) {\n\t\t\t\tCell c = new Cell(\n\t\t\t\t\tapp,\n\t\t\t\t\tcellSize,\n\t\t\t\t\tcolors[(int)app.random(colors.length)],\n\t\t\t\t\ttrue\n\t\t\t\t);\n\t\t\t\tc.position = PVector.add(offset, new PVector(x * cellSize, y * cellSize));\n\t\t\t\tcells[x + (y * gridX)] = c;\n\t\t\t\tnewCells[x + (y * gridX)] = c;\n\t\t\t}\n\t\t}\n\t}", "public Location(int row, int column)\r\n\t{\r\n\t\tthis.row=row;\r\n\t\tthis.column=column;\r\n\t}", "public Cell(Cell original){\n this.i = original.i;\n this.j = original.j;\n this.type = original.type;\n if (original.entity != null) {\n if (original.entity instanceof Agent) {\n Agent agent = (Agent) original.entity;\n this.entity = new Agent(agent);\n }\n else if (original.entity instanceof Box) {\n Box box = (Box) original.entity;\n this.entity = new Box(box);\n }\n }\n else {\n this.entity = null;\n }\n this.goalLetter = original.goalLetter;\n }", "MemberCell createMemberCell();", "Coordinate createCoordinate();", "public Coordinate( final int i) { set( i ); }", "public Coordinate(int x, int y, int identity){\r\n\t\tsuper(x,y);\r\n\t\tthis.identity = identity;\r\n\t}", "protected Coord() {\n\t}", "public Cell(final int indX, final int indY, int x, int y) {\r\n\t\tthis.stage = GameScreen.stage;\r\n\t\tthis.indX = indX;\r\n\t\tthis.indY = indY;\r\n\r\n\t\tthis.img = new Image(Assets.manager.get(Assets.SQUARE_TXT, Texture.class));\r\n\t\timg.setX(x);\r\n\t\timg.setY(y);\r\n\t\tstage.addActor(img);\r\n\t\timg.addListener(new InputListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic boolean touchDown(InputEvent event, float x, float y, int pointer, int button) {\r\n\t\t\t\t// Call gameLogic to find where piece belongs and check game state\r\n\t\t\t\tGameScreen.game.placePiece(indX, indY);\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t});\r\n\t}", "Cell() {\r\n\t\tstate = CellState.EMPTY;\r\n\t}", "public CellReference(Cell cell) {\n\t\tthis(cell, false, false);\n\t}", "public Table() {\n // <editor-fold desc=\"Initialize Cells\" defaultstate=\"collapsed\">\n for (int row = 0; row < 3; row++) {\n for (int column = 0; column < 3; column++) {\n if (cells[row][column] == null) {\n cells[row][column] = new Cell(row, column);\n }\n }\n }\n // </editor-fold>\n }", "private static void InitializeCells()\n {\n cells = new Cell[Size][Size];\n\n for (int i = 0; i < Size; i++)\n {\n for (int j = 0; j < Size; j++)\n {\n cells[i][j] = new Cell(i, j);\n }\n }\n }", "public Cell(int playerNumber) {\n\t\tthis.playerNumber = playerNumber;\n\t}", "public Tile(int row, int column){\n this.row = row;\n this.column = column;\n this.piece = null;\n }", "public Classroom()\n { \n // Create a new world with 10x6 cells with a cell size of 130x130 pixels.\n super(10, 6, 130); \n prepare();\n }", "public Coordinates(int x, int y){\n this.x = x;\n this.y = y;\n }", "public Location(int row, int col) {\n\n this.row = row;\n this.col = col;\n\n }", "public MapGrid(){\n\t\tthis.cell = 25;\n\t\tthis.map = new Node[this.width][this.height];\n\t}", "public BoardCell(BoardCell existingBoardCell){\n xCor=existingBoardCell.getXCor();\n yCor=existingBoardCell.getYCor();\n }", "public Coordinate(int x, int y, int data){\r\n this.x = x;\r\n this.y = y;\r\n this.data = data;\r\n }", "public RedCell()\n {\n super(1, Greenfoot.getRandomNumber(2) + 1);\n setRotation(Greenfoot.getRandomNumber(360));\n }", "public Cell() {\r\n\t\tthis.mineCount = 0;\r\n\t\tthis.isFlagged = false;\r\n\t\tthis.isExposed = false;\r\n\t\tthis.isMine = false;\r\n\t}", "public Cell(){\n this.ship = null;\n this.hasBeenShot = false;\n }", "public Field ( int numrows, int numcols, int cellsize ) {\n\t\tnumrows_ = numrows;\n\t\tnumcols_ = numcols;\n\t\tcellsize_ = cellsize;\n\t\tstep_ = 0;\n\t\tfield_ = new Thing[numrows][numcols];\n\t\tclearField();\n\t}", "public SBlock() {\n // todo\n cells = new boolean[rows][columns];\n cells[0][0] = false;\n cells[0][1] = true;\n cells[0][2] = true;\n cells[1][0] = true;\n cells[1][1] = true;\n cells[1][2] = false;\n cells[2][0] = false;\n cells[2][1] = false;\n cells[2][2] = false;\n }", "public GridLocation(){ //of the grid at the moment\n charactersOccupiedTheLocation=new Object[4];\n }", "void Cell(boolean R, int x, int y, Bridge bridge);", "public Grid(int recRowSize, int recColSize) {\r\n counter = 0;\r\n rowSize = recRowSize;\r\n colSize = recColSize;\r\n myCells = new Cell[recRowSize + 2][recColSize + 2];\r\n for (int row = 0; row < myCells.length; row++) {\r\n for (int col = 0; col < myCells[row].length; col++) {\r\n myCells[row][col] = new Cell();\r\n }\r\n }\r\n }", "public SudokuCell(int row, int column){\n\t\tthis.row = row;\n\t\tthis.column = column;\n\t\tsetBox();\n\t\tvalue = 0;\n\t}", "Grid(int width, int height) {\n this.width = width;\n this.height = height;\n\n // Create the grid\n grid = new Cell[width][height];\n\n // Populate with dead cells to start\n populateGrid(grid);\n }", "public Coordinates(final Coordinates coor) {\n\t\tthis(coor.getX(), coor.getY());\n\t}", "public TeleportationCell(int i,BasicCell nc) {\n\t\tsuper(i);\n\t\tthis.newCell = nc;\n\t}", "Cell(int[][] board, int zeroRow, int zeroCol) {\n\t\t\tthis.board = board;\n\t\t\tthis.zeroRow = zeroRow;\n\t\t\tthis.zeroCol = zeroCol;\n\t\t\tthis.representation = Arrays.deepToString(board);\n\t\t}", "public Coordinates(int x, int y)\r\n {\r\n xCoord = x;\r\n yCoord = y;\r\n }", "public TrapCell(int index){\n super(index);\n }", "public void init_cells()\n\t{\n\t\tint i, j;\n\n\t\t// create a maze of cells\n\t\tMaze = new int[ROWS][COLS];\n//\t\tfor (i = 0; i < ROWS; i++)\n//\t\t\tMaze[i] = new Array(COLS);\n\n\t\t// set all walls of each cell in maze by setting bits : N E S W\n\t\tfor (i = 0; i < ROWS; i++)\n\t\t\tfor (j = 0; j < COLS; j++)\n\t\t\t\tMaze[i][j] = (N + E + S + W);\n\t\t\n\t\t// create stack for storing previously visited locations\n\t\tstack = new Vector<int[]>(ROWS*COLS);\n\t\tfor (i = 0; i < ROWS*COLS; i++)\n\t\t\tstack.add(i, new int[2]);\n\n\t\t// initialize stack\n\t\tfor (i = 0; i < ROWS*COLS; i++)\n\t\t\tfor (j = 0; j < 2; j++)\n\t\t\t\tstack.elementAt(i)[j] = 0;\n\t}", "public Cell(char data, Pos position)\r\n\t{\r\n\t\tthis(false, 0, position, false, AntColor.Black);\r\n\t\tswitch (data)\r\n\t\t{\r\n\t\tcase '#':\r\n\t\t\tisRocky = true;\r\n\t\t\tbreak;\r\n\t\tcase '+':\r\n\t\t\tantHillColor = AntColor.Red;\r\n\t\t\tantHill = true;\r\n\t\t\tbreak;\r\n\t\tcase '-':\r\n\t\t\tantHillColor = AntColor.Black;\r\n\t\t\tantHill = true;\r\n\t\t\tbreak;\r\n\t\tcase '.':\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tfoodCount = Integer.parseInt(\"\" + data);\r\n\t\t\t} catch (NumberFormatException e)\r\n\t\t\t{\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t}", "public CellPane(CellPaneGrid<T> grid, int i, int j, double cw, double ch, double dx, double dy, T cell) {\n\t\tthis.grid = grid;\n\t\tthis.i = i;\n\t\tthis.j = j;\n\t\tthis.cw = cw;\n\t\tthis.ch = ch;\n\t\tthis.setTranslateX(dx);\n\t\tthis.setTranslateY(dy);\n\t\tthis.cell = cell;\n\t\tcell.setPane(this);\n\t\tsyncView();\n\t\tthis.setOnMouseClicked(e -> this.cell.onClick());\n\t}", "public Piece(int a_row, int a_col)\n {\n this.tileLocation = Pair.create(a_row,a_col);\n }" ]
[ "0.7869783", "0.7742171", "0.7597431", "0.75911087", "0.7590211", "0.75331336", "0.7447232", "0.7420904", "0.74019074", "0.73133564", "0.71379", "0.70763725", "0.7076116", "0.7025073", "0.70188856", "0.6949683", "0.6916312", "0.6863941", "0.6821713", "0.68214554", "0.67762583", "0.67707276", "0.6767624", "0.6724394", "0.6694508", "0.6643052", "0.66424274", "0.6640929", "0.66375065", "0.662862", "0.66210115", "0.65979195", "0.6556989", "0.65310496", "0.6518344", "0.6506758", "0.6486572", "0.647318", "0.64526063", "0.6450686", "0.64375764", "0.64282674", "0.6426517", "0.6408427", "0.6398778", "0.6393961", "0.63937277", "0.6363097", "0.6362554", "0.63590145", "0.63441175", "0.6343665", "0.63366187", "0.63356984", "0.6335302", "0.6327973", "0.63145417", "0.6273719", "0.6273132", "0.62724614", "0.6264783", "0.6255372", "0.62488735", "0.62458295", "0.62436944", "0.6236669", "0.6233245", "0.62290376", "0.6223798", "0.6218009", "0.620746", "0.62071353", "0.62044936", "0.618734", "0.61841327", "0.6167469", "0.61541563", "0.61415213", "0.61297554", "0.6120602", "0.611477", "0.6112971", "0.61115456", "0.61089784", "0.6103465", "0.6099545", "0.6097306", "0.6095533", "0.609345", "0.60854197", "0.60785526", "0.6073518", "0.60658705", "0.6058914", "0.60514665", "0.6047499", "0.60414416", "0.60405856", "0.6033366", "0.6032887" ]
0.69477654
16
add block level in a cell: it increments previous level existing in the cell
public void buildInCell() { this.level++; if (this.level == 4) { this.setFreeSpace(false); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void incrementLevel()\r\n {\r\n counts.addFirst( counts.removeFirst() + 1 );\r\n }", "public void changeLVL(int index){\n level +=index;\n changeLvL=true;\n }", "public void addLevel()\r\n {\r\n tables.addFirst( new HashMap<String,T>() );\r\n counts.addFirst( 0 );\r\n }", "private void nextLevel()\n\t{\n\t\tMapInstance.getInstance().setSelectedLevel(MapInstance.getInstance().getSelectedLevel() + 1);\n\t}", "public void inc()\n {\n _level++;\n calculateIndentationString();\n }", "private void incrementLevels(int levels){\n this.level += levels;\n if (this.level > 10){\n this.level = 10;\n }\n }", "private void updateSkiTreeLevel(SkiNode head) {\n\t\tfor (SkiNode nextNode : head.next) {\n\t\t\tif (nextNode != null) {\n\t\t\t\tupdateSkiTreeLevel(nextNode);\n\t\t\t\thead.level = Math.max(head.level, nextNode.level + 1);\n\t\t\t}\n\t\t}\n\t\thead.level = Math.max(head.level, 1);\n\t\thMap[head.i][head.j] = head.level;\n\t}", "private void increaseLevel(boolean list)\n\t{\n\t\tlevel++;\n\n\t\tif(hasData.length == level)\n\t\t{\n\t\t\t// Grow lists when needed\n\t\t\thasData = Arrays.copyOf(hasData, hasData.length * 2);\n\t\t\tlists = Arrays.copyOf(lists, hasData.length * 2);\n\t\t}\n\n\t\thasData[level] = false;\n\t\tlists[level] = list;\n\n\t\tnextKey = ! list;\n\t}", "public void updateLevel(){\n level = parent.level+1;\n if(noOfChildren != 0){\n for (int i = 0; i<noOfChildren; i++) {\n getChild(i).updateLevel();\n }\n }\n }", "public static void levelOrderLinewiseZZ(Node node){\r\n Stack<Node> mainS = new Stack<>();\r\n Stack<Node> childS = new Stack<>();\r\n \r\n //. Add node to Stack\r\n mainS.push(node);\r\n //Define level\r\n int lvl = 1;\r\n \r\n while(mainS.size() > 0){\r\n //1. Get + print\r\n Node rem = mainS.pop();\r\n System.out.print(rem.data + \" \");\r\n \r\n if(lvl % 2 == 1){\r\n //odd level = left->right additon of children is done\r\n for(int i=0; i<rem.children.size(); i++){\r\n Node child = rem.children.get(i);\r\n //Addition is done in child stack\r\n childS.push(child);\r\n }\r\n }\r\n else{\r\n //even level = right to left additon of children is done\r\n for(int i=rem.children.size()-1; i>=0; i--){\r\n Node child = rem.children.get(i);\r\n //Addition is done in child stack\r\n childS.push(child);\r\n }\r\n }\r\n \r\n if(mainS.size() == 0){\r\n //Print Enter\r\n System.out.println();\r\n \r\n //Increase the level\r\n lvl++;\r\n \r\n //Swap the stacks\r\n Stack<Node> temp = mainS;\r\n mainS = childS;\r\n childS = temp;\r\n }\r\n }\r\n }", "public void recursiveRegionDrawing(Cell cell, int level)\n\t{\n\tif(cell.region!=null && level<levelThreshold)\n\t\t{\n\t\t//1) Draw region\n\t\tthis.stroke(120);\n\t\tstrokeWeight(getWidth(cell));\n\t\t\n\t//\tif(cell.term.name.contains(\"autophagy\") || cell.term.name.contains(\"Phagosome\"))\n\t//\t\tSystem.out.println(\"taca\");\n\t\tif(cell.color!=null && cell.color.size()>0)\tfill(cell.color.get(selectedCol).getRGB());\n\t\telse\t\t\t\t\t\t\t\t\t\tfill(240,240,240);\n\t\tcell.region.draw(this.g); // draw this shape\n\t\t\n\t\tif(SHOW_LABELS && cell.labelSize>0)\n\t\t\t{\n\t\t\tfill(0,0,0);\n\t\t\t//textAlign(CENTER);\n\t\t\ttextAlign(LEFT, TOP);\n\t\t\ttextFont(font, cell.labelSize);\n\t\t\ttextLeading(cell.labelSize+lineSpacing);\n\t\t\ttext(cell.label, cell.labelX, cell.labelY);\n\t\t\ttextAlign(LEFT, BASELINE);\n\t\t\t}\n\t\t\n\t\t//2) Continue with recursion\n\t\tif(cell.subcells!=null && cell.subcells.length>0)\t\n\t\t\tfor(Cell cc:cell.subcells)\n\t\t\t\trecursiveRegionDrawing(cc, level+1);\n\t\t}\n\t}", "public void\t\t\t\t\t\t\tincreaseLevel()\t\t\t\t\t\t\t\t{ this.currentLevel += 1; }", "void incrementNewDepth() {\n mNewDepth++;\n }", "public void newlevel() {\n\t\tblack = new Background(COURT_WIDTH, COURT_HEIGHT); // reset background\n\t\tcannon = new Cannon(COURT_WIDTH, COURT_HEIGHT); // reset cannon\n\t\tdeadcannon = null;\n\t\tbullet = null;\n\t\tshot1 = null;\n\t\tshot2 = null;\n\t\t// reset top row\n\t\tfor (int i = 0; i < alien1.length; i++) {\n\t\t\talien1[i] = new Alien(COURT_WIDTH, COURT_HEIGHT);\n\t\t\talien1[i].pos_x = alien1[i].pos_x + 30*i;\n\t\t\talien1[i].v_x = level + alien1[i].v_x;\n\t\t}\n\t\t// reset second row\n\t\tfor (int i = 0; i < alien2.length; i++) {\n\t\t\talien2[i] = new Alien2(COURT_WIDTH, COURT_HEIGHT);\n\t\t\talien2[i].pos_x = alien2[i].pos_x + 30*i;\n\t\t\talien2[i].v_x = level + alien2[i].v_x;\n\t\t}\n\t\t// reset third row\n\t\tfor (int i = 0; i < alien3.length; i++) {\n\t\t\talien3[i] = new Alien3(COURT_WIDTH, COURT_HEIGHT);\n\t\t\talien3[i].pos_x = alien3[i].pos_x + 30*i;\n\t\t\talien3[i].v_x = level + alien3[i].v_x;\n\t\t}\n\t}", "public void extendGraph(int level) {\n\t\tmaxLevel++;\n\t\tsteps.put(maxLevel+1, steps.get(maxLevel));\n\t\tif (maxLevel == graph.countLevels()){\n\t\t\tgraph.extend();\n\t\t}\n\t\t\t\n\t\t\n\t\t/* start at highest level and move each level up until we get to insert level*/\n\t\tfor(int i = maxLevel; i > level; i--) {\n\t\t\tsteps.put(i, steps.get(i-1));\n\t\t\tfacts.put(i, facts.get(i-1));\n\t\t\tinconsistencies.put(i, inconsistencies.get(i-1));\n\t\t}\n\t\t\n\t\t/* add new sets to level */\n\t\t// Set<PlanGraphStep> newSteps = new HashSet<PlanGraphStep>();\n\t\tsteps.put(level, new HashSet<PlanGraphStep>());\n\t\tfacts.put(level, new HashSet<PlanGraphLiteral>());\n\t\tinconsistencies.put(level, new HashSet<LPGInconsistency>());\n\t\t\n\t\t/* propagate facts from previous level via no-ops\n\t\tfor (PlanGraphLiteral pgLiteral : facts.get(level-1)) {\n\t\t\taddStep(persistentSteps.get(pgLiteral), level, false);\n\t\t}*/\n\t\tfacts.get(level).addAll(facts.get(level-1));\n\t\t \n\t}", "void createNewLevel(int level);", "public void setLevel(int newlevel)\n {\n level = newlevel; \n }", "@Override\n public void levelUp(){\n //System.out.println(\"Level: \" + getLevel());\n if (getLevel() > 5) return;\n\n /* System.out.println(\"\\n-------\");\n System.out.println(\"Level: \" + getLevel());\n System.out.println(\"Se va a aumentar: \" + getName() + \"Stacks actuales: Health\" + getHealth() + \" range: \" + range + \" stroke\" + strokePerTime+ \" speed: \" + getSeep());\n*/\n double percentage = growth(getLevel()) + growthRate;\n\n setHealth((int) (getHealth() + getHealth() * percentage));\n strokePerTime = (int) (strokePerTime + strokePerTime * percentage);\n\n // Aumenta el rango si el nivel es 3 o 5\n // Luego quedan muy rotos xD\n if (getLevel() % 2 != 0) range++;\n setLevel(getLevel() + 1);\n\n /* System.out.println(\"resultado: \" + getName() + \"Stacks actuales: Health\" + getHealth() + \" range: \" + range + \" stroke\" + strokePerTime+ \" speed: \" + getSeep());\n System.out.println(\"-------\\n\");*/\n }", "void incrementOldDepth() {\n mOldDepth++;\n }", "public void generateLevel() {\n\t\tfor (int y = 0; y < this.height; y++) {\n\t\t\tfor (int x = 0; x < this.width; x++) {\n\t\t\t\tif (x * y % 10 < 5)\n\t\t\t\t\ttiles[x + y * width] = Tile.GRASS.getId();\n\t\t\t\telse\n\t\t\t\t\ttiles[x + y * width] = Tile.STONE.getId();\n\t\t\t}\n\t\t}\n\t}", "public void incLevel(int lvl){this.Level=this.XP/(100);}", "public void nextLevelTogo() {\n if (this.myClearedLines % 2 == 0) {\n myLinesToGo = 2;\n } else {\n myLinesToGo = 1;\n }\n }", "private void addStackBlocks() {\n\n for (int x = numBlocks; x > 0; x--) {\n\n double blockHeight = totalBLockHeight / numBlocks;\n double blockWidthChange = (maxBlockWidth - minBlockWidth) / numBlocks;\n double blockWidth = minBlockWidth + ((x - 1) * blockWidthChange);\n\n TowerBlock newBlock = new TowerBlock(blockWidth, blockHeight, x);\n towerOne.push(newBlock);\n\n }\n addBlocks = false;\n\n }", "public void setLevel(double amt) {\n\t\tlevel += amt;\n\t}", "public void nextLevel() {\n if (game.level <= 8) {\n game.level = game.level + 1;\n if (isOver()) {\n game.overallMoves = game.getOverallMoves() + game.getMoves();\n }\n f.score.setText(\"Overall Score: \" + game.getOverallMoves());\n restartLevel();\n }\n else if (game.level == 9) { //FINAL LEVEL\n f.levelNum.setText(\"GAME\");\n f.moves.setText(\"OVER\");\n f.score.setText(\"FINAL SCORE: \" + game.getOverallMoves());\n repaint();\n }\n }", "public void recursiveLabelComputing(Cell cell, int level)\n\t{\n\tif(cell.region!=null)\n\t\t{\n\t\t//computeLabelPosition(cell);\n\t\tcomputeAndSplitLabelPosition(cell);\n\t\t\t\n\t\t//2) Continue with recursion\n\t\tif(cell.subcells!=null && cell.subcells.length>0)\t\n\t\t\tfor(Cell cc:cell.subcells)\n\t\t\t\trecursiveLabelComputing(cc, level+1);\n\t\t\t}\n\t}", "protected void restockItem(int x){\r\n this.level += x;\r\n }", "private void addUpBlock(Position p, TETile te,\n int len, int leftWid, int rightWid) {\n int x = p.x;\n int y = p.y;\n for (int j = y; j < y + len; j += 1) {\n for (int i = x - leftWid; i < x + rightWid + 1; i += 1) {\n world[i][j] = te;\n }\n }\n }", "public int calcLevel(int count, int previous){\r\n\t\tint value = 200 + (75*(count-1));\r\n\t\tint next = value + previous;\r\n\r\n\t\tif(count == this.getLevel()){\r\n\t\t\treturn next;\r\n\t\t}\r\n\t\telse{\r\n\t\t\treturn calcLevel(count+1, next);\r\n\t\t}\r\n\t}", "public void increaseDepth() {\n currentDepth++;\n }", "@Override\n public void upgrade(int level){\n System.out.println(\"Level adfasdfasdf: \" + level);\n System.out.println(getLevel());\n\n if(level > 5) level = 5;\n\n if(level > 1){\n for (int i = 1; i < level; i++) levelUp();\n }\n\n /*\n //System.out.println(\"\\n-------\");\n //System.out.println(\"Se va a aumentar: \" + getName() + \"Stacks actuales: Health\" + getHealth() + \" range: \" + range + \" stroke\" + strokePerTime+ \" speed: \" + getSeep());\n\n double percentage = growth(level);\n\n setHealth((int) (getHealth() + getHealth() * percentage));\n strokePerTime = (int) (strokePerTime + strokePerTime * percentage);\n\n // Aumenta el rango si el nivel es 3 o 5\n // Luego quedan muy rotos xD\n if (level % 2 != 0) range++;\n\n //System.out.println(\"resultado: \" + getName() + \"Stacks actuales: Health\" + getHealth() + \" range: \" + range + \" stroke\" + strokePerTime+ \" speed: \" + getSeep());\n //System.out.println(\"-------\\n\");*/\n }", "public void set_Mine_Count(int row,int col)\n{\n\tif(cell[row][col] != 9)\n\t{\n\t\tcell[row][col] += 1;\n\t}\n}", "private void addRow() {\n ArrayList<EscapeBlock> row = new ArrayList<>();\n grid.add(row);\n \n for (int j = 0; j < gridWidth; j++) {\n EscapeBlock block = new EscapeBlock(j, gridHeight);\n block.setLocation(margin + j * (Block.length+1) ,\n margin + topMargin + gridHeight * (Block.length+1)); \n \n this.add(block); // add to the JPanel \n row.add(block); // and to the row\n }\n \n gridHeight++;\n }", "private void addLevelsToArray(){\n\t\tfor(int i = 0; i < lvl_num; i++)\n\t\t\tstage_text[i] = i + 1 + \"\";\n\t}", "@Override\n\tpublic void setLevelNumber(int i) {\n\t\tnumLevel =i;\n\t}", "private void level3() {\n // level 0.3\n levelBlock.moveTo(0, 400);\n levelBlock.setScaleX(200 / levelBlock.getUnscaledWidth());\n levelBlock.setScaleY(200 / levelBlock.getUnscaledHeight());\n// levelBlock.setAlpha((float).001);\n level.addChild(levelBlock);\n\n levelBlock2.moveTo(300, 400);\n levelBlock2.setScaleX(200 / levelBlock.getUnscaledWidth());\n levelBlock2.setScaleY(200 / levelBlock.getUnscaledHeight());\n level.addChild(levelBlock2);\n\n levelBlock3.moveTo(600, 400);\n levelBlock3.setScaleX(400 / levelBlock.getUnscaledWidth());\n levelBlock3.setScaleY(200 / levelBlock.getUnscaledHeight());\n level.addChild(levelBlock3);\n\n crystal1.setPosition(new Point(levelBlock.getHitbox().x + levelBlock.getHitbox().width, 500));\n crystal1.setAlpha((float) .1);\n crystal1.setScaleX(.55);\n crystal1.setScaleY(.6);\n level.addChild(crystal1);\n\n crystal2.setPosition(new Point(levelBlock2.getHitbox().x + levelBlock2.getHitbox().width, 500));\n crystal2.setAlpha((float) .1);\n crystal2.setScaleX(.55);\n crystal2.setScaleY(.6);\n level.addChild(crystal2);\n\n ash.setPosition(new Point(\n crystal1.getPosition().x,\n crystal1.getPosition().y - 70)\n );\n ash.setAlpha((float) .21);\n ash.setScaleX(.55);\n level.addChild(ash);\n\n ash2.setPosition(new Point(\n crystal2.getPosition().x,\n crystal2.getPosition().y - 70)\n );\n ash2.setAlpha((float) .21);\n ash2.setScaleX(.55);\n level.addChild(ash2);\n\n beaconA.moveTo(levelBlock.getHitbox().x + levelBlock.getHitbox().width - 60,\n levelBlock.getHitbox().y - beaconA.getUnscaledHeight());\n level.addChild(beaconA);\n\n beaconB.moveTo(levelBlock2.getHitbox().x + levelBlock2.getHitbox().width - 125,\n levelBlock2.getHitbox().y - beaconA.getUnscaledHeight());\n level.addChild(beaconB);\n\n entrance.moveTo(10, 400 - entrance.getUnscaledHeight() * entrance.getGlobalScaleY());\n entrance.setAlpha((float) 0.4);\n level.addChild(entrance);\n\n exit.setAlpha((float) 0.4);\n exit.moveTo(800 - exit.getUnscaledWidth() * exit.getGlobalScaleX() - 20,\n 400 - entrance.getUnscaledHeight() * entrance.getGlobalScaleY());\n level.addChild(exit);\n\n echoes.addChild(echoA);\n echoes.addChild(echoB);\n }", "protected void incrementNesting() {\n m_nestingDepth++;\n }", "protected void setCellCount(int count) {\n this.cellCountStack.addLast(count);\n }", "void addCell(CellID cid, CellID parent){\n db.addCell(cid,parent);\n }", "@Override\n\tdouble updateLevel() {\n\t\treturn 0;\n\t}", "public void addNB(Cell cell, int pos) {\n\t\t//\tSystem.out.println(\"cell number \"+cell.number+\" added at pos \"+pos+\", for cell \"+number);\n\t\tneighbours[pos] = cell;\n\t\tif(cell.isBomb()) {\n\t\t\tvalue++;\n\t\t}\n\t}", "private void split(){\n // Slice horizontaly to get sub nodes width\n float subWidth = this.getBounds().width / 2;\n // Slice vertically to get sub nodes height\n float subHeight = this.getBounds().height / 2;\n float x = this.getBounds().x;\n float y = this.getBounds().y;\n int newLevel = this.level + 1;\n\n // Create the 4 nodes\n this.getNodes().add(0, new QuadTree(newLevel, new Rectangle(x + subWidth, y, subWidth, subHeight)));\n this.getNodes().add(1, new QuadTree(newLevel, new Rectangle(x, y, subWidth, subHeight)));\n this.getNodes().add(2, new QuadTree(newLevel, new Rectangle(x, y + subHeight, subWidth, subHeight)));\n this.getNodes().add(3, new QuadTree(newLevel, new Rectangle(x + subWidth, y + subHeight, subWidth, subHeight)));\n\n }", "public void putLevel(long csrc, int level)\n {\n //copy the levels matrix so that no one pulls it from under our feet.\n long[][] levelsRef = levels;\n int csrcIndex = findCSRC(levelsRef, csrc);\n\n if (csrcIndex == -1)\n {\n //we don't have the csrc in there yet so we need a new row.\n levels = appendCSRCToMatrix(levelsRef, csrc, level);\n }\n else\n {\n levelsRef[csrcIndex][1] = level;\n }\n }", "public void setItemLevel(int level) { this.level = level; }", "private void addColumn() {\n for (int j = 0; j < gridHeight; j++) {\n EscapeBlock block = new EscapeBlock(gridWidth,j);\n block.setLocation(margin + gridWidth * (Block.length+1) ,\n margin + topMargin + j * (Block.length+1)); \n this.add(block);\n grid.get(j).add(block);\n }\n gridWidth++;\n }", "public int getLevelNo() {\n return levelNo;\n }", "public void setNextLevel(Level level){\r\n this.currentLevel.setNextLevel(level);\r\n }", "private static void addToNested(List<FoldRegionImpl> nested, @NotNull FoldRegionImpl region) {\n for (int i=nested.size();i>=0;i--) {\n FoldRegion prev = i==0 ? null : nested.get(i - 1);\n if (prev == null ||\n TextRange.containsRange(prev, region) && (!TextRange.containsRange(region, prev) || prev.isExpanded() || !region.isExpanded())) {\n nested.add(i,region);\n break;\n }\n }\n }", "private void add(){\n if((cells[pointer]&0xff) >= 255){\n cells[pointer] = 0;\n } else {\n cells[pointer]++;\n }\n }", "@Test\n public void testNumberBlock() {\n IntStream.iterate(0, i -> i + 1).limit(LevelImpl.LEVEL_MAX).forEach(k -> {\n terrain = terrainFactory.create(level.getBlocksNumber());\n assertTrue(terrain.getBlocks().size() <= level.getBlocksNumber());\n level.levelUp();\n });\n }", "public void grow(Grid[][] map) {\n\t\tBranchNode parent = root;\r\n\t\twhile (parent.children.size() > 0) {\r\n\t\t\tif (parent.children.size() >= max_branch_per_node) {\r\n\t\t\t\t// if no more room at this branch\r\n\t\t\t\tparent = parent.children\r\n\t\t\t\t\t\t.get((int) (Math.random() * parent.children.size()));\r\n\t\t\t} else if (Math.random() < 0.5) {\r\n\t\t\t\t// if there is still room, picks randomly\r\n\t\t\t\tparent = parent.children\r\n\t\t\t\t\t\t.get((int) (Math.random() * parent.children.size()));\r\n\t\t\t} else {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tint newX, newY; // X and Y coordinates for the new node.\r\n\t\tint r = (int) (Math.random() * GENE_TOTAL);\r\n\t\tint gene_count = width_gene[0];\r\n\t\tint width_select = 0;\r\n\t\twhile (r > gene_count) {\r\n\t\t\twidth_select += 1;\r\n\t\t\tgene_count += width_gene[width_select];\r\n\t\t}\r\n\t\tr = (int) (Math.random() * WIDTH_VARIATION);\r\n\t\tnewX = parent.x - WIDTH_VARIATION / 2 + (width_select - 2)\r\n\t\t\t\t* WIDTH_VARIATION + r;\r\n\t\tif (newX < 0) {// if goes off the grid, push back.\r\n\t\t\tnewX = 0;\r\n\t\t} else if (newX >= World.WORLD_WIDTH) {\r\n\t\t\tnewX = World.WORLD_WIDTH - 1;\r\n\t\t}\r\n\r\n\t\tr = (int) (Math.random() * GENE_TOTAL);\r\n\t\tgene_count = height_gene[0];\r\n\t\tint height_select = 0;\r\n\t\twhile (r > gene_count) {\r\n\t\t\theight_select += 1;\r\n\t\t\tgene_count += height_gene[height_select];\r\n\t\t}\r\n\t\tr = (int) (Math.random() * HEIGHT_VARIATION);\r\n\t\tnewY = parent.y + height_select * HEIGHT_VARIATION + r;\r\n\t\tif (newY >= World.WORLD_HEIGHT) {\r\n\t\t\tnewY = World.WORLD_HEIGHT - 1;\r\n\t\t}\r\n\r\n\t\t// add the branch to the total body.\r\n\t\tamount_of_tree += (int) Math.sqrt((newX - parent.x) * (newX - parent.x)\r\n\t\t\t\t+ (newY - parent.y) * (newY - parent.y));\r\n\t\tBranchNode child = new BranchNode(parent, newX, newY);\r\n\t\tparent.children.add(child);\r\n\r\n\t\tif (parent.leaf_alive) {\r\n\t\t\t// kill leaf, because branch is growing off of it\r\n\t\t\tparent.killLeaf(this, map);\r\n\t\t}\r\n\r\n\t\t// make new leaf on new branch\r\n\t\tchild.addLeaf(this, map);\r\n\t}", "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 int getCurLevel();", "private void generateLevel() {\n\t\tgenerateBorder();\n\t\tfor (int y = 1; y < height - 1; y++) {\n\t\t\tfor (int x = 1; x < height - 1; x++) {\n\t\t\t\tif (random.nextInt(2) == 1) {\n\t\t\t\t\ttiles[x + y * width] = new Tile(Sprite.getGrass(), false, x, y);\n\t\t\t\t\trandForest(x, y);\n\t\t\t\t} else {\n\t\t\t\t\ttiles[x + y * width] = new Tile(Sprite.getDirt(), false, x, y);\n\t\t\t\t\trandOre(x, y);\n\t\t\t\t}\n\t\t\t\tif (x == 4 && y == 4) {\n\t\t\t\t\ttiles[x + y * width] = new Tile(Sprite.getGrass(), false, x, y);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "@Override\n\tpublic int getLevelNumber() {\n\t\treturn numLevel;\n\t}", "public void setDataLevel(int dataLevel);", "@Override public int getBlockIncrement(int dir)\n{\n BicexEvaluationContext ctx = for_bubble.getExecution().getCurrentContext();\n if (ctx != null) {\n BicexValue bv = ctx.getValues().get(\"*LINE*\");\n List<Integer> times = bv.getTimeChanges();\n long now = for_bubble.getExecution().getCurrentTime();\n long prev = -1;\n long next = -1;\n long cur = -1;\n for (Integer t : times) {\n\t if (t <= now) {\n\t prev = cur;\n\t cur = t;\n\t }\n\t else if (next < 0) {\n\t next = t;\n\t break;\n\t }\n }\n\n if (dir < 0 && prev > 0) {\n\t return (int) (now-prev);\n }\n else if (dir > 0 && next > 0) {\n\t return (int) (next-now);\n }\n }\n\n return super.getBlockIncrement(dir);\n}", "public static void changeLevel(int Rs, int Cs, int level, int[][] original){\n cowGrid = new int[3][3];\n max = 0;\n\n //Finds the max number in the 3x3 grid.\n for (int i = 0; i < 3; i++){\n for (int j = 0; j < 3; j++){\n if (max < original[Rs + i][Cs + j]){\n max = original[Rs + i][Cs + j];\n }\n }\n }\n\n //Changes the depth of the grid.\n for (int i = 0; i < 3; i++){\n for (int j = 0; j < 3; j++){\n if (max - original[Rs + i][Cs + j] <= level){\n original[Rs + i][Cs + j] = max - level;\n }\n }\n }\n }", "public void createLevel() {\n room = 1;\n currentLevelFinish = false;\n createRoom();\n }", "public void increaseNestingLevel() {\n\t\tthis.nestingLevel++;\n\t\tthis.resolvableType = null;\n\t\tif (this.methodParameter != null) {\n\t\t\tthis.methodParameter = this.methodParameter.nested();\n\t\t}\n\t}", "public int getLevel() {\n\t\treturn 1 + this.iter / this.levelfk;\n\t}", "public static void rowPlus() {\n\t\tnRow++;\n\t\tbuildBoard();\n\t\tfor (int c = 0; c < nCol; c++)\n\t\t\tboard[c][nRow - 1] = pItem.getItem(rnd[c][nRow - 1] = random.nextDouble());\n\t\tRightPanel.updateTextBoardInfo();\n\t}", "public void setLevel(int level) {\n if(level > Constant.MAX_LEVEL){\n this.level = Constant.MAX_LEVEL;\n }else {\n this.level = level;\n }\n this.expToLevelUp = this.expValues[this.level];\n }", "protected void setSectionLevel(int newLevel) {\n this.headingLevel = newLevel;\n }", "@Override\n public int getLevelNumber() {\n return 0;\n }", "private void addDownBlock(Position p, TETile te,\n int len, int leftWid, int rightWid) {\n int x = p.x;\n int y = p.y;\n for (int j = y; j > y - len; j -= 1) {\n for (int i = x - rightWid; i < x + leftWid + 1; i += 1) {\n world[i][j] = te;\n }\n }\n }", "public void levelOrder(Node node){\n\t\tArrayList<Node> queue = new ArrayList<Node>();\n\t\t\n\t\tif(node==nil){\n\t\t\treturn;\n\t\t}\n\t\tif(node != nil){\n\t\t\tqueue.add(node);\n\t\t}\n\t\t\n\t\twhile(!queue.isEmpty()){\n\t\t\tNode temp = (Node)queue.get(0);\n\t\t\tSystem.out.println(\" ID: \" + temp.id + \" Count: \" + temp.count + \" Colour: \" + temp.colour);\n\t\t\tqueue.remove(0);\n\t\t\tif(temp.left != nil){\n\t\t\t\tqueue.add(temp.left);\n\t\t\t}\n\t\t\tif(temp.right != nil){\n\t\t\t\tqueue.add(temp.right);\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public void add(NestedInteger ni){}", "public void addBlock(int row, int col, Block block, GameplayState gps) {\n if (row < 4) {\n gps.setGameIsLost(true);\n }\n\n cells[row][col] = block;\n }", "private void addBlock(Block one)\n\t{\n\t\tgetChildren().add(one);\n\t\tblocks1.add(one);\n\t\tblocks2.add(one);\n\t}", "public void startNextLevel() {\n if (getLevel() < 3) {\n setLevel(getLevel() + 1);\n startGame();\n }\n }", "public void growCellAt(int row, int col) {\n\t\t// Complete this method\n\t\tgameGrid[row][col] = 1;\n\t}", "public Builder addBlockNums(int value) {\n ensureBlockNumsIsMutable();\n blockNums_.add(value);\n onChanged();\n return this;\n }", "public Builder addBlockNums(int value) {\n ensureBlockNumsIsMutable();\n blockNums_.add(value);\n onChanged();\n return this;\n }", "public void setLevel(String newLevel) {\n level = newLevel;\n }", "public void goNextLevel(){\r\n setCurrentLevel(currentLevel.getNextLevel());\r\n }", "public int getLevel()\r\n {\r\n return level;\r\n }", "public void incrementLayer () {\n layer++;\n }", "public int getLevel() {\r\n return level;\r\n }", "Update withLevel(LockLevel level);", "private void levelUp() {\n\t\t\n\t\tfor (ArrayList<Invader> row : enemyArray) {\n\t\t\tfor (Invader a : row) {\n\t\t\t\tif (a.getVisibility()) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tresetInvaders();\n\t\taddRow();\n\t\t\n\t\tenemyShotList.add(new Shot(0, 0, SHOT_WIDTH, SHOT_HEIGHT, 15));\n\t\tlevel++;\n\t\t\n\t\tint powerupx = (int) (Math.random()*(WIDTH-PLAYER_WIDTH));\n\t\tdouble poweruprandom = Math.random();\n\t\t\n\t\tif (poweruprandom < 0.25) {\n\t\t\tarmorPiercing.reset(powerupx);\n\t\t}\n\t\t\n\t\tif (poweruprandom >= 0.25 && poweruprandom < 0.5) {\n\t\t\texplosive.reset(powerupx);\n\t\t}\n\t}", "public void update() {\n\t\tif (this.block.getValue() != 0) {\n\t\t\tthis.displayNumberBlock.removeAll();\n\t\t\tthis.displayNumberBlock.setLayout(new GridLayout(1,1));\n\t\t\tthis.label = new JLabel(\"\" + this.block.getValue(), SwingConstants.CENTER);\n\t\t\tthis.label.setFont(new Font(\"Serif\", Font.PLAIN, 25));\n\t\t\tthis.displayNumberBlock.add(this.label, BorderLayout.CENTER);\n\t\t\t\n\t\t\tthis.displayNumberBlock.revalidate();\n\t\t} else {\n\t\t\tthis.displayNumberBlock.removeAll();\n\t\t\tthis.displayNumberBlock.setLayout(new GridLayout(3,3));\n\t\t\t\n\t\t\tfor(int i = 0; i < SudokuPanel.gameSize; i++){\n\t\t\t\tString temp = \"\";\n\t\t\t\tif(this.getBlock().getNotes()[i]){\n\t\t\t\t\ttemp = \"\" + (i+1);\n\t\t\t\t}\n\t\t\t\tJLabel tempLabel = new JLabel(temp);\n\t\t\t\ttempLabel.setFont(new Font(\"Serif\", Font.PLAIN, 10));\n\t\t\t\tthis.displayNumberBlock.add(tempLabel);\n\t\t\t}\n\t\t\tthis.displayNumberBlock.revalidate();\n\t\t}\n\t}", "public void addNodeToLastInsertedNode(Node node, int level) throws NoPreviousInsertedNodeException, LevelException {\n\t\tNode currentNode = this.lastInsertedNodes.get(level - 1);\n\n\t\tif(currentNode == null)\n\t\t\tthrow new NullPointerException(\"NoPreviousInsertedNodeException\");\n\n\t\tif (!(currentNode instanceof Folder)){\n\t\t\tthrow new NullPointerException(\"Last inserted is not a folder\");\n\t\t}\n\n\t\t//Update the swing view first because it will send the needed exceptions\n\t\tesv.addNodeToLastInsertedNode(node, level);\n\n\t\t//Update internal representation of tree\n\t\tFolder parent = (Folder)currentNode;\n\t\tparent.addChild(node);\n\t\tnode.setParent(parent);\n\n\t\t//Update lastInserted HashMap\n\t\tthis.lastInsertedNodes.put(level, node);\n\t}", "public void loadLevel(int level) {\n if (level == 0) {\n return;\n }\n if (this.levels[level] == null) {\n this.elevatorLevelsUnlocked = Math.max(this.elevatorLevelsUnlocked,\n (int)((level-1)/5.0));\n \n this.levels[level] = new MineLevel.Builder(level).buildLevel(this);\n }\n Iterator<Gateway> gateways = this.levels[level-1].getGateways();\n Gateway nextGateway;\n while (gateways.hasNext()) {\n nextGateway = gateways.next();\n if (nextGateway.getDestinationGateway() == null) {\n nextGateway.setDestinationArea(this.levels[level]);\n nextGateway.setDestinationGateway(this.levels[level].getEntranceGateway());\n }\n }\n }", "public void addCell(Cell cell) {\r\n int cellNum = cells.size() + 1;\r\n cell.updateCellNum(cellNum);\r\n cells.add(cell);\r\n }", "void addLevel(Level level) {\r\n\t\tif (level != null) {\r\n\t\t\tlevelList.addItem(level.toString());\r\n\t\t}\r\n\t}", "boolean nextLevel() {\r\n\t\treturn this.ship.getRow() == 0 && this.ship.getCol() == this.board.getDimCol() - 1;\r\n\t}", "private int getLevel(String nextLine){\n\t\t Matcher matcher = plusminus.matcher(nextLine);\n\t\t if(matcher.find())\n\t\t \treturn matcher.start()+1;\n\t\telse return 0;\n\t\t\n\t}", "void updateBoard(@TTTConstants.Sign int sign, int row, int column) {\n board[row][column] = sign;\n depth++;\n }", "protected void setLevel(int level){\r\n this.level = level;\r\n }", "private void applyLvlUpCost() {\n }", "public int getLevel(){\n return level;\n }", "public int getLevel(){\n return level;\n }", "public abstract GF2nElement increase();", "int getLevel();", "int getLevel();", "int getLevel();", "int getLevel();", "int getLevel();", "public void addCell(TCell cell) {\n\tcell.Owner = this;\n\tcolorize(cell);\n\tCells.add(cell);\n }" ]
[ "0.6676774", "0.6338545", "0.63133335", "0.6236465", "0.60777956", "0.60587335", "0.5996705", "0.59908766", "0.59689504", "0.59299165", "0.5892432", "0.5851462", "0.58231765", "0.5781896", "0.574824", "0.57089776", "0.57083315", "0.5685739", "0.56260455", "0.56089085", "0.56046313", "0.5586892", "0.55856764", "0.5585515", "0.5581489", "0.55696946", "0.5564767", "0.554019", "0.55285674", "0.54786944", "0.5474975", "0.54597014", "0.5440187", "0.5422547", "0.5413318", "0.54129076", "0.5402061", "0.5388191", "0.53736174", "0.53632367", "0.5302592", "0.52998465", "0.5280302", "0.52754545", "0.52678895", "0.52517927", "0.524808", "0.5245864", "0.52415854", "0.52397853", "0.5237839", "0.5227671", "0.52273613", "0.52268946", "0.5224153", "0.5215505", "0.52138555", "0.52115583", "0.52101064", "0.52057415", "0.51966536", "0.51944005", "0.5187451", "0.5183873", "0.5183016", "0.5178097", "0.51669884", "0.51564974", "0.5151533", "0.51488847", "0.51455545", "0.5144269", "0.5133125", "0.5133125", "0.5126231", "0.51171863", "0.5114532", "0.5113757", "0.5112826", "0.50932443", "0.5090707", "0.5090244", "0.5088499", "0.5083183", "0.5081972", "0.5076461", "0.50723934", "0.5072186", "0.50713754", "0.5068944", "0.5065516", "0.50647306", "0.50647306", "0.50646806", "0.50593966", "0.50593966", "0.50593966", "0.50593966", "0.50593966", "0.5056635" ]
0.6595286
1
add dome in this cell
public void buildDome() { if (this.getLevel() == 3) { buildInCell(); } else { this.dome = true; this.setFreeSpace(false); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addCell(TCell cell) {\n\tcell.Owner = this;\n\tcolorize(cell);\n\tCells.add(cell);\n }", "void piede() {\n try {\n\n Cell c;\n c = new Cell();\n set2(c);\n c.setColspan(4);\n datatable.addCell(c);\n c = new Cell(new Phrase(\"Totale \\u20ac \" + Db.formatValuta(totale), new Font(Font.HELVETICA, 8, Font.BOLD)));\n set2(c);\n c.setColspan(2);\n c.setHorizontalAlignment(c.ALIGN_RIGHT);\n datatable.addCell(c);\n document.add(datatable);\n } catch (Exception err) {\n err.printStackTrace();\n javax.swing.JOptionPane.showMessageDialog(null, err.toString());\n }\n }", "void addCellContent(Cell cell, String content);", "public void addCell(Cell cell) \n {\n cells.add(cell);\n }", "public void addCell(Cell cell) {\r\n int cellNum = cells.size() + 1;\r\n cell.updateCellNum(cellNum);\r\n cells.add(cell);\r\n }", "protected void addCell(Cell cell) {\n cells[size] = cell;\n ++size;\n }", "void addCell(CellID cid, CellID parent){\n db.addCell(cid,parent);\n }", "@Override\n\tpublic void add(double dx, double dy) {\n\t\t\n\t}", "public void addColumn(PdfPCell cell)\n {\n table.addCell(cell);\n }", "public void addCell(CIntentionCell cell)\n\t{\n\t\tcells.put(cell.getId(), cell);\n\t\tcellsByCanvasId.put(cell.getCanvasId(), cell);\n\n\t\tCalicoInputManager.addCustomInputHandler(cell.getId(), CIntentionCellInputHandler.getInstance());\n\t}", "public abstract void add(final double col, final double row, final Character.Type type) throws Exception;", "void insert(VRpDyCellBh record);", "private void addCell( String value ) {\n if ( readCol++ == 0 ) {\n rows.add( new ArrayList( ncol ) );\n }\n ((List) rows.get( rows.size() - 1 )).add( value );\n }", "@Override\n\tpublic int insert(Cell record) {\n\t\treturn 0;\n\t}", "private void addDoor(Door door) {\n doors.add(door);\n }", "public abstract Cell createDataCell() throws DailyFollowUpException;", "public void addRow(Spedizione spedizione){\n spedizioni.add(spedizione);\n fireTableChanged(new TableModelEvent(this));\n }", "public void addDado(Dado dado) throws SQLException,AziendaException {\n\t\tAdminQuery aq = ProxyDB.getIstance();\n\t\taq.addDado(utente.getUsername(),dado);\n\t}", "public void add(DefaultGraphCell node) {\n nodes.add(node);\n groupObject.add(node);\n fragmentName.append(((NodeData)node.getUserObject()).getName() + \" \");\n \n }", "public void addField()\n {\n DefaultMutableTreeNode node = (DefaultMutableTreeNode) availableFieldsComp.getTree().getLastSelectedPathComponent();\n if (node == null || !node.isLeaf() || !(node.getUserObject() instanceof DataObjDataFieldWrapper) )\n {\n return; // not really a field that can be added, just empty or a string\n }\n\n Object obj = node.getUserObject();\n if (obj instanceof DataObjDataFieldWrapper)\n {\n DataObjDataFieldWrapper wrapper = (DataObjDataFieldWrapper) obj;\n String sep = sepText.getText();\n if (StringUtils.isNotEmpty(sep))\n {\n try\n {\n DefaultStyledDocument doc = (DefaultStyledDocument) formatEditor.getStyledDocument();\n if (doc.getLength() > 0)\n {\n doc.insertString(doc.getLength(), sep, null);\n }\n }\n catch (BadLocationException ble) {}\n \n }\n insertFieldIntoTextEditor(wrapper);\n setHasChanged(true);\n }\n }", "private void insertCell(PdfPTable table, String text, int align, int colspan, Font font) {\n PdfPCell cell = new PdfPCell(new Phrase(text.trim(), font));\r\n //set the cell alignment\r\n cell.setHorizontalAlignment(align);\r\n //set the cell column span in case you want to merge two or more cells\r\n cell.setColspan(colspan);\r\n //in case there is no text and you wan to create an empty row\r\n if (text.trim().equalsIgnoreCase(\"\")) {\r\n cell.setMinimumHeight(10f);\r\n }\r\n //add the call to the table\r\n table.addCell(cell);\r\n\r\n }", "private String addIDatentraegerNew(List<Datentraeger> list) {\n\t\tString iD = \"\";\n\t\tfor( int i = 0 ; i < list.size(); i++ ){\n\t\t\tif( i == list.size() - 1 ){\n\t\t\t\tiD = iD + list.get( i ).iD;\n\n\t\t\t}\n\t\t\telse{\n\t\t\t\tiD = iD + list.get( i ).iD + DEFAULT_DELIMMTER;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn iD;\n\t}", "private void add() {\n\n\t}", "public void updateDataCell();", "public void onclick_add(MouseEvent mouseEvent) {\n\t\tUifEditCmd cmd = new UifEditCmd(\"ssoView\",DialogConstant.DEFAULT_WIDTH, DialogConstant.SIX_ELE_HEIGHT);\n\t\tAppLifeCycleContext.current().getWindowContext().addAppAttribute(\"operate\", \"add\");\n\t\tcmd.execute();\n//\t\tRow row = ds.getEmptyRow();\n//\t\tds.addRow(row);\n//\t\tds.setRowSelectIndex(ds.getRowIndex(row));\n//\t\tds.setEnabled(true);\n//\t\tnew UifUpdateOperatorState(ds, AppLifeCycleContext.current().getViewContext().getView()).execute();\n\t}", "private void insertCell(PdfPTable table, String text, int align, int colspan, Font font){\n\t\t PdfPCell cell = new PdfPCell(new Phrase(text.trim(), font));\n\t\t //set the cell alignment\n\t\t cell.setHorizontalAlignment(align);\n\t\t //set the cell column span in case you want to merge two or more cells\n\t\t cell.setColspan(colspan);\n\t\t //in case there is no text and you wan to create an empty row\n\t\t if(text.trim().equalsIgnoreCase(\"\")){\n\t\t cell.setMinimumHeight(10f);\n\t\t }\n\t\t //add the call to the table\n\t\t table.addCell(cell);\t \n\t}", "public void addToDoEntry(String toDoItem) {\n\t\t// adds a new item at the end of the list\n\t\ttoDoList.add(new ToDoEntry(toDoItem));\n\t}", "public void addAdj(BoardCell adj) {\n\t\tadjList.add(adj);\t\t\t\t\t\t\t\t\t\t\t\t\t\t// adding the cell to the adjacency set\n\t}", "@Override\n\tpublic void agregar(Alumno alumno) {\n\t\tcomision.add(alumno);\n\t}", "private void insertCell(\n PdfPTable table,\n String text,\n int align,\n int colspan,\n Font font\n ){\n PdfPCell cell = new PdfPCell(new Phrase(text.trim(), font));\n //set the cell aligment\n cell.setHorizontalAlignment(align);\n //set the cell column span in case you want to merge two or more cell\n cell.setColspan(colspan);\n //in case if you want \n if(text.trim().equalsIgnoreCase(\"\")){\n cell.setMinimumHeight(10f);\n }\n \n table.addCell(cell);\n }", "public void setAdd(List addDsData) {\n this.addDsData = addDsData;\n }", "public void add(String[] row) {\r\n\t\tthis.df.add(row);\r\n\t}", "public void addDField(String d){\n\t\tdfield.add(d);\n\t}", "public void addItem(Days day)\n {\n // set a bunch of different values for different columes (list of values)\n ContentValues values = new ContentValues();\n values.put(Constants.DAY_NAME, day.getDays());\n values.put(Constants.Main_Assignment_NAME, day.getMainAssignment());\n SQLiteDatabase sqLiteDatabase = getWritableDatabase(); // database we writing too\n sqLiteDatabase.insert(Constants.TABLE_NAME,null,values);//Table,null,values (inserts new row)\n sqLiteDatabase.close();\n }", "public void addObject(DcObject dco);", "@Override\n public void add(T d) {\n Node<T> newNode = new Node<>(d);\n //2. Modificar el siguiente del nuevo nodo(cabeza)\n newNode.setNextNode(head);\n //3. Cambiar la cabeza de la lista(nuevo nodo)\n head = newNode;\n cont++;\n }", "public BTreeNode<E> add(E d) {\n\t\tint index = findInsertPos(d);\n\t\tdata.add(index, d);\n\n\t\tif(isOverflow()) {\n\t\t\treturn split();\n\t\t}\n\t\telse {\n\t\t\treturn null;\n\t\t}\n\t}", "public void add(String data) {\n columns.add(data);\n }", "void addCell(CellID cid){\n if(db == null){\n logger.log(Level.SEVERE, \"warning: backend not initialized in addCell!\");\n }\n db.addCell(cid);\n }", "public void addToEnd1(CDominoes newDomino){\n dominoes.add(0, newDomino);\n \n \n }", "public DNode<E> addBeg(E ele)\n {\n\n \tDNode<E> p=new DNode<E>(ele);\n if(first==null)\t\t\t//No elements in the list\n first=last=p;\n else\t\t\t//Updating the first pointer\n {\n p.next=first;\n first.prev=p;\n first=p;\n }\n return first;\n }", "public void add() {\n\t\t\n\t}", "public void addend(int dato) {\n //agrega nuevo nodo \n NodoEnteroSimple nodo = new NodoEnteroSimple();\n\n nodo.setValor(dato);\n\n if (vacia()) {\n\n head = nodo;\n } else {\n //un temporal de la lista \n NodoEnteroSimple temp = head;\n\n while (temp.getSiguiente() != null) {\n temp = temp.getSiguiente();\n\n }\n temp.getSiguiente();\n }\n size++;\n }", "@Override\r\n\tpublic void addMe() {\n\t\t\r\n\t}", "public void addCD(CD cd){\n\t\tthis.cd.add(cd);\n\t}", "public void addToJD(double x) {\n if (this.jd + x < eph.endJD)\r\n this.jd += x; \r\n \r\n // Adjust the displayed data.\r\n message = String.format(\"JD = %.2f\",jd);\r\n }", "private void insertCell(PdfPTable table,String text,int align,int colspan,Font font){\r\n \r\n PdfPCell cell = new PdfPCell(new Phrase(text.trim(),font));\r\n cell.setHorizontalAlignment(align);\r\n cell.setColspan(colspan);\r\n if (text.trim().equalsIgnoreCase(\"\")) {\r\n cell.setMinimumHeight(10f);\r\n }\r\n table.addCell(cell);\r\n }", "public String addToDo(String name) {\n USER_TASKS.add(new ToDo(name));\n return \" \" + USER_TASKS.get(USER_TASKS.size() - 1).toString();\n }", "public long addNewValueToSQLite(String strDate, double douWeight) {\n ContentValues objContentValue = new ContentValues();\n objContentValue.put(COLUMN_DATE, strDate);\n objContentValue.put(COLUMN_WEIGHT, douWeight);\n\n\n return writeSQLite.insert(TABLE_WEIGHT, null, objContentValue);\n }", "public void add(DisplayItem d) {\n\t\tdisp.add(d);\n\t}", "@Override\n\tpublic Cell createCell()\n\t{\n\t\treturn derivedColumn.createCell();\n\t}", "@Override\n public void insert(J34SiscomexOrigemDi j34SiscomexOrigemDi) {\n super.doInsert(j34SiscomexOrigemDi);\n }", "private void cellAddingToTable(final PdfPTable pdfPTable, final PdfPCell cell, final int border\n , final int colSpan, final int pad) {\n cell.setPaddingLeft(pad);\n cell.setBorder(border);\n cell.setColspan(colSpan);\n pdfPTable.addCell(cell);\n }", "public void Add_date(String d)\n {\n\n date = new String(d);\t\n }", "@Override\n public void add(String name, ActionEvent<Event.CellEvent> event) {\n switch (name) {\n case \"enter\": enter.add(event);break;\n case \"stay\": stay.add(event);break;\n case \"leave\": leave.add(event);break;\n }\n }", "public void add(Demographics d) {\n for(DemographicType demoType : DemographicType.values()) {\n //handle demographic population\n demographicPopulation.put(demoType, demographicPopulation.get(demoType) + d.getDemographicPopulation().get(demoType));\n }\n demVotes += d.demVotes;\n repVotes += d.repVotes;\n// System.out.println(\"\\t\\t\" + this);\n }", "public void insertIntoGraph(mxICell cell) {\n mxICell parent = cell.getParent();\n mxICell source = cell.getTerminal(true);\n mxICell target = cell.getTerminal(false);\n\n // Fixes possible inconsistencies during insert into graph\n cell.setTerminal(null, false);\n cell.setTerminal(null, true);\n cell.setParent(null);\n\n if (parent != null) {\n parent.insert(cell);\n }\n\n if (source != null) {\n source.insertEdge(cell, true);\n }\n\n if (target != null) {\n target.insertEdge(cell, false);\n }\n }", "public void add(gw_show gh) throws Exception {\n\t\tdao.add(gh);\n\n\t}", "public void add(final Double e) {\n data.add(e);\n }", "public abstract void addColumn(Column c);", "public void addRow() {\n tableModel.insertRow(this.getRowCount(), new String[]{});\n this.setModel(tableModel);\n\n }", "public org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle addNewSeCell()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle target = null;\n target = (org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle)get_store().add_element_user(SECELL$18);\n return target;\n }\n }", "public void addAtOffset(double dx, double dy) {\n\t\tGPoint prev = isEmpty() ? new GPoint(0, 0) : last();\n\t\tadd(prev.getX() + dx, prev.getY() + dy);\n\t}", "public void add(DNode node)\n\t{\n\t\tif(first==null)\n\t\t{\n\t\t\tfirst=node;\n\t\t\t//System.out.println(\"add first\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//System.out.println(\"add next\");\n\t\t\tDNode tem=first;\n\t\t\twhile(tem.nextDNode!=null)\n\t\t\t{\n\t\t\t\ttem=tem.nextDNode;\n\t\t\t}\n\t\t\ttem.nextDNode=node;\n\t\t}\n\t}", "private void addDotNode(DotNode dt) {\n dotNodes.add(dt);\n }", "private void add(int d) {\n Node newNode = new Node(d);\n if(null==head) {\n head = newNode;\n return;\n }\n\n Node tmp = head;\n while(null!=tmp.next) {\n tmp = tmp.next;\n }\n tmp.next = newNode;\n }", "public void add(GameObject go) {\r\n table[go.hashCode() % table.length].add(go);\r\n }", "public void addDiamond() {\r\n\t\tthis.diamondCount++;\r\n\t}", "void editCell(Coord coord, String string);", "public DataCell() {\n super();\n }", "private void addButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addButtonActionPerformed\n\n AttlistTableModel tm = (AttlistTableModel) attrTable.getModel();\n tm.addRow();\n int actualIndex = numRows() - 1;\n attrTable.getSelectionModel().setSelectionInterval(actualIndex, actualIndex);\n }", "private void addCom() {\n\n cons = new GridBagConstraints();\n cons.gridx = 0;\n cons.gridy = 0;\n cons.gridwidth = 1;\n cons.fill = GridBagConstraints.HORIZONTAL;\n panelFormulario.add(lbNome, cons);\n\n cons = new GridBagConstraints();\n cons.gridx = 1;\n cons.gridy = 0;\n cons.gridwidth = 2;\n cons.ipadx = 100;\n cons.fill = GridBagConstraints.HORIZONTAL;\n panelFormulario.add(txNome, cons);\n\n //------------------\n cons = new GridBagConstraints();\n cons.gridx = 0;\n cons.gridy = 1;\n cons.gridwidth = 1;\n cons.fill = GridBagConstraints.HORIZONTAL;\n panelFormulario.add(lbSenha, cons);\n\n cons = new GridBagConstraints();\n cons.gridx = 1;\n cons.gridy = 1;\n cons.gridwidth = 2;\n cons.ipadx = 100;\n cons.fill = GridBagConstraints.HORIZONTAL;\n panelFormulario.add(txSenha, cons);\n\n super.add(panelFormulario);\n\n }", "public void addDie(Die die) {\n\t\tDiceGroup diceGroup = dice.get(die.getSize());\r\n\t\tif(diceGroup!=null)\r\n\t\t\tdiceGroup.addDie(die);\r\n\t\telse {\r\n\t\t\tdiceGroup = new DiceGroup(die.getSize());\r\n\t\t\tdiceGroup.addDie(die);\r\n\t\t\tdice.put( die.getSize(), diceGroup );\r\n\t\t}\r\n\t}", "public void addIng(String name, double qte, Date day, String measure){\n\t\t\tSystem.out.println(\"You added: \"+name);\n\t\t\tif(ingmap.containsKey(name)) {\n\t\t\t\tdouble aux = this.checkMeasurement(qte, measure, name); //this is corrected quantity if conversion is necessary\n\t\t\t\tingmap.get(name).addEntry(aux, day, this.idGen);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tIngList aux = new IngList(measure); //creates new ingredient list for that specific ingredient\n\t\t\t\taux.addEntry(qte, day, this.idGen); //since the list is new there's no need for object conversion\n\t\t\t\tingmap.put(name, aux);\n\t\t\t}\n\t\t\tthis.idGen+=1;\n\t\t}", "public void addJogador(Jogador j) {\n\t\tjogadores.add(j);\n\t\t//adicionar o time no jogador\n\t\tj.setTime(this);\n\t\t\n\t}", "public void add(Object o) {\n\t\tDNode n = new DNode(o);\r\n\t\theader.setCount(header.getCount()+1);\r\n\r\n\t\tif(header.getFirst() == null) { // Empty list\r\n\t\t\theader.setFirst(n);\r\n\t\t\theader.setLast(n);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tDNode current = header.getLast(); // pointing now to the last element\r\n\t\t\tcurrent.setNext(n);\r\n\t\t\tn.setPrev(current);\r\n\t\t\theader.setLast(n);\r\n\t\t}\r\n\t}", "void addData();", "public org.hl7.fhir.MedicationStatementDosage addNewDosage()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.hl7.fhir.MedicationStatementDosage target = null;\n target = (org.hl7.fhir.MedicationStatementDosage)get_store().add_element_user(DOSAGE$14);\n return target;\n }\n }", "public void append(Money d) {\r\n // TODO Code here for append\r\n // Step 1: create the new node with data d\r\n MoneyNode newNode = new MoneyNode(d);\r\n\r\n // Step 2: Append after the last node; make last node point to new node\r\n last.next = newNode;\r\n\r\n // Step 3: update, increase length\r\n last = newNode;\r\n length++;\r\n\r\n // Step 4: check the empty linked list manually, no code, just trace\r\n }", "public void add(DiaryCalendarEvent event){\n this.dates.add(new CalendarDay(event.getYear(),event.getMonth(),event.getDay()));\n }", "protected void addDay(Date date) throws Exception {\n Calendar cal = DateHelper.newCalendarUTC();\n cal.setTime(date);\n String datecode = cal.get(Calendar.YEAR) + \"-\" + (cal.get(Calendar.MONTH) + 1) + \"-\" + cal.get(Calendar.DAY_OF_MONTH);\n affectedDays.put(datecode, date);\n Date rDate = DateHelper.roundDownLocal(date);\n datesTodo.add(rDate);\n }", "private void addData() {\n Details d1 = new Details(\"Arpitha\", \"+91-9448907664\", \"25/05/1997\");\n Details d2 = new Details(\"Abhijith\", \"+91-993602342\", \"05/10/1992\");\n details.add(d1);\n details.add(d2);\n }", "public void addToEnd2(CDominoes newDomino){\n dominoes.add(newDomino);\n \n \n }", "public void addNewIDtoCells() {\n\t\t//Get iterator to all the rows in current sheet\n\t\tIterator<Row> rowIteratorA = cells.iterator();\n\t\t\n\t\trowIteratorA.next();//Ignore the column names. We actually know it.\n\t\tRow row = null;\n\t\tint previousValue = -1;\n\t\tdouble key = -1;\n\t\t//For each row we will read the info. 12\n\t\twhile(rowIteratorA.hasNext()){\n\t\t\trow = rowIteratorA.next();\n\t\t\tdouble currentValue = Math.round(row.getCell(CELLQUERY).getNumericCellValue()*100)/100;\n\t\t\t//System.out.println(i++);\n\t\t\tif(currentValue!=previousValue){\n\t\t\t\tif(table.containsKey(currentValue))\n\t\t\t\t\tkey=table.get(currentValue);\n\t\t\t\telse\n\t\t\t\t\tkey=-1;\n\t\t\t}\n\t\t\trow.createCell(CELLKEY);\n\t\t\trow.getCell(CELLKEY).setCellValue(key);\n\t\t\tif(key==-1){\n\t\t\t\tSystem.err.println(\"Error: Value \"+currentValue+\" was not found in the matching table\");\n\t\t\t}\n\t\t}\n\t\tFileOutputStream dataFileOut;\n\t\ttry {\n\t\t\tdataFileOut = new FileOutputStream(\n\t\t\t\t\tcellsFile.getAbsolutePath().replace(\".xlsx\", \"out.xlsx\"));\n\t\t\t//System.out.println(dataFileOut+\" \"+cellsWorkbook);\n\t\t\t\n\t\t\tcellsWorkbook.write(dataFileOut);\n\t\t\tdataFileOut.flush();\n\t\t\tdataFileOut.close();\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}", "public void add(MyDouble val) {\n this.setValue(this.getValue() + val.getValue());\n }", "public void add(T e) {\n\t\tif(!this.isEmpty()) {\n\t\t\tsuper.put(e, new Duet<T>(last, null));\n\t\t\tthis.get(last).setLast(e);\n\t\t\tlast = e;\n\t\t} else {\n\t\t\tsuper.put(e, new Duet<T>(null, null));\n\t\t\tfirst = e;\n\t\t\tlast = e;\n\t\t}\n\t}", "@Override\n\tpublic void createCellStructure() {\n\t\t\n\t}", "public org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle addNewSwCell()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle target = null;\n target = (org.openxmlformats.schemas.drawingml.x2006.main.CTTablePartStyle)get_store().add_element_user(SWCELL$20);\n return target;\n }\n }", "void insertSelective(VRpDyCellBh record);", "public void addColumn(Double value)\n {\n if (value != null)\n {\n addColumn(getDetailCell(value.doubleValue()));\n }\n else\n {\n addColumn(getDetailCell(\"\", Element.ALIGN_LEFT));\n }\n }", "@Override\n\tpublic void add() {\n\t\t\n\t}", "private void addDishToList(String dsName, int amt, int dsPrice, String type) {\n int n, total;\n Map<String, Object> map = new HashMap<String, Object>();\n map.put(DNAME, dsName);\n if ((n = table.addDish(dsName, amt, dsPrice, type,\n vip.getPhone(), vip.getName())) > amt) {\n Map<String, Object> tm = new HashMap<String, Object>();\n tm.put(DNAME, dsName);\n tm.put(AMOUNT, n - amt);\n mList.remove(tm);\n map.put(AMOUNT, n);\n mList.add(map);\n } else {\n map.put(AMOUNT, amt);\n mList.add(map);\n }\n total = vip.getConsumption() + amt * dishes.get(dsName).getPrice();\n vip.setConsumption(total);\n payBtn.setText(PAY + RMB + String.valueOf(total));\n adapter.notifyDataSetChanged();\n listChanged = true;\n }", "private void addColumn() {\n for (int j = 0; j < gridHeight; j++) {\n EscapeBlock block = new EscapeBlock(gridWidth,j);\n block.setLocation(margin + gridWidth * (Block.length+1) ,\n margin + topMargin + j * (Block.length+1)); \n this.add(block);\n grid.get(j).add(block);\n }\n gridWidth++;\n }", "public void add(T e, T seat) {\n\t\tif (this.containsKey(seat) && this.get(seat).getLast() != null) {\n\t\t\tT next = this.get(seat).getLast();\n\t\t\tT prev = this.get(next).getFirst();\n\t\t\tthis.get(prev).setLast(e);\n\t\t\tthis.get(next).setFirst(e);\n\t\t\tsuper.put(e, new Duet<T>(prev, next));\n\t\t}\n\t\telse this.add(e);\n\t}", "public void addExpense(Expense exp) {\n ContentValues values = new ContentValues();\n SQLiteDatabase db = getWritableDatabase();\n\n values.put(COLUMN_NAME, exp.get_name());\n values.put(COLUMN_DATE, exp.get_date());\n db.insert(TABLE_EXPENSES, null, values);\n db.close();\n }", "public void addAddress(String Address, Coord coord);", "public void add() {\n }", "public void addCell(int row, int col, char value) {\n this.cells[row][col] = new Cell(value);\n }", "@Override\n\tpublic String addBills(String bilnumber, Date d, double bilcost) {\n\t\treturn this.b.addBills(bilnumber, d, bilcost)?\"插入成功\":\"插入失败\";\n\t}", "public void addDigit(int addMe){\n //Handle the case of user enter digits for the first time\n if (clearFlag){\n output.setText(\"\");\n }\n \n if (isLeft){\n left = (left*10) + addMe;\n output.setText(output.getText() + addMe);\n output.setToolTipText(\"\" + left);\n }\n else{\n right = (right*10) + addMe;\n output.setText(output.getText() + addMe);\n }\n }" ]
[ "0.6435759", "0.6327013", "0.62194836", "0.6179261", "0.5864257", "0.58203596", "0.58186305", "0.5806365", "0.5790173", "0.57239056", "0.5662209", "0.5563294", "0.55057", "0.5497894", "0.54852986", "0.54511845", "0.5449962", "0.5397301", "0.53568923", "0.5337944", "0.5320599", "0.5319404", "0.5308125", "0.52874786", "0.5279831", "0.52671576", "0.52656657", "0.5261151", "0.5253301", "0.52475786", "0.52381206", "0.5227173", "0.52239805", "0.52198243", "0.5199247", "0.519839", "0.5186418", "0.51834595", "0.5182073", "0.51610875", "0.515467", "0.5151001", "0.51480687", "0.5144081", "0.5142369", "0.51285565", "0.5115194", "0.5114863", "0.51139057", "0.5093743", "0.50849545", "0.5084462", "0.50840294", "0.5077216", "0.50677836", "0.5065142", "0.5051646", "0.50483584", "0.5040916", "0.5030247", "0.501875", "0.5018737", "0.50051594", "0.5002314", "0.50007355", "0.5000508", "0.5000469", "0.4999735", "0.49963263", "0.4992396", "0.4991778", "0.49830574", "0.49820384", "0.49783912", "0.4977258", "0.49762738", "0.49751642", "0.4974608", "0.49745446", "0.49619076", "0.49548918", "0.4953742", "0.4952198", "0.4948727", "0.49449635", "0.4943263", "0.49408478", "0.4935678", "0.49346513", "0.49340272", "0.4933035", "0.4928721", "0.4922777", "0.4916344", "0.49138668", "0.49114165", "0.49105746", "0.48968393", "0.4896061", "0.48954237" ]
0.5767411
9
It deletes worker pointer from a cell
public void deleteCurrWorker() { this.currWorker = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void deleteWerker(Worker w)\n {\n if(aantalWerkers > 0)\n {\n for(int i=0; i<5;i++)\n {\n if(workers[i] == w)\n {\n workers[i] = null;\n }\n }\n w.setInStructure(false);\n aantalWerkers--;\n }\n }", "public void localDeleteCell(long cellId)\n\t{\n\t\tCIntentionCell cell = cells.remove(cellId);\n\t\tcellsByCanvasId.remove(cell.getCanvasId());\n\t\tcell.delete();\n\n\t\tIntentionGraph.getInstance().repaint();\n\t}", "public void unsetSwCell()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(SWCELL$20, 0);\n }\n }", "void oracle(){\n if (this.neighbors < 1){\n if (!isAlive()){\n observer.deleteCell(id);\n }\n }\n }", "public void unsetNwCell()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(NWCELL$26, 0);\n }\n }", "public void unsetSeCell()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(SECELL$18, 0);\n }\n }", "public void delete() {\r\n\t\t\tif (!isDeleted && handles.remove(this)) {\r\n\t\t\t\telementsUsed -= count;\r\n\t\t\t\tisDeleted = true;\r\n\t\t\t\tif (elementsUsed < numElements / 4) {\r\n\t\t\t\t\tcompact();\r\n\t\t\t\t\tnumElements = Math.max(10, elementsUsed * 2);\r\n\t\t\t\t}\r\n\t\t\t\tshapePeer.vboHandle = null;\r\n\t\t\t}\r\n\t\t}", "@Override\n\tpublic void removeCell(Cell arg0) {\n\t\t\n\t}", "@Override\r\n\tpublic Jumper delete(Jumper jumper) {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic void delete(int work_num) {\n\t\tworkMapper.delete(work_num);\n\t\t\n\t}", "public void remove(){\n\t\tqueueArray[1][0] = null;\n\t\tqueueArray[1][1] = null;\n\t}", "public synchronized void delete() {\n if (this.swigCPtr != 0) {\n if (this.swigCMemOwn) {\n this.swigCMemOwn = false;\n libVisioMoveJNI.delete_VgIconMarkerConstRefPtr(this.swigCPtr);\n }\n this.swigCPtr = 0;\n }\n }", "public void removeThing(){\n thing = null;\n }", "public void unsetNeCell()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(NECELL$24, 0);\n }\n }", "public synchronized void removeThisWorker() {\n Listeler.removeWorker(this);\n }", "public synchronized void delete() {\n if (this.swigCPtr != 0) {\n if (this.swigCMemOwn) {\n this.swigCMemOwn = false;\n libVisioMoveJNI.delete_VgIconMarkerDescriptorRefPtr(this.swigCPtr);\n }\n this.swigCPtr = 0;\n }\n }", "public synchronized void delete() {\n if (this.swigCPtr != 0) {\n if (this.swigCMemOwn) {\n this.swigCMemOwn = false;\n libVisioMoveJNI.delete_VgIPlaceListenerConstRefPtr(this.swigCPtr);\n }\n this.swigCPtr = 0;\n }\n }", "public void removeCell(int index) {\r\n cells.remove(index);\r\n if(DEBUG) IJ.log(\"Cell \" + (index+1) + \" is gone. Now record has \" + size() + \" cells.\");\r\n }", "public abstract boolean killCell(Cell c);", "public native void deselectCell(CellRecord cell) /*-{\r\n var self = [email protected]::getOrCreateJsObj()();\r\n self.deselectCell([email protected]::getJsObj()());\r\n }-*/;", "public void delete() {\n\t\tmat_ = null;\n\t}", "@Override\n public void onDestroy() {\n Log.d(TAG, \" onDestroy\");\n super.onDestroy();\n\n cellListener.stop();\n\n taskQueue.stopQueue();\n taskQueue = null;\n }", "@Override\n\tpublic void deletRow(HongXunWorkNum hongXunWorkNum) {\n\t\tgetHibernateTemplate().delete(hongXunWorkNum);\n\t}", "public void delete()\n {\n if (this.data != null)\n {\n this.data.free();\n this.data = null;\n }\n \n this.width = 0;\n this.height = 0;\n \n this.mipmaps = 1;\n }", "private void delete() {\n\n\t}", "private void delete(ByteBuffer rowKey,\n Clustering<?> clustering,\n Cell<?> cell,\n WriteContext ctx,\n long nowInSec)\n {\n DecoratedKey valueKey = getIndexKeyFor(getIndexedValue(rowKey,\n clustering,\n cell));\n doDelete(valueKey,\n buildIndexClustering(rowKey, clustering, cell),\n DeletionTime.build(cell.timestamp(), nowInSec),\n ctx);\n }", "void clearCell(int x, int y);", "public void stopSweeper()\r\n\t{\r\n\t\tsynchronized (lock) {\r\n\t\t\tcache = null;\r\n\t\t\tlock.notify();\r\n\t\t}\r\n\t}", "public native void deselectCell(String cell) /*-{\r\n var self = [email protected]::getOrCreateJsObj()();\r\n self.deselectCell(cell);\r\n }-*/;", "public synchronized void delete() {\ncounter -= 1;\n}", "public synchronized void delPlayer(@NotNull PlayerInterface player) {\n\n for(BoardCell boardCell[] : board.getGrid()) {\n for(BoardCell b : boardCell) {\n if(b.getWorker() != null) {\n if(b.getWorker().getPlayerWorker().getNickname().equals(player.getNickname())) {\n b.setWorker(null);\n }\n }\n }\n }\n player.getWorkerRef().clear();\n for (int i = 0; i < onlinePlayers.size(); i++) {\n if(onlinePlayers.get(i).getNickname().equals(player.getNickname())) {\n if(started) {\n stateList.remove(i);\n onlinePlayers.remove(i);\n nickNames.remove(player.getNickname());\n }\n break;\n }\n }\n }", "@Override\n\tpublic void delete(DatabaseHandler db) {\n\t\tdb.deleteWork(this);\n\t\t\n\t}", "public void delete() {\n\t\tcp.delete();\n\t}", "public synchronized void delete() {\n if (this.swigCPtr != 0) {\n if (this.swigCMemOwn) {\n this.swigCMemOwn = false;\n libVisioMoveJNI.delete_VgIRouteGeometryDescriptor(this.swigCPtr);\n }\n this.swigCPtr = 0;\n }\n }", "public void unsetWholeTbl()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(WHOLETBL$2, 0);\n }\n }", "@Override\n\tpublic void deletRow(HongXunWorkItem hongXunWorkItem) {\n\t\tgetHibernateTemplate().delete(hongXunWorkItem);\n\t}", "@Override\n\t\tpublic void delete() {\n\n\t\t}", "public void clearCell( int index){\r\n boardCells[ index ].empty();\r\n }", "public synchronized void delete() {\n if (this.agpCptr != 0) {\n if (this.isAgpCmemOwn) {\n this.isAgpCmemOwn = false;\n CoreJni.deleteCoreRenderNodeDescArrayView(this.agpCptr);\n }\n this.agpCptr = 0;\n }\n }", "public Object delete() throws Exception {\n\t\tObject temp = data[front];\n\t\tdata[front]=null;\n\t\tfront =(front+1)%maxSize;\n\t\tcount--;\n\t\treturn temp;\n\t\t\n\t}", "public void eraseCell(CellID cid){\n db.eraseCell(cid);\n }", "public void removed()\n {\n if (prev == null) {\n IBSPColChecker.setNodeForShape(shape, next);\n }\n else {\n prev.next = next;\n }\n\n if (next != null) {\n next.prev = prev;\n }\n }", "@Override\n public void run() {\n addresses.remove(address);\n }", "public synchronized void removeTheWarrior(){\n charactersOccupiedTheLocation[0]=null;\n notifyAll();\n }", "public void delete(){\r\n\t\tblocks = null;\r\n\t\ttry {\r\n\t\t\tfinalize();\r\n\t\t} catch (Throwable e) {\t}\r\n\t}", "public BufferSlot remove();", "@Override\n\tpublic void deleteWorkout(int id) {\n\n\t}", "public void deleteInstance(){\n //cancels the runnable\n shouldCancelRunnable = true;\n //remove the chest from the map to avoid confusion\n this.location.getBlock().setType(Material.AIR);\n //unregister from all events, we're done!\n HandlerList.unregisterAll(this);\n }", "public void removeJob(int jNo);", "public void atExitOfWorker(Worker w, Model model)\n {\n w.setDistLastPheroDrop(w.getPheromonePolicy().getDropDistance()+1);\n //remove all the pheromones that were detected and visited in the way towards\n w.removeAllDetectedPhero();\n w.removeAllVisitedPhero();\n\n model.findPheromones(w);\n w.setMoving(true);\n }", "private void kill(Cell cell)\n\t{\n\t\tcell.setNextState(EMPTY);\n\t\tresetBreedTime(cell);\n\t\tresetStarveTime(cell);\n\t}", "private final void m118787c(bkcr bkcr) {\n if (getAdapter() instanceof bkcq) {\n ((bkcq) getAdapter()).remove(bkcr);\n }\n }", "public synchronized void delete() {\n if (this.swigCPtr != 0) {\n if (this.swigCMemOwn) {\n this.swigCMemOwn = false;\n libVisioMoveJNI.delete_VgIDatabaseDatasetDescriptor(this.swigCPtr);\n }\n this.swigCPtr = 0;\n }\n }", "public void destory(){\n \n }", "private void deleteElement(final int idx) {\r\n\t\tserializer.setRandomAccess(idx, null);\r\n\t\tif (idx < firstFree) {\r\n\t\t\tsetNextPointer(idx, firstFree);\r\n\t\t\tsetPrevPointer(idx, 0);\r\n\t\t\tfirstFree = idx;\r\n\t\t} else {\r\n\t\t\tint free = firstFree;\r\n\t\t\tint lastFree = 0;\r\n\t\t\twhile (free < idx) {\r\n\t\t\t\tlastFree = free;\r\n\t\t\t\tfree = getNextPointer(free);\r\n\t\t\t}\r\n\t\t\tsetNextPointer(lastFree, idx);\r\n\t\t\tsetNextPointer(idx, free);\r\n\t\t}\r\n\t}", "@Override\n\tpublic void delete(CelPhone celphone) {\n\t\t\n\t}", "@Override\n\tpublic void delete() {\n\t\t\n\t}", "@Override\n\tpublic void delete() {\n\t\t\n\t}", "public void removeTile(){\n\t\toccupied = false;\n\t\tcurrentTile = null;\n\t}", "public void deleteMarker(DBMarker marker)\n\t{\n\t\tMarker locationMarker = markerHashTable.get(marker);\n\t\tlocationMarker.remove();\n\t}", "public void removeWorker(ServerWorker serverWorker) {\n workerList.remove(serverWorker);\n }", "private void deletejob() {\n\t\tjob.delete(new UpdateListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void done(BmobException e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif (e==null) {\n\t\t\t\t\ttoast(\"删除成功\");\n\t\t\t\t\tUpdateJobActivity.this.finish();\n\t\t\t\t} else {\n\t\t\t\t\ttoast(\"错误:\"+e.getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "public void removed() {\n }", "@Override\n public void delete()\n {\n }", "public CoreCell removeCellFromUniverseByIndex (int theCellIndex){\r\n return (cellsUniverse.remove(theCellIndex));\r\n }", "@Override\n\tpublic void delete()\n\t{\n\t\tif (!isAtEnd()) right.pop();\n\t}", "public void remove() {\n elements[index] = null;\n size--;\n next();\n }", "public void deleteInst() {\n\t\tlogger.debug(\"DeviceNameTableTester has been stopped\");\n\t}", "@Override\n public void delete() {\n }", "@Override\n\tpublic void del() {\n\t\ttarget.del();\n\t}", "void delete(){\r\n\t\t\r\n\t}", "void decoller();", "public void deleteSelected() {\r\n \t\tObject cells[] = graph.getSelectionCells();\r\n \t\tGraphModel graphmodel = graph.getModel();\r\n \r\n \t\t// If a cell is a blocking region avoid removing its edges and\r\n \t\t// select its element at the end of the removal process\r\n \t\tSet edges = new HashSet();\r\n \t\tSet<Object> select = new HashSet<Object>();\r\n \r\n \t\t// Set with all regions that can be deleted as its child were removed\r\n \t\tSet<Object> regions = new HashSet<Object>();\r\n \t\t// Set with all JmtCells that we are removing\r\n \t\tSet<Object> jmtCells = new HashSet<Object>();\r\n \r\n \t\t// Giuseppe De Cicco & Fabio Granara\r\n \t\t// for(int k=0; k<cells.length; k++){\r\n \t\t// if(cells[k] instanceof JmtEdge){\r\n \t\t// ((JmtCell)(graphmodel.getParent(graphmodel.getSource((JmtEdge)cells[k])))).SubOut();\r\n \t\t// ((JmtCell)(graphmodel.getParent(graphmodel.getTarget((JmtEdge)cells[k])))).SubIn();\r\n \t\t// }\r\n \t\t//\r\n \t\t// }\r\n \t\tfor (int i = 0; i < cells.length; i++) {\r\n \t\t\tif (!(cells[i] instanceof BlockingRegion)) {\r\n \t\t\t\t// Adds edge for removal\r\n \t\t\t\tedges.addAll(DefaultGraphModel.getEdges(graphmodel, new Object[] { cells[i] }));\r\n \t\t\t\t// Giuseppe De Cicco & Fabio Granara\r\n \t\t\t\t// quando vado a eliminare un nodo, a cui collegato un arco,\r\n \t\t\t\t// vado ad incrementare o diminuire il contatore per il\r\n \t\t\t\t// pulsanteAGGIUSTATUTTO\r\n \t\t\t\t// Iterator iter = edges.iterator();\r\n \t\t\t\t// while (iter.hasNext()) {\r\n \t\t\t\t// Object next = iter.next();\r\n \t\t\t\t// if (next instanceof JmtEdge){\r\n \t\t\t\t// ((JmtCell)(graphmodel.getParent(graphmodel.getSource((JmtEdge)next)))).SubOut();\r\n \t\t\t\t// ((JmtCell)(graphmodel.getParent(graphmodel.getTarget((JmtEdge)next)))).SubIn();\r\n \t\t\t\t// }\r\n \t\t\t\t//\r\n \t\t\t\t// }\r\n \t\t\t\t// Stores parents information and cell\r\n \t\t\t\tif (cells[i] instanceof JmtCell) {\r\n \t\t\t\t\tif (((JmtCell) cells[i]).getParent() instanceof BlockingRegion) {\r\n \t\t\t\t\t\tregions.add(((JmtCell) cells[i]).getParent());\r\n \t\t\t\t\t}\r\n \t\t\t\t\tjmtCells.add(cells[i]);\r\n \t\t\t\t}\r\n \t\t\t} else {\r\n \t\t\t\t// Adds node for selection\r\n \t\t\t\tObject[] nodes = graph.getDescendants(new Object[] { cells[i] });\r\n \t\t\t\tfor (Object node : nodes) {\r\n \t\t\t\t\tif (node instanceof JmtCell || node instanceof JmtEdge) {\r\n \t\t\t\t\t\tselect.add(node);\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t\t// Removes blocking region from data structure\r\n \t\t\t\tmodel.deleteBlockingRegion(((BlockingRegion) cells[i]).getKey());\r\n \t\t\t}\r\n \t\t}\r\n \r\n \t\tif (!edges.isEmpty()) {\r\n \t\t\tgraphmodel.remove(edges.toArray());\r\n \t\t}\r\n \t\t// removes cells from graph\r\n \t\tgraphmodel.remove(cells);\r\n \r\n \t\t// Checks if all children of a blocking region have been removed\r\n \t\tIterator<Object> it = regions.iterator();\r\n \t\twhile (it.hasNext()) {\r\n \t\t\tjmtCells.add(null);\r\n \t\t\tBlockingRegion region = (BlockingRegion) it.next();\r\n \t\t\tList child = region.getChildren();\r\n \t\t\tboolean empty = true;\r\n \t\t\tfor (int i = 0; i < child.size(); i++) {\r\n \t\t\t\tif (child.get(i) instanceof JmtCell && !jmtCells.contains(child.get(i))) {\r\n \t\t\t\t\tempty = false;\r\n \t\t\t\t\tbreak;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\tif (empty) {\r\n \t\t\t\tmodel.deleteBlockingRegion(region.getKey());\r\n \t\t\t\tgraphmodel.remove(new Object[] { region });\r\n \t\t\t}\r\n \t\t}\r\n \r\n \t\t// Removes cells from data structure\r\n \t\tfor (Object cell : cells) {\r\n \t\t\tif (cell instanceof JmtCell) {\r\n \t\t\t\tmodel.deleteStation(((CellComponent) ((JmtCell) cell).getUserObject()).getKey());\r\n \t\t\t} else if (cell instanceof JmtEdge) {\r\n \t\t\t\tJmtEdge link = (JmtEdge) cell;\r\n \t\t\t\tmodel.setConnected(link.getSourceKey(), link.getTargetKey(), false);\r\n \t\t\t}\r\n \t\t}\r\n \r\n \t\t// If no stations remains gray select and link buttons\r\n \t\tif (graph.getModel().getRootCount() == 0) {\r\n \t\t\tcomponentBar.clearButtonGroupSelection(0);\r\n \t\t\tsetConnect.setEnabled(false);\r\n \t\t\tsetSelect.setEnabled(false);\r\n \t\t}\r\n \r\n \t\t// Selects components from removed blocking regions\r\n \t\tif (select.size() > 0) {\r\n \t\t\tgraph.setSelectionCells(select.toArray());\r\n \t\t\t// Resets parent information of cells that changed parent\r\n \t\t\tit = select.iterator();\r\n \t\t\twhile (it.hasNext()) {\r\n \t\t\t\tObject next = it.next();\r\n \t\t\t\tif (next instanceof JmtCell) {\r\n \t\t\t\t\t((JmtCell) next).resetParent();\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t}", "@Override\r\n\tpublic void delete(String workerId) {\n\t\tWorker worker = getWorkerById(workerId);\r\n\t\tbaseDao.delete(worker);\r\n\t}", "@Override\r\n\tpublic void delete(int r_idx) throws Exception {\n\r\n\t}", "public Handle delete(Handle handle) {\n\n int homePos = hash(table, handle.getStringAt());\n int pos;\n\n // QUADRATIC PROBE\n for (int i = 0; i < table.length; i++) {\n pos = (homePos + i * i) % table.length;\n\n if (table[pos] == null) {\n // element not in table\n break;\n }\n else if (table[pos].equals(handle)) {\n // we are currently at the element\n Handle toRet = table[pos];\n table[pos] = GRAVESTONE;\n logicalSize--;\n return toRet;\n }\n } // end for-loop\n\n return null; // could not find element\n }", "private void eliminatePiece(BoardPiece boardPiece) {\n\t\tPlayer playerOwner = PlayerObserver.getInstance().getPlayerOwner(boardPiece);\n\t\tplayerOwner.killPiece(boardPiece);\n\t\tboardPiece.destroy();\n\t}", "public Builder clearCellid() {\n \n cellid_ = 0;\n onChanged();\n return this;\n }", "public void remove ( ) {\n\t\texecute ( handle -> handle.remove ( ) );\n\t}", "public void remove() {\r\n return;\r\n }", "@Override\n\t\tprotected void _delete() {\n\t\t\toldValue = 0;\n\t\t\tnewValue = 0;\n\t\t}", "@Override\r\n\tpublic void delete() {\n\r\n\t}", "public void remove(GameObject go) {\r\n table[go.hashCode() % table.length].remove(go);\r\n }", "public void remove() {\n\t itr.remove();\n\t size--;\n\t nextCount--;\n\t }", "public void remove() {\n\t itr.remove();\n\t size--;\n\t nextCount--;\n\t }", "@Override\r\n\tpublic void deleteItem() {\n\t\taPList.remove();\r\n\t}", "private void removeRow() {\n gridHeight--; \n for (EscapeBlock block : grid.get(gridHeight)) { // for each block from the last row\n block.disconnectAll();\n this.remove(block); // remove it from the UI\n }\n\n grid.remove(gridHeight); // remove the row\n }", "@Override\n\tpublic void deleteCB(CB cb) {\n\t\t\n\t}", "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}", "public void punishment(){\n\t\tthis.cell = 0;\n\t}", "public void destructor() {\n \t \t \n \t \t int n = pimpl.pathcodearray.getLength();\n \t \t for (int i = 0; i < n; i++) Destroyable.delete( pimpl.pathcodearray.operator_square_bracket(i));\n \t \t Destroyable.delete( this.state);\n\n \t \t this.currentpath.unrefNoDelete(); // to match the ref() in the constructor\n \t \t \n \t \t Destroyable.delete(currentpath); // java port \t \t \n \t \t Destroyable.delete(pimpl); // java port\n \t }", "abstract public void deleteAfterBetaReduction();", "public void delete() {\n\n\t}", "@Override\n\tpublic void delete() {\n\n\t}", "public void cellAlreadyOccupied(int worker) {\n notifyCellAlreadyOccupied(worker, getCurrentTurn().getCurrentPlayer().getNickname());\n }", "@Override\r\n\tpublic void delete(Observer observer) {\n\t\tvector.remove(observer);\r\n\t}", "public void remove () {}", "@Override\n public void unmarkCell() {\n MNKCell last = MC.getLast();\n super.unmarkCell();\n key = nextZobrist(last.i, last.j);\n value = previousValues.pop();\n }", "public synchronized void delete() {\n if (this.agpCptr != 0) {\n if (this.isAgpCmemOwn) {\n this.isAgpCmemOwn = false;\n CoreJni.deleteCoreResourceArray(this.agpCptr);\n }\n this.agpCptr = 0;\n }\n }", "public void remove() {\n\t\tprocess temp = queue.removeFirst();\n\t}" ]
[ "0.6613292", "0.65527654", "0.6460969", "0.6284435", "0.6188678", "0.6178649", "0.60101795", "0.60099816", "0.60080105", "0.59915686", "0.59841794", "0.59659076", "0.5961008", "0.59582853", "0.59528875", "0.58943623", "0.5888712", "0.5878553", "0.58653504", "0.5834684", "0.58282775", "0.5719423", "0.5707624", "0.56902313", "0.5684729", "0.5681972", "0.5679841", "0.5679364", "0.5674104", "0.5672397", "0.56685734", "0.56516224", "0.5576275", "0.55650455", "0.5560332", "0.55493337", "0.5547974", "0.5540731", "0.552186", "0.5508043", "0.5502948", "0.5492474", "0.54887956", "0.54684085", "0.5460205", "0.54552436", "0.54424167", "0.54370713", "0.5430426", "0.5425534", "0.54252917", "0.5422161", "0.5421938", "0.54036623", "0.53687406", "0.5366052", "0.5358767", "0.5358767", "0.53547573", "0.5339095", "0.53372175", "0.5330551", "0.53136265", "0.5292661", "0.5287882", "0.52855295", "0.52820903", "0.52807707", "0.5265833", "0.526579", "0.52577996", "0.5255318", "0.52472353", "0.5236678", "0.52351236", "0.5232025", "0.5231081", "0.5218652", "0.5217579", "0.52131313", "0.52122986", "0.52076066", "0.52045107", "0.5202116", "0.5202116", "0.51973414", "0.5192498", "0.51852864", "0.51821095", "0.518184", "0.51809484", "0.5175507", "0.5165364", "0.5165197", "0.5155505", "0.51540387", "0.5151722", "0.51504403", "0.5149874", "0.51454335" ]
0.70538604
0
The initialisation method for the UniRanker Class. Generates all the universities and courses from the stored csv file, and ranks all the courses by subject.
private static void init(String[] subjectsSupported) { generateUnis(); generateCourses(); rankCourses(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void generateUnis() {\r\n\t\tString[] lines = readFile(\"resources/unidata.csv\");\r\n\t\tint numOfUnis = lines.length + 1;\r\n\t\tfor (String line : lines) {\r\n\t\t\tString[] attributes = line.split(\",\");\r\n\t\t\tUniversity temp = new University();\r\n\t\t\ttemp.name = attributes[0];\r\n\t\t\ttemp.type = attributes[1];\r\n\t\t\ttemp.isRussellGroup = Boolean.parseBoolean(attributes[2]);\r\n\t\t\ttemp.studentSatisfaction = Double.parseDouble(attributes[3]);\r\n\t\t\ttemp.nationwideRanking = numOfUnis - Integer.parseInt(attributes[4]);\r\n\t\t\ttemp.costOfLiving = Double.parseDouble(attributes[5]);\r\n\t\t\ttemp.studentFacultyRatio = Double.parseDouble(attributes[6]);\r\n\t\t\ttemp.researchOutput = (int) Double.parseDouble(attributes[7]); // THIS LINE IS INCORRECT\r\n\t\t\ttemp.internationalStudentsRatio = Double.parseDouble(attributes[8]);\r\n\t\t\ttemp.graduateProspects = Double.parseDouble(attributes[9]);\r\n\t\t\t/*\r\n\t\t\t * Structure of CSV file containing general university data: NAME, TYPE (City or\r\n\t\t\t * Campus), RUSSELL GROUP, STUDENT SATISFACTION, NATIONWIDE RANKING (Overall),\r\n\t\t\t * COST OF LIVING (According to appropriate cost of living index), STUDENT\r\n\t\t\t * FACULTY RATIO, RESEARCH OUTPUT, INTERNATIONAL STUDENT RATIO and GRADUATE\r\n\t\t\t * PROSPECTS (How many graduates in full-time employment or education after an\r\n\t\t\t * appropriate period).\r\n\t\t\t */\r\n\t\t\tunis.put(temp.name, temp);\r\n\t\t}\r\n\t}", "@PostConstruct\n\tpublic void init() {\n\t\tBufferedReader fileReader = null;\n\t\ttry {\n\t\t\tResource resource = resourceLoader.getResource(\"classpath:JetBlue_Airports.csv\");\n\t\t\tfileReader = new BufferedReader(new FileReader(resource.getFile()));\n\t\t\tairportList = CsvReaderUtil.formAirportList(fileReader);\n\t\t\tLOG.info(\"Loaded data from csv file on startup, total airports: {}\", airportList.size());\n\t\t} catch (Exception e) {\n\t\t\tLOG.error(\"Exception: \", e);\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tfileReader.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\tLOG.error(\"Exception while closing csv file, exception: \", e);\n\t\t\t}\n\t\t}\n\t}", "@PostConstruct\r\n\tpublic void init()\r\n\t{\r\n\t\tResource resource = resourceLoader.getResource(\"classpath:\"+\"assets/csv/corpus.csv\");\r\n\t\ttry {\r\n\t\t\tcsvArray = CsvUtil.loadCSVFile(resource.getInputStream());\t\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "static void initializeStudentSystem() {\r\n\r\n Course math = new Course(\"1000\", \"Mathematics\", \"College of Science\");\r\n Course computing = new Course(\"1001\", \"Computing\", \"College of Engineering\");\r\n Course english = new Course(\"1002\", \"English\", \"College of Liberal Arts\");\r\n Course history = new Course(\"1003\", \"History\", \"College of Liberal Arts\");\r\n Course biology = new Course(\"1004\", \"Biology\", \"College of Science\");\r\n courses.put(math.getCRN(), math);\r\n courses.put(computing.getCRN(), computing);\r\n courses.put(english.getCRN(), english);\r\n courses.put(history.getCRN(), history);\r\n courses.put(biology.getCRN(), biology);\r\n //\r\n User admin = new User();\r\n admin.setUsername(\"admin\");\r\n admin.setPassword(\"admin\");\r\n admin.setAccountType(4);\r\n accounts.put(admin.getUsername(), admin);\r\n //\r\n Student defaultStudent = new Student();\r\n defaultStudent.setName(\"Jose Cabrera\");\r\n defaultStudent.setUsername(\"John1\");\r\n defaultStudent.setPassword(\"123\");\r\n defaultStudent.setId(\"80539934\");\r\n defaultStudent.setMajor(\"CS\");\r\n defaultStudent.setAccountType(1);\r\n defaultStudent.setGraduationStatus(21);\r\n accounts.put(\"John1\", defaultStudent);\r\n //\r\n Student defaultStudent2 = new Student();\r\n defaultStudent2.setName(\"Raul Hinostroza\");\r\n defaultStudent2.setUsername(\"John2\");\r\n defaultStudent2.setPassword(\"123\");\r\n defaultStudent2.setId(\"805393\");\r\n defaultStudent2.setMajor(\"CS\");\r\n defaultStudent2.setAccountType(1);\r\n accounts.put(\"John2\", defaultStudent2);\r\n //\r\n Student defaultStudent3 = new Student();\r\n defaultStudent3.setName(\"Max Morales\");\r\n defaultStudent3.setUsername(\"John3\");\r\n defaultStudent3.setPassword(\"123\");\r\n defaultStudent3.setId(\"8053923\");\r\n defaultStudent3.setMajor(\"CS\");\r\n defaultStudent3.setAccountType(1);\r\n accounts.put(\"John3\", defaultStudent3);\r\n defaultStudent.addCourses(\"1000\");\r\n defaultStudent2.addCourses(\"1000\");\r\n defaultStudent3.addCourses(\"1000\");\r\n //\r\n Faculty defaultFaculty = new Faculty();\r\n defaultFaculty.setAccountType(2);\r\n defaultFaculty.setName(\"Smith\");\r\n defaultFaculty.setUsername(\"Smith1\");\r\n defaultFaculty.setPassword(\"123\");\r\n accounts.put(defaultFaculty.getUsername(), defaultFaculty);\r\n //\r\n Staff defaultStaff = new Staff();\r\n defaultStaff.setAccountType(3);\r\n defaultStaff.setName(\"Smith\");\r\n defaultStaff.setUsername(\"Smith2\");\r\n defaultStaff.setPassword(\"123\");\r\n accounts.put(defaultStaff.getUsername(), defaultStaff);\r\n }", "public void initialize() {\n\n\t\tthis.subNetGenes = getSubNetGenes(species, xmlFile);\n\t\tthis.subNetwork = getSubNetwork(subNetGenes, oriGraphFile);\n\t\tHPNUlilities.dumpLocalGraph(subNetwork, subNetFile);\n\t\t/* Create level file for the original graph */\n\t\tHPNUlilities.createLevelFile(codePath, oriGraphFile, oriLevel,\n\t\t\t\tglobalLevelFile, penaltyType, partitionSize);\n\n\t}", "public static void init() {\n\t\tList<Object> objects = FileManager.readObjectFromFile(\"student.dat\");\n\t\tfor (Object o : objects)\n\t\t\tStudentList.add((Student) o);\n\t}", "@Override\n\tpublic void executeParser() {\n\t\tString filepath = (!filePath.isEmpty() && !filePath.equals(null)) ? filePath : \"faculty.csv\";\n\n\t\tList<String> linesFromFile = loadLinesFromFile(filepath);\n\t\t// Convert the list to an Array of Strings.\n\t\tString[] lines = linesFromFile.toArray(new String[0]);\n\t\tList<AuthorAffiliation> authorAffiliationList = new ArrayList<AuthorAffiliation>();\n\n\t\tfor (int i = 1; i < lines.length; i++) {\n\t\t\tString[] nameAffiliation = lines[i].split(\",\");\n\n\t\t\tif (nameAffiliation.length == 2) {\n\t\t\t\tAuthorAffiliation authorAffiliation = new AuthorAffiliation();\n\t\t\t\tauthorAffiliation.setName(nameAffiliation[0]);\n\t\t\t\tauthorAffiliation.setAffiliation(nameAffiliation[1]);\n\t\t\t\tauthorAffiliationList.add(authorAffiliation);\n\t\t\t}\n\t\t}\n\n\t\tHandleFacultyAffiliation facultyAffiliation;\n\t\ttry {\n\t\t\tfacultyAffiliation = new HandleFacultyAffiliation();\n\t\t\tfacultyAffiliation.insertRecords(authorAffiliationList);\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"Error while processing faculty affilications.\");\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void university(){\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(\"Registry:\");\n\t\tString registry = reader.nextLine();\n\t\tSystem.out.println(\"Number of years accredited:\");\n\t\tint accreditedYears = reader.nextInt();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Rector name:\");\n\t\tString rectorName = reader.nextLine();\n\t\tSystem.out.println(\"Number of students in stratum 1 and 2:\");\n\t\tint studentsStratum = reader.nextInt();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Number of students:\");\n\t\tint students = reader.nextInt();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Position in the saberPro test:\");\n\t\tint nationalPositionPro = reader.nextInt();\n\t\treader.nextLine();\n\t\tUniversity toAdd = new University(nameRegistered, nit, address, contactNumber, employees, value, legalRepresentative, constitution, rows, type, registry, accreditedYears, rectorName, studentsStratum, students, nationalPositionPro);\n\t\ttheHolding.addSubordinate(toAdd);\n\t\tSystem.out.println(\"The company were added successfuly\");\n\t}", "public void load() throws CityException{\r\n \r\n allRanks = new ArrayList<Rank>();\r\n File file = new File(RANK_DATA_DIRECTORY);\r\n Scanner rankDataReader = null;\r\n Scanner lineReader = null;\r\n\r\n try {\r\n\r\n rankDataReader = new Scanner(file);\r\n\r\n ArrayList<String> rankDataArray = new ArrayList<String>();\r\n int count = 0;\r\n\r\n while (rankDataReader.hasNext()) {\r\n\r\n String rankDataLine = rankDataReader.nextLine();\r\n\r\n if (count > 0) {\r\n\r\n String[] rankData = rankDataLine.split(\",\");\r\n\r\n String rankName = rankData[0];\r\n int xp = Integer.parseInt(rankData[1]);\r\n int plotAvailable = Integer.parseInt(rankData[2]);\r\n\r\n allRanks.add(new Rank(rankName, xp, plotAvailable));\r\n }\r\n\r\n count++;\r\n }\r\n\r\n } catch (FileNotFoundException e) {\r\n throw new CityException(\"InvalidFile\");\r\n } finally {\r\n rankDataReader.close();\r\n }\r\n }", "private Data initialise() {\n \r\n getRoomsData();\r\n getMeetingTimesData();\r\n setLabMeetingTimes();\r\n getInstructorsData();\r\n getCoursesData();\r\n getDepartmentsData();\r\n getInstructorFixData();\r\n \r\n for (int i=0;i<departments.size(); i++){\r\n numberOfClasses += departments.get(i).getCourses().size();\r\n }\r\n return this;\r\n }", "@Before\n\tpublic void initialize() {\n\t\t\n\t\tfewUnique50 = new int[50];\n\t\tUtility.fillIntArrayFromFile(fewUnique50, \"/premade/fewUnique500\");\n\t\tfewUnique500 = new int[500];\n\t\tUtility.fillIntArrayFromFile(fewUnique500, \"/premade/fewUnique500\");\n\t\tfewUnique5000 = new int[5000];\n\t\tUtility.fillIntArrayFromFile(fewUnique5000, \"/premade/fewUnique5000\");\n\t\tfewUnique50000 = new int[50000];\n\t\tUtility.fillIntArrayFromFile(fewUnique50000, \"/premade/fewUnique50000\");\n\t\t\n//\t\tSystem.out.print(\"{\");\n//\t\tSystem.out.print(fewUnique50000[0]);\n//\t\tfor (int i = 1; i < fewUnique50000.length; i++) System.out.print(\", \" + fewUnique50000[i]);\n//\t\tSystem.out.println(\"}\");\n\t}", "private static void rankCourses() {\r\n\t\tfor (String subject : courses.keySet()) {\r\n\t\t\tLinkedList<Course> subjectCourses = courses.get(subject);\r\n\t\t\tfor (int i = 1; i <= 8; i++) {\r\n\t\t\t\tswitch (i) {\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\t// Subject rank\r\n\t\t\t\t\tintRanker(1, subjectCourses);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\t// Student satisfaction\r\n\t\t\t\t\tintRanker(2, subjectCourses);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\t// Nationwide ranking\r\n\t\t\t\t\tdoubleRanker(3, subjectCourses);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\t// Cost of living\r\n\t\t\t\t\tdoubleRanker(4, subjectCourses);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\t// Student to faculty ratio\r\n\t\t\t\t\tdoubleRanker(5, subjectCourses);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 6:\r\n\t\t\t\t\t// Research Output\r\n\t\t\t\t\tintRanker(6, subjectCourses);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 7:\r\n\t\t\t\t\t// International students\r\n\t\t\t\t\tdoubleRanker(7, subjectCourses);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 8:\r\n\t\t\t\t\t// Graduate prospects\r\n\t\t\t\t\tdoubleRanker(8, subjectCourses);\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}", "public void initialize() {\n setThisFacility(null);\n loadData();\n initCols();\n\n }", "@PostConstruct\n public void init() {\n this.facts.addAll(checkExtractor.obtainFactList());\n this.facts.addAll(facebookExtractor.obtainFactList());\n this.facts.addAll(googleExtractor.obtainFactList());\n this.facts.addAll(linkedinExtractor.obtainFactList());\n this.facts.addAll(twitterExtractor.obtainFactList());\n\n this.checkHeader = this.utils.generateDatasetHeader(this.checkExtractor.obtainFactList());\n this.facebookHeader = this.utils.generateDatasetHeader(this.facebookExtractor.obtainFactList());\n this.googleHeader = this.utils.generateDatasetHeader(this.googleExtractor.obtainFactList());\n this.linkedinHeader = this.utils.generateDatasetHeader(this.linkedinExtractor.obtainFactList());\n this.twitterHeader = this.utils.generateDatasetHeader(this.twitterExtractor.obtainFactList());\n }", "Main(int citizens)\n {\n\n this.citizens = citizens;\n rank = new int[citizens];\n id = new int[citizens];\n for (int i = 0; i < citizens; i++){\n\n rank[i] = 1;\n id[i] = i;\n }\n }", "public void init() throws IOException{\n\t\tString path = \"/Users/wenzheli/Documents/workspace/benew/ta4j/ta4j/resource/code_secode_name.csv\";\n\t\tBufferedReader br = null;\n\t\tString line = \"\";\n\t\tbr = new BufferedReader(new FileReader(path));\n\t\tbr.readLine(); // skip the header line\n\t\twhile ((line = br.readLine()) != null) {\n\t\t\tString[] strs = line.split(\",\");\n\t\t\tsecodeToCode.put(strs[1], format(strs[0]));\n\t\t}\n\t}", "private void initialise() throws IOException {\r\n //Initialise PrintWriter\r\n try {\r\n out = new PrintWriter(new File(CSV_FILE_NAME), \"UTF8\");\r\n } catch (FileNotFoundException ex) {\r\n System.out.println(ex.getMessage());\r\n if (out != null) {\r\n out.close();\r\n }\r\n System.exit(1);\r\n }\r\n }", "public CSVReader(String filename) {\r\n try {\r\n File inFile = new File(filename);\r\n Scanner scanner = new Scanner(inFile);\r\n boolean hasNumberOfCountries = false;\r\n boolean hasYearLabels = false;\r\n while (scanner.hasNextLine()) {\r\n String nextLine = scanner.nextLine();\r\n if (nextLine.startsWith(\"Number of countries\")) {\r\n int numberOfCountries = Integer.parseInt(nextLine.split(\",\")[1]);\r\n countryNames = new String[numberOfCountries];\r\n cellularDataTable = new double[numberOfCountries][];\r\n countryIndex = 0;\r\n hasNumberOfCountries = true;\r\n continue;\r\n }\r\n if (nextLine.startsWith(\"Country Name\")) {\r\n parseYearLabels(nextLine);\r\n hasYearLabels = true;\r\n continue;\r\n }\r\n if (hasNumberOfCountries && hasYearLabels) {\r\n // if both number of countries and year labels are found, proceed to parse data\r\n if (!nextLine.isEmpty()) {\r\n parseCountryData(nextLine);\r\n }\r\n }\r\n }\r\n if (!hasNumberOfCountries || !hasYearLabels) {\r\n System.out.println(\"Invalid file: missing Number of countries or Year labels, exiting program\");\r\n System.exit(0);\r\n }\r\n scanner.close();\r\n } catch (FileNotFoundException e) {\r\n System.out.println(\"File \" + filename + \" not found, exiting program\");\r\n System.exit(0);\r\n }\r\n }", "public static void main(String[] args) {\n\n //\tThis code is given to you. There is NO NEED TO CHANGE IT\n AltFinal altFinal = new AltFinal(\"College.csv\");\n\n //\tThis is some sample code to show all students in the Students List and how to iterate through the list\n //\tmany of your tasks will need to do something similar.\n //\t\tloop through the list, look for some value in each student record and\n // \t\teither count that value or compare to another value\n //\tNothing TODO here - just some sample code to list the students. You'll use this for loop often\n for (Student student : altFinal.students) {\n System.out.println(\"student = \" + student);\n }\n\n //\t----------------------------------------------------------------------------------------------\n //\tNow that we have all of the data loaded let's do some analysis on the information\n\n //\tBelow here is the code to use for the the Final\n\n //\tCommented out until you write the code for the highScholarshipStateStudent method.\n Student bigMoney;\n bigMoney = altFinal.highScholarshipStateStudent(\"Texas\");\n System.out.println(bigMoney.getName() + \" is from \" + bigMoney.getHomeState() + \" and received a $\" + bigMoney.getScholarship() + \" scholarship!\");\n bigMoney = altFinal.highScholarshipStateStudent(\"California\");\n System.out.println(bigMoney.getName() + \" is from \" + bigMoney.getHomeState() + \" and received a $\" + bigMoney.getScholarship() + \" scholarship!\");\n bigMoney = altFinal.highScholarshipStateStudent(\"Utah\");\n System.out.println(bigMoney.getName() + \" is from \" + bigMoney.getHomeState() + \" and received a $\" + bigMoney.getScholarship() + \" scholarship!\");\n bigMoney = altFinal.highScholarshipStateStudent(\"Washington\");\n System.out.println(bigMoney.getName() + \" is from \" + bigMoney.getHomeState() + \" and received a $\" + bigMoney.getScholarship() + \" scholarship!\");\n bigMoney = altFinal.highScholarshipStateStudent(\"Oregon\");\n System.out.println(bigMoney.getName() + \" is from \" + bigMoney.getHomeState() + \" and received a $\" + bigMoney.getScholarship() + \" scholarship!\");\n bigMoney = altFinal.highScholarshipStateStudent(\"Nevada\");\n System.out.println(bigMoney.getName() + \" is from \" + bigMoney.getHomeState() + \" and received a $\" + bigMoney.getScholarship() + \" scholarship!\");\n //\tThe test is to create methods that will look at the student List and\n // \tcount different values or compare them to find what we are interested in\n\n //\tTODO At the top of this file there is a highestScholarship method.\n // \t\t\tYou have to add code to that method for this to work\n //\twhen you have created the method you can uncomment these two lines of code to see your results\n Student student = altFinal.highestScholarship();\n System.out.println(student.getName() + \" has the biggest Scholarship for: $\" + student.getScholarship());\n\n //\tTODO print how many students are from Texas\n int texans = altFinal.countHomeState(\"Texas\");\n System.out.println(\"Students in Texas: \" + texans);\n //\tTODO print how many students are from outside the US (Their homeState is Foreign)\n int foreign = altFinal.countHomeState(\"Foreign\");\n System.out.println(\"Students in Foreign: \" + foreign);\n //\tTODO print which of these two cities has the most students\n //\tYou must compare the counts for the two groups of students (Texans and Foreign)\n // \tthen print which has the most students. Your code must tell you. You must use an if-else statement\n if (texans > foreign) {\n System.out.println(\"Texans has the most students\" + texans);\n } else System.out.println(\"Foreign has the most students\"+ foreign);\n\n\n //\tTODO \thow many Freshman students appear in the list?\n //\tTODO \thow many Senior students appear in the list?\n //\tTODO \thow many Masters students appear in the list?\n //\t\t\tuse the countYearInSchool method to answer the above questions\n int yearInSchoolX = altFinal.getCountYearInSchoolAndMinor(\"Freshman\", \"Comp Sci\");\n System.out.println(\"There were \" + yearInSchoolX + \" Comp Sci Freshman students\");\n\n int yearInSchool = altFinal.getCountYearInSchoolAndMinor(\"Freshman\", \"Math\");\n System.out.println(\"There were \" + yearInSchool + \" Freshman students\");\n\n //\tTODO \thow many students have scholarships greater than $XX,000?\n //\t\t\tyou will have to create the scholarshipsGreaterThan method to get your answer\n //\t\t\tthen you can uncomment the lines below to print it out\n int bigScholarships = altFinal.getScholarshipsGreaterThan(5000);\n System.out.println(\"Scholarships greater than $5000: \" + bigScholarships);\n\n//\t\t//\tTODO \tprint how many students have scholarships greater than $8,000?\n int testScholarshipMethod = altFinal.getScholarshipsGreaterThan(8000);\n System.out.println(\"there are this many students \" + testScholarshipMethod + \" that have scholarships greater than 8000\");\n\n System.out.println(\"Scholarships for Texans studying anything $\" + altFinal.scholarshipTotal(\"Texas\", null));\n System.out.println(\"Scholarships for anyone studying Statistics $\" + altFinal.scholarshipTotal(null, \"Statistics\"));\n System.out.println(\"Scholarships for Texans studying Statistics $\" + altFinal.scholarshipTotal(\"Texas\", \"Statistics\"));\n System.out.println(\"Scholarships for anyone studying anything $\" + altFinal.scholarshipTotal(null, null));\n }", "private void initialise() {\n \thashFamily = new Hash[this.r];\n for(int i= 0; i < this.r;i++)\n {\n \tthis.hashFamily[i] = new Hash(this.s * 2);\n }\n this.net = new OneSparseRec[this.r][this.s *2];\n for(int i = 0 ; i < this.r; i++)\n \tfor(int j =0 ; j< this.s * 2 ; j++)\n \t\tthis.net[i][j] = new OneSparseRec();\n \n }", "public void initUsers() {\n User user1 = new User(\"Alicja\", \"Grzyb\", \"111111\", \"grzyb\");\n User user2 = new User(\"Krzysztof\", \"Kowalski\", \"222222\", \"kowalski\");\n User user3 = new User(\"Karolina\", \"Nowak\", \"333333\", \"nowak\");\n User user4 = new User(\"Zbigniew\", \"Stonoga \", \"444444\", \"stonoga\");\n User user5 = new User(\"Olek\", \"Michnik\", \"555555\", \"michnik\");\n users.add(user1);\n users.add(user2);\n users.add(user3);\n users.add(user4);\n users.add(user5);\n }", "public void initialize() {\n\n list.add(user1);\n list.add(user2);\n list.add(user3);\n }", "@Override\r\n public void build() throws IOException, TwitterException {\r\n // Read the csv file\r\n CSVReader csvr = new CSVReader(\";\", sourcePath);\r\n // Will contains the csv file rows\r\n ArrayList<String[]> rows;\r\n // Set builder params\r\n setBuilderParams(indexPath);\r\n // Get the whole CSV rows\r\n rows = csvr.readCSV();\r\n \r\n TweetsIndexManager tim = new TweetsIndexManager(\"index/AllTweetsIndex\");\r\n\r\n // Mantain the id of a user\r\n String id;\r\n // Manatain the id and the number of the followers of the user\r\n String[] result;\r\n // Mantain the number of followers of that user\r\n int followers;\r\n \r\n int tNotFound = 0;\r\n int tFound = 0;\r\n \r\n // For each politicians in the file read\r\n for (String[] row : rows) {\r\n // Get the politician name\r\n String name = row[0];\r\n // Get the politician surname\r\n //String surname = row[1];\r\n // Get all users that have the same name of the politician\r\n result = findUserTwitterId(name, tim);\r\n // Get the userId\r\n id = result[0]; // row[1]; \r\n // Get the number of followers\r\n followers = Integer.parseInt(result[1]);\r\n \r\n //System.out.println(\"Current twitter ID: \" + id);\r\n \r\n if(id.equals(\"\")) {\r\n tNotFound++;\r\n id= row[1];\r\n followers = 800;\r\n } else {\r\n tFound++;\r\n }\r\n \r\n //System.out.println(\"Politicians Builder index path: \" + this.indexPath);\r\n \r\n //System.out.println(\"Search for : \" + name + \", followers: \" + followers);\r\n // If a user was found and it has at list a certain value of followers\r\n if (!id.equals(\"\") && followers >= 800) {\r\n // Create a new document for the index\r\n this.name.setStringValue((name).toLowerCase());\r\n this.screenName.setStringValue(id);\r\n\r\n //System.out.println(\"\");\r\n //System.out.println(this.politician.get(\"name\"));\r\n //System.out.println(this.politician.get(\"screenName\"));\r\n\r\n // Define the politician vote\r\n // If the pol vote is equal to his group vote\r\n /*if (row[2].equals(groupVote.get(row[3]))) {\r\n // Return his vote and write the document\r\n this.vote.setStringValue(row[2]);\r\n this.writer.addDocument(this.politician);\r\n System.out.println(this.politician.get(\"vote\"));\r\n // If the pol vote is defined in the csv file\r\n } else if (row[2].equals(\"si\") || row[2].equals(\"no\")) {\r\n // Return his vote and write the document\r\n this.vote.setStringValue(row[2]);\r\n this.writer.addDocument(this.politician);\r\n System.out.println(this.politician.get(\"vote\"));\r\n // If the pol vote is not defined in the csv file\r\n } else if (row[2].equals(\"-\") && !row[3].equals(\"MISTO\")) {\r\n // Return his group vote and write the document\r\n this.vote.setStringValue(groupVote.get(row[3]));\r\n this.writer.addDocument(this.politician);\r\n System.out.println(this.politician.get(\"vote\"));\r\n }*/\r\n \r\n \r\n this.vote.setStringValue(groupVote.get(row[2]));\r\n \r\n //this.vote.setStringValue(\"si\");\r\n \r\n //System.out.println(this.politician.get(\"vote\"));\r\n \r\n this.writer.addDocument(this.politician);\r\n }\r\n \r\n //System.out.println(\"Party: \" + row[2]);\r\n //System.out.println(\"----------------\");\r\n \r\n this.writer.commit();\r\n \r\n }\r\n \r\n System.out.println(\"Twitter IDs not found: \" + tNotFound);\r\n \r\n System.out.println(\"Twitter IDs found: \" + tFound);\r\n \r\n this.writer.close();\r\n }", "public void setUniversityRank(int universityRank)\r\n\t{\r\n\t\tthis.universityRank = universityRank;\r\n\t}", "public Leaderboard() {\n filePath = new File(\"Files\").getAbsolutePath();\n highScores = \"scores\";\n\n topScores = new ArrayList<>();\n topName = new ArrayList<>();\n }", "protected void initialize() {\n // Attribute Load\n this.attributeMap.clear();\n this.attributeMap.putAll(this.loadAttribute());\n // RuleUnique Load\n this.unique = this.loadRule();\n // Marker Load\n this.marker = this.loadMarker();\n // Reference Load\n this.reference = this.loadReference();\n }", "public void init() {\n\n\t\tConnection connection = null;\n\t\tStatement statement = null;\n\n\t\ttry {\n\n\t\t\tconnection = DatabaseInteractor.getConnection();\n\t\t\tstatement = connection.createStatement();\n\n\t\t} catch (SQLException exception) {\n\t\t\texception.printStackTrace();\n\t\t\treturn;\n\t\t} catch (ClassNotFoundException exception) {\n\t\t\texception.printStackTrace();\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\n\t\t\tDatabaseInteractor.createTable(StringConstants.USERS_TABLE, statement);\n\t\t\tDatabaseInteractor.createTable(StringConstants.QUESTIONS_TABLE, statement);\n\t\t\tDatabaseInteractor.createTable(StringConstants.ANSWERS_TABLE, statement);\n\t\t\tDatabaseInteractor.createTable(StringConstants.TOPICS_TABLE, statement);\n\t\t\tDatabaseInteractor.createTable(StringConstants.USER_QUESTION_VOTES_TABLE, statement);\n\t\t\tDatabaseInteractor.createTable(StringConstants.USER_ANSWER_VOTES_TABLE, statement);\n\t\t\tDatabaseInteractor.createTable(StringConstants.USER_TOPIC_RANKS_TABLE, statement);\n\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\n\t}", "public void init() {\n\t\tinit(\"1,0 3,0 5,0 7,0 9,0 0,1 2,1 4,1 6,1 8,1 1,2 3,2 5,2 7,2 9,2 0,3 2,3 4,3 6,3 8,3\", \n\t\t\t \"1,6 3,6 5,6 7,6 9,6 0,7 2,7 4,7 6,7 8,7 1,8 3,8 5,8 7,8 9,8 0,9 2,9 4,9 6,9 8,9\"); \n }", "public void init() {\n\t\t// Read the data text file and load up the local database\n\t\tinitData();\n\n\t\t// Create the labels and the textbox\n\t\taddNameLabel();\n\t\taddNameBox();\n\t\taddGraphButton();\n\t\taddClearButton();\n\n\t\t// Set up the graph object\n\t\tgraph = new NameSurferGraph();\n\t\tadd(graph);\n\n\t}", "public final void initialise (Uid u, String tn)\n {\n }", "public void readInOrganizations() {\n // read CSV file for Organizations\n allOrganizations = new ArrayList<Organization>();\n InputStream inputStream = getResources().openRawResource(R.raw.organizations);\n CSVFile csvFile = new CSVFile(inputStream);\n List scoreList = csvFile.read();\n // ignore first row because it is the title row\n for (int i = 1; i < scoreList.size(); i++) {\n String[] organizationInfo = (String[]) scoreList.get(i);\n\n // inputs to Organization constructor:\n // String name, int logoPhotoID, int photo1ID, int photo2ID, int photo3ID\n\n // group together description\n String description = getDescription(5, organizationInfo);\n\n // get all image IDs according to the names\n int logoPhotoID = context.getResources().getIdentifier(organizationInfo[1], \"drawable\", context.getPackageName());\n int photo1ID = context.getResources().getIdentifier(organizationInfo[2], \"drawable\", context.getPackageName());\n int photo2ID = context.getResources().getIdentifier(organizationInfo[3], \"drawable\", context.getPackageName());\n int photo3ID = context.getResources().getIdentifier(organizationInfo[4], \"drawable\", context.getPackageName());\n allOrganizations.add(new Organization(organizationInfo[0], logoPhotoID, photo1ID, photo2ID, photo3ID, description));\n\n //System.out.println(\"organizationInfo: \" + organizationInfo[0] + \" \" + organizationInfo[1] + \" \" + organizationInfo[2] + \" \" + organizationInfo[3] + \" \" + organizationInfo[4]);\n }\n }", "private void init() {\n\n\t\tinitializeLists();\n\t\tcreateTiles();\n\t\tcreateTileViews();\n\t\tshuffleTiles();\n\n\t}", "@Override\n public void initializeUsersForImportation() {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"initializeUsersForImportation\");\n }\n clearAddPanels();\n setRenderImportUserPanel(true);\n\n List<User> users;\n\n usersForImportation = new ArrayList<Pair<Boolean, User>>();\n\n if (Role.isLoggedUserAdmin() || Role.isLoggedUserProjectManager()) {\n choosenInstitutionForAdmin = (Institution) Component.getInstance(CHOOSEN_INSTITUTION_FOR_ADMIN);\n\n if (choosenInstitutionForAdmin != null) {\n users = User.listUsersForCompany(choosenInstitutionForAdmin);\n } else {\n users = User.listAllUsers();\n }\n } else {\n users = User.listUsersForCompany(Institution.getLoggedInInstitution());\n }\n boolean emailAlreadyExists;\n for (User user : users) {\n emailAlreadyExists = false;\n\n for (ConnectathonParticipant cp : connectathonParticipantsDataModel().getAllItems(FacesContext.getCurrentInstance())) {\n\n if (user.getEmail().equals(cp.getEmail())) {\n emailAlreadyExists = true;\n }\n }\n\n if (!emailAlreadyExists) {\n usersForImportation.add(new Pair<Boolean, User>(false, user));\n }\n }\n }", "public void init()\r\n {\n readFile(inputFile);\r\n writeInfoFile();\r\n }", "public InputReader(String csv){\n inputStream = new Scanner(csv);\n instantiate();\n assert(invariant());\n }", "private void loadAllCountData(){\n // load from csv\n try{\n FileReader file = new FileReader(\"/home/ubuntu/user_counts_small.csv\");\n //FileReader file = new FileReader(\"/Users/YHWH/Desktop/cloud computing/team project/user_counts.csv\");\n BufferedReader buff = new BufferedReader(file);\n String line = \"\";\n boolean eof = false;\n\n while(!eof){\n line = buff.readLine();\n if(line == null){\n eof = true;\n }\n else{\n String[] data = line.split(\"\\t\"); //0->id, 1->selfCount, 2->prevCount\n wholeCountData.put(data[0], Integer.parseInt(data[2]));\n }\n }\n buff.close();\n }\n catch(IOException e){\n e.printStackTrace();\n }\n }", "public College()\r\n {\r\n students = new ArrayList<Student>();\r\n }", "@Override\r\n\tpublic void initialize() throws ResourceInitializationException {\r\n\t String mOutputDirStr = (String) getConfigParameterValue(PARAM_OUTPUTDIR);\r\n\t\tmode = (String) getConfigParameterValue(PARAM_MODE);\r\n\t if (mOutputDirStr != null) {\r\n\t \tmOutputDir = new File(mOutputDirStr);\r\n\t \tif (!mOutputDir.exists()) {\r\n\t \t\tmOutputDir.mkdirs();\r\n\t \t}\r\n\t }\r\n//\r\n// // Initialize rankers\r\n// compositeRanker = new CompositeRanker();\r\n// ngramRanker = new NgramRanker();\r\n// otherRanker = new OtherRanker();\r\n// compositeRanker.addRanker(ngramRanker);\r\n// compositeRanker.addRanker(otherRanker);\r\n }", "private void initComponents() {\r\n\t\trand = new Random();\r\n\t\tfetchProfiles();\r\n\t\tgetPeopleFromFile();\r\n\t}", "@Override\n public void csvImport(String filename) {\n try {\n FileReader r = new FileReader(filename);\n Scanner in = new Scanner(r);\n\n while (in.hasNext()) {\n String firstInput = in.next().trim();\n String firstName = firstInput.substring(0, firstInput.length() - 1).trim();\n String lastInput = in.next().trim();\n String lastName = lastInput.substring(0, lastInput.length() - 1).trim();\n String ID = in.next().substring(0, 5);\n int pID = Integer.parseInt(ID);\n String grade = in.next();\n\n Student s = new Student(firstName, lastName, pID);\n Grade g = new Grade(grade);\n\n map.put(s, g);\n }\n checker = true;\n } catch (FileNotFoundException ex) {\n System.out.println(\"File was not found\");\n checker = false;\n }\n }", "private StudentController() {\n\t\tstudents = new ArrayList<Student>();\n\t\tinflateFromFile();\n\t}", "@PostConstruct\r\n public void init() {\r\n students = new ArrayList<>();\r\n students.add(new Student(\"Marek\", \"Smorąg\", 3.0));\r\n students.add(new Student(\"Bartosz\", \"Rudecki\", 4.54));\r\n students.add(new Student(\"Jakub\", \"Dąbała\", 5.43));\r\n students.add(new Student(\"Jakub\", \"Rek\", 4.23));\r\n students.add(new Student(\"Julia\", \"Smorąg\", 3.56));\r\n students.add(new Student(\"Arkadiusz\", \"Abramowski\", 3.56));\r\n students.add(new Student(\"Marta\", \"Nowak\", 4.23));\r\n students.add(new Student(\"Rafał\", \"Zalewski\", 4.67));\r\n students.add(new Student(\"Adrian\", \"Zalewski\", 5.0));\r\n students.add(new Student(\"Mirosław\", \"Kulesza\", 4.12));\r\n students.add(new Student(\"Michał\", \"Kostro\", 3.67));\r\n students.add(new Student(\"Jan\", \"Nowak\", 3.38));\r\n }", "public Student()\r\n {\r\n // initialise variables with defult values\r\n ID=-1;\r\n Name=null;\r\n University=null;\r\n Department=null;\r\n term=0;\r\n cgpa=0.0;\r\n Gpa=new double[10];\r\n Creditsandgrades=new double[10][10][10];\r\n }", "private void init() {\n\n MyFileReader finalResultReader = null;\n\n finalResultReader = new MyFileReader(FilePath.billboardCombineResultPath);\n\n String line = \"\";\n\n while (true) {\n\n line = finalResultReader.getNextLine();\n if (line == null)\n break;\n\n String[] elements = line.split(\" \");\n if (elements.length == 1)\n continue; // skip those billboard which can not influence any route\n\n String panelID = elements[0].split(\"~\")[0]; // panelID~weeklyImpression\n int weeklyImpression = Integer.parseInt(elements[0].split(\"~\")[1]);\n\n\n List<Integer> routeIDs = new ArrayList<>();\n\n for (int i = 1; i < elements.length; i++) {\n\n int routeID = Integer.parseInt(elements[i]);\n //if (routeID < length) {\n routeIDs.add(routeID);\n //}\n }\n\n panelIDs.add(panelID);\n weeklyImpressions.add(weeklyImpression);\n routeIDsOfBillboards.add(routeIDs);\n\n }\n setUpRouteIDsAndIndexes();\n finalResultReader.close();\n }", "public static void init()\n\t{\n\t\t\n\t\tu.creerGalaxie(\"VoieLactee\", \"spirale\", 0);\n\t\tu.creerEtoile(\"Soleil\", 0, 'F', u.getGalaxie(\"VoieLactee\")); //1\n\t\tu.creerObjetFroid(\"Terre\", 150000 , 13000 , 365 , u.getObjet(1)); //2\n\n\t\tu.creerObjetFroid(\"Lune\", 200 , 5000 , 30 , u.getObjet(2)); //3\n\n\t\tu.creerObjetFroid(\"Mars\", 200000 , 11000 , 750 , u.getObjet(1)); //4\n\n\t\tu.creerObjetFroid(\"Phobos\", 150 , 500 , 40 , u.getObjet(4)); //5\n\n\t\tu.creerObjetFroid(\"Pluton\", 1200000 , 4000 , 900 , u.getObjet(1)); //6\n\n\t\tu.creerEtoile(\"Sirius\", 2, 'B', u.getGalaxie(\"VoieLactee\")); //7\n\n\t\tu.creerObjetFroid(\"BIG-1\", 1000 , 50000 , 333 , u.getObjet(7)); //8\n\n\t\tu.creerGalaxie(\"M31\", \"lenticulaire\", 900000);\n\t\tu.creerEtoile(\"XS67\", 8, 'F', u.getGalaxie(\"M31\")); //9\n\t\tu.creerObjetFroid(\"XP88\", 160000 , 40000 , 400 , u.getObjet(9)); //10\n\t}", "private static void initUsers() {\n\t\tusers = new ArrayList<User>();\n\n\t\tusers.add(new User(\"Majo\", \"abc\", true));\n\t\tusers.add(new User(\"Alvaro\", \"def\", false));\n\t\tusers.add(new User(\"Luis\", \"ghi\", true));\n\t\tusers.add(new User(\"David\", \"jkl\", false));\n\t\tusers.add(new User(\"Juan\", \"mno\", true));\n\t\tusers.add(new User(\"Javi\", \"pqr\", false));\n\t}", "public UniGraph()\r\n/* 14: */ {\r\n/* 15: 28 */ this.map = new HashMap();\r\n/* 16: 29 */ assert (checkRep());\r\n/* 17: */ }", "private ClientGenerator(){\n scanner = new BufferedReader(new InputStreamReader(System.in));\n Nnow = initSetN();\n Ntotal = Nnow;\n threads = new TreeMap<>();\n clients = new TreeMap<>();\n try {\n userReader = new CSVReader(new FileReader(\"randomUsers.csv\"));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n runClients(loadPlayersInfo());\n }", "@Override\r\n public void init() throws HarvesterException {\r\n JsonSimple options = new JsonSimple(getJsonConfig().getObject(\"harvester\", \"csv\"));\r\n \r\n String filePath = options.getString(null, \"fileLocation\");\r\n if (filePath == null) {\r\n throw new HarvesterException(\"No data file provided!\");\r\n }\r\n File csvDataFile = new File(filePath);\r\n if (csvDataFile == null || !csvDataFile.exists()) {\r\n throw new HarvesterException(\"Could not find CSV file '\" + filePath + \"'\");\r\n }\r\n filename = csvDataFile.getName();\r\n \r\n idPrefix = options.getString(\"\", \"recordIDPrefix\");\r\n maxRows = options.getInteger(-1, \"maxRows\");\r\n ignoredFields = getStringList(options, \"ignoreFields\");\r\n includedFields = getStringList(options, \"includedFields\");\r\n payloadId = options.getString(DEFAULT_PAYLOAD_ID, \"payloadId\");\r\n batchSize = options.getInteger(DEFAULT_BATCH_SIZE, \"batchSize\");\r\n hasMore = true;\r\n \r\n try {\r\n // open the CSV file for reading\r\n Reader fileReader = new InputStreamReader(new FileInputStream(csvDataFile), \"UTF-8\");\r\n char delimiter = options.getString(String.valueOf(DEFAULT_DELIMITER), \"delimiter\").charAt(0);\r\n csvReader = new CSVReader(fileReader, delimiter);\r\n \r\n // configure the data fields\r\n if (options.getBoolean(true, \"headerRow\")) {\r\n dataFields = Arrays.asList(csvReader.readNext());\r\n } else {\r\n dataFields = getStringList(options, \"headerList\");\r\n }\r\n \r\n // check that the specified id column is valid\r\n idColumn = options.getString(null, \"idColumn\");\r\n if (idColumn != null && !dataFields.contains(idColumn)) {\r\n throw new HarvesterException(\"'\" + idColumn + \"' is invalid!\");\r\n }\r\n } catch (IOException ioe) {\r\n throw new HarvesterException(ioe);\r\n }\r\n }", "public void read()\r\n\t{\r\n\t\tScanner input = null;\r\n\t\ttry\r\n\t\t{\r\n\t\t\tint i = 0;\r\n\r\n\t\t\tinput = new Scanner(new File(\"netflix.csv\")).useDelimiter(\"[,\\r\\n]\");\r\n\r\n\t\t\twhile (input.hasNext())\r\n\t\t\t{\r\n\t\t\t\tinput.nextLine();\r\n\t\t\t\tString title = input.next();\r\n\r\n\t\t\t\tString rating = input.next();\r\n\r\n\t\t\t\tint year = Integer.parseInt(input.next());\r\n\r\n\t\t\t\tint score = Integer.parseInt(input.next());\r\n\t\t\t\tMovie a = new Movie(title, rating, year, score);\r\n\t\t\t\tdata[i] = a;\r\n\t\t\t\ti++;\r\n\t\t\t\tactualSize++;\r\n\r\n\t\t\t}\r\n\t\t\tinput.close();\r\n\r\n\t\t}\r\n\t\tcatch (FileNotFoundException e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"File not found\");\r\n\r\n\t\t}\r\n\r\n\t}", "public static void main(String[] args) throws FileNotFoundException, IOException {\r\n \r\n Directory d = new Directory();\r\n \r\n if (args.length != 1) {\r\n System.out.println(\"Usage: java CSVReaderTest <filename>\");\r\n }\r\n else {\r\n FileReader fr = new FileReader(args[0]);\r\n BufferedReader c = new BufferedReader(fr);\r\n\r\n int lineNum = 0;\r\n boolean eof = false;\r\n \r\n while (!eof) {\r\n String line = c.readLine();\r\n \r\n if (line == null) {\r\n eof = true;\r\n }\r\n else{\r\n // Allocate an array of the necessary size to return the strings\r\n String[] values = new String[4];\r\n // Start beginIndex at the beginning of the String, position 0\r\n int beginIndex = 0;\r\n\r\n for (int i = 0; i < 3; i++) {\r\n int endIndex;\r\n endIndex = line.indexOf(',', beginIndex);\r\n\r\n // if the argument begins and ends with quotes, remove them\r\n if (line.charAt(beginIndex) == '\"' && line.charAt(endIndex - 1) == '\"') {\r\n values[i] = line.substring(beginIndex + 1, endIndex - 1);\r\n\r\n } else {\r\n values[i] = line.substring(beginIndex, endIndex);\r\n }\r\n\r\n beginIndex = endIndex + 1;\r\n }\r\n\r\n if (line.charAt(beginIndex) == '\"' && line.charAt(line.length() - 1) == '\"') {\r\n values[3] = line.substring(beginIndex + 1, line.length() - 1);\r\n } else {\r\n values[3] = line.substring(beginIndex, line.length());\r\n }\r\n \r\n if (lineNum > 1) {\r\n lineNum = lineNum + 1;\r\n Student s = new Student(values[0]);\r\n s.setFirstName(values[1]);\r\n s.setLastName(values[2]);\r\n s.setPhoneNumber(values[3]);\r\n d.addStudent(s);\r\n System.out.println(s);\r\n }\r\n\r\n }\r\n }\r\n c.close();\r\n }\r\n \r\n Student c = new Student(\"mengl1\");\r\n c.setFirstName(\"Meng\");\r\n c.setLastName(\"Li\");\r\n c.setPhoneNumber(\"412-807-0153\");\r\n \r\n Student a = new Student(\"mengl2\");\r\n a.setFirstName(\"Mengl\");\r\n a.setLastName(\"Li\");\r\n a.setPhoneNumber(\"412-807-0154\");\r\n \r\n Student b = new Student(\"terryhong\");\r\n b.setFirstName(\"terry\");\r\n b.setLastName(\"hong\");\r\n b.setPhoneNumber(\"412-464-475\");\r\n\r\n d.addStudent(c);\r\n d.addStudent(a);\r\n d.addStudent(b);\r\n \r\n //System.out.println(d.searchByAndrewId(\"mengl2\"));\r\n //d.deleteStudent(\"terryhong\");\r\n System.out.println(d.size());\r\n // System.out.println(d.searchByLastName(\"Li\"));\r\n\r\n }", "static void loadCourse() {\n\t\tScanner inputStreamC = null; // create object variable for Course\n\n\t\ttry { // create Scanner object & assign to variable\n\t\t\tinputStreamC = new Scanner(new File(\"course.txt\"));\n\t\t\tinputStreamC.useDelimiter(\",\");\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"No Course Infomation was Loaded\");\n\t\t\t// System.exit(0);\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\twhile (inputStreamC.hasNext()) {\n\n\t\t\t\tString readCourseID = inputStreamC.next();\n\t\t\t\tString readCourseName = inputStreamC.next();\n\t\t\t\tString readCourseUserName = inputStreamC.next();\n\t\t\t\t\n\t\t\t\tCourse c1 = new Course(readCourseID, readCourseName, readCourseUserName);\n\t\t\t\tcourseInfoArray.add(c1);\n\t\t\t\t//System.out.println(\"Read a Course \" + c1.getCourseID() + \" \" + c1.getCourseName() + \" \"\t+ c1.getCoordinatorUserID());\n\t\t\t\t\n\t\t\t} //eo while\n\t\t} catch (IllegalStateException e) {\n\t\t\tSystem.err.println(\"Could not read from the file\");\n\t\t} catch (InputMismatchException e) {\n\t\t\tSystem.err.println(\"Something wrong happened while reading the file\");\n\t\t}\n\t\tinputStreamC.close();\n\t}", "private void initBroker() throws URISyntaxException, IOException {\n\n ClassLoader classloader = Thread.currentThread().getContextClassLoader();\n\n // InputStream is = classloader.getResourceAsStream(\"data/merchant.csv\");\n\n URL brokerURL = classloader.getResource(\"data/broker/\");\n String[] merchantFiles = new File(brokerURL.toURI()).list();\n\n int j = 0;\n while (j < merchantFiles.length) {\n InputStream is = classloader.getResourceAsStream(\"data/broker/\" + merchantFiles[j]);\n CSVReader reader = new CSVReader(new InputStreamReader(is, \"UTF-8\"));\n String[] nextLine;\n while ((nextLine = reader.readNext()) != null) {\n String tradeName = nextLine[FORENAME];\n if (StringUtils.isBlank(tradeName)) {\n continue;\n }\n brokerImportService.saveOrUpdateBroker(fillUpBrokerImportVO(nextLine));\n }\n j++;\n }\n\n }", "public void initialise() \n\t{\n\t\tthis.docids = scoresMap.keys();\n\t\tthis.scores = scoresMap.getValues();\n\t\tthis.occurrences = occurrencesMap.getValues();\t\t\n\t\tresultSize = this.docids.length;\n\t\texactResultSize = this.docids.length;\n\n\t\tscoresMap.clear();\n\t\toccurrencesMap.clear();\n\t\tthis.arraysInitialised = true;\n\t}", "public static void init() {\r\n\t\twines = read();\r\n\t\tread_tasteNotes(wines);\r\n\t\tidSorted = duplicate(wines);\r\n\t}", "public Course()\n\t{\n\t\tstudents = new Student[30];\n\t\tnumStudents = 0;\n\t}", "private RankDAO() throws CityException{\r\n load();\r\n }", "private void init() throws FileNotFoundException, TransformerConfigurationException {\n try (Scanner filesscanner = new Scanner(new File(csvlocation))) {\n while (filesscanner.hasNext()) {\n filecontent.add(filesscanner.next());\n }\n if (!filecontent.isEmpty()) {\n this.header = filecontent.get(0);\n filecontent.remove(0);\n }\n setMailtemplate();\n } catch (FileNotFoundException | TransformerConfigurationException e) {\n LOGGER.error(\"Exception occured while reading the file\", e);\n throw e;\n }\n }", "public Student() {\r\n\t\t\r\n\t\t//populating country options\r\n\t\t//can also be done using a properties file\r\n\t\t\r\n\t\t/*\r\n\t\t * countryOptions = new LinkedHashMap<String, String>();\r\n\t\t * \r\n\t\t * countryOptions.put(\"BR\", \"Brazil\"); countryOptions.put(\"IN\", \"India\");\r\n\t\t * countryOptions.put(\"US\", \"United States\"); countryOptions.put(\"CA\",\r\n\t\t * \"Canada\");\r\n\t\t */\r\n\t\t\r\n\t\t\r\n\t}", "public void initAttendances() {\n\t\t\n\t\tFileReader attendancesReader = null;\n\t\ttry\t{\n\t\t\ttry {\n\t\t\t\tattendancesReader = new FileReader(attendancesFile);\n\t\t\t\tScanner attendancesScanner = new Scanner(attendancesReader);\n\n\t\t\t\twhile (attendancesScanner.hasNextLine() ) {\n\t\t\t\t\tString attendancesLine = attendancesScanner.nextLine();\n\t\t\t\t\tString [] attendanceTokens = attendancesLine.split(\"\\\\s+\");\n\t\t\t\t\tString currentClassID = attendanceTokens[0];\n\n\t\t\t\t\tfc = fitnessProg.getFitnessClassWithID(currentClassID);\n\t\t\t\t\tint attendance1 = Integer.parseInt(attendanceTokens[1]);\n\t\t\t\t\tint attendance2 = Integer.parseInt(attendanceTokens[2]);\n\t\t\t\t\tint attendance3 = Integer.parseInt(attendanceTokens[3]);\n\t\t\t\t\tint attendance4 = Integer.parseInt(attendanceTokens[4]);\n\t\t\t\t\tint attendance5 = Integer.parseInt(attendanceTokens[5]);\n\t\t\t\t\tint [] passAttendances = {attendance1, attendance2, attendance3, attendance4, attendance5};\n\t\t\t\t\tfc.setAttendanceRecords(passAttendances);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tfinally {\n\n\t\t\t\tif (attendancesReader != null) {\n\t\t\t\t\tattendancesReader.close();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\tcatch (IOException ioe) {\n\t\t\tJOptionPane.showMessageDialog(null, \"File not found\",\n\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE);\n\n\t\t}\n\t\tcatch (InputMismatchException e) {\n\t\t\tJOptionPane.showMessageDialog(null, \"Invalid file content\",\n\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t}\t\n\t}", "private static void initializeLists() {\n\t\t\n\t\t//read from serialized files to assign array lists\n\t\t//customerList = (ArrayList<Customer>) readObject(customerFile);\n\t\t//employeeList = (ArrayList<Employee>) readObject(employeeFile);\n\t\t//applicationList = (ArrayList<Application>) readObject(applicationFile);\n\t\t//accountList = (ArrayList<BankAccount>) readObject(accountFile);\n\t\t\n\t\t//read from database to assign array lists\n\t\temployeeList = (ArrayList<Employee>)employeeDao.readAll();\n\t\tcustomerList = (ArrayList<Customer>)customerDao.readAll();\n\t\taccountList = (ArrayList<BankAccount>) accountDao.readAll();\n\t\tapplicationList = (ArrayList<Application>)applicationDao.readAll();\n\t\t\n\t\tassignBankAccounts();\n\t}", "public void createArrayList() throws IOException,ParseException\r\n\t {\n\t \t\r\n\t try(ICsvBeanReader beanReader = new CsvBeanReader(new FileReader(CSV_FILENAME), \r\n\t \t\tCsvPreference.STANDARD_PREFERENCE))\r\n\t {\r\n\t // the header elements are used to map the values to the bean\r\n\t final String[] headers = beanReader.getHeader(true);\r\n\t final CellProcessor[] processors = getProcessors();\r\n\t Complete customer;\r\n\t String gender,fullname;\r\n\t while ((customer = beanReader.read(Complete.class, headers, processors)) != null)\r\n\t {\r\n\t fullname = customer.getFirstname() + \" \" + customer.getLastname();\r\n\t if(customer.getGender().equals(\"f\"))\r\n\t \t gender = \"female\";\r\n\t \telse\r\n\t gender = \"male\";\r\n\t Date dob=new SimpleDateFormat(\"MM/dd/yyyy\").parse(customer.getDob()); \r\n\t String pattern = \"dd/MM/yyyy\";\r\n\t SimpleDateFormat simpleDateFormat = new SimpleDateFormat(pattern);\r\n \tString date = simpleDateFormat.format(dob);\r\n\t String age = calcAge(date);\r\n\t if(customer.getCategory().equals(\"student\"))\r\n\t {\r\n\t \tString grade = calcGrade(customer.getSec_percent());\r\n\t \tstudentList.add(new Student(customer.getId(),fullname,gender,date,age,customer.getAadhar_number(),customer.getCity(),\r\n\t \tcustomer.getContact_number(),Integer.parseInt(customer.getRoll_no()),customer.getClass_no(),Integer.parseInt(customer.getTotal_marks())\r\n\t \t,grade,Integer.parseInt(customer.getSec_percent()),customer.getHs_stream()));\r\n\t \t\t\r\n\t } \r\n\t else //for teacher\r\n\t {\r\n\t \tDate doj=new SimpleDateFormat(\"MM/dd/yyyy\").parse(customer.getDoj()); \r\n\t \tString pattern1 = \"dd/MM/yyyy\";\r\n\t SimpleDateFormat simpleDateFormat1 = new SimpleDateFormat(pattern);\r\n \tString join_date = simpleDateFormat.format(doj);\r\n\t \tString str_sub_teachers = customer.getSubject_teaches();\r\n\t \tString service_period = calService(join_date);\r\n\t \tList<String> sub_teachers = new ArrayList<String>(Arrays.asList(str_sub_teachers.split(\"-\")));\r\n\t \t\t\t\r\n\t \t\tteacherList.add(new Teacher(customer.getId(),fullname,gender,date,age,customer.getAadhar_number(),customer.getCity(),\r\n \t\t\t\tcustomer.getContact_number(),customer.getEmp_no(),customer.getClass_teacher_of(),join_date,service_period\r\n \t\t\t\t,customer.getPrevious_school(),customer.getPost(),Integer.parseInt(customer.getSalary()),sub_teachers));\r\n }\r\n\t \r\n\t } //while\r\n\t }\r\n\t System.out.println(\"ArrayList Sucessfully Created\");\t\r\n\t \t\r\n\t }", "private void testDataReader() {\n File csv = new File(pathTest);\n try (FileReader fr = new FileReader(csv); BufferedReader bfr = new BufferedReader(fr)) {\n Logger.printInfo(\"Reading test data\");\n for (String line; (line = bfr.readLine()) != null; ) {\n String[] split = line.split(\",\");\n String data = textCleaner(split[indexData].toLowerCase());\n int label = Integer.parseInt(split[indexLabel].toLowerCase());\n\n linesTest.add(data);\n labelsTest.add(label);\n Logger.print(\"Reading size: \" + linesTest.size());\n }\n for (String l : linesTest) {\n matrixTest.add(wordVectorizer(l));\n }\n } catch (IOException ex) {\n Logger.printError(\"!! Test Data Not Reading !!\");\n System.exit(0);\n }\n }", "private void loadData() {\n try {\n URL source = new URL(CSV_URL);\n URLConnection connect = source.openConnection();\n BufferedReader f = new BufferedReader(new InputStreamReader(connect.getInputStream()));\n\n header = f.readLine().split(\",\");\n // Replace third header with Difficulty Rating\n header[3] = \"Difficulty\";\n\n String line;\n while((line = f.readLine()) != null) {\n String[] row = line.split(\",\");\n // Section: 0, 1, 2, 3 for now, 3 will be WCC\n\n int problemNumber = Integer.parseInt(row[0]);\n int section;\n int year;\n String exam = row[1];\n String answer = row[2];\n\n if(row.length > 3) {\n answer += \"~\" + row[3];\n }\n\n if(exam.matches(\"USNCO .*\")) {\n exam = exam.substring(6);\n year = Integer.parseInt(exam.substring(1, 5));\n if(exam.charAt(0) == 'N') {\n section = 1;\n }\n else {\n section = 0;\n }\n }\n else {\n year = Integer.parseInt(exam.substring(4, 8));\n section = 3;\n }\n\n int id = year*240 + problemNumber*4 + section;\n data.put(id, answer);\n }\n }\n catch (Exception e) {\n // Solution given by StackOverflow: https://stackoverflow.com/questions/1149703/\n StringWriter sw = new StringWriter();\n PrintWriter pw = new PrintWriter(sw);\n e.printStackTrace(pw);\n String sStackTrace = sw.toString().substring(0, 800); // stack trace as a string\n\n // Send error messages to me\n instance.retrieveUserById(CREATOR).queue(\n user -> user.openPrivateChannel().queue(\n channel -> channel.sendMessage(sStackTrace).queue()));\n\n }\n }", "public User_Account() {\r\n\t\tfirstName=middleName=lastName = null;\r\n\t\taddress=city=state=zip=null;\r\n\t\tphone=email=webLinks= new ArrayList <String>(); \r\n\t\tedu = new ArrayList <Education>();\r\n\t\twork = new ArrayList <Work>();\r\n\t}", "public CSCourses() {\n courseList = new LinkedList<Course>(); \n numOfCourses = 0;\n }", "public void init(){\n\t\tEmployee first = new Employee(\"Diego\", \"Gerente\", \"[email protected]\");\n\t\tHighSchool toAdd = new HighSchool(\"Santiago Apostol\", \"4656465\", \"cra 33a #44-56\", \"3145689879\", 30, 5000, \"Jose\", new Date(1, 3, 2001), 3, \"Servicios educativos\", \"451616\", 15, \"Piedrahita\", 45, 1200, 500);\n\t\ttoAdd.addEmployee(first);\n\t\tProduct pilot = new Product(\"jet\", \"A00358994\", 1.5, 5000);\n\t\tFood firstFood = new Food(\"Colombina\", \"454161\", \"cra 18\", \"454611313\", 565, 60000, \"Alberto\", new Date(1, 8, 2015), 6, \"Manufactura\", 4);\n\t\tfirstFood.addProduct(pilot);\n\t\ttheHolding = new Holding(\"Hertz\", \"15545\", \"cra 39a #30a-55\", \"3147886693\", 80, 500000, \"Daniel\", new Date(1, 2, 2015), 5);\n\t\ttheHolding.addSubordinate(toAdd);\n\t\ttheHolding.addSubordinate(firstFood);\n\t}", "public IMU()\n {\n this(Axis.kZ, AHRSAlgorithm.kComplementary);\n }", "@Override\n public void initialize() {\n int numReduceTasks = conf.getNumReduceTasks();\n String jobID = taskAttemptID.getJobID();\n File mapOutputFolder = new File(\"mapoutput\");\n if (!mapOutputFolder.exists()) {\n mapOutputFolder.mkdir();\n }\n for (int reduceID = 0; reduceID < numReduceTasks; reduceID++) {\n outputFiles.add(\"mapoutput/\" + jobID + \"_r-\" + reduceID + \"_\" + this.partition);\n }\n }", "public void init() {\n for (int i = 0; i < MAX_SCORES; i++) {\n highScores[i] = 0;\n names[i] = \"---\";\n }\n }", "private void initializewriters() {\n try {\n outputfile = new FileWriter(journeyfile);\n // create CSVWriter object filewriter object as parameter\n writer = new CSVWriter(outputfile);\n\n // adding header to csv\n String[] header = {\"Lat\", \"Lng\", \"Zacc\", \"Timestamp\"};\n writer.writeNext(header);\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n\n }", "private void initData() {\n\t\tnamesInfo = new NameSurferDataBase(fileName);\n\n\t}", "public Courses(String x1, String x2, String x3, String x4, String x5, String x6) {\n\t\tcourse_name=x1;\n\t\tcourse_id=x2;\n\t\tcourse_max=x3;\n\t\tcourse_current_num=\"0\";\n\t\tlist.clear();\n\t\tcourse_instructor=x4;\n\t\tcourse_section=x5;\n\t\tcourse_location=x6;\n\t\t\n\t}", "public void performInitialisation() {\n \t\t// subclasses can override the behaviour for this method\n \t}", "public void setUp() {\n list = new LinkedList<Song>();\n Song song1 = new Song(\"James\", \"Rock\", 2019, \"three\");\n Song song2 = new Song(\"Jason\", \"Hip-Hop\", 2000, \"one\");\n Song song3 = new Song(\"Hayley\", \"R&B\", 2011, \"two\");\n list.add(song1);\n list.add(song2);\n list.add(song3);\n sorter = new Sorter(list);\n }", "private static void intRanker(int i, LinkedList<Course> subjectCourses) {\r\n\t\tTreeMap<Integer, Course> map = new TreeMap<Integer, Course>(Collections.reverseOrder());\r\n\t\tfor (Course c : subjectCourses) {\r\n\t\t\tswitch (i) {\r\n\t\t\tcase 1:\r\n\t\t\t\tmap.put(1 - c.subjectRank, c); // In reverse order as lower is better.\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3:\r\n\t\t\t\tmap.put(1 - c.uni.nationwideRanking, c);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 6:\r\n\t\t\t\tmap.put(c.uni.researchOutput, c);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSet<Entry<Integer, Course>> integerSet = map.entrySet();\r\n\t\tIterator<Entry<Integer, Course>> integerIt = integerSet.iterator();\r\n\t\tint counter = 1;\r\n\t\twhile (integerIt.hasNext()) {\r\n\t\t\tMap.Entry<Integer, Course> me = (Map.Entry<Integer, Course>) integerIt.next();\r\n\t\t\tLinkedList<RankedCourse> ranked = rankedCourses.get(subjectCourses.getFirst().subject);\r\n\t\t\tRankedCourse rc = new RankedCourse();\r\n\t\t\tfor (RankedCourse course : ranked) {\r\n\t\t\t\tif (course.courseName.equals(me.getValue().courseName) && course.uni.equals(me.getValue().uni)) {\r\n\t\t\t\t\trc = course;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tswitch (i) {\r\n\t\t\tcase 1:\r\n\t\t\t\trc.subjectRank = counter;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3:\r\n\t\t\t\trc.nationwideRank = counter;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 6:\r\n\t\t\t\trc.researchOutputRank = counter;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tcounter++;\r\n\t\t}\r\n\t}", "public void initialize() {\n\t\tloadRaces();\n\t\tloadBets();\n\t\tgenerateRaces(NUMBER_RACES - races.size());\n\t\t\n\t\traces.stream().forEach(race -> {\n\t\t\texecutor.submit(new RaceWorker(race, this));\n\t\t});\n\t\t\n\t\tinitialized = true;\n\t}", "private void initialize()\n {\n for(int i=0;i<4;i++)\n {\n foundationPile[i]= new Pile(Rank.ACE);\n foundationPile[i].setRules(true, false, false, false, true,false, true);\n } \n for(int i=0;i<7;i++)\n {\n tableauHidden[i] = new Pile();\n tableauVisible[i] = new Pile(Rank.KING);\n tableauVisible[i].setRules(false, true, false, false, false,false, true);\n } \n deck.shuffle();\n deck.shuffle();\n dealGame();\n }", "private void initialize() {\n this.traitMap = new HashMap<T, ITrait<T>>();\n this.traitList = new ArrayList<ITrait<T>>();\n this.observers = Collections.synchronizedList(new ArrayList<IStatisticsObserver>());\n this.dimensionName = \"UNNAMED\";\n\n }", "public void initialize() throws ResourceInitializationException {\n StringBuffer sb=new StringBuffer();\n String input = (String) getConfigParameterValue(\"INPUT_FILE\");\n System.out.println(\"INPUT_FILE:\" + input);\n System.out.println(\"Initializing Collection Reader....\");\n ///////////////\n try {\n in = new BufferedReader(new FileReader(input));\n String strs=null;\n while((strs=in.readLine())!=null){\n sb.append(strs+\"\\n\");\n }\n } catch (UnsupportedEncodingException e1) {\n // TODO Auto-generated catch block\n e1.printStackTrace();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n /////////////////////\n \n cas=sb.toString();\n }", "public static void initialisations() {\n\t\tit = 0;\r\n\t\tbc = 1;\r\n\r\n\t\t// pile des reprises pour compilation des branchements en avant\r\n\t\tpileRep = new TPileRep(); \r\n\t\t// programme objet = code Mapile de l'unite en cours de compilation\r\n\t\tpo = new ProgObjet();\r\n\t\t// COMPILATION SEPAREE: desripteur de l'unite en cours de compilation\r\n\t\tdesc = new Descripteur();\r\n\r\n\t\t// initialisation necessaire aux attributs lexicaux\r\n\t\tUtilLex.initialisation();\r\n\r\n\t\t// initialisation du type de l'expression courante\r\n\t\ttCour = NEUTRE;\r\n\r\n\t\t//Initialisation de la variable qui compte le nombre de param�tres de chaque proc�dure \r\n\t\tnbParamProc = 0;\r\n\r\n\t\t//Initialisation de la variable qui compte le nombre de variables d�clar�es\r\n\t\tnbVar++;\r\n\r\n\t\t//Initialisation vTmp\r\n\t\tvTmp = 0;\r\n\t\t\r\n\t\tdesc.setUnite(\"programme\");\r\n\t\t\r\n\t}", "public UsersDataSet() {}", "public void init(){\n\t\tcoreNumber = this.readIntValueFromFile(MAX_CORE_ID) + 1;\n\t\tparseAvailableFrequencies();\n\t\t\n\t\tmBaseCpuSpeedTimes = new long[cpuFrequencies.length];\n\t\tmRelCpuSpeedTimes = new long[cpuFrequencies.length];\t\t\t\t\n\t\tcores = new Core[coreNumber];\n\t\tfor(int i = 0; i < coreNumber; i++){\n\t\t\tcores[i] = new Core(i);\n\t\t\tcores[i].init();\n\t\t}\n\t}", "public void fillFromFile()\n\t{\n\t\tJFileChooser fc = new JFileChooser();\t//creates a new fileChooser object\n\t\tint status = fc.showOpenDialog(null);\t//creates a var to catch the dialog output\n\t\tif(status == JFileChooser.APPROVE_OPTION)\t\n\t\t{\n\t\t\tFile selectedFile = fc.getSelectedFile ( );\n\t\t\tthis.fileName = selectedFile;\n\t\t\tScanner file = null; //scans the file looking for information to load\n\n\t\t\tif(selectedFile.exists())\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tfile = new Scanner(fileName); //scans the input file\n\t\t\t\t}\n\t\t\t\tcatch(Exception IOException)\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showConfirmDialog (null, \"Unable to import data from the list\");\n\t\t\t\t\tSystem.exit (-1);\n\t\t\t\t}//if there was an error it will pop up this message\n\t\t\t\t\n\t\t\t\tString str = file.nextLine ( ); //names the line\n\t\t\t\tString [] header = str.split (\"\\\\|\"); //splits the line at the |\n\t\t\t\tsetCourseNumber(header[1]);\n\t\t\t\tsetCourseName(header[0]);\n\t\t\t\tsetInstructor(header[2]);\n\t\t\t\t\n\t\t\t\twhile(file.hasNextLine ( ))\n\t\t\t\t{\n\t\t\t\t\tstr = file.nextLine ( ); //names the line\n\t\t\t\t\tString [] tokens = str.split (\"\\\\|\"); //splits the line at the |\n\t\t\t\t\tStudent p = new Student();\n\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tp.setStrNameLast (String.valueOf (tokens[0]));\n\t\t\t\t\t\tp.setStrNameFirst (String.valueOf (tokens[1]));\n\t\t\t\t\t\tp.setStrMajor (String.valueOf (tokens[2]));\n\t\t\t\t\t\tp.setClassification (tokens[3]);\n\t\t\t\t\t\tp.setiHoursCompleted (new Integer (tokens[4]).intValue ( ));\n\t\t\t\t\t\tp.setfGPA (new Float (tokens[5]).floatValue ( ));\n\t\t\t\t\t\tp.setStrStudentPhoto (String.valueOf (tokens[6]));\n\t\t\t\t\t//creates a person object and then populates it with an array of scanned input values\n\t\t\t\t\t\tclassRoll.add (p);\n\t\t\t\t\t\t}//creates a person object and then populates it with an array of scanned input values\n\t\t\t\t\t\tcatch(Exception IOException)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tIOException.printStackTrace ( );\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog (null, \"Bad input record: '\" + str + \"'\" + IOException.getMessage());\n\t\t\t\t\t\t}//pops up a message if there were any errors reading from the file\n\t\t\t\t}//continues through the file until there are no more lines to scan\n\t\t\tfile.close ( ); //closes the file\n\n\t\t\t\tif(selectedFile.exists ( )==false)\n\t\t\t\t{\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tthrow new Exception();\n\t\t\t\t\t}\n\t\t\t\t\tcatch (Exception IOException)\n\t\t\t\t\t{\n\t\t\t\t\t\tJOptionPane.showMessageDialog (null, \"Bad input record: '\" + selectedFile + \"' \" + IOException.getMessage());\n\t\t\t\t\t}\n\t\t\t\t}//if the user picks a file that does not exist this error message will be caught.\n\t\t\t}\n\t\t}//if the input is good it will load the information from the selected file to and Array List\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.exit (0);\n\t\t\t}\n\t\tthis.saveNeed = true;\n\n\t\t}", "@SuppressWarnings({ \"rawtypes\", \"unchecked\"})\n\tpublic static ArrayList<StudentCourse> initStudentCourses() throws IOException, ParseException {\n\t\t// read String from text file\n\t\tArrayList<String> stringArray = (ArrayList) IO.read(Main.studentcoursepath.toString());\n\t\t\t\n\t\tif (stringArray.size() == 0){\n\t\t\treturn new ArrayList<StudentCourse>();\n\t\t}\n for (int i = 0 ; i < stringArray.size() ; i++) {\n\t\t\t\tString field = (String) stringArray.get(i);\n\n\t\t\t\t// get individual 'fields' of the string separated by SEPARATOR\n\t\t\t\t// pass in the string to the string tokenizer using delimiter \",\"\n\t\t\t\tStringTokenizer tokenizer = new StringTokenizer(field, SEPARATOR);\n\n\t\t\t\t//first to fifth tokens\n\t\t\t\tString userID = tokenizer.nextToken().trim();\n\t\t\t\tString userName = tokenizer.nextToken().trim();\n\t\t\t\tString courseID = tokenizer.nextToken().trim();\n\t\t\t\tint indexID = Integer.parseInt(tokenizer.nextToken().trim());\n\t\t\t\tString registerStatus = tokenizer.nextToken().trim();\n\n\t\t\t\t// create Course object from file data\n\t\t\t\tStudentCourse course = new StudentCourse(userID, userName, courseID, indexID, registerStatus);\n\t\t\t\t// add to Courses list\n\t\t\t\tstudentCourseList.add(course) ;\n\t\t}\n\t\treturn studentCourseList ;\n\t}", "private void init() throws UnknownHostException, RemoteException {\n\n FileApp.setMapper(this);\n predKey = 0;\n toDistribute = readNodeEntries();\n //System.out.println(\"Mapper.init() :: toDistribute=\"+toDistribute);\n }", "public UsersInF() {\n initComponents();\n dao = new UsersDAO();\n loadTableUsers(dao.readAll());\n }", "public Teacher() {\n// coursesTaught = new ArrayList<Course>();\n }", "private void initializeCompletedCourses() {\r\n try {\r\n String query = \"SELECT * FROM completedregistrations WHERE studentid=?\";\r\n PreparedStatement pstmt = conn.prepareStatement(query);\r\n pstmt.setInt(1, id);\r\n ResultSet rs = pstmt.executeQuery();\r\n completeCourses = new ArrayList<>();\r\n while (rs.next()) {\r\n completeCourses.add(new Registration(rs.getInt(\"studentid\"), rs.getInt(\"courseid\"), rs.getInt(\"secnum\"), rs.getString(\"grade\"), conn));\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }", "private void initialize() {\n\n // \n // 1) Driver to run Seed Tracker.\n //\n if (!strategyResource.startsWith(\"/\")) {\n strategyResource = \"/org/hps/recon/tracking/strategies/\" + strategyResource;\n }\n List<SeedStrategy> sFinallist = StrategyXMLUtils.getStrategyListFromInputStream(this.getClass().getResourceAsStream(strategyResource));\n StraightTracker stFinal = new StraightTracker(sFinallist, this._useHPSMaterialManager, this.includeMS);\n// stFinal.setApplySectorBinning(_applySectorBinning);\n stFinal.setUseDefaultXPlane(false);\n stFinal.setDebug(this.debug);\n stFinal.setIterativeConfirmed(_iterativeConfirmed);\n stFinal.setMaterialManagerTransform(CoordinateTransformations.getTransform());\n stFinal.setInputCollectionName(stInputCollectionName);\n stFinal.setTrkCollectionName(trackCollectionName);\n stFinal.setBField(bfield);\n stFinal.setTrackFittingAlgorithm(new StraightTrackAxialFitter());\n if (debug) {\n stFinal.setDiagnostics(new SeedTrackerDiagnostics());\n }\n // stFinal.setSectorParams(false); //this doesn't actually seem to do anything\n stFinal.setSectorParams(1, 10000);\n add(stFinal);\n//\n// if (rmsTimeCut > 0) {\n// stFinal.setTrackCheck(new HitTimeTrackCheck(rmsTimeCut));\n// }\n }", "public int initDb(KeywordFactory kwf, Reader csv) \n throws InterruptedException, IOException\n {\n int ex = 0;\n ex = createTable(kwf);\n if (ex > 0) return ex;\n\n ex = loadData(csv, kwf);\n return ex;\n }", "public Student3TierImpl() throws RemoteException {\r\n initializeDB();\r\n }", "private void initiliaze() {\r\n\t\tthis.inputFile = cd.getInputFile();\r\n\t\tthis.flowcell = cd.getFlowcell();\r\n\t\tthis.totalNumberOfTicks = cd.getOptions().getTotalNumberOfTicks();\r\n\t\tthis.outputFile = cd.getOutputFile();\r\n\t\tthis.statistics = cd.getStatistic();\r\n\t}", "private void setupVariables() {\n activeCourseList = new ArrayList<>();\n activeScheduleList = new ArrayList<>();\n\n scanner = new Scanner(System.in);\n reader = new JsonReader(\"./data/ScheduleList.json\",\n \"./data/CourseList.json\");\n\n loadLists();\n }", "public static void main(String[] args)\n {\n\n // open text file\n File courseFile = new File(\"courses.txt\");\n // open a Scanner to read data from File\n Scanner courseReader = null;\n try\n {\n courseReader = new Scanner(courseFile);\n }\n catch (FileNotFoundException e)\n {\n System.out\n .println(\"No courseList Course found- courseList is empty\");\n }\n\n\n\n // Instantiate the HashMap\n HashMap<Integer, Course> courseHM = new HashMap<>();\n\n\n\n // read the file one course at a time & determine which subject\n // it is before creating an instance of the course and adding it\n // to the HashMap\n while ( courseReader != null && courseReader.hasNext() )\n {\n\n String category = courseReader.nextLine();\n String name = courseReader.nextLine();\n String crnString = courseReader.nextLine();\n Integer crn = Integer.parseInt(crnString);\n\n if ( category.equalsIgnoreCase(\"English\") )\n {\n\n String level = courseReader.nextLine();\n String format = courseReader.nextLine();\n\n // Creates the English course & puts it in the HashMap\n English tempClass = new English(category, name, crn, level, format);\n courseHM.put(crn, tempClass);\n\n }\n else if ( category.equalsIgnoreCase(\"Math\") )\n {\n\n String temp = courseReader.nextLine();\n boolean stem = Boolean.parseBoolean(temp);\n String format = courseReader.nextLine();\n\n // Creates the Math course & puts it in the HashMap\n Math tempClass = new Math(category, name, crn, stem, format);\n courseHM.put(crn, tempClass);\n\n }\n else if ( category.equalsIgnoreCase(\"History\") )\n {\n\n String temp = courseReader.nextLine();\n boolean areaEligible = Boolean.parseBoolean(temp);\n String format = courseReader.nextLine();\n\n // Creates the History course & puts it in the HashMap\n History tempClass = new History(category, name, crn, areaEligible,\n format);\n courseHM.put(crn, tempClass);\n\n }\n else\n {\n System.out.println(\"Unknown Course type \" + category);\n }\n\n }\n\n\n\n\n // iterates through the key set of Integers\n Set<Integer> keySet = courseHM.keySet();\n for (Integer key : keySet)\n {\n Course course = courseHM.get(key);\n System.out.println(key + \" : \" + course.toString());\n }\n\n\n\n }", "public Driver() {\n setupFiles();\n }", "@Override\n\t\tprotected void initialise() {\n\n\t\t}", "private CSVParser() {\n this.headerMap = new HashMap<>();\n this.header = null;\n this.toDoList = new ToDoList();\n }", "public void loadListFromCsv() {\n List<Publication> list = new ArrayList<>();\n String line;\n try(BufferedReader bufferedReader = new BufferedReader(new FileReader(\"saves/data.csv\"))){\n while ((line = bufferedReader.readLine()) != null){\n String[] attributes = line.split(\",(?=([^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)\");\n String[] formattedAttributes = formatAttributes(attributes);\n Publication book = createPublicationFromAttributes(formattedAttributes);\n list.add(book);\n }\n } catch (IOException e){\n System.out.println(\"IOException occurred: \" + e.getMessage());\n }\n\n this.library = list;\n }", "private FileLoader(){\n rows =new Vector<String>();\n //tsptwinstance= new TSPTWinstance();\n }" ]
[ "0.65844667", "0.57760435", "0.5754835", "0.5636304", "0.55789965", "0.5498095", "0.54975057", "0.5496811", "0.54867864", "0.5469335", "0.5402328", "0.53308153", "0.5317362", "0.5280143", "0.52755016", "0.52532786", "0.51881033", "0.51835203", "0.5168515", "0.5168185", "0.51674205", "0.51664037", "0.5166289", "0.5164516", "0.51609576", "0.51539075", "0.51385564", "0.5129713", "0.5111912", "0.5104069", "0.5101695", "0.50910175", "0.50845605", "0.5067276", "0.506382", "0.50628716", "0.5059446", "0.50530696", "0.5048673", "0.50445515", "0.50423455", "0.50423175", "0.50333446", "0.5029114", "0.502846", "0.5020612", "0.5014148", "0.49969327", "0.499556", "0.49948743", "0.4988798", "0.49755928", "0.49708936", "0.49671504", "0.49645656", "0.49487573", "0.49449533", "0.49412814", "0.49343473", "0.49327987", "0.49323058", "0.4930205", "0.4929995", "0.49129468", "0.49104536", "0.49072045", "0.48996672", "0.48979858", "0.4893842", "0.4880291", "0.48801047", "0.486479", "0.4862721", "0.48602223", "0.4854273", "0.48533916", "0.48491672", "0.48368698", "0.48367038", "0.48335397", "0.48276088", "0.48252964", "0.4816093", "0.48114032", "0.48101696", "0.48099798", "0.4806405", "0.4802471", "0.47995153", "0.4798082", "0.4795507", "0.47946358", "0.47882888", "0.47853103", "0.4784123", "0.4777607", "0.4777035", "0.47736347", "0.47697043", "0.47665057" ]
0.6081473
1
Ranks the universities based on the category of data.
private static void doubleRanker(int i, LinkedList<Course> subjectCourses) { TreeMap<Double, Course> map = new TreeMap<Double, Course>(Collections.reverseOrder()); for (Course c : subjectCourses) { switch (i) { case 2: map.put(c.uni.studentSatisfaction, c); break; case 4: map.put(1 - c.uni.costOfLiving, c); // In reverse order as lower is better. break; case 5: map.put(c.uni.studentFacultyRatio, c); break; case 7: map.put(c.uni.internationalStudentsRatio, c); break; case 8: map.put(c.uni.graduateProspects, c); break; } } Set<Entry<Double, Course>> doubleSet = map.entrySet(); Iterator<Entry<Double, Course>> doubleIt = doubleSet.iterator(); int counter = 1; while (doubleIt.hasNext()) { Map.Entry<Double, Course> me = (Map.Entry<Double, Course>) doubleIt.next(); LinkedList<RankedCourse> ranked = rankedCourses.get(subjectCourses.getFirst().subject); RankedCourse rc = new RankedCourse(); for (RankedCourse course : ranked) { if (course.courseName.equals(me.getValue().courseName) && course.uni.equals(me.getValue().uni)) { rc = course; break; } } switch (i) { case 2: rc.studentFacultyRatioRank = counter; case 4: rc.costOfLivingRank = counter; break; case 5: rc.studentFacultyRatioRank = counter; break; case 7: rc.internationalStudentsRatioRank = counter; break; case 8: rc.graduateProspectsRank = counter; break; } counter++; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setUniversityRank(int universityRank)\r\n\t{\r\n\t\tthis.universityRank = universityRank;\r\n\t}", "private void categorizeData(){\n\t\tfor(String s :userData.keySet()){\n\t\t\tTransactionData trans = userData.get(s);\n\t\t\tif(trans.getCategory() == 'I'){\n\t\t\t\tignorableTransactions.add(trans);\n\t\t\t}\n\t\t\telse if(trans.getCategory() == 'R'){\n\t\t\t\trestaurantTransactions.add(trans);\n\t\t\t}\n\t\t\telse if(trans.getCategory() == 'G'){\n\t\t\t\tgaspumpTransactions.add(trans);\n\t\t\t}\n\t\t\telse if(trans.getCategory() == 'M'){\n\t\t\t\tmarketTransactions.add(trans);\n\t\t\t}\n\t\t\telse if(trans.getCategory() == 'T'){\n\t\t\t\ttaxiTransactions.add(trans);\n\n\t\t\t}\n\t\t\telse if(trans.getCategory() == 'S'){\n\t\t\t\tstayTransactions.add(trans);\n\t\t\t}\n\t\t\tif(trans.getCategory() == 'U'){\n\t\t\t\tunknownTransactions.add(trans);\n\t\t\t}\n\t\t}\n\t}", "private static void generateUnis() {\r\n\t\tString[] lines = readFile(\"resources/unidata.csv\");\r\n\t\tint numOfUnis = lines.length + 1;\r\n\t\tfor (String line : lines) {\r\n\t\t\tString[] attributes = line.split(\",\");\r\n\t\t\tUniversity temp = new University();\r\n\t\t\ttemp.name = attributes[0];\r\n\t\t\ttemp.type = attributes[1];\r\n\t\t\ttemp.isRussellGroup = Boolean.parseBoolean(attributes[2]);\r\n\t\t\ttemp.studentSatisfaction = Double.parseDouble(attributes[3]);\r\n\t\t\ttemp.nationwideRanking = numOfUnis - Integer.parseInt(attributes[4]);\r\n\t\t\ttemp.costOfLiving = Double.parseDouble(attributes[5]);\r\n\t\t\ttemp.studentFacultyRatio = Double.parseDouble(attributes[6]);\r\n\t\t\ttemp.researchOutput = (int) Double.parseDouble(attributes[7]); // THIS LINE IS INCORRECT\r\n\t\t\ttemp.internationalStudentsRatio = Double.parseDouble(attributes[8]);\r\n\t\t\ttemp.graduateProspects = Double.parseDouble(attributes[9]);\r\n\t\t\t/*\r\n\t\t\t * Structure of CSV file containing general university data: NAME, TYPE (City or\r\n\t\t\t * Campus), RUSSELL GROUP, STUDENT SATISFACTION, NATIONWIDE RANKING (Overall),\r\n\t\t\t * COST OF LIVING (According to appropriate cost of living index), STUDENT\r\n\t\t\t * FACULTY RATIO, RESEARCH OUTPUT, INTERNATIONAL STUDENT RATIO and GRADUATE\r\n\t\t\t * PROSPECTS (How many graduates in full-time employment or education after an\r\n\t\t\t * appropriate period).\r\n\t\t\t */\r\n\t\t\tunis.put(temp.name, temp);\r\n\t\t}\r\n\t}", "public void randomizeCategory() {\n this.group = (int) (3*Math.random()+1);\n }", "private HashMap<DIVISION, CompetitiveRank[]> createRankMap() {\n HashMap<DIVISION, CompetitiveRank[]> ranks = new HashMap<>();\n ranks.put(DIVISION.IRON, createRankTiers(DIVISION.IRON, 3));\n ranks.put(DIVISION.BRONZE, createRankTiers(DIVISION.BRONZE, 3));\n ranks.put(DIVISION.SILVER, createRankTiers(DIVISION.SILVER, 3));\n ranks.put(DIVISION.GOLD, createRankTiers(DIVISION.GOLD, 3));\n ranks.put(DIVISION.PLATINUM, createRankTiers(DIVISION.PLATINUM, 3));\n ranks.put(DIVISION.DIAMOND, createRankTiers(DIVISION.DIAMOND, 3));\n ranks.put(DIVISION.IMMORTAL, createRankTiers(DIVISION.IMMORTAL, 3));\n\n // No tiers\n ranks.put(DIVISION.UNRATED, createRankTier(DIVISION.UNRATED));\n ranks.put(DIVISION.RADIANT, createRankTier(DIVISION.RADIANT));\n return ranks;\n }", "private CompetitiveRank[] createRankTier(DIVISION division) {\n return createRankTiers(division, 1);\n }", "public static Map<Integer, TaxCategory> britishColumbia() {\n\n\t\t\tHashMap<Integer, TaxCategory> categories = new HashMap<Integer, TaxCategory>();\n\t\t\ttry {\n\t\t\t\t//INSERT YOUR CODE HERE - Using the specification given on Federal\n\t\t\t\t//You will need to study how Manitoba is being implemented\n\t\t\t\tTaxCategory cat1 = new TaxCategory(5.06, 0, 42184.00); // Tax Category 1 for BC\n\t\t\t\tcategories.put( 1, cat1 );//puts both the key and the Taxcategory(value) into the hashmap for category 1\n\t\t\t\tTaxCategory cat2 = new TaxCategory(7.70, 42184.01, 84369.00); // Tax Category 2 for BC\n\t\t\t\tcategories.put( 2, cat2 );//puts both the key and the Taxcategory(value) into the hashmap for category 2\n\t\t\t\tTaxCategory cat3 = new TaxCategory(10.50, 84369.01, 96866.00); // Tax Category 3 for BC\n\t\t\t\tcategories.put( 3, cat3 );//puts both the key and the Taxcategory(value) into the hashmap for category 3\n\t\t\t\tTaxCategory cat4 = new TaxCategory(12.29, 96866.01, 117623.00); // Tax Category 4 for BC\n\t\t\t\tcategories.put( 4, cat4 );//puts both the key and the Taxcategory(value) into the hashmap for category 4\n\t\t\t\tTaxCategory cat5 = new TaxCategory(14.70, 117623.01, 159483.00); // Tax Category 5 for BC\n\t\t\t\tcategories.put( 5, cat5 );//puts both the key and the Taxcategory(value) into the hashmap for category 5\n\t\t\t\tTaxCategory cat6 = new TaxCategory(16.80, 159483.01, 222420.00); // Tax Category 6 for BC\n\t\t\t\tcategories.put( 6, cat6 );//puts both the key and the Taxcategory(value) into the hashmap for category 6\n\t\t\t\tTaxCategory cat7 = new TaxCategory(20.50, 222420.01, 10000000); // Tax Category 7 for BC\n\t\t\t\tcategories.put( 7, cat7 );//puts both the key and the Taxcategory(value) into the hashmap for category 7\n\n\t\t\t} catch( Exception e ) {}\n\n\t\t\treturn categories;\n\t\t}", "private void assignCapitals() {\n City bestCity = null;\n int mostLandTilesSurrounding = 0;\n int landTilesSurrounding = 0;\n int minRow = 0;\n int maxRow = 0;\n int minColumn = 0;\n int maxColumn = 0;\n if (numPlayers == 2) {\n for (int i = 0; i < 2; i++) {\n mostLandTilesSurrounding = 0;\n if (i == 0) {\n minRow = 0;\n maxRow = MAP_LENGTH-1;\n minColumn = 0;\n maxColumn = MAP_LENGTH/2;\n } else if (i == 1) {\n minRow = 0;\n maxRow = MAP_LENGTH-1;\n minColumn = MAP_LENGTH/2;;\n maxColumn = MAP_LENGTH-1;\n }\n for (int r = minRow; r < maxRow; r++) {\n for (int c = minColumn; c < maxColumn; c++) {\n if (tileMap[r][c].getCity() != null) {\n landTilesSurrounding = surroundingLandCheckCity(tileMap[r][c].getCity());\n if (landTilesSurrounding > mostLandTilesSurrounding) {\n mostLandTilesSurrounding = landTilesSurrounding;\n bestCity = tileMap[r][c].getCity();\n }\n }\n }\n }\n tileMap[bestCity.getRow()][bestCity.getCol()].getCity().setTribe(i);\n tileMap[bestCity.getRow()][bestCity.getCol()].getCity().setCapital(true);\n capitalCities[numCapitalCities] = tileMap[bestCity.getRow()][bestCity.getCol()].getCity();\n numCapitalCities++;\n }\n } else if (numPlayers == 3) {\n\n for (int i = 0; i < 3; i++) {\n mostLandTilesSurrounding = 0;\n if (i == 0) {\n minRow = 0;\n maxRow = MAP_LENGTH / 2;\n minColumn = 0;\n maxColumn = MAP_LENGTH / 2;\n } else if (i == 1) {\n minRow = 0;\n maxRow = MAP_LENGTH / 2;\n minColumn = MAP_LENGTH / 2;\n maxColumn = MAP_LENGTH - 1;\n } else if (i == 2) {\n minRow = MAP_LENGTH / 2;\n maxRow = MAP_LENGTH - 1;\n minColumn = 0;\n maxColumn = MAP_LENGTH / 2;\n }\n for (int r = minRow; r < maxRow; r++) {\n for (int c = minColumn; c < maxColumn; c++) {\n if (tileMap[r][c].getCity() != null) {\n landTilesSurrounding = surroundingLandCheckCity(tileMap[r][c].getCity());\n if (landTilesSurrounding > mostLandTilesSurrounding) {\n mostLandTilesSurrounding = landTilesSurrounding;\n bestCity = tileMap[r][c].getCity();\n }\n }\n }\n }\n tileMap[bestCity.getRow()][bestCity.getCol()].getCity().setTribe(i);\n tileMap[bestCity.getRow()][bestCity.getCol()].getCity().setCapital(true);\n capitalCities[numCapitalCities] = tileMap[bestCity.getRow()][bestCity.getCol()].getCity();\n numCapitalCities++;\n System.out.println(\"Capital city of player \" + i + \" is at \" + bestCity.getCol() + \", \" + bestCity.getRow()); //For checking capital city determination\n }\n } else if (numPlayers == 4) {\n for (int i = 0; i < 4; i++) {\n mostLandTilesSurrounding = 0;\n if (i == 0) {\n minRow = 0;\n maxRow = MAP_LENGTH/2;\n minColumn = 0;\n maxColumn = MAP_LENGTH/2;\n } else if (i == 1) {\n minRow = 0;\n maxRow = MAP_LENGTH/2;\n minColumn = MAP_LENGTH/2;\n maxColumn = MAP_LENGTH-1;\n } else if (i == 2) {\n minRow = MAP_LENGTH/2;\n maxRow = MAP_LENGTH-1;\n minColumn = 0;\n maxColumn = MAP_LENGTH/2;\n } else if (i == 3) {\n minRow = MAP_LENGTH/2;\n maxRow = MAP_LENGTH-1;\n minColumn = MAP_LENGTH/2;\n maxColumn = MAP_LENGTH-1;\n }\n for (int r = minRow; r < maxRow; r++) {\n for (int c = minColumn; c < maxColumn; c++) {\n if (tileMap[r][c].getCity() != null) {\n landTilesSurrounding = surroundingLandCheckCity(tileMap[r][c].getCity());\n if (landTilesSurrounding > mostLandTilesSurrounding) {\n mostLandTilesSurrounding = landTilesSurrounding;\n bestCity = tileMap[r][c].getCity();\n }\n }\n }\n }\n tileMap[bestCity.getRow()][bestCity.getCol()].getCity().setTribe(i);\n tileMap[bestCity.getRow()][bestCity.getCol()].getCity().setCapital(true);\n capitalCities[numCapitalCities] = tileMap[bestCity.getRow()][bestCity.getCol()].getCity();\n numCapitalCities++;\n }\n }\n }", "private void getUniversities() {\n ProgressDialog dialog = new ProgressDialog(this, \"Caricamento...\");\n application.databaseCall(\"universities.php\", UNIVERSITY_SELECTION_TAG, dialog);\n }", "private static void rankCourses() {\r\n\t\tfor (String subject : courses.keySet()) {\r\n\t\t\tLinkedList<Course> subjectCourses = courses.get(subject);\r\n\t\t\tfor (int i = 1; i <= 8; i++) {\r\n\t\t\t\tswitch (i) {\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\t// Subject rank\r\n\t\t\t\t\tintRanker(1, subjectCourses);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\t// Student satisfaction\r\n\t\t\t\t\tintRanker(2, subjectCourses);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\t// Nationwide ranking\r\n\t\t\t\t\tdoubleRanker(3, subjectCourses);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\t// Cost of living\r\n\t\t\t\t\tdoubleRanker(4, subjectCourses);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\t// Student to faculty ratio\r\n\t\t\t\t\tdoubleRanker(5, subjectCourses);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 6:\r\n\t\t\t\t\t// Research Output\r\n\t\t\t\t\tintRanker(6, subjectCourses);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 7:\r\n\t\t\t\t\t// International students\r\n\t\t\t\t\tdoubleRanker(7, subjectCourses);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 8:\r\n\t\t\t\t\t// Graduate prospects\r\n\t\t\t\t\tdoubleRanker(8, subjectCourses);\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}", "private CompetitiveRank[] createRankTiers(DIVISION division, int count) {\n CompetitiveRank[] ranks = new CompetitiveRank[count];\n for(int i = 0; i < ranks.length; i++) {\n ranks[i] = createRank(division, i + 1);\n }\n return ranks;\n }", "private void iniciarRanking() {\n\t\tif(!usouIa) {\r\n\t\t\tswitch (this.dificuldade) {\r\n\t\t\tcase FACIL:\r\n\t\t\t\trank = new RankingFacil();\r\n\t\t\t\tbreak;\r\n\t\t\tcase MEDIO:\r\n\t\t\t\trank = new RankingMedio();\r\n\t\t\t\tbreak;\r\n\t\t\tcase DIFICIL:\r\n\t\t\t\trank = new RankingDificil();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\trank.iniciarRanking(new Jogador(this.nomeJogador, timer.getTempo(), timer.getTempoTotal()));//MANDA O NOME DO JOGADOR, O TEMPO FORMATADO E O TEMPO TOTAL PRO RANKING\r\n\t\t}\r\n\t}", "private void populateData() {\r\n\t\tfor(int i = 0; i < this.incomeRanges.length; i++) {\r\n\t\t\tthis.addData(new Data(incomeRanges[i], 0), true);\r\n\t\t}\t// end for\r\n\t}", "public void sortCompetitors(){\n\t\t}", "private CompetitiveRank createRank(DIVISION division, int tier) {\n return new CompetitiveRank(\n division,\n tier,\n resourceHandler.getImageResource(BASE_PATH + division.name() + \"/\" + tier + \".png\")\n );\n }", "private void arrangeFactors() {\n List<Condition> tempTrialConditions = new ArrayList<Condition>();\n List<Condition> tempStudyConditions = new ArrayList<Condition>();\n List<ibfb.domain.core.Factor> tempFactors = new ArrayList<ibfb.domain.core.Factor>();\n\n // conditions\n for (Condition cond : workbookStudy.getConditions()) {\n if (hasLabel(cond.getLabel(), Workbook.STUDY)) {\n cond.setLabel(Workbook.STUDY);\n tempStudyConditions.add(cond);\n }\n }\n for (Condition cond : workbookStudy.getStudyConditions()) {\n if (hasLabel(cond.getLabel(), Workbook.STUDY)) {\n cond.setLabel(Workbook.STUDY);\n tempStudyConditions.add(cond);\n }\n }\n\n // study conditions\n for (Condition cond : workbookStudy.getConditions()) {\n //if (hasLabel(cond.getLabel(), Workbook.TRIAL_LABEL)) {\n if (hasLabel(cond.getLabel(), workbookStudy.getTrialLabel())) {\n\n cond.setLabel(workbookStudy.getTrialLabel());\n tempTrialConditions.add(cond);\n }\n }\n for (Condition cond : workbookStudy.getStudyConditions()) {\n // if (hasLabel(cond.getLabel(), Workbook.TRIAL_LABEL)) {\n if (hasLabel(cond.getLabel(), workbookStudy.getTrialLabel())) {\n cond.setLabel(workbookStudy.getTrialLabel());\n tempTrialConditions.add(cond);\n }\n }\n\n // factors (ENTRY)\n for (Condition cond : workbookStudy.getStudyConditions()) {\n //if (hasLabel(cond.getLabel(), Workbook.TRIAL_LABEL)) {\n if (hasLabel(cond.getLabel(), workbookStudy.getTrialLabel())) {\n //tempFactors.add(getFactor(cond, Workbook.ENTRY_LABEL));\n tempFactors.add(getFactor(cond, workbookStudy.getTrialLabel()));\n }\n }\n\n for (Condition cond : workbookStudy.getConditions()) {\n //if (hasLabel(cond.getLabel(), Workbook.ENTRY_LABEL)) {\n if (hasLabel(cond.getLabel(), workbookStudy.getEntryLabel())) {\n //tempFactors.add(getFactor(cond, Workbook.ENTRY_LABEL));\n tempFactors.add(getFactor(cond, workbookStudy.getEntryLabel()));\n }\n }\n for (ibfb.domain.core.Factor factor : workbookStudy.getFactors()) {\n //if (hasLabel(factor.getLabel(), Workbook.ENTRY_LABEL)) {\n if (hasLabel(factor.getLabel(), workbookStudy.getEntryLabel())) {\n tempFactors.add(factor);\n }\n }\n\n // Factors (plot)\n for (Condition cond : workbookStudy.getStudyConditions()) {\n //if (hasLabel(cond.getLabel(), Workbook.PLOT_LABEL)) {\n if (hasLabel(cond.getLabel(), workbookStudy.getPlotLabel())) {\n //tempFactors.add(getFactor(cond, Workbook.PLOT_LABEL));\n tempFactors.add(getFactor(cond, workbookStudy.getPlotLabel()));\n }\n }\n for (Condition cond : workbookStudy.getConditions()) {\n //if (hasLabel(cond.getLabel(), Workbook.PLOT_LABEL)) {\n if (hasLabel(cond.getLabel(), workbookStudy.getPlotLabel())) {\n //tempFactors.add(getFactor(cond, Workbook.PLOT_LABEL));\n tempFactors.add(getFactor(cond, workbookStudy.getPlotLabel()));\n }\n }\n\n for (ibfb.domain.core.Factor factor : workbookStudy.getFactors()) {\n //if (hasLabel(factor.getLabel(), Workbook.PLOT_LABEL)) {\n if (hasLabel(factor.getLabel(), workbookStudy.getPlotLabel())) {\n tempFactors.add(factor);\n /*} else if (factor.getLabel() != null && workbookStudy.getOtherLabels().contains(factor.getLabel())) {\n tempFactors.add(factor);\n */\n }\n }\n\n for (ibfb.domain.core.Factor factor : workbookStudy.getFactors()) {\n //if (hasLabel(factor.getLabel(), Workbook.PLOT_LABEL)) {\n if (factor.getLabel() != null \n && !hasLabel(factor.getLabel(), Workbook.STUDY)\n && !hasLabel(factor.getLabel(), workbookStudy.getEntryLabel())\n && !hasLabel(factor.getLabel(), workbookStudy.getPlotLabel())\n && !hasLabel(factor.getLabel(), workbookStudy.getTrialLabel())) {\n tempFactors.add(factor);\n }\n }\n\n workbookStudy.setStudyConditions(tempStudyConditions);\n workbookStudy.setConditions(tempTrialConditions);\n workbookStudy.setFactors(tempFactors);\n }", "private void Deciderank() {\n\n\t\tfor(int i=0;i<banknode;i++){\n\t\t\tif(i<banknode*a1) {Bank.get(i).CAR=megaCAR;Bank.get(i).forcelev=megaCAR;}\n\t\t\tif(banknode*a1<=i&&i<=banknode*a2) {Bank.get(i).CAR=mediumCAR;Bank.get(i).forcelev=mediumCAR;}\n\t\t\tif(banknode*a2<i) {Bank.get(i).CAR=smallCAR;Bank.get(i).forcelev=smallCAR;}\n\t\t\t}\n\t\t}", "@Override\n\t@Transactional\n\n\tpublic void initCategorie() {\n\t\tStream.of(\"Action\",\"Drame\",\"Guerre\",\"Fantastique\",\"Science-fiction\",\"Thriller\").forEach(cat->{\n\t\t\tCategorie categorie=new Categorie();\n\t\t\tcategorie.setName(cat);\n\t\t\tcategorieRepository.save(categorie);\n\t\t});\n\t}", "private void updateRanking(boolean byTime, char[] allTyreTypes)\n {\n if(byTime) // if required to sort by time\n {\n getDrivers().adjustDriversListByTime(allTyreTypes);\n }\n else // if required to sort by championship score\n {\n getDrivers().sortByScore();\n }\n for(int i = 0 ; i < getDrivers().getSize() ; i++)\n {\n getDrivers().getDriver(i).setRanking(i + 1); // update ranking\n }\n }", "public static void sortByFitlvl() {\n Collections.sort(Population);\n if (debug) {\n debugLog(\"\\nSorted: \");\n printPopulation();\n }\n }", "private void loadData() {\r\n\t\talert(\"Loading data ...\\n\");\r\n \r\n // ---- categories------\r\n my.addCategory(new Category(\"1\", \"VIP\"));\r\n my.addCategory(new Category(\"2\", \"Regular\"));\r\n my.addCategory(new Category(\"3\", \"Premium\"));\r\n my.addCategory(new Category(\"4\", \"Mierder\"));\r\n \r\n my.loadData();\r\n \r\n\t }", "public void populateRiver()\n\t{\n\t\twhile (emptyIndices.size() != 10) // 10 animals requirement at start\n\t\t{\n\t\t\tswitch (rng.nextInt(3))\n\t\t\t{\n\t\t\tcase 0:\n\t\t\t\triver[rng.nextInt(20)] = new Bear();\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\triver[rng.nextInt(20)] = new Fish();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\triver[rng.nextInt(20)] = null;\n\t\t\t}\n\t\t\tfindEmpty(); // force emptyIndices update\n\t\t}\n\t}", "public void ordenarRanking(){\n for(int i = 0; i < clasificacion.length; i++) {\n boolean flag = false;\n for(int j = 0; j < clasificacion.length-1; j++) {\n\n /*Si el elemento de la posicion j+1 es mayor que el anterior se intercambian\n los valores de esas posiciones*/\n if((clasificacion[j].getMediana())<(clasificacion[j+1].getMediana())) {\n Ranking k = new Ranking();\n k=clasificacion[j];\n clasificacion[j] = clasificacion[i];\n clasificacion[i] = k;\n flag=true; //Se pone a true para indicar que se ha hecho un cambio\n }//END_IF\n }//END_FOR\n\n if(!flag) break; //Si flag es igual a falso quiere decir que en la ultima iteracion\n //no hubo ningun intercambio y por lo tanto el metodo puede terminar\n //ya que el vector esta ordenado\n }//END_FOR\n\n }", "protected void levelUp() {\n\t\tlevel++;\n\t\t// set up floors for next level\n\t\tint[] nextFloors = floors[level];\n\t\tint[] nextFurnishing = furnishings[level];\n\t\tfor(int i = 0; i < nextFloors.length; i++) {\n\t\t\tFloor newFloor = game.getFloorByKey(nextFloors[i]);\n\t\t\ttiles[i].setFloor(newFloor);\n\t\t\tif(nextFurnishing[i] != 0) {\n\t\t\t\tFurnishingDirectory newFurn = game.getFurnishingByKey(nextFurnishing[i]);\n\t\t\t\tnew Furnishing(newFurn, tiles[i]);\n\t\t\t}\n\t\t}\n\t}", "public static Map<Integer, TaxCategory> newBrunswick() {\n\n\t\t\tHashMap<Integer, TaxCategory> categories = new HashMap<Integer, TaxCategory>();\n\t\t\ttry {\n\t\t\t\t//INSERT YOUR CODE HERE - Using the specification given on Federal\n\t\t\t\t//You will need to study how Manitoba is being implemented\n\t\t\t\tTaxCategory cat1 = new TaxCategory(9.68, 0, 43835); //Tax Category 1 for NewBrunswick\n\t\t\t\tcategories.put( 1, cat1 ); //puts both the key and the Taxcategory(value) into the hashmap for category 1\n\t\t\t\tTaxCategory cat2 = new TaxCategory(14.82, 43835.01, 87671); //Tax Category 1 for NewBrunswick\n\t\t\t\tcategories.put( 2, cat2 ); //puts both the key and the Taxcategory(value) into the hashmap for category 2\n\t\t\t\tTaxCategory cat3 = new TaxCategory(16.52, 87671.01, 142534); //Tax Category 1 for NewBrunswick\n\t\t\t\tcategories.put( 3, cat3 ); //puts both the key and the Taxcategory(value) into the hashmap for category 3\n\t\t\t\tTaxCategory cat4 = new TaxCategory(17.84, 142534.01, 162383); //Tax Category 1 for NewBrunswick\n\t\t\t\tcategories.put( 4, cat4 ); //puts both the key and the Taxcategory(value) into the hashmap for category 4\n\t\t\t\tTaxCategory cat5 = new TaxCategory(20.3, 162383.01, 10000000); //Tax Category 1 for NewBrunswick\n\t\t\t\tcategories.put( 5, cat5 ); //puts both the key and the Taxcategory(value) into the hashmap for category 5\n\n\t\t\t} catch( Exception e ) {}\n\n\t\t\treturn categories;\n\t\t}", "private void populateBasicLists() {\n // TODO chathuranga change following\n districtList = districtDAO.getDistrictNames(language, user);\n // TODO chathuranga when search by all district option\n /* if (districtId == 0) {\n if (!districtList.isEmpty()) {\n districtId = districtList.keySet().iterator().next();\n logger.debug(\"first allowed district in the list {} was set\", districtId);\n }\n }*/\n dsDivisionList = dsDivisionDAO.getDSDivisionNames(districtId, language, user);\n mrDivisionList = mrDivisionDAO.getMRDivisionNames(dsDivisionId, language, user);\n }", "private void setCategoryData(){\n ArrayList<Category> categories = new ArrayList<>();\n //add categories\n categories.add(new Category(\"Any Category\",0));\n categories.add(new Category(\"General Knowledge\", 9));\n categories.add(new Category(\"Entertainment: Books\", 10));\n categories.add(new Category(\"Entertainment: Film\", 11));\n categories.add(new Category(\"Entertainment: Music\", 12));\n categories.add(new Category(\"Entertainment: Musicals & Theaters\", 13));\n categories.add(new Category(\"Entertainment: Television\", 14));\n categories.add(new Category(\"Entertainment: Video Games\", 15));\n categories.add(new Category(\"Entertainment: Board Games\", 16));\n categories.add(new Category(\"Science & Nature\", 17));\n categories.add(new Category(\"Science: Computers\", 18));\n categories.add(new Category(\"Science: Mathematics\", 19));\n categories.add(new Category(\"Mythology\", 20));\n categories.add(new Category(\"Sport\", 21));\n categories.add(new Category(\"Geography\", 22));\n categories.add(new Category(\"History\", 23));\n categories.add(new Category(\"Politics\", 24));\n categories.add(new Category(\"Art\", 25));\n categories.add(new Category(\"Celebrities\", 26));\n categories.add(new Category(\"Animals\", 27));\n categories.add(new Category(\"Vehicles\", 28));\n categories.add(new Category(\"Entertainment: Comics\", 29));\n categories.add(new Category(\"Science: Gadgets\", 30));\n categories.add(new Category(\"Entertainment: Japanese Anime & Manga\", 31));\n categories.add(new Category(\"Entertainment: Cartoon & Animations\", 32));\n\n //fill data in selectCategory Spinner\n ArrayAdapter<Category> adapter = new ArrayAdapter<>(this,\n android.R.layout.simple_spinner_dropdown_item, categories);\n selectCategory.setAdapter(adapter);\n\n }", "private void pickUtts() {\n for (int i = 0; i < CATEGORIES.length; i++)\n pickedUtts[i] = new Utterance[BUTTONS_PER_PAGE];\n // check all categories to be sure there's enough\n for (int i = 0; i < CATEGORIES.length; i++) {\n if(includedUtts.get(i).size() < BUTTONS_PER_PAGE)\n new Exception().printStackTrace();\n }\n // pick new utts\n Random ran = new Random();\n for (int i = 0; i < CATEGORIES.length; i++) {\n Utterance pick;\n for ( int j = 0; j < BUTTONS_PER_PAGE; j++ ) {\n do {\n pick = includedUtts.get(i).get(ran.nextInt(includedUtts.get(i).size()));\n } while (Arrays.asList(pickedUtts[i]).contains(pick));\n pickedUtts[i][j] = pick;\n }\n }\n }", "public void university(){\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(\"Registry:\");\n\t\tString registry = reader.nextLine();\n\t\tSystem.out.println(\"Number of years accredited:\");\n\t\tint accreditedYears = reader.nextInt();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Rector name:\");\n\t\tString rectorName = reader.nextLine();\n\t\tSystem.out.println(\"Number of students in stratum 1 and 2:\");\n\t\tint studentsStratum = reader.nextInt();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Number of students:\");\n\t\tint students = reader.nextInt();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Position in the saberPro test:\");\n\t\tint nationalPositionPro = reader.nextInt();\n\t\treader.nextLine();\n\t\tUniversity toAdd = new University(nameRegistered, nit, address, contactNumber, employees, value, legalRepresentative, constitution, rows, type, registry, accreditedYears, rectorName, studentsStratum, students, nationalPositionPro);\n\t\ttheHolding.addSubordinate(toAdd);\n\t\tSystem.out.println(\"The company were added successfuly\");\n\t}", "private Pool setUpSkookumchuk() {\n final int skookumchukVolume = 1000;\n final int skookumchukTemperature = 42;\n final double skookumchukPH = 7.9;\n final double skookumchukNutrientCoefficient = 0.9;\n final int skookumchukNumberOfGuppies = 100;\n final int skookumchukMinAge = 10;\n final int skookumchukMaxAge = 25;\n final double skookumchukMinHealthCoefficient = 0.5;\n final double skookumchukMaxHealthCoefficient = 0.8;\n\n GuppySet skookumchukGuppies = new GuppySet(skookumchukNumberOfGuppies,\n skookumchukMinAge, skookumchukMaxAge,\n skookumchukMinHealthCoefficient,\n skookumchukMaxHealthCoefficient);\n\n Pool skookumchuk = setUpPool(\"Skookumchuk\", skookumchukVolume,\n skookumchukTemperature, skookumchukPH,\n skookumchukNutrientCoefficient, skookumchukGuppies);\n\n return skookumchuk;\n }", "void Union( int x, int y){\n\n int i = root(x);\n int j = root(y);\n if (i == j) return;\n if (rank[i] > rank[j]) { id[j] = i; rank[i] += rank[j]; }\n else { id[i] = j; rank[j] += rank[i]; }\n }", "public void rank(){\n\n\t}", "public void fill(){\n int i = 0;\n for (Suit suit:Suit.values()){\n for (Rank rank:Rank.values()) {\n deck[i] = new Card(rank, suit);\n numCards++;\n i++;\n }\n }\n }", "private void initialiseCategories() {\n\t\t_nzCategories = BashCmdUtil.bashCmdHasOutput(\"ls categories/nz\");\n\t\t_intCategories = BashCmdUtil.bashCmdHasOutput(\"ls categories/international\");\n\t}", "public void init(){\n\t\tcontentInBank = new TreeMap<>();\n\t\tint bank=0;\n\t\tfor (int i = 0; i < MEMORY_ADDRESS_LIMIT; i++) {\n\t\t\tbank = i % numOfbank;\n\t\t\t\n\t\t\tif (contentInBank.get(bank) == null) {\n\t\t\t\tMap<Integer,Entry>con = new TreeMap<>();\n\t\t\t\tcon.put(i, new Entry(MemoryType.UNDEF,\"0\", i));\n\t\t\t\tcontentInBank.put(bank, con);\n\t\t\t} else {\n\t\t\t\tcontentInBank.get(bank).put(i, new Entry(MemoryType.UNDEF,\"0\", i));\t\n\t\t\t}\n\t\t}\n\t}", "private void updateData() {\n\t\tDefaultMutableTreeNode root = new DefaultMutableTreeNode(\"Rollmaterial\");\n\n\t\tif (treeModel == null) {\n\t\t\ttreeModel = new DefaultTreeModel(root);\n\t\t\tstocksTree.setModel(treeModel);\n\t\t}\n\n\t\tHashMap<String, HashSet<rollingstock>> allsorted = new HashMap<>();\n\t\tHashSet<rollingstock> sorted = new HashSet<>();\n\n\t\tfor (rollingstock rs : dataCollector.collector.getAllTrainData().stocks.values()) {\n\t\t\tsorted.add(rs);\n\t\t\tfor (String t : rs.getTypes()) {\n\t\t\t\tHashSet<rollingstock> th;\n\t\t\t\tth = allsorted.get(t);\n\t\t\t\tif (th == null) {\n\t\t\t\t\tth = new HashSet<>();\n\t\t\t\t\tallsorted.put(t, th);\n\t\t\t\t}\n\t\t\t\tth.add(rs);\n\t\t\t}\n\t\t}\n\n\t\tDefaultMutableTreeNode list1 = new DefaultMutableTreeNode(\"alphabetisch\");\n\t\troot.add(list1);\n\t\tfor (rollingstock rs : sorted) {\n\t\t\tlist1.add(new DefaultMutableTreeNode(rs));\n\t\t}\n\t\tlist1 = new DefaultMutableTreeNode(\"mit Antrieb\");\n\t\troot.add(list1);\n\t\tfor (rollingstock rs : sorted) {\n\t\t\tif (rs.getEngine() != null) {\n\t\t\t\tlist1.add(new DefaultMutableTreeNode(rs));\n\t\t\t}\n\t\t}\n\t\tlist1 = new DefaultMutableTreeNode(\"ohne Antrieb\");\n\t\troot.add(list1);\n\t\tfor (rollingstock rs : sorted) {\n\t\t\tif (rs.getEngine() == null) {\n\t\t\t\tlist1.add(new DefaultMutableTreeNode(rs));\n\t\t\t}\n\t\t}\n\n\t\tlist1 = new DefaultMutableTreeNode(\"nach Typ\");\n\t\troot.add(list1);\n\t\tfor (String t : allsorted.keySet()) {\n\t\t\tDefaultMutableTreeNode list2 = new DefaultMutableTreeNode(t);\n\t\t\tlist1.add(list2);\n\t\t\tDefaultMutableTreeNode welist = new DefaultMutableTreeNode(\"mit Antrieb\");\n\t\t\tDefaultMutableTreeNode woelist = new DefaultMutableTreeNode(\"ohne Antrieb\");\n\n\t\t\tlist2.add(welist);\n\t\t\tlist2.add(woelist);\n\t\t\tfor (rollingstock rs : allsorted.get(t)) {\n\t\t\t\tif (rs.getEngine() == null) {\n\t\t\t\t\twoelist.add(new DefaultMutableTreeNode(rs));\n\t\t\t\t} else {\n\t\t\t\t\twelist.add(new DefaultMutableTreeNode(rs));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\ttreeModel.setRoot(root);\n\t}", "@Override\n\tpublic void sortDeck() {\n\t\tfor(int i = 0; i < getCount() - 1; i++) {\n\t\t\tfor(int j = i + 1; j < getCount(); j++) {\n\t\t\t\tif(aktuellesDeck[i].compareTo(aktuellesDeck[j]) == 1) {\n\t\t\t\t\tSkatCard speicherCard = new SkatCard(aktuellesDeck[i].getSuit(), aktuellesDeck[i].getRank());\n\t\t\t\t\taktuellesDeck[i] = null;\n\t\t\t\t\taktuellesDeck[i] = new SkatCard(aktuellesDeck[j].getSuit(), aktuellesDeck[j].getRank());\n\t\t\t\t\taktuellesDeck[j] = null;\n\t\t\t\t\taktuellesDeck[j] = new SkatCard(speicherCard.getSuit(), speicherCard.getRank());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "void setDefaultRank(KingdomUser user);", "public void changeCategory(int index){\n if(user[index].getAmountCategory()>=3 && user[index].getAmountCategory()<=10){\n user[index].setCategoryUser(user[index].newCategory(\"littleContributor\"));\n }\n else if(user[index].getAmountCategory()>10 && user[index].getAmountCategory()<30){\n user[index].setCategoryUser(user[index].newCategory(\"mildContributor\"));\n }\n else if(user[index].getAmountCategory() == 30){\n user[index].setCategoryUser(user[index].newCategory(\"starContributor\"));\n }\n }", "private void move3(Habitat habitat,Pool pool)\r\n\t{\r\n\t\t// TODO Auto-generated method stub\r\n\t\tboolean moved = false;\r\n\t\tPool clonedPool=null;\r\n\t\tArrayList<Integer> tabuSivs = new ArrayList<Integer>();\r\n\t\ttabuSivs.add(-1);\r\n\t\t\r\n\t\t//Sort the users of the pool compared to gravity center\r\n\t\t//Collections.sort(pool.getListOfUsers(), User.ComparatorDistG);\r\n\t\t\r\n\t\tfor(int i =0;i<habitat.getSivs().size() - 1 && !moved;i++)\r\n\t\t{\r\n\t\t\tint k = (new Random()).nextInt(habitat.getSivs().size());\r\n\t\t\tint loops = 0;\r\n\t\t\twhile((habitat.getSivs().get(k) == pool || habitat.getSivs().get(k).getRestCarCap()==0 || tabuSivs.contains(k)) && loops<10 )\r\n\t\t\t{\r\n\t\t\t\tk = (new Random()).nextInt(habitat.getSivs().size());\r\n\t\t\t\tloops++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(!tabuSivs.contains(k))\r\n\t\t\t{\r\n\t\t\t\ttabuSivs.add(k);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//if(habitat.getSivs().get(i) != pool && habitat.getSivs().get(i).getListOfUsers().size()==1) \r\n\t\t\tif(habitat.getSivs().get(k) != pool && habitat.getSivs().get(k).getRestCarCap()>0)\r\n\t\t\t{\r\n\t\t\t\tclonedPool = (Pool) pool.clone();\r\n\t\t\t\t//for(int j=0;j<pool.getListOfUsers().size() && !moved;j++)\r\n\t\t\t\tfor(int j=pool.getListOfUsers().size() - 1; j>=0 && !moved;j--)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(habitat.getSivs().get(k).areAllUsersAuthorized(clonedPool.getListOfUsers().get(j).getNumUser()))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\thabitat.getSivs().get(k).addUser(clonedPool.getListOfUsers().get(j));\r\n\t\t\t\t\t\tif(habitat.getSivs().get(k).buildRoutes())\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tmoved = true;\r\n\t\t\t\t\t\t\tclonedPool.getListOfUsers().remove(j);\r\n\t\t\t\t\t\t\tclonedPool.buildRoutes();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\thabitat.getSivs().get(k).removeUser(clonedPool.getListOfUsers().get(j));\r\n\t\t\t\t\t\t\thabitat.getSivs().get(k).buildRoutes();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(moved)\r\n\t\t{\r\n\t\t\thabitat.removePool(pool);\r\n\t\t\thabitat.addPool(clonedPool);\r\n\t\t}\r\n\t}", "public static Map<Integer, TaxCategory> federal() {\n\n\t\t\tHashMap<Integer, TaxCategory> categories = new HashMap<Integer, TaxCategory>();\n\t\t\ttry {\n\t\t\t\t//INSERT YOUR CODE HERE - Using the specification given on Federal\n\t\t\t\t//You will need to study how Manitoba is being implemented\n\t\t\t\tTaxCategory cat1 = new TaxCategory(15, 0, 49020); //Tax Category 1 for federal\n\t\t\t\tcategories.put( 1, cat1 );//puts both the key and the Taxcategory(value) into the hashmap for category 1\n\t\t\t\tTaxCategory cat2 = new TaxCategory( 20.5, 49020.01, 98040); //Tax Category 2 for federal\n\t\t\t\tcategories.put( 2, cat2 );//puts both the key and the Taxcategory(value) into the hashmap for category 2\n\t\t\t\tTaxCategory cat3 = new TaxCategory(26, 98040.01, 151978); //Tax Category 3 for federal\n\t\t\t\tcategories.put( 3, cat3 );//puts both the key and the Taxcategory(value) into the hashmap for category 3\n\t\t\t\tTaxCategory cat4 = new TaxCategory(29, 151978.01, 216511); //Tax Category 4 for federal\n\t\t\t\tcategories.put( 4, cat4 );//puts both the key and the Taxcategory(value) into the hashmap for category 4\n\t\t\t\tTaxCategory cat5 = new TaxCategory(33, 216511.01, 10000000); //Tax Category 5 for federal\n\t\t\t\tcategories.put( 5, cat5 );//puts both the key and the Taxcategory(value) into the hashmap for category 5\n\n\t\t\t} catch( Exception e ) {}\n\n\t\t\treturn categories;\n\t\t}", "private void populateBranches() {\n\t\tStationsDTO[] station = null;\n\t\ttry {\n\t\t\tstation = handler.getAllBranches();\n\t\t\tif (null != station) {\n\t\t\t\tint len = station.length;\n\t\t\t\tfor (int i = 0; i < len; i++) {\n\t\t\t\t\tcoBranch.add(station[i].getName() + \" - \"\n\t\t\t\t\t\t\t+ station[i].getId());\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception exception) {\n\t\t\texception.printStackTrace();\n\t\t}\n\t}", "public void determineRank(){\r\n //ranks highcard 0, pair 1, twopair 2, three of a kind 3, straight 4, flush 5,\r\n //full house 6, four of a kind 7 , straight flush 8, royal flush 9\r\n //I should start top down.\r\n\r\n //Royal Flush\r\n if(isRoyalFlush())\r\n setRank(9);\r\n //Straight flush\r\n else if(isFlush() && isStraight())\r\n setRank(8);\r\n //four of a kind\r\n else if(isFourOfAKind())\r\n setRank(7);\r\n //full house\r\n else if( isFullHouse())\r\n setRank(6);\r\n //flush\r\n else if(isFlush())\r\n setRank(5);\r\n //straight\r\n else if(isStraight())\r\n setRank(4);\r\n //three of a kind\r\n else if(isThreeOfAKind())\r\n setRank(3);\r\n //twoPair\r\n else if(isTwoPair())\r\n setRank(2);\r\n //pair\r\n else if(isPair())\r\n setRank(1);\r\n //highcard\r\n else\r\n setRank(0);\r\n\r\n }", "public void groupSelectedFurniture() {\n List<HomePieceOfFurniture> selectedFurniture = getMovableSelectedFurniture();\n if (!selectedFurniture.isEmpty()) {\n final boolean basePlanLocked = this.home.isBasePlanLocked();\n final boolean allLevelsSelection = this.home.isAllLevelsSelection();\n final List<Selectable> oldSelection = this.home.getSelectedItems();\n List<HomePieceOfFurniture> homeFurniture = this.home.getFurniture();\n // Sort the grouped furniture in the ascending order of their index in home or their group\n Map<HomeFurnitureGroup, TreeMap<Integer, HomePieceOfFurniture>> groupedFurnitureMap =\n new HashMap<HomeFurnitureGroup, TreeMap<Integer, HomePieceOfFurniture>>();\n int groupedFurnitureCount = 0;\n for (HomePieceOfFurniture piece : selectedFurniture) {\n HomeFurnitureGroup group = getPieceOfFurnitureGroup(piece, null, homeFurniture);\n TreeMap<Integer, HomePieceOfFurniture> sortedMap = groupedFurnitureMap.get(group);\n if (sortedMap == null) {\n sortedMap = new TreeMap<Integer, HomePieceOfFurniture>();\n groupedFurnitureMap.put(group, sortedMap);\n }\n if (group == null) {\n sortedMap.put(homeFurniture.indexOf(piece), piece);\n } else {\n sortedMap.put(group.getFurniture().indexOf(piece), piece);\n }\n groupedFurnitureCount++;\n }\n final HomePieceOfFurniture [] groupedPieces = new HomePieceOfFurniture [groupedFurnitureCount]; \n final int [] groupedPiecesIndex = new int [groupedPieces.length];\n final Level [] groupedPiecesLevel = new Level [groupedPieces.length];\n final float [] groupPiecesElevation = new float [groupedPieces.length];\n final boolean [] groupPiecesVisible = new boolean [groupedPieces.length];\n final HomeFurnitureGroup [] groupedPiecesGroups = new HomeFurnitureGroup [groupedPieces.length];\n Level minLevel = this.home.getSelectedLevel();\n int i = 0;\n for (Map.Entry<HomeFurnitureGroup, TreeMap<Integer, HomePieceOfFurniture>> sortedMapEntry : groupedFurnitureMap.entrySet()) {\n for (Map.Entry<Integer, HomePieceOfFurniture> pieceEntry : sortedMapEntry.getValue().entrySet()) {\n HomePieceOfFurniture piece = pieceEntry.getValue();\n groupedPieces [i] = piece;\n groupedPiecesIndex [i] = pieceEntry.getKey();\n groupedPiecesLevel [i] = piece.getLevel();\n groupPiecesElevation [i] = piece.getElevation();\n groupPiecesVisible [i] = piece.isVisible();\n groupedPiecesGroups [i] = sortedMapEntry.getKey();\n if (groupedPiecesLevel [i] != null) {\n if (minLevel == null\n || groupedPiecesLevel [i].getElevation() < minLevel.getElevation()) {\n minLevel = groupedPiecesLevel [i];\n }\n }\n i++;\n }\n } \n final HomeFurnitureGroup group;\n if (selectedFurniture.indexOf(this.leadSelectedPieceOfFurniture) > 0) {\n group = createHomeFurnitureGroup(Arrays.asList(groupedPieces), this.leadSelectedPieceOfFurniture);\n } else {\n group = createHomeFurnitureGroup(Arrays.asList(groupedPieces));\n }\n // Store piece elevation that could have been updated during grouping\n final float [] groupPiecesNewElevation = new float [groupedPieces.length];\n i = 0;\n for (HomePieceOfFurniture piece : groupedPieces) {\n groupPiecesNewElevation [i++] = piece.getElevation();\n }\n TreeMap<Integer, HomePieceOfFurniture> homeSortedMap = groupedFurnitureMap.get(null);\n final int groupIndex = homeSortedMap != null \n ? homeSortedMap.lastKey() + 1 - groupedPieces.length\n : homeFurniture.size();\n final boolean movable = group.isMovable();\n final Level groupLevel = minLevel;\n \n doGroupFurniture(groupedPieces, new HomeFurnitureGroup [] {group}, \n null, new int [] {groupIndex}, new Level [] {groupLevel}, basePlanLocked, false);\n if (this.undoSupport != null) {\n UndoableEdit undoableEdit = new AbstractUndoableEdit() {\n @Override\n public void undo() throws CannotUndoException {\n super.undo();\n doUngroupFurniture(new HomeFurnitureGroup [] {group}, groupedPieces, \n groupedPiecesGroups, groupedPiecesIndex, groupedPiecesLevel, basePlanLocked, allLevelsSelection);\n for (int i = 0; i < groupedPieces.length; i++) {\n groupedPieces [i].setElevation(groupPiecesElevation [i]);\n groupedPieces [i].setVisible(groupPiecesVisible [i]);\n }\n home.setSelectedItems(oldSelection);\n }\n \n @Override\n public void redo() throws CannotRedoException {\n super.redo();\n for (int i = 0; i < groupedPieces.length; i++) {\n groupedPieces [i].setElevation(groupPiecesNewElevation [i]);\n groupedPieces [i].setLevel(null);\n }\n group.setMovable(movable);\n group.setVisible(true);\n doGroupFurniture(groupedPieces, new HomeFurnitureGroup [] {group}, \n null, new int [] {groupIndex}, new Level [] {groupLevel}, basePlanLocked, false);\n }\n \n @Override\n public String getPresentationName() {\n return preferences.getLocalizedString(FurnitureController.class, \"undoGroupName\");\n }\n };\n this.undoSupport.postEdit(undoableEdit);\n }\n }\n }", "private void assignJValuesToInputBranch()\r\n\t{\r\n\t\tfor (int j = lowestJValue; j <= highestJValue; j++) {\r\n\t\t\tinputBranchWithJ.put(j, inputBranchArray.get(j - lowestJValue));\r\n\t\t}\r\n\r\n\t\tif (isEType) {\r\n\t\t\tsetupAssociatedBranchesEType(inputBranchWithJ);\r\n\t\t} else {\r\n\t\t\tsetupAssociatedBranchesAType(inputBranchWithJ);\r\n\t\t}\r\n\r\n\t}", "public void allocateCountries() {\n\t\tmakeDeck() ;\n\t\t\n\t\tint id =0;\n\t\t//Randomly give players 9 country cards, and place 1 army on country\n\t\tfor(int j=0;j<Constants.NUM_PLAYERS;j++) {\n\t\t\tfor (int i=0; i<9;i++) {\n\t\t\t\tid = deck.get(0).getCardID() ;\n\t\t\t\tif(deck.get(0).getInsignia()=='w') {\n\t\t\t\t\ti--;\n\t\t\t\t} else {\n\t\t\t\t\tsetCountryOwnership(j, id, 1);\n\t\t\t\t\t\n\t\t\t\t\t//Tells user what cards where drawn\n\t\t\t\t\tview.displayString(\"Player \"+(j+1)+\" Drew Card ' \" +deck.get(0).toString()+\"'\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdiscardPile.add(deck.remove(0));\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Set rest of countries to neutrals with 1 army\n\t\tfor(int j=Constants.NUM_PLAYERS;j<6;j++) {\n\t\t\tfor (int i=0; i<6;i++) {\n\t\t\t\tid = deck.get(0).getCardID() ;\n\t\t\t\tif(deck.get(0).getInsignia()=='w') {\n\t\t\t\t\ti--;\n\t\t\t\t} else { \n\t\t\t\t\tsetCountryOwnership(j, id, 1);\n\t\t\t\t}\n\t\t\t\tdiscardPile.add(deck.remove(0));\n\t\t\t}\n\t\t}\n\t\t//Adds cards back to deck and shuffles\n\t\tdiscardToDeck() ;\t\t\n\t}", "private Map<String, SortedSet<PortletCategoryBean>> getRegistry43(\n WebRequest request,\n IPerson user,\n PortletCategory rootCategory,\n boolean includeUncategorized,\n Set<IPortletDefinition> favorites) {\n\n /*\n * This collection of all the portlets in the portal is for the sake of\n * tracking which ones are uncategorized. They will be added to the\n * output if includeUncategorized=true.\n */\n Set<IPortletDefinition> portletsNotYetCategorized =\n includeUncategorized\n ? new HashSet<>(portletDefinitionRegistry.getAllPortletDefinitions())\n : new HashSet<>(); // Not necessary to fetch them if we're not\n // tracking them\n\n // construct a new channel registry\n Map<String, SortedSet<PortletCategoryBean>> rslt = new TreeMap<>();\n SortedSet<PortletCategoryBean> categories = new TreeSet<>();\n\n // add the root category and all its children to the registry\n final Locale locale = getUserLocale(user);\n categories.add(\n preparePortletCategoryBean(\n request, rootCategory, portletsNotYetCategorized, user, locale, favorites));\n\n if (includeUncategorized) {\n /*\n * uPortal historically has provided for a convention that portlets not in any category\n * may potentially be viewed by users but may not be subscribed to.\n *\n * As of uPortal 4.2, the logic below now takes any portlets the user has BROWSE access to\n * that have not already been identified as belonging to a category and adds them to a category\n * called Uncategorized.\n */\n\n EntityIdentifier ei = user.getEntityIdentifier();\n IAuthorizationPrincipal ap =\n AuthorizationServiceFacade.instance().newPrincipal(ei.getKey(), ei.getType());\n\n Set<PortletDefinitionBean> marketplacePortlets = new HashSet<>();\n for (IPortletDefinition portlet : portletsNotYetCategorized) {\n if (authorizationService.canPrincipalBrowse(ap, portlet)) {\n PortletDefinitionBean pdb =\n preparePortletDefinitionBean(\n request, portlet, locale, favorites.contains(portlet));\n marketplacePortlets.add(pdb);\n }\n }\n\n // construct a new channel category bean for this category\n final String uncName = messageSource.getMessage(UNCATEGORIZED, new Object[] {}, locale);\n final String uncDescription =\n messageSource.getMessage(UNCATEGORIZED_DESC, new Object[] {}, locale);\n PortletCategory pc =\n new PortletCategory(\n uncName); // Use of this String for Id matches earlier version of API\n pc.setName(uncName);\n pc.setDescription(uncDescription);\n PortletCategoryBean unc =\n PortletCategoryBean.fromPortletCategory(pc, null, marketplacePortlets);\n\n // Add even if no portlets in category\n categories.add(unc);\n }\n\n rslt.put(CATEGORIES_MAP_KEY, categories);\n return rslt;\n }", "public void setFiveRandomCategories () {\n\t\t//create a file to store the selected five categories\n\t\tBashCmdUtil.bashCmdNoOutput(\"mkdir -p data\");\n\t\tFile five_random_categories = new File (\"data/five_random_categories\");\n\t\tif (!five_random_categories.exists()) {\n\t\t\tBashCmdUtil.bashCmdNoOutput(\"touch data/five_random_categories\");\n\t\t}\n\t\t// if five random categories dont exist, i.e. new game being started\n\t\tif (five_random_categories.length() == 0) {\n\t\t\tList<String> shuffledCategories = new ArrayList<String>(_nzCategories);\n\t\t\tCollections.shuffle(shuffledCategories);\n\t\t\tString str = \"\";\n\t\t\tfor (int i = 0; i < 5; i++) {\n\t\t\t\ttry {\n\t\t\t\t\t//create files that are used to store the clues of \n\t\t\t\t\t//the selected five categories\n\t\t\t\t\tFile dir = new File (\"data/games_module\");\n\t\t\t\t\tif (!dir.exists()) {\n\t\t\t\t\t\tdir.mkdir();\n\t\t\t\t\t}\n\t\t\t\t\tFile file = new File(dir,shuffledCategories.get(i));\n\t\t\t\t\tif (!file.exists()) {\n\t\t\t\t\t\tfile.createNewFile();\n\t\t\t\t\t}\t\t\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t_fiveRandomCategories.add(shuffledCategories.get(i));\n\t\t\t\tsetFiveRandomClues(shuffledCategories.get(i));\n\t\t\t\tstr = str + shuffledCategories.get(i) + \",\";\n\t\t\t\t_gamesData.put(shuffledCategories.get(i), _fiveRandomClues);\n\t\t\t}\n\t\t\tBashCmdUtil.bashCmdNoOutput(String.format(\"echo \\\"%s\\\" >> data/five_random_categories\",str));\n\t\t}\n\t\telse { // if files already exist, i.e. the game has already started\n\t\t\tBufferedReader reader;\n\t\t\tString str = \"\";\n\t\t\ttry {\n\t\t\t\treader = new BufferedReader(new FileReader(\"data/five_random_categories\"));\n\t\t\t\tString line = reader.readLine();\n\t\t\t\tstr = line;\n\t\t\t\treader.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tString[] splitStr = str.split(\",\");\n\t\t\tfor (int i = 0; i<5;i++) {\n\t\t\t\t_fiveRandomCategories.add(splitStr[i]);\n\t\t\t\tsetFiveRandomClues(splitStr[i]);\n\t\t\t\t_gamesData.put(splitStr[i], _fiveRandomClues);\n\t\t\t}\n\t\t}\n\t}", "public void createTreeMap() {\n myList = new TreeMap<>();\n scrabbleList = new TreeMap<>();\n }", "public void divyCountries() {\r\n\t\twhile (CountryPicker.size() > 0) {\r\n\t\t\tfor (int x = 0; x < 6; x++) {\r\n\t\t\t\tif (CountryPicker.size() > 0) {\r\n\t\t\t\t\tnew threadz(CountryPicker.get(0), players.get(x).getColor(), false);\r\n\t\t\t\t\tCountryPicker.get(0).setTroops(1);\r\n\t\t\t\t\tplayers.get(x).addCountries(CountryPicker.get(0));\r\n\t\t\t\t\tCountryPicker.remove(0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public void load() throws CityException{\r\n \r\n allRanks = new ArrayList<Rank>();\r\n File file = new File(RANK_DATA_DIRECTORY);\r\n Scanner rankDataReader = null;\r\n Scanner lineReader = null;\r\n\r\n try {\r\n\r\n rankDataReader = new Scanner(file);\r\n\r\n ArrayList<String> rankDataArray = new ArrayList<String>();\r\n int count = 0;\r\n\r\n while (rankDataReader.hasNext()) {\r\n\r\n String rankDataLine = rankDataReader.nextLine();\r\n\r\n if (count > 0) {\r\n\r\n String[] rankData = rankDataLine.split(\",\");\r\n\r\n String rankName = rankData[0];\r\n int xp = Integer.parseInt(rankData[1]);\r\n int plotAvailable = Integer.parseInt(rankData[2]);\r\n\r\n allRanks.add(new Rank(rankName, xp, plotAvailable));\r\n }\r\n\r\n count++;\r\n }\r\n\r\n } catch (FileNotFoundException e) {\r\n throw new CityException(\"InvalidFile\");\r\n } finally {\r\n rankDataReader.close();\r\n }\r\n }", "public TaxCategory() {\n\t\ttaxRates=new TreeSet<TaxRate>();\n\t\t\n\t}", "public static void populate() {\n for (int i = 1; i <= 15; i++) {\n B.add(i);\n Collections.shuffle(B);\n\n }\n for (int i = 16; i <= 30; i++) {\n I.add(i);\n Collections.shuffle(I);\n }\n for (int n = 31; n <= 45; n++) {\n N.add(n);\n Collections.shuffle(N);\n }\n for (int g = 46; g <= 60; g++) {\n G.add(g);\n Collections.shuffle(G);\n }\n for (int o = 61; o <= 75; o++) {\n O.add(o);\n Collections.shuffle(O);\n }\n\n for (int i = 1; i <= 75; i++) {\n roll.add(i); // adds the numbers in the check list\n }\n }", "private void CreateDataIngestors() throws isisicatclient.IcatException_Exception {\n Grouping dataIngestors = new Grouping();\r\n dataIngestors.name = \"DataIngestors\";\r\n dataIngestors.id = port.create(sessionId, dataIngestors);\r\n dataIngestors = (Grouping) port.search(sessionId, \"Grouping[name='DataIngestors']\").get(0);\r\n\r\n List<String> ingestorTables = port.getEntityNames();\r\n\r\n ingestorTables.remove(\"Facility\");\r\n\r\n List<EntityBaseBean> ingestorRules = new ArrayList<>();\r\n for (String table : ingestorTables) {\r\n Rule rule = new Rule();\r\n rule.grouping = dataIngestors;\r\n rule.crudFlags = \"CRUD\"; //no delete permission for ingestors\r\n rule.what = table;\r\n ingestorRules.add(rule);\r\n }\r\n port.createMany(sessionId, ingestorRules);\r\n }", "private void populaUnidade()\n {\n Unidade unidade = new Unidade(\"Unidade Santo Amaro\", \"Horario de funcionamento: 6:00 as 23:00\");\n unidadeDAO.insert(unidade);\n unidade = new Unidade(\"Unidade Aclimação\", \"Horario de funcionamento: 7:00 as 22:00\");\n unidadeDAO.insert(unidade);\n unidade = new Unidade(\"Unidade Vinhedo\", \"Horario de funcionamento: 6:00 as 22:00\");\n unidadeDAO.insert(unidade);\n }", "public void initForCup(){\n hdBase = HD_BASED_ON_RANK;\n hdNoHdRankThreshold = -30;\n hdCorrection = 0; \n hdCeiling = 0;\n }", "@Before\n\tpublic void setUp() throws Exception {\n\t\tfor (int i = 1; i <= 20; i++) {\n\t\t\tUniversidade universidade = new Universidade();\n\t\t\tuniversidade.setNome(\"UFG - Unidade \" + i);\n\t\t\tuniversidadeDAO.save(universidade);\n\t\t}\n\t\tuniversidadeDAO.flush();\n\t}", "private static void fixPopulation() {\r\n \t//get a copy of the population hash map\r\n \tHashMap<String, ArrayList<Critter>> copy = new HashMap<String, ArrayList<Critter>>(population);\r\n \tIterator<String> populationIterator = copy.keySet().iterator();\r\n \twhile (populationIterator.hasNext()) { \r\n String pos = populationIterator.next();\r\n ArrayList<Critter> critterList = copy.get(pos);\r\n //clear the key if there is no more critters in that space\r\n if(critterList.size() == 0 || critterList == null) {\r\n \tpopulation.remove(pos);\r\n }\r\n \t}\r\n }", "Main(int citizens)\n {\n\n this.citizens = citizens;\n rank = new int[citizens];\n id = new int[citizens];\n for (int i = 0; i < citizens; i++){\n\n rank[i] = 1;\n id[i] = i;\n }\n }", "public static void main(String[] args) {\n Map<Integer, ArrayList<String>> citiesMap = new HashMap<>();\n\n CityDAO cityDAO = new CityDAO();\n CountryDAO countryDAO = new CountryDAO();\n\n ArrayList<City> cities = cityDAO.ReadCitiesFormCSV(\"src/main/resources/cities.csv\");\n Collections.sort(cities, Comparator.comparing(City::getPopulation));\n ArrayList<Country> countries = countryDAO.ReadCountriesFormCSV(\"src/main/resources/countries.csv\");\n\n //Add list of cities to their countries\n for (int countryIdx = 0; countryIdx < countries.size(); countryIdx++) {\n for (int cityIdx = 0; cityIdx < cities.size(); cityIdx++) {\n if (cities.get(cityIdx).getCode() == countries.get(countryIdx).getId())\n countries.get(countryIdx).addCityToCountry(cities.get(cityIdx));\n }\n }\n\n //Print list of cities in each country\n// for(Country country : countries) {\n// ArrayList<City> citiesL = country.getListOfCities();\n// for (City city : citiesL)\n// System.out.print(city.getCityName() + \" \");\n// System.out.println();\n// }\n\n for(City city : cities) {\n if (citiesMap.get(city.getCode()) == null)\n citiesMap.put(city.getCode(), new ArrayList<>());\n citiesMap.get(city.getCode()).add(city.getCityName());\n }\n System.out.println(\"Print List of cities sorted according to population sorted from lowest to highest\");\n citiesMap.forEach((k,v) -> System.out.println(\"Code: \" + k + \", List of cities: \" + v));\n\n System.out.println(\"\\n\");\n }", "private void loadDefaultCategory() {\n CategoryTable category = new CategoryTable();\n String categoryId = category.generateCategoryID(db.getLastCategoryID());\n String categoryName = \"Food\";\n String type = \"Expense\";\n db.insertCategory(new CategoryTable(categoryId,categoryName,type));\n categoryId = category.generateCategoryID(db.getLastCategoryID());\n categoryName = \"Study\";\n type = \"Expense\";\n db.insertCategory(new CategoryTable(categoryId,categoryName,type));\n db.close();\n }", "@Test\n public void Scenario1() {\n\n Response resp = reqSpec.request().get();\n\n DataWrapper respBody = resp.as(DataWrapper.class);\n List<Regions> regions = respBody.getData().get(0).getRegions();\n\n Map<Integer, String> sortedIntensity = new TreeMap<>();\n\n try {\n\n ListIterator iterator = regions.listIterator();\n int iter = 0;\n\n while (iterator.hasNext()) {\n\n sortedIntensity.put(regions.get(iter).getIntensity().getForecast(),\n regions.get(iter).getShortname());\n iter++;\n iterator.next();\n }\n\n } catch (NullPointerException npe) {\n npe.printStackTrace();\n }\n\n System.out.println(\"Regions sorted by intensity forecast:\");\n System.out.println(sortedIntensity);\n }", "public void sort() {\n\t\tfor (int i = 1; i < this.dataModel.getLength(); i++) {\n\t\t\tfinal int x = this.dataModel.get(i);\n\n\t\t\t// Find location to insert using binary search\n\t\t\tfinal int j = Math.abs(this.dataModel.binarySearch(0, i, x) + 1);\n\n\t\t\t// Shifting array to one location right\n\t\t\tthis.dataModel.arrayCopy(j, j + 1, i - j);\n\n\t\t\t// Placing element at its correct location\n\t\t\tthis.dataModel.set(j, x);\n\t\t\tthis.repaint(this.count++);\n\t\t}\n\t}", "public void createAnimalsCollection() {\n ArrayList<DataSetAnimal> animalsFetched = getDFO().getAnimalData(getFILE_NAME()).getAnimals();\n setAnimals(new ArrayList<>());\n for (DataSetAnimal animal: animalsFetched) {\n String tmpBreed = animal.getBreedOrType().substring(animal.getBreedOrType().lastIndexOf(\" \") + 1);\n switch (tmpBreed) {\n case \"dolphin\":\n getAnimals().add(new AnimalDolphin(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"duck\":\n getAnimals().add(new AnimalDuck(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"cat\":\n getAnimals().add(new AnimalCat(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"chicken\":\n getAnimals().add(new AnimalChicken(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"horse\":\n getAnimals().add(new AnimalHorse(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"shark\":\n getAnimals().add(new AnimalShark(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"parakeet\":\n getAnimals().add(new AnimalParakeet(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n default:\n getAnimals().add(new AnimalDog(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n }\n }\n }", "private void fillUpAnimalsTable() {\n\t\tfillUpAnimalsTable(Calendar.getInstance().getTime());\n\t}", "public void ungroupSelectedFurniture() {\n List<HomeFurnitureGroup> movableSelectedFurnitureGroups = new ArrayList<HomeFurnitureGroup>(); \n for (Selectable item : this.home.getSelectedItems()) {\n if (item instanceof HomeFurnitureGroup) {\n HomeFurnitureGroup group = (HomeFurnitureGroup)item;\n if (isPieceOfFurnitureMovable(group)) {\n movableSelectedFurnitureGroups.add(group);\n }\n }\n } \n if (!movableSelectedFurnitureGroups.isEmpty()) {\n List<HomePieceOfFurniture> homeFurniture = this.home.getFurniture();\n final boolean oldBasePlanLocked = this.home.isBasePlanLocked();\n final boolean allLevelsSelection = this.home.isAllLevelsSelection();\n final List<Selectable> oldSelection = this.home.getSelectedItems();\n // Sort the groups in the ascending order of their index in home or their group\n Map<HomeFurnitureGroup, TreeMap<Integer, HomeFurnitureGroup>> groupsMap =\n new HashMap<HomeFurnitureGroup, TreeMap<Integer, HomeFurnitureGroup>>();\n int groupsCount = 0;\n for (HomeFurnitureGroup piece : movableSelectedFurnitureGroups) {\n HomeFurnitureGroup groupGroup = getPieceOfFurnitureGroup(piece, null, homeFurniture);\n TreeMap<Integer, HomeFurnitureGroup> sortedMap = groupsMap.get(groupGroup);\n if (sortedMap == null) {\n sortedMap = new TreeMap<Integer, HomeFurnitureGroup>();\n groupsMap.put(groupGroup, sortedMap);\n }\n if (groupGroup == null) {\n sortedMap.put(homeFurniture.indexOf(piece), piece);\n } else {\n sortedMap.put(groupGroup.getFurniture().indexOf(piece), piece);\n }\n groupsCount++;\n }\n final HomeFurnitureGroup [] groups = new HomeFurnitureGroup [groupsCount]; \n final HomeFurnitureGroup [] groupsGroups = new HomeFurnitureGroup [groups.length];\n final int [] groupsIndex = new int [groups.length];\n final Level [] groupsLevels = new Level [groups.length];\n int i = 0;\n List<HomePieceOfFurniture> ungroupedPiecesList = new ArrayList<HomePieceOfFurniture>();\n List<Integer> ungroupedPiecesIndexList = new ArrayList<Integer>();\n List<HomeFurnitureGroup> ungroupedPiecesGroupsList = new ArrayList<HomeFurnitureGroup>();\n for (Map.Entry<HomeFurnitureGroup, TreeMap<Integer, HomeFurnitureGroup>> sortedMapEntry : groupsMap.entrySet()) {\n TreeMap<Integer, HomeFurnitureGroup> sortedMap = sortedMapEntry.getValue();\n int endIndex = sortedMap.lastKey() + 1 - sortedMap.size();\n for (Map.Entry<Integer, HomeFurnitureGroup> groupEntry : sortedMap.entrySet()) {\n HomeFurnitureGroup group = groupEntry.getValue();\n groups [i] = group;\n groupsGroups [i] = sortedMapEntry.getKey();\n groupsIndex [i] = groupEntry.getKey(); \n groupsLevels [i++] = group.getLevel();\n for (HomePieceOfFurniture groupPiece : group.getFurniture()) {\n ungroupedPiecesList.add(groupPiece);\n ungroupedPiecesGroupsList.add(sortedMapEntry.getKey());\n ungroupedPiecesIndexList.add(endIndex++);\n }\n }\n } \n final HomePieceOfFurniture [] ungroupedPieces = \n ungroupedPiecesList.toArray(new HomePieceOfFurniture [ungroupedPiecesList.size()]); \n final HomeFurnitureGroup [] ungroupedPiecesGroups = \n ungroupedPiecesGroupsList.toArray(new HomeFurnitureGroup [ungroupedPiecesGroupsList.size()]); \n final int [] ungroupedPiecesIndex = new int [ungroupedPieces.length];\n final Level [] ungroupedPiecesLevels = new Level [ungroupedPieces.length];\n boolean basePlanLocked = oldBasePlanLocked;\n for (i = 0; i < ungroupedPieces.length; i++) {\n ungroupedPiecesIndex [i] = ungroupedPiecesIndexList.get(i); \n ungroupedPiecesLevels [i] = ungroupedPieces [i].getLevel();\n // Unlock base plan if the piece is a part of it\n basePlanLocked &= !isPieceOfFurniturePartOfBasePlan(ungroupedPieces [i]);\n } \n final boolean newBasePlanLocked = basePlanLocked;\n\n doUngroupFurniture(groups, ungroupedPieces, ungroupedPiecesGroups, ungroupedPiecesIndex, ungroupedPiecesLevels, newBasePlanLocked, false);\n if (this.undoSupport != null) {\n UndoableEdit undoableEdit = new AbstractUndoableEdit() {\n @Override\n public void undo() throws CannotUndoException {\n super.undo();\n doGroupFurniture(ungroupedPieces, groups, groupsGroups, groupsIndex, groupsLevels, oldBasePlanLocked, allLevelsSelection);\n home.setSelectedItems(oldSelection);\n }\n \n @Override\n public void redo() throws CannotRedoException {\n super.redo();\n doUngroupFurniture(groups, ungroupedPieces, ungroupedPiecesGroups, ungroupedPiecesIndex, ungroupedPiecesLevels, newBasePlanLocked, false);\n }\n \n @Override\n public String getPresentationName() {\n return preferences.getLocalizedString(FurnitureController.class, \"undoUngroupName\");\n }\n };\n this.undoSupport.postEdit(undoableEdit);\n }\n }\n }", "private void getCityHotels(String tag) {\n\n HotelListingRequest hotelListingRequest = HotelListingRequest.getHotelListRequest();\n hotelListingRequest.setCurrencyCode(userDTO.getCurrency());\n hotelListingRequest.setLanguageCode(userDTO.getLanguage());\n hotelListingRequest.setCheckInDate(new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH).format(checkInDate));\n hotelListingRequest.setCheckOutDate(new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH).format(checkOutDate));\n hotelListingRequest.setPageNumber(1);\n hotelListingRequest.setPageSize(10);\n\n\n if (tag.equals(\"noRooms\")) {\n\n hotelListingRequest.setCityId(cityId); // for sold out hotels.. set popularity and descending order.\n hotelListingRequest.setSortBy(OrderByTypes.Descending.getOrderVal());\n hotelListingRequest.setSortParameter(\"popularity\");\n\n } else {\n\n hotelListingRequest.setCityId(Long.parseLong(destination.getKey())); // regular flow.. getting cityId and areaId from destination.\n\n UserDTO.getUserDTO().setCityName(destination.getDestinationName());\n // here check whether category is city search otherwise areaWise search\n if (destination.getCategory().equals(\"City\")) {\n\n hotelListingRequest.setSortBy(OrderByTypes.Descending.getOrderVal());\n hotelListingRequest.setSortParameter(\"popularity\");\n\n\n } else {\n\n hotelListingRequest.setSortBy(OrderByTypes.Descending.getOrderVal());\n hotelListingRequest.setSortParameter(\"area\");\n hotelListingRequest.setSortByArea(0);\n }\n\n\n }\n\n\n ArrayList<OccupancyDto> occupancyDtoArrayList = new ArrayList<>();\n for (int i = 0; i < hotelAccommodationsArrayList.size(); i++) {\n kidsAgeArrayList = new ArrayList<>();\n if (hotelAccommodationsArrayList.get(i).getKids() > 0) {\n if (hotelAccommodationsArrayList.get(i).getKids() == 1) {\n kidsAgeArrayList.add(hotelAccommodationsArrayList.get(i).getKid1Age());\n } else if (hotelAccommodationsArrayList.get(i).getKids() == 2) {\n kidsAgeArrayList.add(hotelAccommodationsArrayList.get(i).getKid1Age());\n kidsAgeArrayList.add(hotelAccommodationsArrayList.get(i).getKid2Age());\n }\n }\n\n occupancyDtoArrayList.add(new OccupancyDto(hotelAccommodationsArrayList.get(i).getAdultsCount(), kidsAgeArrayList));\n hotelListingRequest.setOccupancy(occupancyDtoArrayList);\n }\n FiltersRequestDto filtersRequestDto = new FiltersRequestDto();\n filtersRequestDto.setAmenityIds(null);\n filtersRequestDto.setAreaIds(null);\n filtersRequestDto.setHotelId(null);\n filtersRequestDto.setCategoryIds(null);\n filtersRequestDto.setChainIds(null);\n filtersRequestDto.setMaxPrice(0.00);\n filtersRequestDto.setMinPrice(0.00);\n filtersRequestDto.setTripAdvisorRatings(null);\n filtersRequestDto.setStarRatings(null);\n hotelListingRequest.setFilters(filtersRequestDto);\n\n request = new Gson().toJson(hotelListingRequest);\n\n if (NetworkUtilities.isInternet(getActivity())) {\n\n showDialog();\n\n hotelSearchPresenter.getHotelListInfo(Constant.API_URL + Constant.HOTELLISTING, request, context);\n\n\n } else {\n\n Utilities.commonErrorMessage(context, context.getString(R.string.Network_not_avilable), context.getString(R.string.please_check_your_internet_connection), false, getFragmentManager());\n }\n\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 Union(subset [] subsets, int x , int y ){ \n\t\tint xroot = find(subsets, x); \n\t int yroot = find(subsets, y); \n\t \n\t\tif (subsets[xroot].rank < subsets[yroot].rank) \n\t\t\tsubsets[xroot].parent = yroot; \n\t\telse if (subsets[yroot].rank < subsets[xroot].rank) \n\t\t\tsubsets[yroot].parent = xroot; \n\t\telse{ \n\t\t\tsubsets[xroot].parent = yroot; \n\t\t\tsubsets[yroot].rank++; \n\t\t} \n\t}", "private void buildCategories() {\n List<Category> categories = categoryService.getCategories();\n if (categories == null || categories.size() == 0) {\n throw new UnrecoverableApplicationException(\n \"no item types found in database\");\n }\n\n Map<Category, List<Category>> categoriesMap = new HashMap<Category, List<Category>>();\n for (Category subCategory : categories) {\n Category parent = subCategory.getParentCategory();\n if (categoriesMap.get(parent) == null) {\n categoriesMap.put(parent, new ArrayList<Category>());\n categoriesMap.get(parent).add(subCategory);\n } else {\n categoriesMap.get(parent).add(subCategory);\n }\n }\n\n this.allCategories = categories;\n this.sortedCategories = categoriesMap;\n }", "private void setLairNames(int typeInt) {\n\t\tswitch (typeInt) { // puts lairnames in a hash map with the city name as key and the lairname as value depending on the type of villain\n\n\t\tcase 0:\n\t\t\tlairNames.put(\"Springfield\", \"Hagley Oval\");\n\t\t\tlairNames.put(\"Te Puke\", \"Bay Oval\");\n\t\t\tlairNames.put(\"Gore\", \"The Grove Park\");\n\t\t\tlairNames.put(\"Ohakune\", \"Ohakune Domain\");\n\t\t\tlairNames.put(\"Paeroa\", \"Centennial Park\");\n\t\t\tlairNames.put(\"Taihape\", \"Memorial Park, Taihape\");\n\t\t\tbreak;\n\n\t\tcase 1:\n\t\t\tlairNames.put(\"Springfield\", \"Selwyn Rugby Club\");\n\t\t\tlairNames.put(\"Te Puke\", \"Centenial Park, Te Puke\");\n\t\t\tlairNames.put(\"Gore\", \"Newman Park, Gore\");\n\t\t\tlairNames.put(\"Ohakune\", \"Rochfort Park, Ohakune\");\n\t\t\tlairNames.put(\"Paeroa\", \"Paeroa Old Boys Football Ground\");\n\t\t\tlairNames.put(\"Taihape\", \"Memorial Park, Taihape\");\n\t\t\tbreak;\n\n\t\tcase 2:\n\t\t\tlairNames.put(\"Springfield\", \"The Springfield Hotel\");\n\t\t\tlairNames.put(\"Te Puke\", \"Molly O'Connors Pub\");\n\t\t\tlairNames.put(\"Gore\", \"Howl at the Moon, Cafe and Bar\");\n\t\t\tlairNames.put(\"Ohakune\", \"Powderkeg Restaurant and Bar\");\n\t\t\tlairNames.put(\"Paeroa\", \"The Paeroa Hotel\");\n\t\t\tlairNames.put(\"Taihape\", \"Gumboot Manor Restaurant and Bar\");\n\t\t\tbreak;\n\n\t\tcase 3:\n\t\t\tlairNames.put(\"Springfield\", \"Springfield Telephone Exchange\");\n\t\t\tlairNames.put(\"Te Puke\", \"Te Puke Telephone Exchange\");\n\t\t\tlairNames.put(\"Gore\", \"Gore Telephone Exchange\");\n\t\t\tlairNames.put(\"Ohakune\", \"Ohakune Telephone Exchange\");\n\t\t\tlairNames.put(\"Paeroa\", \"Paeroa Telephone Exchange\");\n\t\t\tlairNames.put(\"Taihape\", \"Taihape Telephone Exchange\");\n\t\t\tbreak;\n\n\t\tcase 4:\n\t\t\tlairNames.put(\"Springfield\", \"Christchurch District Court Chambers\");\n\t\t\tlairNames.put(\"Te Puke\", \"Te Awamutu District Court Chambers\");\n\t\t\tlairNames.put(\"Gore\", \"Gore District Court\");\n\t\t\tlairNames.put(\"Ohakune\", \"Ohakune District Court\");\n\t\t\tlairNames.put(\"Paeroa\", \"Hauraki District Court\");\n\t\t\tlairNames.put(\"Taihape\", \"Taihape District Court\");\n\t\t\tbreak;\n\n\t\tcase 5:\n\t\t\tlairNames.put(\"Springfield\", \"Springfield Giant Donut Statue\");\n\t\t\tlairNames.put(\"Te Puke\", \"Te Puke Giant Kiwifruit Statue\");\n\t\t\tlairNames.put(\"Gore\", \"Gore Giant Trout Statue\");\n\t\t\tlairNames.put(\"Ohakune\", \"Ohakune Giant Carrot Statue\");\n\t\t\tlairNames.put(\"Paeroa\", \"Paeroa L&P Statue\");\n\t\t\tlairNames.put(\"Taihape\", \"Taihape Giant Gumboot Statue\");\n\t\t\tbreak;\n\t\t}\t\n\t}", "default List<Source> representativeTypicalityQuery(int topk, Set<Source> resultSet, Set<String> domain) {\n final Map<Source, List<Source>> region = interestingRegion(topk, resultSet, domain);\n\n final Comparator<Map.Entry<Source, List<Source>>> byValue =\n (entry1, entry2) ->\n Ints.compare(entry1.getValue().size(), entry2.getValue().size());\n\n return region.entrySet().stream()\n .sorted(byValue.reversed())\n .map(Map.Entry::getKey)\n .collect(Collectors.toList());\n }", "public Ranking[] vaciarRanking()\n {\n for(int i=0;i<10;i++){\n clasificacion[i].setLogin(\" \");\n clasificacion[i].setMediana(0);\n }//END_FOR\n return clasificacion;\n }", "List<Rank> getRanks() {\n\t\ttry {\n\t\t\treturn analysisModel.getRanks();\n\t\t} catch (DatabaseException ex) {\n\t\t\tLOG.error(\"Failed to get result name list\", ex);\n\t\t}\n\t\treturn Collections.emptyList();\n\t}", "private CategoryDataset createDataset() {\n\t \n\t \tvar dataset = new DefaultCategoryDataset();\n\t \n\t\t\tSystem.out.println(bic);\n\t\t\t\n\t\t\tfor(Map.Entry<String, Integer> entry : bic.entrySet()) {\n\t\t\t String key = entry.getKey();\n\t\t\t Integer value = entry.getValue();\n\t\t\t dataset.setValue(value, \"# Bicicletas\", key);\n\t \n\t\t\t}\n\t return dataset;\n\t \n\t }", "public CouncillorsReserve(List<Councillor> councillors){\r\n\t\tthis.councillors=councillors;\r\n\t\tCollections.shuffle(this.councillors);\r\n\t}", "private void updateCategoryTree() {\n categoryTree.removeAll();\r\n fillTree(categoryTree);\r\n\r\n }", "public void rank(Hashtable<?, Integer> fname, int occur)\r\n\t{\r\n\t\t// Transfer as List and sort it\r\n\t\tArrayList<Map.Entry<?, Integer>> list = new ArrayList<Entry<?, Integer>>(fname.entrySet());\r\n\t\tCollections.sort(list, new Comparator<Map.Entry<?, Integer>>()\r\n\t\t{\r\n\t\t\tpublic int compare(Map.Entry<?, Integer> obj1, Map.Entry<?, Integer> obj2)\r\n\t\t\t{\r\n\t\t\t\treturn obj1.getValue().compareTo(obj2.getValue());\r\n\t\t\t}\r\n\t\t});\r\n\t\tCollections.reverse(list);\r\n\t\t\r\n\t\tif (occur != 0)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"\\nTop 5 Search Results\\n\");\r\n\t\t\tint num = 5;\r\n\t\t\tint j = 1;\r\n\t\t\twhile (list.size() > j && num > 0)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"(\" + j + \") \" + list.get(j) + \" times \");\r\n\t\t\t\tj++;\r\n\t\t\t\tnum--;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void updateUniversidades() {\n\t\t\n\t\tlistaUniversidades = (ArrayList<Universidades>)hibernateController.selectUniversidades();\n\t}", "private void addCities() {\n int random2 = 0;\n for (int i = 1; i < MAP_LENGTH-1; i++) {\n for (int j = 1; j < MAP_LENGTH-1; j++) {\n if (tileMap[i][j].getTerrain() instanceof Grass) { //Make cities on grass tiles only\n random2 = (int)(Math.round(Math.random()*18));\n if (!adjacentCity(i, j) && (random2 < 3)) {\n tileMap[i][j].setCity(new City(i, j, false)); //If randomly chosen and not in proximity of another city, create a city there (right now set as not a capital)\n }\n }\n }\n }\n }", "private void initRegister() {\n this.register = new TreeMap<>();\n register.put(BillDenomination.ONE, ZERO);\n register.put(BillDenomination.TWO, ZERO);\n register.put(BillDenomination.FIVE, ZERO);\n register.put(BillDenomination.TEN, ZERO);\n register.put(BillDenomination.TWENTY, ZERO);\n }", "public void setRank(int value);", "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}", "private List<ExploreSitesCategory> createDefaultCategoryTiles() {\n List<ExploreSitesCategory> categoryList = new ArrayList<>();\n\n // Sport category.\n ExploreSitesCategory category = new ExploreSitesCategory(\n SPORT, getContext().getString(R.string.explore_sites_default_category_sports));\n category.setDrawable(getVectorDrawable(R.drawable.ic_directions_run_blue_24dp));\n categoryList.add(category);\n\n // Shopping category.\n category = new ExploreSitesCategory(\n SHOPPING, getContext().getString(R.string.explore_sites_default_category_shopping));\n category.setDrawable(getVectorDrawable(R.drawable.ic_shopping_basket_blue_24dp));\n categoryList.add(category);\n\n // Food category.\n category = new ExploreSitesCategory(\n FOOD, getContext().getString(R.string.explore_sites_default_category_cooking));\n category.setDrawable(getVectorDrawable(R.drawable.ic_restaurant_menu_blue_24dp));\n categoryList.add(category);\n return categoryList;\n }", "public void fillDeck()\n {\n //start with an empty card at the 2 of clubs\n Card c = new Card(); \n int s = c.CLUB;\n int r = c.MIN_RANK;\n\n while (s <= c.SPADE)\n {\n while (r <= c.ACE)\n {\n Card dealing = new Card(s, r); \n dealer.enqueue(dealing); \n r++; \n }\n \n s++; \n r = c.MIN_RANK; \n }\n }", "public static Map<Integer, TaxCategory> alberta() {\n\n\t\t\tHashMap<Integer, TaxCategory> categories = new HashMap<Integer, TaxCategory>();\n\t\t\ttry {\n\t\t\t\t//INSERT YOUR CODE HERE - Using the specification given on Federal\n\t\t\t\t//You will need to study how Manitoba is being implemented\n\t\t\t\tTaxCategory cat1 = new TaxCategory(10, 0, 131220); // Tax Category 1 for Alberta\n\t\t\t\tcategories.put( 1, cat1 ); //puts both the key and the Taxcategory(value) into the hashmap for category 1\n\t\t\t\tTaxCategory cat2 = new TaxCategory(12,131220.01, 157464); // Tax Category 2 for Alberta\n\t\t\t\tcategories.put( 2, cat2 ); //puts both the key and the Taxcategory(value) into the hashmap for category 2\n\t\t\t\tTaxCategory cat3 = new TaxCategory(13, 157464.01, 209952); // Tax Category 3 for Alberta\n\t\t\t\tcategories.put( 3, cat3 );//puts both the key and the Taxcategory(value) into the hashmap for category 3\n\t\t\t\tTaxCategory cat4 = new TaxCategory(14, 209952.01, 314928); // Tax Category 4 for Alberta\n\t\t\t\tcategories.put( 4, cat4 );//puts both the key and the Taxcategory(value) into the hashmap for category 4\n\t\t\t\tTaxCategory cat5 = new TaxCategory(15, 314928.01, 10000000); // Tax Category 5 for Alberta\n\t\t\t\tcategories.put( 5, cat5 );//puts both the key and the Taxcategory(value) into the hashmap for category 5\n\n\t\t\t} catch( Exception e ) {}\n\n\t\t\treturn categories;\n\t\t}", "private DefaultCategoryDataset createDataset() {\n\t\t\n\t\tdataset.clear();\n\t\t\n\t\t// Query HIM to submit data for bar chart display \n\t\tHistoricalInfoMgr.getChartDataset(expNum);\n\n\n\t\treturn dataset; // add the data point (y-value, variable, x-value)\n\t}", "@Override\r\n\tpublic void fillByRows(List<Category> categorys,int row) {\n\t\t\tfill(categorys);\r\n\t\tfor(Category category : categorys) {\r\n\t\t\tList<Product> products = category.getProducts();\t\r\n\t\t\tint i = 0;\r\n\t\t\tList<List<Product>> list = new ArrayList<>();\r\n\t\t\tList<Product> p = new ArrayList<>();\r\n\t\t\tif(!category.getProducts().isEmpty()) {\r\n\t\t\tfor(Product product : products) {\r\n\t\t\t\tp.add(product);i++;\r\n\t\t\t\tif(i%8==0) {\r\n\t\t\t\t\tlist.add(p);\r\n\t\t\t\t\tp = new ArrayList<>();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tif(!p.isEmpty()) {\r\n\t\t\t\tlist.add(p);\r\n\t\t\t}\r\n\t\t\tcategory.setProductsByRows(list);\r\n\t\t}\r\n\t}\r\n\t}", "public static void fill_map(){\n\t\tcategory_links_map.put(\"Categories\", \"Movies\");\n\t\tcategory_links_map.put(\"Actors\", \"Movies\");\n\t\tcategory_links_map.put(\"Movies\", \"Actors\");\n\t\tcategory_links_map.put(\"Artists\", \"Creations\");\n\t\tcategory_links_map.put(\"Creations\", \"Artists\");\n\t\tcategory_links_map.put(\"Countries\", \"Locations\");\n\t\tcategory_links_map.put(\"Locations\", \"Countries\");\n\t\tcategory_links_map.put(\"NBA players\", \"NBA teams\");\n\t\tcategory_links_map.put(\"NBA teams\", \"NBA players\");\n\t\tcategory_links_map.put(\"Israeli soccer players\", \"Israeli soccer teams\");\n\t\tcategory_links_map.put(\"Israeli soccer teams\", \"Israeli soccer players\");\n\t\tcategory_links_map.put(\"World soccer players\", \"World soccer teams\");\n\t\tcategory_links_map.put(\"World soccer teams\", \"World soccer players\");\n\t}", "private static void determineFinalRanks(Fold fold, ParametersManager params) {\n for (int currRank = fold.getNumInst(); currRank >= 1; currRank--) {\n Instance instSmallestWeight = fold.getInstSmallestWeight(); // selects the next less important instance\n\n instSmallestWeight.setRank(currRank); // ranks the instance by its order of elimination\n instSmallestWeight.setWeight(Double.POSITIVE_INFINITY); // the instance will be disregarded from now\n\n // removes the traces of the ranked instance out of the other instances\n fold.clearInstTraces(instSmallestWeight);\n\n /* For instances with rank value smaller than the number of neighbors, the relative position in the ranking\n is irrelevant (and, by construction, impossible to determine). Therefore, only the first steps of the\n ranking are performed for these instances. */\n if (currRank <= params.getNumNeighbors()) continue;\n\n // updates the distances matrix, setting the distance to or from the ranked instance to infinite\n fold.updateDistMatrix(instSmallestWeight.getId());\n\n // updates the weights of instances that had the eliminated instance among its nearest neighbors\n InstanceWeighting.updateAssociatesWeights(fold, instSmallestWeight, params);\n }\n }", "public static void kategorien_aus_inhaltsverzeichnis_abfangen (String htmlfile)\n\t{\n\t\tmain mainobject = new main ();\n\t\t// System.out.println (\"Ermittle alle Kategorien (Gruppen, Oberkategorien)... 209\\n\");\n BufferedReader in = null;\n try {\n in = new BufferedReader(new FileReader(htmlfile));\n String zeile = null;\n int counter = 0;\n while ((zeile = in.readLine()) != null) {\n \t\n \t// hole kateogrienamen: aus inhaltsverziechnis:\n \tString kategoriename = \"\";\n \t\n \t// Oberkategorie Kategorie steht zwischen:\n \t// <p style=\"margin-top: 0.21cm; margin-bottom: 0.21cm; text-transform: uppercase\">\n \t// und\n \t// </a></font></font></p>\n \t\n \t\n \t\n \t// adde kategorienamen in combo:\n \n\t\t\n\n \t\tcount_kategorien = count_kategorien+1;\n \t\t//kategorienamen[count_kategorien] = kategoriename;\n \t\t//System.out.println (\"Kat Nr.\" + count_kategorien + \" ist \" + kategoriename+\"\\n\" );\n\n \t\t// Schreibe die Kategorien in Textfile:\n \t\tFile kategorienfile = new File (\"kategorien.txt\");\n \t\tif (kategorienfile.exists ())\n \t\t\t{\n \t\t\t\t// lösche die alte vorher damit es keine probleme gibt:\n \t\t\tkategorienfile.delete();\n \t\t\t}\n \t\tFile unterkategorienfile = new File (\"unterkategorien.txt\");\n \t\tif (unterkategorienfile.exists ())\n \t\t\t{\n \t\t\t\t// lösche die alte vorher damit es keine probleme gibt:\n \t\t\tunterkategorienfile.delete();\n \t\t\t}\n \t\t\n \t\tFileWriter fwk1 = new FileWriter (kategorienfile,true);\n \t\tfwk1.write(kategoriename+\"\\n\");\n \t\tfwk1.flush();\n \t\tfwk1.close();\n \t\t\n } // while\n } // try\n catch (Exception yx)\n {\n \tSystem.out.println (\"konnte kategorien aus inhaltverszeichnis nicht auslesen.\");\n }\n\t\t\n\t\t\n\t}", "public final void rule__Buchung__Group_11__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:5493:1: ( ( ( rule__Buchung__KategorieAssignment_11_1 ) ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:5494:1: ( ( rule__Buchung__KategorieAssignment_11_1 ) )\r\n {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:5494:1: ( ( rule__Buchung__KategorieAssignment_11_1 ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:5495:1: ( rule__Buchung__KategorieAssignment_11_1 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getBuchungAccess().getKategorieAssignment_11_1()); \r\n }\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:5496:1: ( rule__Buchung__KategorieAssignment_11_1 )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:5496:2: rule__Buchung__KategorieAssignment_11_1\r\n {\r\n pushFollow(FOLLOW_rule__Buchung__KategorieAssignment_11_1_in_rule__Buchung__Group_11__1__Impl11673);\r\n rule__Buchung__KategorieAssignment_11_1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getBuchungAccess().getKategorieAssignment_11_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "@Test\n public void givenTheUSCensusData_WhenSortedOnPopulationDensity_ShouldReturnSortedResult() {\n final String CSV_FILE_PATH = \"src/test/resources/USCensusData.csv\";\n try {\n usCensusAnalyzer.loadStateCensusCSVData(CensusAnalyser.Country.US, CSV_FILE_PATH);\n String sortedCensusData = usCensusAnalyzer.sortedStateCensusData(CensusAnalyser.SortingMode.DENSITY);\n CensusDAO[] censusDAO = new Gson().fromJson(sortedCensusData, CensusDAO[].class);\n Assert.assertEquals(\"District of Columbia\",censusDAO[0].StateName);\n } catch (CSVBuilderException e) {\n e.printStackTrace();\n }\n }", "@Override\r\n\tpublic void fill(List<Category> list) {\n\t\tfor(Category category : list) {\r\n\t\t\tfill(category);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "public void Unassigned_Cases()\n\t{\n\t\t//assigning a ContactTracer to a case\n\t\tif(coronaCase.size() > 0)\n\t\t{\n\t\t\tSystem.out.println(\"\\nDisplaying unassigned cases: \");\n\t\t\tfor(int i = 0; i < coronaCase.size(); i++)\n\t\t\t\tif(coronaCase.get(i).isAssignedCase() == false)\n\t\t\t\t\tSystem.out.println(coronaCase.get(i).toString());\n\n\t\t}\n\t\telse\n\t\t\tSystem.out.println(\"No unassigned cases to display.\");\n\t\t\n\t}", "@Test\n public void testListMayors02() {\n System.out.println(\"listMayors\");\n\n Map expResult = new LinkedHashMap();\n\n City city1 = (new City(new Pair(41.237364, -8.846746), \"city1\", 72));\n city1.setMayor(new User(\"nick6\", \"[email protected]\"));\n expResult.put(city1, city1.getMayor());\n\n City city5 = (new City(new Pair(41.337408, -8.291943), \"city5\", 74));\n city5.setMayor(new User(\"nick6\", \"[email protected]\"));\n expResult.put(city5, city5.getMayor());\n\n City city6 = (new City(new Pair(41.314965, -8.423371), \"city6\", 80));\n city6.setMayor(new User(\"nick0\", \"[email protected]\"));\n expResult.put(city6, city6.getMayor());\n\n City city3 = (new City(new Pair(41.118700, -8.589700), \"city3\", 42));\n city3.setMayor(new User(\"nick8\", \"[email protected]\"));\n expResult.put(city3, city3.getMayor());\n\n City city4 = (new City(new Pair(41.467407, -8.964340), \"city4\", 64));\n city4.setMayor(new User(\"nick8\", \"[email protected]\"));\n expResult.put(city4, city4.getMayor());\n\n City city0 = (new City(new Pair(41.243345, -8.674084), \"city0\", 28));\n city0.setMayor(new User(\"nick2\", \"[email protected]\"));\n expResult.put(city0, city0.getMayor());\n\n City city2 = (new City(new Pair(40.519841, -8.085113), \"city2\", 81));\n city2.setMayor(new User(\"nick2\", \"[email protected]\"));\n expResult.put(city2, city2.getMayor());\n\n City city7 = (new City(new Pair(40.822244, -8.794953), \"city7\", 11));\n city7.setMayor(new User(\"nick5\", \"[email protected]\"));\n expResult.put(city7, city7.getMayor());\n\n City city9 = (new City(new Pair(40.851360, -8.136585), \"city9\", 65));\n city9.setMayor(new User(\"nick5\", \"[email protected]\"));\n expResult.put(city9, city9.getMayor());\n\n City city8 = (new City(new Pair(40.781886, -8.697502), \"city8\", 7));\n city8.setMayor(new User(\"nick3\", \"[email protected]\"));\n expResult.put(city8, city8.getMayor());\n\n Map result = sn10.listMayors();\n\n // To compare Values.\n assertArrayEquals(expResult.values().toArray(), result.values().toArray());\n }", "@Test\n public void testListMayors03() {\n System.out.println(\"listMayors\");\n\n Map expResult = new LinkedHashMap();\n\n City city1 = (new City(new Pair(41.237364, -8.846746), \"city1\", 72));\n city1.setMayor(new User(\"nick6\", \"[email protected]\"));\n expResult.put(city1, city1.getMayor());\n\n City city5 = (new City(new Pair(41.337408, -8.291943), \"city5\", 74));\n city5.setMayor(new User(\"nick6\", \"[email protected]\"));\n expResult.put(city5, city5.getMayor());\n\n City city6 = (new City(new Pair(41.314965, -8.423371), \"city6\", 80));\n city6.setMayor(new User(\"nick0\", \"[email protected]\"));\n expResult.put(city6, city6.getMayor());\n\n City city3 = (new City(new Pair(41.118700, -8.589700), \"city3\", 42));\n city3.setMayor(new User(\"nick8\", \"[email protected]\"));\n expResult.put(city3, city3.getMayor());\n\n City city4 = (new City(new Pair(41.467407, -8.964340), \"city4\", 64));\n city4.setMayor(new User(\"nick8\", \"[email protected]\"));\n expResult.put(city4, city4.getMayor());\n\n City city0 = (new City(new Pair(41.243345, -8.674084), \"city0\", 28));\n city0.setMayor(new User(\"nick2\", \"[email protected]\"));\n expResult.put(city0, city0.getMayor());\n\n City city2 = (new City(new Pair(40.519841, -8.085113), \"city2\", 81));\n city2.setMayor(new User(\"nick2\", \"[email protected]\"));\n expResult.put(city2, city2.getMayor());\n\n City city7 = (new City(new Pair(40.822244, -8.794953), \"city7\", 11));\n city7.setMayor(new User(\"nick5\", \"[email protected]\"));\n expResult.put(city7, city7.getMayor());\n\n City city9 = (new City(new Pair(40.851360, -8.136585), \"city9\", 65));\n city9.setMayor(new User(\"nick5\", \"[email protected]\"));\n expResult.put(city9, city9.getMayor());\n\n City city8 = (new City(new Pair(40.781886, -8.697502), \"city8\", 7));\n city8.setMayor(new User(\"nick3\", \"[email protected]\"));\n expResult.put(city8, city8.getMayor());\n\n Map result = new LinkedHashMap(sn10.listMayors());\n\n // To compare Values.\n assertThat(result, is(expResult));\n }", "@Test\n public void testListMayors01() {\n System.out.println(\"listMayors\");\n\n Map expResult = new LinkedHashMap();\n\n City city1 = (new City(new Pair(41.237364, -8.846746), \"city1\", 72));\n city1.setMayor(new User(\"nick6\", \"[email protected]\"));\n expResult.put(city1, city1.getMayor());\n\n City city5 = (new City(new Pair(41.337408, -8.291943), \"city5\", 74));\n city5.setMayor(new User(\"nick6\", \"[email protected]\"));\n expResult.put(city5, city5.getMayor());\n\n City city6 = (new City(new Pair(41.314965, -8.423371), \"city6\", 80));\n city6.setMayor(new User(\"nick0\", \"[email protected]\"));\n expResult.put(city6, city6.getMayor());\n\n City city3 = (new City(new Pair(41.118700, -8.589700), \"city3\", 42));\n city3.setMayor(new User(\"nick8\", \"[email protected]\"));\n expResult.put(city3, city3.getMayor());\n\n City city4 = (new City(new Pair(41.467407, -8.964340), \"city4\", 64));\n city4.setMayor(new User(\"nick8\", \"[email protected]\"));\n expResult.put(city4, city4.getMayor());\n\n City city0 = (new City(new Pair(41.243345, -8.674084), \"city0\", 28));\n city0.setMayor(new User(\"nick2\", \"[email protected]\"));\n expResult.put(city0, city0.getMayor());\n\n City city2 = (new City(new Pair(40.519841, -8.085113), \"city2\", 81));\n city2.setMayor(new User(\"nick2\", \"[email protected]\"));\n expResult.put(city2, city2.getMayor());\n\n City city7 = (new City(new Pair(40.822244, -8.794953), \"city7\", 11));\n city7.setMayor(new User(\"nick5\", \"[email protected]\"));\n expResult.put(city7, city7.getMayor());\n\n City city9 = (new City(new Pair(40.851360, -8.136585), \"city9\", 65));\n city9.setMayor(new User(\"nick5\", \"[email protected]\"));\n expResult.put(city9, city9.getMayor());\n\n City city8 = (new City(new Pair(40.781886, -8.697502), \"city8\", 7));\n city8.setMayor(new User(\"nick3\", \"[email protected]\"));\n expResult.put(city8, city8.getMayor());\n\n Map result = sn10.listMayors();\n\n // To compare Keys.\n assertArrayEquals(expResult.keySet().toArray(), result.keySet().toArray());\n }", "public static Map<Integer, TaxCategory> saskatchewan() {\n\n\t\t\tHashMap<Integer, TaxCategory> categories = new HashMap<Integer, TaxCategory>();\n\t\t\ttry {\n\t\t\t\t//INSERT YOUR CODE HERE - Using the specification given on Federal\n\t\t\t\t//You will need to study how Manitoba is being implemented\n\t\t\t\tTaxCategory cat1 = new TaxCategory(10.5, 0, 45677.00); //Tax Category 1 for SK\n\t\t\t\tcategories.put( 1, cat1 );//puts both the key and the Taxcategory(value) into the hashmap for category 1\n\t\t\t\tTaxCategory cat2 = new TaxCategory(12.50, 45677.01, 130506.00);//Tax Category 2 for SK\n\t\t\t\tcategories.put( 2, cat2 );//puts both the key and the Taxcategory(value) into the hashmap for category 2\n\t\t\t\tTaxCategory cat3 = new TaxCategory(13.16, 130506.01, 10000000);//Tax Category 3 for SK\n\t\t\t\tcategories.put( 3, cat3 );//puts both the key and the Taxcategory(value) into the hashmap for category 3\n\n\t\t\t} catch( Exception e ) {}\n\n\t\t\treturn categories;\n\t\t}", "@Test\n public void getCities()\n {\n List<City> cities = new ArrayList<>();\n Map<City, List<Road>> networkEmpty = new HashMap<>();\n Country countryEmpty = new Country(\"CountryEmpty\", networkEmpty);\n assertTrue(countryEmpty.getCities().size()==0);\n assertEquals(cities,countryEmpty.getCities());\n //Sorted list returned.\n cities = new ArrayList<>(country1.getNetwork().keySet());\n Collections.sort(cities);\n assertEquals(cities,country1.getCities());\n }", "public void populateDeck(){\n\n //Add everything to r\n for(int i=0;i<LUMBER;i++){\n deck.add(new ResourceCard(container, Resource.WOOD, cardStartPoint));\n }\n\n for(int i=0;i<WOOL;i++){\n deck.add(new ResourceCard(container, Resource.WOOL, cardStartPoint));\n }\n\n for(int i=0;i<GRAIN;i++){\n deck.add(new ResourceCard(container, Resource.WHEAT, cardStartPoint));\n }\n\n for(int i=0;i<BRICK;i++){\n deck.add(new ResourceCard(container, Resource.BRICKS, cardStartPoint));\n }\n\n for(int i=0;i<ORE;i++){\n deck.add(new ResourceCard(container, Resource.ORE, cardStartPoint));\n }\n //Collections.shuffle(deck);\n\n }" ]
[ "0.5656855", "0.5483477", "0.54358095", "0.5188172", "0.5172999", "0.516673", "0.5123499", "0.49789113", "0.4967153", "0.49543518", "0.4886381", "0.4878406", "0.48604447", "0.48529813", "0.4833261", "0.48302326", "0.48235705", "0.47764617", "0.47618717", "0.47360945", "0.47145504", "0.47062206", "0.4699932", "0.469463", "0.46812493", "0.46384388", "0.46316236", "0.4623663", "0.46232027", "0.46208367", "0.46155953", "0.46119145", "0.46094933", "0.45904103", "0.4586651", "0.45813993", "0.45754814", "0.45715225", "0.45612624", "0.4554442", "0.45531332", "0.45402527", "0.4534693", "0.45300323", "0.45191425", "0.45149457", "0.45082456", "0.45001823", "0.44969139", "0.44963348", "0.44961834", "0.44845816", "0.4483673", "0.44826332", "0.44825387", "0.4480837", "0.44760162", "0.44750044", "0.44593737", "0.4457258", "0.4456579", "0.4448968", "0.44487688", "0.44451082", "0.444331", "0.4433075", "0.443114", "0.44239065", "0.44191998", "0.44163904", "0.44142878", "0.440932", "0.440373", "0.440363", "0.44017082", "0.43998522", "0.4394202", "0.43904704", "0.4386961", "0.43842587", "0.43830734", "0.43811253", "0.43717298", "0.4371348", "0.4366637", "0.43645322", "0.43568507", "0.43514693", "0.43503183", "0.43483168", "0.4348053", "0.43476292", "0.43448424", "0.43399197", "0.43341473", "0.43327865", "0.43319413", "0.43304154", "0.43298188", "0.43271455", "0.4323342" ]
0.0
-1
Ranks the universities based on the category of data.
private static void intRanker(int i, LinkedList<Course> subjectCourses) { TreeMap<Integer, Course> map = new TreeMap<Integer, Course>(Collections.reverseOrder()); for (Course c : subjectCourses) { switch (i) { case 1: map.put(1 - c.subjectRank, c); // In reverse order as lower is better. break; case 3: map.put(1 - c.uni.nationwideRanking, c); break; case 6: map.put(c.uni.researchOutput, c); break; } } Set<Entry<Integer, Course>> integerSet = map.entrySet(); Iterator<Entry<Integer, Course>> integerIt = integerSet.iterator(); int counter = 1; while (integerIt.hasNext()) { Map.Entry<Integer, Course> me = (Map.Entry<Integer, Course>) integerIt.next(); LinkedList<RankedCourse> ranked = rankedCourses.get(subjectCourses.getFirst().subject); RankedCourse rc = new RankedCourse(); for (RankedCourse course : ranked) { if (course.courseName.equals(me.getValue().courseName) && course.uni.equals(me.getValue().uni)) { rc = course; break; } } switch (i) { case 1: rc.subjectRank = counter; break; case 3: rc.nationwideRank = counter; break; case 6: rc.researchOutputRank = counter; break; } counter++; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setUniversityRank(int universityRank)\r\n\t{\r\n\t\tthis.universityRank = universityRank;\r\n\t}", "private void categorizeData(){\n\t\tfor(String s :userData.keySet()){\n\t\t\tTransactionData trans = userData.get(s);\n\t\t\tif(trans.getCategory() == 'I'){\n\t\t\t\tignorableTransactions.add(trans);\n\t\t\t}\n\t\t\telse if(trans.getCategory() == 'R'){\n\t\t\t\trestaurantTransactions.add(trans);\n\t\t\t}\n\t\t\telse if(trans.getCategory() == 'G'){\n\t\t\t\tgaspumpTransactions.add(trans);\n\t\t\t}\n\t\t\telse if(trans.getCategory() == 'M'){\n\t\t\t\tmarketTransactions.add(trans);\n\t\t\t}\n\t\t\telse if(trans.getCategory() == 'T'){\n\t\t\t\ttaxiTransactions.add(trans);\n\n\t\t\t}\n\t\t\telse if(trans.getCategory() == 'S'){\n\t\t\t\tstayTransactions.add(trans);\n\t\t\t}\n\t\t\tif(trans.getCategory() == 'U'){\n\t\t\t\tunknownTransactions.add(trans);\n\t\t\t}\n\t\t}\n\t}", "private static void generateUnis() {\r\n\t\tString[] lines = readFile(\"resources/unidata.csv\");\r\n\t\tint numOfUnis = lines.length + 1;\r\n\t\tfor (String line : lines) {\r\n\t\t\tString[] attributes = line.split(\",\");\r\n\t\t\tUniversity temp = new University();\r\n\t\t\ttemp.name = attributes[0];\r\n\t\t\ttemp.type = attributes[1];\r\n\t\t\ttemp.isRussellGroup = Boolean.parseBoolean(attributes[2]);\r\n\t\t\ttemp.studentSatisfaction = Double.parseDouble(attributes[3]);\r\n\t\t\ttemp.nationwideRanking = numOfUnis - Integer.parseInt(attributes[4]);\r\n\t\t\ttemp.costOfLiving = Double.parseDouble(attributes[5]);\r\n\t\t\ttemp.studentFacultyRatio = Double.parseDouble(attributes[6]);\r\n\t\t\ttemp.researchOutput = (int) Double.parseDouble(attributes[7]); // THIS LINE IS INCORRECT\r\n\t\t\ttemp.internationalStudentsRatio = Double.parseDouble(attributes[8]);\r\n\t\t\ttemp.graduateProspects = Double.parseDouble(attributes[9]);\r\n\t\t\t/*\r\n\t\t\t * Structure of CSV file containing general university data: NAME, TYPE (City or\r\n\t\t\t * Campus), RUSSELL GROUP, STUDENT SATISFACTION, NATIONWIDE RANKING (Overall),\r\n\t\t\t * COST OF LIVING (According to appropriate cost of living index), STUDENT\r\n\t\t\t * FACULTY RATIO, RESEARCH OUTPUT, INTERNATIONAL STUDENT RATIO and GRADUATE\r\n\t\t\t * PROSPECTS (How many graduates in full-time employment or education after an\r\n\t\t\t * appropriate period).\r\n\t\t\t */\r\n\t\t\tunis.put(temp.name, temp);\r\n\t\t}\r\n\t}", "public void randomizeCategory() {\n this.group = (int) (3*Math.random()+1);\n }", "private HashMap<DIVISION, CompetitiveRank[]> createRankMap() {\n HashMap<DIVISION, CompetitiveRank[]> ranks = new HashMap<>();\n ranks.put(DIVISION.IRON, createRankTiers(DIVISION.IRON, 3));\n ranks.put(DIVISION.BRONZE, createRankTiers(DIVISION.BRONZE, 3));\n ranks.put(DIVISION.SILVER, createRankTiers(DIVISION.SILVER, 3));\n ranks.put(DIVISION.GOLD, createRankTiers(DIVISION.GOLD, 3));\n ranks.put(DIVISION.PLATINUM, createRankTiers(DIVISION.PLATINUM, 3));\n ranks.put(DIVISION.DIAMOND, createRankTiers(DIVISION.DIAMOND, 3));\n ranks.put(DIVISION.IMMORTAL, createRankTiers(DIVISION.IMMORTAL, 3));\n\n // No tiers\n ranks.put(DIVISION.UNRATED, createRankTier(DIVISION.UNRATED));\n ranks.put(DIVISION.RADIANT, createRankTier(DIVISION.RADIANT));\n return ranks;\n }", "private CompetitiveRank[] createRankTier(DIVISION division) {\n return createRankTiers(division, 1);\n }", "public static Map<Integer, TaxCategory> britishColumbia() {\n\n\t\t\tHashMap<Integer, TaxCategory> categories = new HashMap<Integer, TaxCategory>();\n\t\t\ttry {\n\t\t\t\t//INSERT YOUR CODE HERE - Using the specification given on Federal\n\t\t\t\t//You will need to study how Manitoba is being implemented\n\t\t\t\tTaxCategory cat1 = new TaxCategory(5.06, 0, 42184.00); // Tax Category 1 for BC\n\t\t\t\tcategories.put( 1, cat1 );//puts both the key and the Taxcategory(value) into the hashmap for category 1\n\t\t\t\tTaxCategory cat2 = new TaxCategory(7.70, 42184.01, 84369.00); // Tax Category 2 for BC\n\t\t\t\tcategories.put( 2, cat2 );//puts both the key and the Taxcategory(value) into the hashmap for category 2\n\t\t\t\tTaxCategory cat3 = new TaxCategory(10.50, 84369.01, 96866.00); // Tax Category 3 for BC\n\t\t\t\tcategories.put( 3, cat3 );//puts both the key and the Taxcategory(value) into the hashmap for category 3\n\t\t\t\tTaxCategory cat4 = new TaxCategory(12.29, 96866.01, 117623.00); // Tax Category 4 for BC\n\t\t\t\tcategories.put( 4, cat4 );//puts both the key and the Taxcategory(value) into the hashmap for category 4\n\t\t\t\tTaxCategory cat5 = new TaxCategory(14.70, 117623.01, 159483.00); // Tax Category 5 for BC\n\t\t\t\tcategories.put( 5, cat5 );//puts both the key and the Taxcategory(value) into the hashmap for category 5\n\t\t\t\tTaxCategory cat6 = new TaxCategory(16.80, 159483.01, 222420.00); // Tax Category 6 for BC\n\t\t\t\tcategories.put( 6, cat6 );//puts both the key and the Taxcategory(value) into the hashmap for category 6\n\t\t\t\tTaxCategory cat7 = new TaxCategory(20.50, 222420.01, 10000000); // Tax Category 7 for BC\n\t\t\t\tcategories.put( 7, cat7 );//puts both the key and the Taxcategory(value) into the hashmap for category 7\n\n\t\t\t} catch( Exception e ) {}\n\n\t\t\treturn categories;\n\t\t}", "private void assignCapitals() {\n City bestCity = null;\n int mostLandTilesSurrounding = 0;\n int landTilesSurrounding = 0;\n int minRow = 0;\n int maxRow = 0;\n int minColumn = 0;\n int maxColumn = 0;\n if (numPlayers == 2) {\n for (int i = 0; i < 2; i++) {\n mostLandTilesSurrounding = 0;\n if (i == 0) {\n minRow = 0;\n maxRow = MAP_LENGTH-1;\n minColumn = 0;\n maxColumn = MAP_LENGTH/2;\n } else if (i == 1) {\n minRow = 0;\n maxRow = MAP_LENGTH-1;\n minColumn = MAP_LENGTH/2;;\n maxColumn = MAP_LENGTH-1;\n }\n for (int r = minRow; r < maxRow; r++) {\n for (int c = minColumn; c < maxColumn; c++) {\n if (tileMap[r][c].getCity() != null) {\n landTilesSurrounding = surroundingLandCheckCity(tileMap[r][c].getCity());\n if (landTilesSurrounding > mostLandTilesSurrounding) {\n mostLandTilesSurrounding = landTilesSurrounding;\n bestCity = tileMap[r][c].getCity();\n }\n }\n }\n }\n tileMap[bestCity.getRow()][bestCity.getCol()].getCity().setTribe(i);\n tileMap[bestCity.getRow()][bestCity.getCol()].getCity().setCapital(true);\n capitalCities[numCapitalCities] = tileMap[bestCity.getRow()][bestCity.getCol()].getCity();\n numCapitalCities++;\n }\n } else if (numPlayers == 3) {\n\n for (int i = 0; i < 3; i++) {\n mostLandTilesSurrounding = 0;\n if (i == 0) {\n minRow = 0;\n maxRow = MAP_LENGTH / 2;\n minColumn = 0;\n maxColumn = MAP_LENGTH / 2;\n } else if (i == 1) {\n minRow = 0;\n maxRow = MAP_LENGTH / 2;\n minColumn = MAP_LENGTH / 2;\n maxColumn = MAP_LENGTH - 1;\n } else if (i == 2) {\n minRow = MAP_LENGTH / 2;\n maxRow = MAP_LENGTH - 1;\n minColumn = 0;\n maxColumn = MAP_LENGTH / 2;\n }\n for (int r = minRow; r < maxRow; r++) {\n for (int c = minColumn; c < maxColumn; c++) {\n if (tileMap[r][c].getCity() != null) {\n landTilesSurrounding = surroundingLandCheckCity(tileMap[r][c].getCity());\n if (landTilesSurrounding > mostLandTilesSurrounding) {\n mostLandTilesSurrounding = landTilesSurrounding;\n bestCity = tileMap[r][c].getCity();\n }\n }\n }\n }\n tileMap[bestCity.getRow()][bestCity.getCol()].getCity().setTribe(i);\n tileMap[bestCity.getRow()][bestCity.getCol()].getCity().setCapital(true);\n capitalCities[numCapitalCities] = tileMap[bestCity.getRow()][bestCity.getCol()].getCity();\n numCapitalCities++;\n System.out.println(\"Capital city of player \" + i + \" is at \" + bestCity.getCol() + \", \" + bestCity.getRow()); //For checking capital city determination\n }\n } else if (numPlayers == 4) {\n for (int i = 0; i < 4; i++) {\n mostLandTilesSurrounding = 0;\n if (i == 0) {\n minRow = 0;\n maxRow = MAP_LENGTH/2;\n minColumn = 0;\n maxColumn = MAP_LENGTH/2;\n } else if (i == 1) {\n minRow = 0;\n maxRow = MAP_LENGTH/2;\n minColumn = MAP_LENGTH/2;\n maxColumn = MAP_LENGTH-1;\n } else if (i == 2) {\n minRow = MAP_LENGTH/2;\n maxRow = MAP_LENGTH-1;\n minColumn = 0;\n maxColumn = MAP_LENGTH/2;\n } else if (i == 3) {\n minRow = MAP_LENGTH/2;\n maxRow = MAP_LENGTH-1;\n minColumn = MAP_LENGTH/2;\n maxColumn = MAP_LENGTH-1;\n }\n for (int r = minRow; r < maxRow; r++) {\n for (int c = minColumn; c < maxColumn; c++) {\n if (tileMap[r][c].getCity() != null) {\n landTilesSurrounding = surroundingLandCheckCity(tileMap[r][c].getCity());\n if (landTilesSurrounding > mostLandTilesSurrounding) {\n mostLandTilesSurrounding = landTilesSurrounding;\n bestCity = tileMap[r][c].getCity();\n }\n }\n }\n }\n tileMap[bestCity.getRow()][bestCity.getCol()].getCity().setTribe(i);\n tileMap[bestCity.getRow()][bestCity.getCol()].getCity().setCapital(true);\n capitalCities[numCapitalCities] = tileMap[bestCity.getRow()][bestCity.getCol()].getCity();\n numCapitalCities++;\n }\n }\n }", "private void getUniversities() {\n ProgressDialog dialog = new ProgressDialog(this, \"Caricamento...\");\n application.databaseCall(\"universities.php\", UNIVERSITY_SELECTION_TAG, dialog);\n }", "private static void rankCourses() {\r\n\t\tfor (String subject : courses.keySet()) {\r\n\t\t\tLinkedList<Course> subjectCourses = courses.get(subject);\r\n\t\t\tfor (int i = 1; i <= 8; i++) {\r\n\t\t\t\tswitch (i) {\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\t// Subject rank\r\n\t\t\t\t\tintRanker(1, subjectCourses);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\t// Student satisfaction\r\n\t\t\t\t\tintRanker(2, subjectCourses);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\t// Nationwide ranking\r\n\t\t\t\t\tdoubleRanker(3, subjectCourses);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\t// Cost of living\r\n\t\t\t\t\tdoubleRanker(4, subjectCourses);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\t// Student to faculty ratio\r\n\t\t\t\t\tdoubleRanker(5, subjectCourses);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 6:\r\n\t\t\t\t\t// Research Output\r\n\t\t\t\t\tintRanker(6, subjectCourses);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 7:\r\n\t\t\t\t\t// International students\r\n\t\t\t\t\tdoubleRanker(7, subjectCourses);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 8:\r\n\t\t\t\t\t// Graduate prospects\r\n\t\t\t\t\tdoubleRanker(8, subjectCourses);\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}", "private CompetitiveRank[] createRankTiers(DIVISION division, int count) {\n CompetitiveRank[] ranks = new CompetitiveRank[count];\n for(int i = 0; i < ranks.length; i++) {\n ranks[i] = createRank(division, i + 1);\n }\n return ranks;\n }", "private void iniciarRanking() {\n\t\tif(!usouIa) {\r\n\t\t\tswitch (this.dificuldade) {\r\n\t\t\tcase FACIL:\r\n\t\t\t\trank = new RankingFacil();\r\n\t\t\t\tbreak;\r\n\t\t\tcase MEDIO:\r\n\t\t\t\trank = new RankingMedio();\r\n\t\t\t\tbreak;\r\n\t\t\tcase DIFICIL:\r\n\t\t\t\trank = new RankingDificil();\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\trank.iniciarRanking(new Jogador(this.nomeJogador, timer.getTempo(), timer.getTempoTotal()));//MANDA O NOME DO JOGADOR, O TEMPO FORMATADO E O TEMPO TOTAL PRO RANKING\r\n\t\t}\r\n\t}", "private void populateData() {\r\n\t\tfor(int i = 0; i < this.incomeRanges.length; i++) {\r\n\t\t\tthis.addData(new Data(incomeRanges[i], 0), true);\r\n\t\t}\t// end for\r\n\t}", "public void sortCompetitors(){\n\t\t}", "private CompetitiveRank createRank(DIVISION division, int tier) {\n return new CompetitiveRank(\n division,\n tier,\n resourceHandler.getImageResource(BASE_PATH + division.name() + \"/\" + tier + \".png\")\n );\n }", "private void arrangeFactors() {\n List<Condition> tempTrialConditions = new ArrayList<Condition>();\n List<Condition> tempStudyConditions = new ArrayList<Condition>();\n List<ibfb.domain.core.Factor> tempFactors = new ArrayList<ibfb.domain.core.Factor>();\n\n // conditions\n for (Condition cond : workbookStudy.getConditions()) {\n if (hasLabel(cond.getLabel(), Workbook.STUDY)) {\n cond.setLabel(Workbook.STUDY);\n tempStudyConditions.add(cond);\n }\n }\n for (Condition cond : workbookStudy.getStudyConditions()) {\n if (hasLabel(cond.getLabel(), Workbook.STUDY)) {\n cond.setLabel(Workbook.STUDY);\n tempStudyConditions.add(cond);\n }\n }\n\n // study conditions\n for (Condition cond : workbookStudy.getConditions()) {\n //if (hasLabel(cond.getLabel(), Workbook.TRIAL_LABEL)) {\n if (hasLabel(cond.getLabel(), workbookStudy.getTrialLabel())) {\n\n cond.setLabel(workbookStudy.getTrialLabel());\n tempTrialConditions.add(cond);\n }\n }\n for (Condition cond : workbookStudy.getStudyConditions()) {\n // if (hasLabel(cond.getLabel(), Workbook.TRIAL_LABEL)) {\n if (hasLabel(cond.getLabel(), workbookStudy.getTrialLabel())) {\n cond.setLabel(workbookStudy.getTrialLabel());\n tempTrialConditions.add(cond);\n }\n }\n\n // factors (ENTRY)\n for (Condition cond : workbookStudy.getStudyConditions()) {\n //if (hasLabel(cond.getLabel(), Workbook.TRIAL_LABEL)) {\n if (hasLabel(cond.getLabel(), workbookStudy.getTrialLabel())) {\n //tempFactors.add(getFactor(cond, Workbook.ENTRY_LABEL));\n tempFactors.add(getFactor(cond, workbookStudy.getTrialLabel()));\n }\n }\n\n for (Condition cond : workbookStudy.getConditions()) {\n //if (hasLabel(cond.getLabel(), Workbook.ENTRY_LABEL)) {\n if (hasLabel(cond.getLabel(), workbookStudy.getEntryLabel())) {\n //tempFactors.add(getFactor(cond, Workbook.ENTRY_LABEL));\n tempFactors.add(getFactor(cond, workbookStudy.getEntryLabel()));\n }\n }\n for (ibfb.domain.core.Factor factor : workbookStudy.getFactors()) {\n //if (hasLabel(factor.getLabel(), Workbook.ENTRY_LABEL)) {\n if (hasLabel(factor.getLabel(), workbookStudy.getEntryLabel())) {\n tempFactors.add(factor);\n }\n }\n\n // Factors (plot)\n for (Condition cond : workbookStudy.getStudyConditions()) {\n //if (hasLabel(cond.getLabel(), Workbook.PLOT_LABEL)) {\n if (hasLabel(cond.getLabel(), workbookStudy.getPlotLabel())) {\n //tempFactors.add(getFactor(cond, Workbook.PLOT_LABEL));\n tempFactors.add(getFactor(cond, workbookStudy.getPlotLabel()));\n }\n }\n for (Condition cond : workbookStudy.getConditions()) {\n //if (hasLabel(cond.getLabel(), Workbook.PLOT_LABEL)) {\n if (hasLabel(cond.getLabel(), workbookStudy.getPlotLabel())) {\n //tempFactors.add(getFactor(cond, Workbook.PLOT_LABEL));\n tempFactors.add(getFactor(cond, workbookStudy.getPlotLabel()));\n }\n }\n\n for (ibfb.domain.core.Factor factor : workbookStudy.getFactors()) {\n //if (hasLabel(factor.getLabel(), Workbook.PLOT_LABEL)) {\n if (hasLabel(factor.getLabel(), workbookStudy.getPlotLabel())) {\n tempFactors.add(factor);\n /*} else if (factor.getLabel() != null && workbookStudy.getOtherLabels().contains(factor.getLabel())) {\n tempFactors.add(factor);\n */\n }\n }\n\n for (ibfb.domain.core.Factor factor : workbookStudy.getFactors()) {\n //if (hasLabel(factor.getLabel(), Workbook.PLOT_LABEL)) {\n if (factor.getLabel() != null \n && !hasLabel(factor.getLabel(), Workbook.STUDY)\n && !hasLabel(factor.getLabel(), workbookStudy.getEntryLabel())\n && !hasLabel(factor.getLabel(), workbookStudy.getPlotLabel())\n && !hasLabel(factor.getLabel(), workbookStudy.getTrialLabel())) {\n tempFactors.add(factor);\n }\n }\n\n workbookStudy.setStudyConditions(tempStudyConditions);\n workbookStudy.setConditions(tempTrialConditions);\n workbookStudy.setFactors(tempFactors);\n }", "private void Deciderank() {\n\n\t\tfor(int i=0;i<banknode;i++){\n\t\t\tif(i<banknode*a1) {Bank.get(i).CAR=megaCAR;Bank.get(i).forcelev=megaCAR;}\n\t\t\tif(banknode*a1<=i&&i<=banknode*a2) {Bank.get(i).CAR=mediumCAR;Bank.get(i).forcelev=mediumCAR;}\n\t\t\tif(banknode*a2<i) {Bank.get(i).CAR=smallCAR;Bank.get(i).forcelev=smallCAR;}\n\t\t\t}\n\t\t}", "@Override\n\t@Transactional\n\n\tpublic void initCategorie() {\n\t\tStream.of(\"Action\",\"Drame\",\"Guerre\",\"Fantastique\",\"Science-fiction\",\"Thriller\").forEach(cat->{\n\t\t\tCategorie categorie=new Categorie();\n\t\t\tcategorie.setName(cat);\n\t\t\tcategorieRepository.save(categorie);\n\t\t});\n\t}", "private void updateRanking(boolean byTime, char[] allTyreTypes)\n {\n if(byTime) // if required to sort by time\n {\n getDrivers().adjustDriversListByTime(allTyreTypes);\n }\n else // if required to sort by championship score\n {\n getDrivers().sortByScore();\n }\n for(int i = 0 ; i < getDrivers().getSize() ; i++)\n {\n getDrivers().getDriver(i).setRanking(i + 1); // update ranking\n }\n }", "public static void sortByFitlvl() {\n Collections.sort(Population);\n if (debug) {\n debugLog(\"\\nSorted: \");\n printPopulation();\n }\n }", "private void loadData() {\r\n\t\talert(\"Loading data ...\\n\");\r\n \r\n // ---- categories------\r\n my.addCategory(new Category(\"1\", \"VIP\"));\r\n my.addCategory(new Category(\"2\", \"Regular\"));\r\n my.addCategory(new Category(\"3\", \"Premium\"));\r\n my.addCategory(new Category(\"4\", \"Mierder\"));\r\n \r\n my.loadData();\r\n \r\n\t }", "public void populateRiver()\n\t{\n\t\twhile (emptyIndices.size() != 10) // 10 animals requirement at start\n\t\t{\n\t\t\tswitch (rng.nextInt(3))\n\t\t\t{\n\t\t\tcase 0:\n\t\t\t\triver[rng.nextInt(20)] = new Bear();\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\triver[rng.nextInt(20)] = new Fish();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\triver[rng.nextInt(20)] = null;\n\t\t\t}\n\t\t\tfindEmpty(); // force emptyIndices update\n\t\t}\n\t}", "public void ordenarRanking(){\n for(int i = 0; i < clasificacion.length; i++) {\n boolean flag = false;\n for(int j = 0; j < clasificacion.length-1; j++) {\n\n /*Si el elemento de la posicion j+1 es mayor que el anterior se intercambian\n los valores de esas posiciones*/\n if((clasificacion[j].getMediana())<(clasificacion[j+1].getMediana())) {\n Ranking k = new Ranking();\n k=clasificacion[j];\n clasificacion[j] = clasificacion[i];\n clasificacion[i] = k;\n flag=true; //Se pone a true para indicar que se ha hecho un cambio\n }//END_IF\n }//END_FOR\n\n if(!flag) break; //Si flag es igual a falso quiere decir que en la ultima iteracion\n //no hubo ningun intercambio y por lo tanto el metodo puede terminar\n //ya que el vector esta ordenado\n }//END_FOR\n\n }", "protected void levelUp() {\n\t\tlevel++;\n\t\t// set up floors for next level\n\t\tint[] nextFloors = floors[level];\n\t\tint[] nextFurnishing = furnishings[level];\n\t\tfor(int i = 0; i < nextFloors.length; i++) {\n\t\t\tFloor newFloor = game.getFloorByKey(nextFloors[i]);\n\t\t\ttiles[i].setFloor(newFloor);\n\t\t\tif(nextFurnishing[i] != 0) {\n\t\t\t\tFurnishingDirectory newFurn = game.getFurnishingByKey(nextFurnishing[i]);\n\t\t\t\tnew Furnishing(newFurn, tiles[i]);\n\t\t\t}\n\t\t}\n\t}", "public static Map<Integer, TaxCategory> newBrunswick() {\n\n\t\t\tHashMap<Integer, TaxCategory> categories = new HashMap<Integer, TaxCategory>();\n\t\t\ttry {\n\t\t\t\t//INSERT YOUR CODE HERE - Using the specification given on Federal\n\t\t\t\t//You will need to study how Manitoba is being implemented\n\t\t\t\tTaxCategory cat1 = new TaxCategory(9.68, 0, 43835); //Tax Category 1 for NewBrunswick\n\t\t\t\tcategories.put( 1, cat1 ); //puts both the key and the Taxcategory(value) into the hashmap for category 1\n\t\t\t\tTaxCategory cat2 = new TaxCategory(14.82, 43835.01, 87671); //Tax Category 1 for NewBrunswick\n\t\t\t\tcategories.put( 2, cat2 ); //puts both the key and the Taxcategory(value) into the hashmap for category 2\n\t\t\t\tTaxCategory cat3 = new TaxCategory(16.52, 87671.01, 142534); //Tax Category 1 for NewBrunswick\n\t\t\t\tcategories.put( 3, cat3 ); //puts both the key and the Taxcategory(value) into the hashmap for category 3\n\t\t\t\tTaxCategory cat4 = new TaxCategory(17.84, 142534.01, 162383); //Tax Category 1 for NewBrunswick\n\t\t\t\tcategories.put( 4, cat4 ); //puts both the key and the Taxcategory(value) into the hashmap for category 4\n\t\t\t\tTaxCategory cat5 = new TaxCategory(20.3, 162383.01, 10000000); //Tax Category 1 for NewBrunswick\n\t\t\t\tcategories.put( 5, cat5 ); //puts both the key and the Taxcategory(value) into the hashmap for category 5\n\n\t\t\t} catch( Exception e ) {}\n\n\t\t\treturn categories;\n\t\t}", "private void populateBasicLists() {\n // TODO chathuranga change following\n districtList = districtDAO.getDistrictNames(language, user);\n // TODO chathuranga when search by all district option\n /* if (districtId == 0) {\n if (!districtList.isEmpty()) {\n districtId = districtList.keySet().iterator().next();\n logger.debug(\"first allowed district in the list {} was set\", districtId);\n }\n }*/\n dsDivisionList = dsDivisionDAO.getDSDivisionNames(districtId, language, user);\n mrDivisionList = mrDivisionDAO.getMRDivisionNames(dsDivisionId, language, user);\n }", "private void setCategoryData(){\n ArrayList<Category> categories = new ArrayList<>();\n //add categories\n categories.add(new Category(\"Any Category\",0));\n categories.add(new Category(\"General Knowledge\", 9));\n categories.add(new Category(\"Entertainment: Books\", 10));\n categories.add(new Category(\"Entertainment: Film\", 11));\n categories.add(new Category(\"Entertainment: Music\", 12));\n categories.add(new Category(\"Entertainment: Musicals & Theaters\", 13));\n categories.add(new Category(\"Entertainment: Television\", 14));\n categories.add(new Category(\"Entertainment: Video Games\", 15));\n categories.add(new Category(\"Entertainment: Board Games\", 16));\n categories.add(new Category(\"Science & Nature\", 17));\n categories.add(new Category(\"Science: Computers\", 18));\n categories.add(new Category(\"Science: Mathematics\", 19));\n categories.add(new Category(\"Mythology\", 20));\n categories.add(new Category(\"Sport\", 21));\n categories.add(new Category(\"Geography\", 22));\n categories.add(new Category(\"History\", 23));\n categories.add(new Category(\"Politics\", 24));\n categories.add(new Category(\"Art\", 25));\n categories.add(new Category(\"Celebrities\", 26));\n categories.add(new Category(\"Animals\", 27));\n categories.add(new Category(\"Vehicles\", 28));\n categories.add(new Category(\"Entertainment: Comics\", 29));\n categories.add(new Category(\"Science: Gadgets\", 30));\n categories.add(new Category(\"Entertainment: Japanese Anime & Manga\", 31));\n categories.add(new Category(\"Entertainment: Cartoon & Animations\", 32));\n\n //fill data in selectCategory Spinner\n ArrayAdapter<Category> adapter = new ArrayAdapter<>(this,\n android.R.layout.simple_spinner_dropdown_item, categories);\n selectCategory.setAdapter(adapter);\n\n }", "public void university(){\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(\"Registry:\");\n\t\tString registry = reader.nextLine();\n\t\tSystem.out.println(\"Number of years accredited:\");\n\t\tint accreditedYears = reader.nextInt();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Rector name:\");\n\t\tString rectorName = reader.nextLine();\n\t\tSystem.out.println(\"Number of students in stratum 1 and 2:\");\n\t\tint studentsStratum = reader.nextInt();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Number of students:\");\n\t\tint students = reader.nextInt();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Position in the saberPro test:\");\n\t\tint nationalPositionPro = reader.nextInt();\n\t\treader.nextLine();\n\t\tUniversity toAdd = new University(nameRegistered, nit, address, contactNumber, employees, value, legalRepresentative, constitution, rows, type, registry, accreditedYears, rectorName, studentsStratum, students, nationalPositionPro);\n\t\ttheHolding.addSubordinate(toAdd);\n\t\tSystem.out.println(\"The company were added successfuly\");\n\t}", "private void pickUtts() {\n for (int i = 0; i < CATEGORIES.length; i++)\n pickedUtts[i] = new Utterance[BUTTONS_PER_PAGE];\n // check all categories to be sure there's enough\n for (int i = 0; i < CATEGORIES.length; i++) {\n if(includedUtts.get(i).size() < BUTTONS_PER_PAGE)\n new Exception().printStackTrace();\n }\n // pick new utts\n Random ran = new Random();\n for (int i = 0; i < CATEGORIES.length; i++) {\n Utterance pick;\n for ( int j = 0; j < BUTTONS_PER_PAGE; j++ ) {\n do {\n pick = includedUtts.get(i).get(ran.nextInt(includedUtts.get(i).size()));\n } while (Arrays.asList(pickedUtts[i]).contains(pick));\n pickedUtts[i][j] = pick;\n }\n }\n }", "private Pool setUpSkookumchuk() {\n final int skookumchukVolume = 1000;\n final int skookumchukTemperature = 42;\n final double skookumchukPH = 7.9;\n final double skookumchukNutrientCoefficient = 0.9;\n final int skookumchukNumberOfGuppies = 100;\n final int skookumchukMinAge = 10;\n final int skookumchukMaxAge = 25;\n final double skookumchukMinHealthCoefficient = 0.5;\n final double skookumchukMaxHealthCoefficient = 0.8;\n\n GuppySet skookumchukGuppies = new GuppySet(skookumchukNumberOfGuppies,\n skookumchukMinAge, skookumchukMaxAge,\n skookumchukMinHealthCoefficient,\n skookumchukMaxHealthCoefficient);\n\n Pool skookumchuk = setUpPool(\"Skookumchuk\", skookumchukVolume,\n skookumchukTemperature, skookumchukPH,\n skookumchukNutrientCoefficient, skookumchukGuppies);\n\n return skookumchuk;\n }", "void Union( int x, int y){\n\n int i = root(x);\n int j = root(y);\n if (i == j) return;\n if (rank[i] > rank[j]) { id[j] = i; rank[i] += rank[j]; }\n else { id[i] = j; rank[j] += rank[i]; }\n }", "public void rank(){\n\n\t}", "public void fill(){\n int i = 0;\n for (Suit suit:Suit.values()){\n for (Rank rank:Rank.values()) {\n deck[i] = new Card(rank, suit);\n numCards++;\n i++;\n }\n }\n }", "private void initialiseCategories() {\n\t\t_nzCategories = BashCmdUtil.bashCmdHasOutput(\"ls categories/nz\");\n\t\t_intCategories = BashCmdUtil.bashCmdHasOutput(\"ls categories/international\");\n\t}", "public void init(){\n\t\tcontentInBank = new TreeMap<>();\n\t\tint bank=0;\n\t\tfor (int i = 0; i < MEMORY_ADDRESS_LIMIT; i++) {\n\t\t\tbank = i % numOfbank;\n\t\t\t\n\t\t\tif (contentInBank.get(bank) == null) {\n\t\t\t\tMap<Integer,Entry>con = new TreeMap<>();\n\t\t\t\tcon.put(i, new Entry(MemoryType.UNDEF,\"0\", i));\n\t\t\t\tcontentInBank.put(bank, con);\n\t\t\t} else {\n\t\t\t\tcontentInBank.get(bank).put(i, new Entry(MemoryType.UNDEF,\"0\", i));\t\n\t\t\t}\n\t\t}\n\t}", "private void updateData() {\n\t\tDefaultMutableTreeNode root = new DefaultMutableTreeNode(\"Rollmaterial\");\n\n\t\tif (treeModel == null) {\n\t\t\ttreeModel = new DefaultTreeModel(root);\n\t\t\tstocksTree.setModel(treeModel);\n\t\t}\n\n\t\tHashMap<String, HashSet<rollingstock>> allsorted = new HashMap<>();\n\t\tHashSet<rollingstock> sorted = new HashSet<>();\n\n\t\tfor (rollingstock rs : dataCollector.collector.getAllTrainData().stocks.values()) {\n\t\t\tsorted.add(rs);\n\t\t\tfor (String t : rs.getTypes()) {\n\t\t\t\tHashSet<rollingstock> th;\n\t\t\t\tth = allsorted.get(t);\n\t\t\t\tif (th == null) {\n\t\t\t\t\tth = new HashSet<>();\n\t\t\t\t\tallsorted.put(t, th);\n\t\t\t\t}\n\t\t\t\tth.add(rs);\n\t\t\t}\n\t\t}\n\n\t\tDefaultMutableTreeNode list1 = new DefaultMutableTreeNode(\"alphabetisch\");\n\t\troot.add(list1);\n\t\tfor (rollingstock rs : sorted) {\n\t\t\tlist1.add(new DefaultMutableTreeNode(rs));\n\t\t}\n\t\tlist1 = new DefaultMutableTreeNode(\"mit Antrieb\");\n\t\troot.add(list1);\n\t\tfor (rollingstock rs : sorted) {\n\t\t\tif (rs.getEngine() != null) {\n\t\t\t\tlist1.add(new DefaultMutableTreeNode(rs));\n\t\t\t}\n\t\t}\n\t\tlist1 = new DefaultMutableTreeNode(\"ohne Antrieb\");\n\t\troot.add(list1);\n\t\tfor (rollingstock rs : sorted) {\n\t\t\tif (rs.getEngine() == null) {\n\t\t\t\tlist1.add(new DefaultMutableTreeNode(rs));\n\t\t\t}\n\t\t}\n\n\t\tlist1 = new DefaultMutableTreeNode(\"nach Typ\");\n\t\troot.add(list1);\n\t\tfor (String t : allsorted.keySet()) {\n\t\t\tDefaultMutableTreeNode list2 = new DefaultMutableTreeNode(t);\n\t\t\tlist1.add(list2);\n\t\t\tDefaultMutableTreeNode welist = new DefaultMutableTreeNode(\"mit Antrieb\");\n\t\t\tDefaultMutableTreeNode woelist = new DefaultMutableTreeNode(\"ohne Antrieb\");\n\n\t\t\tlist2.add(welist);\n\t\t\tlist2.add(woelist);\n\t\t\tfor (rollingstock rs : allsorted.get(t)) {\n\t\t\t\tif (rs.getEngine() == null) {\n\t\t\t\t\twoelist.add(new DefaultMutableTreeNode(rs));\n\t\t\t\t} else {\n\t\t\t\t\twelist.add(new DefaultMutableTreeNode(rs));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\ttreeModel.setRoot(root);\n\t}", "@Override\n\tpublic void sortDeck() {\n\t\tfor(int i = 0; i < getCount() - 1; i++) {\n\t\t\tfor(int j = i + 1; j < getCount(); j++) {\n\t\t\t\tif(aktuellesDeck[i].compareTo(aktuellesDeck[j]) == 1) {\n\t\t\t\t\tSkatCard speicherCard = new SkatCard(aktuellesDeck[i].getSuit(), aktuellesDeck[i].getRank());\n\t\t\t\t\taktuellesDeck[i] = null;\n\t\t\t\t\taktuellesDeck[i] = new SkatCard(aktuellesDeck[j].getSuit(), aktuellesDeck[j].getRank());\n\t\t\t\t\taktuellesDeck[j] = null;\n\t\t\t\t\taktuellesDeck[j] = new SkatCard(speicherCard.getSuit(), speicherCard.getRank());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "void setDefaultRank(KingdomUser user);", "public void changeCategory(int index){\n if(user[index].getAmountCategory()>=3 && user[index].getAmountCategory()<=10){\n user[index].setCategoryUser(user[index].newCategory(\"littleContributor\"));\n }\n else if(user[index].getAmountCategory()>10 && user[index].getAmountCategory()<30){\n user[index].setCategoryUser(user[index].newCategory(\"mildContributor\"));\n }\n else if(user[index].getAmountCategory() == 30){\n user[index].setCategoryUser(user[index].newCategory(\"starContributor\"));\n }\n }", "private void move3(Habitat habitat,Pool pool)\r\n\t{\r\n\t\t// TODO Auto-generated method stub\r\n\t\tboolean moved = false;\r\n\t\tPool clonedPool=null;\r\n\t\tArrayList<Integer> tabuSivs = new ArrayList<Integer>();\r\n\t\ttabuSivs.add(-1);\r\n\t\t\r\n\t\t//Sort the users of the pool compared to gravity center\r\n\t\t//Collections.sort(pool.getListOfUsers(), User.ComparatorDistG);\r\n\t\t\r\n\t\tfor(int i =0;i<habitat.getSivs().size() - 1 && !moved;i++)\r\n\t\t{\r\n\t\t\tint k = (new Random()).nextInt(habitat.getSivs().size());\r\n\t\t\tint loops = 0;\r\n\t\t\twhile((habitat.getSivs().get(k) == pool || habitat.getSivs().get(k).getRestCarCap()==0 || tabuSivs.contains(k)) && loops<10 )\r\n\t\t\t{\r\n\t\t\t\tk = (new Random()).nextInt(habitat.getSivs().size());\r\n\t\t\t\tloops++;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(!tabuSivs.contains(k))\r\n\t\t\t{\r\n\t\t\t\ttabuSivs.add(k);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//if(habitat.getSivs().get(i) != pool && habitat.getSivs().get(i).getListOfUsers().size()==1) \r\n\t\t\tif(habitat.getSivs().get(k) != pool && habitat.getSivs().get(k).getRestCarCap()>0)\r\n\t\t\t{\r\n\t\t\t\tclonedPool = (Pool) pool.clone();\r\n\t\t\t\t//for(int j=0;j<pool.getListOfUsers().size() && !moved;j++)\r\n\t\t\t\tfor(int j=pool.getListOfUsers().size() - 1; j>=0 && !moved;j--)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(habitat.getSivs().get(k).areAllUsersAuthorized(clonedPool.getListOfUsers().get(j).getNumUser()))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\thabitat.getSivs().get(k).addUser(clonedPool.getListOfUsers().get(j));\r\n\t\t\t\t\t\tif(habitat.getSivs().get(k).buildRoutes())\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tmoved = true;\r\n\t\t\t\t\t\t\tclonedPool.getListOfUsers().remove(j);\r\n\t\t\t\t\t\t\tclonedPool.buildRoutes();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\thabitat.getSivs().get(k).removeUser(clonedPool.getListOfUsers().get(j));\r\n\t\t\t\t\t\t\thabitat.getSivs().get(k).buildRoutes();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif(moved)\r\n\t\t{\r\n\t\t\thabitat.removePool(pool);\r\n\t\t\thabitat.addPool(clonedPool);\r\n\t\t}\r\n\t}", "public static Map<Integer, TaxCategory> federal() {\n\n\t\t\tHashMap<Integer, TaxCategory> categories = new HashMap<Integer, TaxCategory>();\n\t\t\ttry {\n\t\t\t\t//INSERT YOUR CODE HERE - Using the specification given on Federal\n\t\t\t\t//You will need to study how Manitoba is being implemented\n\t\t\t\tTaxCategory cat1 = new TaxCategory(15, 0, 49020); //Tax Category 1 for federal\n\t\t\t\tcategories.put( 1, cat1 );//puts both the key and the Taxcategory(value) into the hashmap for category 1\n\t\t\t\tTaxCategory cat2 = new TaxCategory( 20.5, 49020.01, 98040); //Tax Category 2 for federal\n\t\t\t\tcategories.put( 2, cat2 );//puts both the key and the Taxcategory(value) into the hashmap for category 2\n\t\t\t\tTaxCategory cat3 = new TaxCategory(26, 98040.01, 151978); //Tax Category 3 for federal\n\t\t\t\tcategories.put( 3, cat3 );//puts both the key and the Taxcategory(value) into the hashmap for category 3\n\t\t\t\tTaxCategory cat4 = new TaxCategory(29, 151978.01, 216511); //Tax Category 4 for federal\n\t\t\t\tcategories.put( 4, cat4 );//puts both the key and the Taxcategory(value) into the hashmap for category 4\n\t\t\t\tTaxCategory cat5 = new TaxCategory(33, 216511.01, 10000000); //Tax Category 5 for federal\n\t\t\t\tcategories.put( 5, cat5 );//puts both the key and the Taxcategory(value) into the hashmap for category 5\n\n\t\t\t} catch( Exception e ) {}\n\n\t\t\treturn categories;\n\t\t}", "private void populateBranches() {\n\t\tStationsDTO[] station = null;\n\t\ttry {\n\t\t\tstation = handler.getAllBranches();\n\t\t\tif (null != station) {\n\t\t\t\tint len = station.length;\n\t\t\t\tfor (int i = 0; i < len; i++) {\n\t\t\t\t\tcoBranch.add(station[i].getName() + \" - \"\n\t\t\t\t\t\t\t+ station[i].getId());\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception exception) {\n\t\t\texception.printStackTrace();\n\t\t}\n\t}", "public void determineRank(){\r\n //ranks highcard 0, pair 1, twopair 2, three of a kind 3, straight 4, flush 5,\r\n //full house 6, four of a kind 7 , straight flush 8, royal flush 9\r\n //I should start top down.\r\n\r\n //Royal Flush\r\n if(isRoyalFlush())\r\n setRank(9);\r\n //Straight flush\r\n else if(isFlush() && isStraight())\r\n setRank(8);\r\n //four of a kind\r\n else if(isFourOfAKind())\r\n setRank(7);\r\n //full house\r\n else if( isFullHouse())\r\n setRank(6);\r\n //flush\r\n else if(isFlush())\r\n setRank(5);\r\n //straight\r\n else if(isStraight())\r\n setRank(4);\r\n //three of a kind\r\n else if(isThreeOfAKind())\r\n setRank(3);\r\n //twoPair\r\n else if(isTwoPair())\r\n setRank(2);\r\n //pair\r\n else if(isPair())\r\n setRank(1);\r\n //highcard\r\n else\r\n setRank(0);\r\n\r\n }", "public void groupSelectedFurniture() {\n List<HomePieceOfFurniture> selectedFurniture = getMovableSelectedFurniture();\n if (!selectedFurniture.isEmpty()) {\n final boolean basePlanLocked = this.home.isBasePlanLocked();\n final boolean allLevelsSelection = this.home.isAllLevelsSelection();\n final List<Selectable> oldSelection = this.home.getSelectedItems();\n List<HomePieceOfFurniture> homeFurniture = this.home.getFurniture();\n // Sort the grouped furniture in the ascending order of their index in home or their group\n Map<HomeFurnitureGroup, TreeMap<Integer, HomePieceOfFurniture>> groupedFurnitureMap =\n new HashMap<HomeFurnitureGroup, TreeMap<Integer, HomePieceOfFurniture>>();\n int groupedFurnitureCount = 0;\n for (HomePieceOfFurniture piece : selectedFurniture) {\n HomeFurnitureGroup group = getPieceOfFurnitureGroup(piece, null, homeFurniture);\n TreeMap<Integer, HomePieceOfFurniture> sortedMap = groupedFurnitureMap.get(group);\n if (sortedMap == null) {\n sortedMap = new TreeMap<Integer, HomePieceOfFurniture>();\n groupedFurnitureMap.put(group, sortedMap);\n }\n if (group == null) {\n sortedMap.put(homeFurniture.indexOf(piece), piece);\n } else {\n sortedMap.put(group.getFurniture().indexOf(piece), piece);\n }\n groupedFurnitureCount++;\n }\n final HomePieceOfFurniture [] groupedPieces = new HomePieceOfFurniture [groupedFurnitureCount]; \n final int [] groupedPiecesIndex = new int [groupedPieces.length];\n final Level [] groupedPiecesLevel = new Level [groupedPieces.length];\n final float [] groupPiecesElevation = new float [groupedPieces.length];\n final boolean [] groupPiecesVisible = new boolean [groupedPieces.length];\n final HomeFurnitureGroup [] groupedPiecesGroups = new HomeFurnitureGroup [groupedPieces.length];\n Level minLevel = this.home.getSelectedLevel();\n int i = 0;\n for (Map.Entry<HomeFurnitureGroup, TreeMap<Integer, HomePieceOfFurniture>> sortedMapEntry : groupedFurnitureMap.entrySet()) {\n for (Map.Entry<Integer, HomePieceOfFurniture> pieceEntry : sortedMapEntry.getValue().entrySet()) {\n HomePieceOfFurniture piece = pieceEntry.getValue();\n groupedPieces [i] = piece;\n groupedPiecesIndex [i] = pieceEntry.getKey();\n groupedPiecesLevel [i] = piece.getLevel();\n groupPiecesElevation [i] = piece.getElevation();\n groupPiecesVisible [i] = piece.isVisible();\n groupedPiecesGroups [i] = sortedMapEntry.getKey();\n if (groupedPiecesLevel [i] != null) {\n if (minLevel == null\n || groupedPiecesLevel [i].getElevation() < minLevel.getElevation()) {\n minLevel = groupedPiecesLevel [i];\n }\n }\n i++;\n }\n } \n final HomeFurnitureGroup group;\n if (selectedFurniture.indexOf(this.leadSelectedPieceOfFurniture) > 0) {\n group = createHomeFurnitureGroup(Arrays.asList(groupedPieces), this.leadSelectedPieceOfFurniture);\n } else {\n group = createHomeFurnitureGroup(Arrays.asList(groupedPieces));\n }\n // Store piece elevation that could have been updated during grouping\n final float [] groupPiecesNewElevation = new float [groupedPieces.length];\n i = 0;\n for (HomePieceOfFurniture piece : groupedPieces) {\n groupPiecesNewElevation [i++] = piece.getElevation();\n }\n TreeMap<Integer, HomePieceOfFurniture> homeSortedMap = groupedFurnitureMap.get(null);\n final int groupIndex = homeSortedMap != null \n ? homeSortedMap.lastKey() + 1 - groupedPieces.length\n : homeFurniture.size();\n final boolean movable = group.isMovable();\n final Level groupLevel = minLevel;\n \n doGroupFurniture(groupedPieces, new HomeFurnitureGroup [] {group}, \n null, new int [] {groupIndex}, new Level [] {groupLevel}, basePlanLocked, false);\n if (this.undoSupport != null) {\n UndoableEdit undoableEdit = new AbstractUndoableEdit() {\n @Override\n public void undo() throws CannotUndoException {\n super.undo();\n doUngroupFurniture(new HomeFurnitureGroup [] {group}, groupedPieces, \n groupedPiecesGroups, groupedPiecesIndex, groupedPiecesLevel, basePlanLocked, allLevelsSelection);\n for (int i = 0; i < groupedPieces.length; i++) {\n groupedPieces [i].setElevation(groupPiecesElevation [i]);\n groupedPieces [i].setVisible(groupPiecesVisible [i]);\n }\n home.setSelectedItems(oldSelection);\n }\n \n @Override\n public void redo() throws CannotRedoException {\n super.redo();\n for (int i = 0; i < groupedPieces.length; i++) {\n groupedPieces [i].setElevation(groupPiecesNewElevation [i]);\n groupedPieces [i].setLevel(null);\n }\n group.setMovable(movable);\n group.setVisible(true);\n doGroupFurniture(groupedPieces, new HomeFurnitureGroup [] {group}, \n null, new int [] {groupIndex}, new Level [] {groupLevel}, basePlanLocked, false);\n }\n \n @Override\n public String getPresentationName() {\n return preferences.getLocalizedString(FurnitureController.class, \"undoGroupName\");\n }\n };\n this.undoSupport.postEdit(undoableEdit);\n }\n }\n }", "private void assignJValuesToInputBranch()\r\n\t{\r\n\t\tfor (int j = lowestJValue; j <= highestJValue; j++) {\r\n\t\t\tinputBranchWithJ.put(j, inputBranchArray.get(j - lowestJValue));\r\n\t\t}\r\n\r\n\t\tif (isEType) {\r\n\t\t\tsetupAssociatedBranchesEType(inputBranchWithJ);\r\n\t\t} else {\r\n\t\t\tsetupAssociatedBranchesAType(inputBranchWithJ);\r\n\t\t}\r\n\r\n\t}", "public void allocateCountries() {\n\t\tmakeDeck() ;\n\t\t\n\t\tint id =0;\n\t\t//Randomly give players 9 country cards, and place 1 army on country\n\t\tfor(int j=0;j<Constants.NUM_PLAYERS;j++) {\n\t\t\tfor (int i=0; i<9;i++) {\n\t\t\t\tid = deck.get(0).getCardID() ;\n\t\t\t\tif(deck.get(0).getInsignia()=='w') {\n\t\t\t\t\ti--;\n\t\t\t\t} else {\n\t\t\t\t\tsetCountryOwnership(j, id, 1);\n\t\t\t\t\t\n\t\t\t\t\t//Tells user what cards where drawn\n\t\t\t\t\tview.displayString(\"Player \"+(j+1)+\" Drew Card ' \" +deck.get(0).toString()+\"'\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdiscardPile.add(deck.remove(0));\n\t\t\t}\n\t\t}\n\t\t\n\t\t//Set rest of countries to neutrals with 1 army\n\t\tfor(int j=Constants.NUM_PLAYERS;j<6;j++) {\n\t\t\tfor (int i=0; i<6;i++) {\n\t\t\t\tid = deck.get(0).getCardID() ;\n\t\t\t\tif(deck.get(0).getInsignia()=='w') {\n\t\t\t\t\ti--;\n\t\t\t\t} else { \n\t\t\t\t\tsetCountryOwnership(j, id, 1);\n\t\t\t\t}\n\t\t\t\tdiscardPile.add(deck.remove(0));\n\t\t\t}\n\t\t}\n\t\t//Adds cards back to deck and shuffles\n\t\tdiscardToDeck() ;\t\t\n\t}", "private Map<String, SortedSet<PortletCategoryBean>> getRegistry43(\n WebRequest request,\n IPerson user,\n PortletCategory rootCategory,\n boolean includeUncategorized,\n Set<IPortletDefinition> favorites) {\n\n /*\n * This collection of all the portlets in the portal is for the sake of\n * tracking which ones are uncategorized. They will be added to the\n * output if includeUncategorized=true.\n */\n Set<IPortletDefinition> portletsNotYetCategorized =\n includeUncategorized\n ? new HashSet<>(portletDefinitionRegistry.getAllPortletDefinitions())\n : new HashSet<>(); // Not necessary to fetch them if we're not\n // tracking them\n\n // construct a new channel registry\n Map<String, SortedSet<PortletCategoryBean>> rslt = new TreeMap<>();\n SortedSet<PortletCategoryBean> categories = new TreeSet<>();\n\n // add the root category and all its children to the registry\n final Locale locale = getUserLocale(user);\n categories.add(\n preparePortletCategoryBean(\n request, rootCategory, portletsNotYetCategorized, user, locale, favorites));\n\n if (includeUncategorized) {\n /*\n * uPortal historically has provided for a convention that portlets not in any category\n * may potentially be viewed by users but may not be subscribed to.\n *\n * As of uPortal 4.2, the logic below now takes any portlets the user has BROWSE access to\n * that have not already been identified as belonging to a category and adds them to a category\n * called Uncategorized.\n */\n\n EntityIdentifier ei = user.getEntityIdentifier();\n IAuthorizationPrincipal ap =\n AuthorizationServiceFacade.instance().newPrincipal(ei.getKey(), ei.getType());\n\n Set<PortletDefinitionBean> marketplacePortlets = new HashSet<>();\n for (IPortletDefinition portlet : portletsNotYetCategorized) {\n if (authorizationService.canPrincipalBrowse(ap, portlet)) {\n PortletDefinitionBean pdb =\n preparePortletDefinitionBean(\n request, portlet, locale, favorites.contains(portlet));\n marketplacePortlets.add(pdb);\n }\n }\n\n // construct a new channel category bean for this category\n final String uncName = messageSource.getMessage(UNCATEGORIZED, new Object[] {}, locale);\n final String uncDescription =\n messageSource.getMessage(UNCATEGORIZED_DESC, new Object[] {}, locale);\n PortletCategory pc =\n new PortletCategory(\n uncName); // Use of this String for Id matches earlier version of API\n pc.setName(uncName);\n pc.setDescription(uncDescription);\n PortletCategoryBean unc =\n PortletCategoryBean.fromPortletCategory(pc, null, marketplacePortlets);\n\n // Add even if no portlets in category\n categories.add(unc);\n }\n\n rslt.put(CATEGORIES_MAP_KEY, categories);\n return rslt;\n }", "public void setFiveRandomCategories () {\n\t\t//create a file to store the selected five categories\n\t\tBashCmdUtil.bashCmdNoOutput(\"mkdir -p data\");\n\t\tFile five_random_categories = new File (\"data/five_random_categories\");\n\t\tif (!five_random_categories.exists()) {\n\t\t\tBashCmdUtil.bashCmdNoOutput(\"touch data/five_random_categories\");\n\t\t}\n\t\t// if five random categories dont exist, i.e. new game being started\n\t\tif (five_random_categories.length() == 0) {\n\t\t\tList<String> shuffledCategories = new ArrayList<String>(_nzCategories);\n\t\t\tCollections.shuffle(shuffledCategories);\n\t\t\tString str = \"\";\n\t\t\tfor (int i = 0; i < 5; i++) {\n\t\t\t\ttry {\n\t\t\t\t\t//create files that are used to store the clues of \n\t\t\t\t\t//the selected five categories\n\t\t\t\t\tFile dir = new File (\"data/games_module\");\n\t\t\t\t\tif (!dir.exists()) {\n\t\t\t\t\t\tdir.mkdir();\n\t\t\t\t\t}\n\t\t\t\t\tFile file = new File(dir,shuffledCategories.get(i));\n\t\t\t\t\tif (!file.exists()) {\n\t\t\t\t\t\tfile.createNewFile();\n\t\t\t\t\t}\t\t\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t_fiveRandomCategories.add(shuffledCategories.get(i));\n\t\t\t\tsetFiveRandomClues(shuffledCategories.get(i));\n\t\t\t\tstr = str + shuffledCategories.get(i) + \",\";\n\t\t\t\t_gamesData.put(shuffledCategories.get(i), _fiveRandomClues);\n\t\t\t}\n\t\t\tBashCmdUtil.bashCmdNoOutput(String.format(\"echo \\\"%s\\\" >> data/five_random_categories\",str));\n\t\t}\n\t\telse { // if files already exist, i.e. the game has already started\n\t\t\tBufferedReader reader;\n\t\t\tString str = \"\";\n\t\t\ttry {\n\t\t\t\treader = new BufferedReader(new FileReader(\"data/five_random_categories\"));\n\t\t\t\tString line = reader.readLine();\n\t\t\t\tstr = line;\n\t\t\t\treader.close();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tString[] splitStr = str.split(\",\");\n\t\t\tfor (int i = 0; i<5;i++) {\n\t\t\t\t_fiveRandomCategories.add(splitStr[i]);\n\t\t\t\tsetFiveRandomClues(splitStr[i]);\n\t\t\t\t_gamesData.put(splitStr[i], _fiveRandomClues);\n\t\t\t}\n\t\t}\n\t}", "public void createTreeMap() {\n myList = new TreeMap<>();\n scrabbleList = new TreeMap<>();\n }", "public void load() throws CityException{\r\n \r\n allRanks = new ArrayList<Rank>();\r\n File file = new File(RANK_DATA_DIRECTORY);\r\n Scanner rankDataReader = null;\r\n Scanner lineReader = null;\r\n\r\n try {\r\n\r\n rankDataReader = new Scanner(file);\r\n\r\n ArrayList<String> rankDataArray = new ArrayList<String>();\r\n int count = 0;\r\n\r\n while (rankDataReader.hasNext()) {\r\n\r\n String rankDataLine = rankDataReader.nextLine();\r\n\r\n if (count > 0) {\r\n\r\n String[] rankData = rankDataLine.split(\",\");\r\n\r\n String rankName = rankData[0];\r\n int xp = Integer.parseInt(rankData[1]);\r\n int plotAvailable = Integer.parseInt(rankData[2]);\r\n\r\n allRanks.add(new Rank(rankName, xp, plotAvailable));\r\n }\r\n\r\n count++;\r\n }\r\n\r\n } catch (FileNotFoundException e) {\r\n throw new CityException(\"InvalidFile\");\r\n } finally {\r\n rankDataReader.close();\r\n }\r\n }", "public void divyCountries() {\r\n\t\twhile (CountryPicker.size() > 0) {\r\n\t\t\tfor (int x = 0; x < 6; x++) {\r\n\t\t\t\tif (CountryPicker.size() > 0) {\r\n\t\t\t\t\tnew threadz(CountryPicker.get(0), players.get(x).getColor(), false);\r\n\t\t\t\t\tCountryPicker.get(0).setTroops(1);\r\n\t\t\t\t\tplayers.get(x).addCountries(CountryPicker.get(0));\r\n\t\t\t\t\tCountryPicker.remove(0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public TaxCategory() {\n\t\ttaxRates=new TreeSet<TaxRate>();\n\t\t\n\t}", "private void populaUnidade()\n {\n Unidade unidade = new Unidade(\"Unidade Santo Amaro\", \"Horario de funcionamento: 6:00 as 23:00\");\n unidadeDAO.insert(unidade);\n unidade = new Unidade(\"Unidade Aclimação\", \"Horario de funcionamento: 7:00 as 22:00\");\n unidadeDAO.insert(unidade);\n unidade = new Unidade(\"Unidade Vinhedo\", \"Horario de funcionamento: 6:00 as 22:00\");\n unidadeDAO.insert(unidade);\n }", "public static void populate() {\n for (int i = 1; i <= 15; i++) {\n B.add(i);\n Collections.shuffle(B);\n\n }\n for (int i = 16; i <= 30; i++) {\n I.add(i);\n Collections.shuffle(I);\n }\n for (int n = 31; n <= 45; n++) {\n N.add(n);\n Collections.shuffle(N);\n }\n for (int g = 46; g <= 60; g++) {\n G.add(g);\n Collections.shuffle(G);\n }\n for (int o = 61; o <= 75; o++) {\n O.add(o);\n Collections.shuffle(O);\n }\n\n for (int i = 1; i <= 75; i++) {\n roll.add(i); // adds the numbers in the check list\n }\n }", "private void CreateDataIngestors() throws isisicatclient.IcatException_Exception {\n Grouping dataIngestors = new Grouping();\r\n dataIngestors.name = \"DataIngestors\";\r\n dataIngestors.id = port.create(sessionId, dataIngestors);\r\n dataIngestors = (Grouping) port.search(sessionId, \"Grouping[name='DataIngestors']\").get(0);\r\n\r\n List<String> ingestorTables = port.getEntityNames();\r\n\r\n ingestorTables.remove(\"Facility\");\r\n\r\n List<EntityBaseBean> ingestorRules = new ArrayList<>();\r\n for (String table : ingestorTables) {\r\n Rule rule = new Rule();\r\n rule.grouping = dataIngestors;\r\n rule.crudFlags = \"CRUD\"; //no delete permission for ingestors\r\n rule.what = table;\r\n ingestorRules.add(rule);\r\n }\r\n port.createMany(sessionId, ingestorRules);\r\n }", "public void initForCup(){\n hdBase = HD_BASED_ON_RANK;\n hdNoHdRankThreshold = -30;\n hdCorrection = 0; \n hdCeiling = 0;\n }", "private static void fixPopulation() {\r\n \t//get a copy of the population hash map\r\n \tHashMap<String, ArrayList<Critter>> copy = new HashMap<String, ArrayList<Critter>>(population);\r\n \tIterator<String> populationIterator = copy.keySet().iterator();\r\n \twhile (populationIterator.hasNext()) { \r\n String pos = populationIterator.next();\r\n ArrayList<Critter> critterList = copy.get(pos);\r\n //clear the key if there is no more critters in that space\r\n if(critterList.size() == 0 || critterList == null) {\r\n \tpopulation.remove(pos);\r\n }\r\n \t}\r\n }", "@Before\n\tpublic void setUp() throws Exception {\n\t\tfor (int i = 1; i <= 20; i++) {\n\t\t\tUniversidade universidade = new Universidade();\n\t\t\tuniversidade.setNome(\"UFG - Unidade \" + i);\n\t\t\tuniversidadeDAO.save(universidade);\n\t\t}\n\t\tuniversidadeDAO.flush();\n\t}", "Main(int citizens)\n {\n\n this.citizens = citizens;\n rank = new int[citizens];\n id = new int[citizens];\n for (int i = 0; i < citizens; i++){\n\n rank[i] = 1;\n id[i] = i;\n }\n }", "private void loadDefaultCategory() {\n CategoryTable category = new CategoryTable();\n String categoryId = category.generateCategoryID(db.getLastCategoryID());\n String categoryName = \"Food\";\n String type = \"Expense\";\n db.insertCategory(new CategoryTable(categoryId,categoryName,type));\n categoryId = category.generateCategoryID(db.getLastCategoryID());\n categoryName = \"Study\";\n type = \"Expense\";\n db.insertCategory(new CategoryTable(categoryId,categoryName,type));\n db.close();\n }", "public static void main(String[] args) {\n Map<Integer, ArrayList<String>> citiesMap = new HashMap<>();\n\n CityDAO cityDAO = new CityDAO();\n CountryDAO countryDAO = new CountryDAO();\n\n ArrayList<City> cities = cityDAO.ReadCitiesFormCSV(\"src/main/resources/cities.csv\");\n Collections.sort(cities, Comparator.comparing(City::getPopulation));\n ArrayList<Country> countries = countryDAO.ReadCountriesFormCSV(\"src/main/resources/countries.csv\");\n\n //Add list of cities to their countries\n for (int countryIdx = 0; countryIdx < countries.size(); countryIdx++) {\n for (int cityIdx = 0; cityIdx < cities.size(); cityIdx++) {\n if (cities.get(cityIdx).getCode() == countries.get(countryIdx).getId())\n countries.get(countryIdx).addCityToCountry(cities.get(cityIdx));\n }\n }\n\n //Print list of cities in each country\n// for(Country country : countries) {\n// ArrayList<City> citiesL = country.getListOfCities();\n// for (City city : citiesL)\n// System.out.print(city.getCityName() + \" \");\n// System.out.println();\n// }\n\n for(City city : cities) {\n if (citiesMap.get(city.getCode()) == null)\n citiesMap.put(city.getCode(), new ArrayList<>());\n citiesMap.get(city.getCode()).add(city.getCityName());\n }\n System.out.println(\"Print List of cities sorted according to population sorted from lowest to highest\");\n citiesMap.forEach((k,v) -> System.out.println(\"Code: \" + k + \", List of cities: \" + v));\n\n System.out.println(\"\\n\");\n }", "public void sort() {\n\t\tfor (int i = 1; i < this.dataModel.getLength(); i++) {\n\t\t\tfinal int x = this.dataModel.get(i);\n\n\t\t\t// Find location to insert using binary search\n\t\t\tfinal int j = Math.abs(this.dataModel.binarySearch(0, i, x) + 1);\n\n\t\t\t// Shifting array to one location right\n\t\t\tthis.dataModel.arrayCopy(j, j + 1, i - j);\n\n\t\t\t// Placing element at its correct location\n\t\t\tthis.dataModel.set(j, x);\n\t\t\tthis.repaint(this.count++);\n\t\t}\n\t}", "@Test\n public void Scenario1() {\n\n Response resp = reqSpec.request().get();\n\n DataWrapper respBody = resp.as(DataWrapper.class);\n List<Regions> regions = respBody.getData().get(0).getRegions();\n\n Map<Integer, String> sortedIntensity = new TreeMap<>();\n\n try {\n\n ListIterator iterator = regions.listIterator();\n int iter = 0;\n\n while (iterator.hasNext()) {\n\n sortedIntensity.put(regions.get(iter).getIntensity().getForecast(),\n regions.get(iter).getShortname());\n iter++;\n iterator.next();\n }\n\n } catch (NullPointerException npe) {\n npe.printStackTrace();\n }\n\n System.out.println(\"Regions sorted by intensity forecast:\");\n System.out.println(sortedIntensity);\n }", "public void createAnimalsCollection() {\n ArrayList<DataSetAnimal> animalsFetched = getDFO().getAnimalData(getFILE_NAME()).getAnimals();\n setAnimals(new ArrayList<>());\n for (DataSetAnimal animal: animalsFetched) {\n String tmpBreed = animal.getBreedOrType().substring(animal.getBreedOrType().lastIndexOf(\" \") + 1);\n switch (tmpBreed) {\n case \"dolphin\":\n getAnimals().add(new AnimalDolphin(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"duck\":\n getAnimals().add(new AnimalDuck(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"cat\":\n getAnimals().add(new AnimalCat(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"chicken\":\n getAnimals().add(new AnimalChicken(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"horse\":\n getAnimals().add(new AnimalHorse(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"shark\":\n getAnimals().add(new AnimalShark(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n case \"parakeet\":\n getAnimals().add(new AnimalParakeet(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n default:\n getAnimals().add(new AnimalDog(animal.getBreedOrType(), animal.getName(), animal.getYearOfBirth()));\n break;\n }\n }\n }", "private void fillUpAnimalsTable() {\n\t\tfillUpAnimalsTable(Calendar.getInstance().getTime());\n\t}", "public void ungroupSelectedFurniture() {\n List<HomeFurnitureGroup> movableSelectedFurnitureGroups = new ArrayList<HomeFurnitureGroup>(); \n for (Selectable item : this.home.getSelectedItems()) {\n if (item instanceof HomeFurnitureGroup) {\n HomeFurnitureGroup group = (HomeFurnitureGroup)item;\n if (isPieceOfFurnitureMovable(group)) {\n movableSelectedFurnitureGroups.add(group);\n }\n }\n } \n if (!movableSelectedFurnitureGroups.isEmpty()) {\n List<HomePieceOfFurniture> homeFurniture = this.home.getFurniture();\n final boolean oldBasePlanLocked = this.home.isBasePlanLocked();\n final boolean allLevelsSelection = this.home.isAllLevelsSelection();\n final List<Selectable> oldSelection = this.home.getSelectedItems();\n // Sort the groups in the ascending order of their index in home or their group\n Map<HomeFurnitureGroup, TreeMap<Integer, HomeFurnitureGroup>> groupsMap =\n new HashMap<HomeFurnitureGroup, TreeMap<Integer, HomeFurnitureGroup>>();\n int groupsCount = 0;\n for (HomeFurnitureGroup piece : movableSelectedFurnitureGroups) {\n HomeFurnitureGroup groupGroup = getPieceOfFurnitureGroup(piece, null, homeFurniture);\n TreeMap<Integer, HomeFurnitureGroup> sortedMap = groupsMap.get(groupGroup);\n if (sortedMap == null) {\n sortedMap = new TreeMap<Integer, HomeFurnitureGroup>();\n groupsMap.put(groupGroup, sortedMap);\n }\n if (groupGroup == null) {\n sortedMap.put(homeFurniture.indexOf(piece), piece);\n } else {\n sortedMap.put(groupGroup.getFurniture().indexOf(piece), piece);\n }\n groupsCount++;\n }\n final HomeFurnitureGroup [] groups = new HomeFurnitureGroup [groupsCount]; \n final HomeFurnitureGroup [] groupsGroups = new HomeFurnitureGroup [groups.length];\n final int [] groupsIndex = new int [groups.length];\n final Level [] groupsLevels = new Level [groups.length];\n int i = 0;\n List<HomePieceOfFurniture> ungroupedPiecesList = new ArrayList<HomePieceOfFurniture>();\n List<Integer> ungroupedPiecesIndexList = new ArrayList<Integer>();\n List<HomeFurnitureGroup> ungroupedPiecesGroupsList = new ArrayList<HomeFurnitureGroup>();\n for (Map.Entry<HomeFurnitureGroup, TreeMap<Integer, HomeFurnitureGroup>> sortedMapEntry : groupsMap.entrySet()) {\n TreeMap<Integer, HomeFurnitureGroup> sortedMap = sortedMapEntry.getValue();\n int endIndex = sortedMap.lastKey() + 1 - sortedMap.size();\n for (Map.Entry<Integer, HomeFurnitureGroup> groupEntry : sortedMap.entrySet()) {\n HomeFurnitureGroup group = groupEntry.getValue();\n groups [i] = group;\n groupsGroups [i] = sortedMapEntry.getKey();\n groupsIndex [i] = groupEntry.getKey(); \n groupsLevels [i++] = group.getLevel();\n for (HomePieceOfFurniture groupPiece : group.getFurniture()) {\n ungroupedPiecesList.add(groupPiece);\n ungroupedPiecesGroupsList.add(sortedMapEntry.getKey());\n ungroupedPiecesIndexList.add(endIndex++);\n }\n }\n } \n final HomePieceOfFurniture [] ungroupedPieces = \n ungroupedPiecesList.toArray(new HomePieceOfFurniture [ungroupedPiecesList.size()]); \n final HomeFurnitureGroup [] ungroupedPiecesGroups = \n ungroupedPiecesGroupsList.toArray(new HomeFurnitureGroup [ungroupedPiecesGroupsList.size()]); \n final int [] ungroupedPiecesIndex = new int [ungroupedPieces.length];\n final Level [] ungroupedPiecesLevels = new Level [ungroupedPieces.length];\n boolean basePlanLocked = oldBasePlanLocked;\n for (i = 0; i < ungroupedPieces.length; i++) {\n ungroupedPiecesIndex [i] = ungroupedPiecesIndexList.get(i); \n ungroupedPiecesLevels [i] = ungroupedPieces [i].getLevel();\n // Unlock base plan if the piece is a part of it\n basePlanLocked &= !isPieceOfFurniturePartOfBasePlan(ungroupedPieces [i]);\n } \n final boolean newBasePlanLocked = basePlanLocked;\n\n doUngroupFurniture(groups, ungroupedPieces, ungroupedPiecesGroups, ungroupedPiecesIndex, ungroupedPiecesLevels, newBasePlanLocked, false);\n if (this.undoSupport != null) {\n UndoableEdit undoableEdit = new AbstractUndoableEdit() {\n @Override\n public void undo() throws CannotUndoException {\n super.undo();\n doGroupFurniture(ungroupedPieces, groups, groupsGroups, groupsIndex, groupsLevels, oldBasePlanLocked, allLevelsSelection);\n home.setSelectedItems(oldSelection);\n }\n \n @Override\n public void redo() throws CannotRedoException {\n super.redo();\n doUngroupFurniture(groups, ungroupedPieces, ungroupedPiecesGroups, ungroupedPiecesIndex, ungroupedPiecesLevels, newBasePlanLocked, false);\n }\n \n @Override\n public String getPresentationName() {\n return preferences.getLocalizedString(FurnitureController.class, \"undoUngroupName\");\n }\n };\n this.undoSupport.postEdit(undoableEdit);\n }\n }\n }", "private void getCityHotels(String tag) {\n\n HotelListingRequest hotelListingRequest = HotelListingRequest.getHotelListRequest();\n hotelListingRequest.setCurrencyCode(userDTO.getCurrency());\n hotelListingRequest.setLanguageCode(userDTO.getLanguage());\n hotelListingRequest.setCheckInDate(new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH).format(checkInDate));\n hotelListingRequest.setCheckOutDate(new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH).format(checkOutDate));\n hotelListingRequest.setPageNumber(1);\n hotelListingRequest.setPageSize(10);\n\n\n if (tag.equals(\"noRooms\")) {\n\n hotelListingRequest.setCityId(cityId); // for sold out hotels.. set popularity and descending order.\n hotelListingRequest.setSortBy(OrderByTypes.Descending.getOrderVal());\n hotelListingRequest.setSortParameter(\"popularity\");\n\n } else {\n\n hotelListingRequest.setCityId(Long.parseLong(destination.getKey())); // regular flow.. getting cityId and areaId from destination.\n\n UserDTO.getUserDTO().setCityName(destination.getDestinationName());\n // here check whether category is city search otherwise areaWise search\n if (destination.getCategory().equals(\"City\")) {\n\n hotelListingRequest.setSortBy(OrderByTypes.Descending.getOrderVal());\n hotelListingRequest.setSortParameter(\"popularity\");\n\n\n } else {\n\n hotelListingRequest.setSortBy(OrderByTypes.Descending.getOrderVal());\n hotelListingRequest.setSortParameter(\"area\");\n hotelListingRequest.setSortByArea(0);\n }\n\n\n }\n\n\n ArrayList<OccupancyDto> occupancyDtoArrayList = new ArrayList<>();\n for (int i = 0; i < hotelAccommodationsArrayList.size(); i++) {\n kidsAgeArrayList = new ArrayList<>();\n if (hotelAccommodationsArrayList.get(i).getKids() > 0) {\n if (hotelAccommodationsArrayList.get(i).getKids() == 1) {\n kidsAgeArrayList.add(hotelAccommodationsArrayList.get(i).getKid1Age());\n } else if (hotelAccommodationsArrayList.get(i).getKids() == 2) {\n kidsAgeArrayList.add(hotelAccommodationsArrayList.get(i).getKid1Age());\n kidsAgeArrayList.add(hotelAccommodationsArrayList.get(i).getKid2Age());\n }\n }\n\n occupancyDtoArrayList.add(new OccupancyDto(hotelAccommodationsArrayList.get(i).getAdultsCount(), kidsAgeArrayList));\n hotelListingRequest.setOccupancy(occupancyDtoArrayList);\n }\n FiltersRequestDto filtersRequestDto = new FiltersRequestDto();\n filtersRequestDto.setAmenityIds(null);\n filtersRequestDto.setAreaIds(null);\n filtersRequestDto.setHotelId(null);\n filtersRequestDto.setCategoryIds(null);\n filtersRequestDto.setChainIds(null);\n filtersRequestDto.setMaxPrice(0.00);\n filtersRequestDto.setMinPrice(0.00);\n filtersRequestDto.setTripAdvisorRatings(null);\n filtersRequestDto.setStarRatings(null);\n hotelListingRequest.setFilters(filtersRequestDto);\n\n request = new Gson().toJson(hotelListingRequest);\n\n if (NetworkUtilities.isInternet(getActivity())) {\n\n showDialog();\n\n hotelSearchPresenter.getHotelListInfo(Constant.API_URL + Constant.HOTELLISTING, request, context);\n\n\n } else {\n\n Utilities.commonErrorMessage(context, context.getString(R.string.Network_not_avilable), context.getString(R.string.please_check_your_internet_connection), false, getFragmentManager());\n }\n\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 Union(subset [] subsets, int x , int y ){ \n\t\tint xroot = find(subsets, x); \n\t int yroot = find(subsets, y); \n\t \n\t\tif (subsets[xroot].rank < subsets[yroot].rank) \n\t\t\tsubsets[xroot].parent = yroot; \n\t\telse if (subsets[yroot].rank < subsets[xroot].rank) \n\t\t\tsubsets[yroot].parent = xroot; \n\t\telse{ \n\t\t\tsubsets[xroot].parent = yroot; \n\t\t\tsubsets[yroot].rank++; \n\t\t} \n\t}", "private void buildCategories() {\n List<Category> categories = categoryService.getCategories();\n if (categories == null || categories.size() == 0) {\n throw new UnrecoverableApplicationException(\n \"no item types found in database\");\n }\n\n Map<Category, List<Category>> categoriesMap = new HashMap<Category, List<Category>>();\n for (Category subCategory : categories) {\n Category parent = subCategory.getParentCategory();\n if (categoriesMap.get(parent) == null) {\n categoriesMap.put(parent, new ArrayList<Category>());\n categoriesMap.get(parent).add(subCategory);\n } else {\n categoriesMap.get(parent).add(subCategory);\n }\n }\n\n this.allCategories = categories;\n this.sortedCategories = categoriesMap;\n }", "private void setLairNames(int typeInt) {\n\t\tswitch (typeInt) { // puts lairnames in a hash map with the city name as key and the lairname as value depending on the type of villain\n\n\t\tcase 0:\n\t\t\tlairNames.put(\"Springfield\", \"Hagley Oval\");\n\t\t\tlairNames.put(\"Te Puke\", \"Bay Oval\");\n\t\t\tlairNames.put(\"Gore\", \"The Grove Park\");\n\t\t\tlairNames.put(\"Ohakune\", \"Ohakune Domain\");\n\t\t\tlairNames.put(\"Paeroa\", \"Centennial Park\");\n\t\t\tlairNames.put(\"Taihape\", \"Memorial Park, Taihape\");\n\t\t\tbreak;\n\n\t\tcase 1:\n\t\t\tlairNames.put(\"Springfield\", \"Selwyn Rugby Club\");\n\t\t\tlairNames.put(\"Te Puke\", \"Centenial Park, Te Puke\");\n\t\t\tlairNames.put(\"Gore\", \"Newman Park, Gore\");\n\t\t\tlairNames.put(\"Ohakune\", \"Rochfort Park, Ohakune\");\n\t\t\tlairNames.put(\"Paeroa\", \"Paeroa Old Boys Football Ground\");\n\t\t\tlairNames.put(\"Taihape\", \"Memorial Park, Taihape\");\n\t\t\tbreak;\n\n\t\tcase 2:\n\t\t\tlairNames.put(\"Springfield\", \"The Springfield Hotel\");\n\t\t\tlairNames.put(\"Te Puke\", \"Molly O'Connors Pub\");\n\t\t\tlairNames.put(\"Gore\", \"Howl at the Moon, Cafe and Bar\");\n\t\t\tlairNames.put(\"Ohakune\", \"Powderkeg Restaurant and Bar\");\n\t\t\tlairNames.put(\"Paeroa\", \"The Paeroa Hotel\");\n\t\t\tlairNames.put(\"Taihape\", \"Gumboot Manor Restaurant and Bar\");\n\t\t\tbreak;\n\n\t\tcase 3:\n\t\t\tlairNames.put(\"Springfield\", \"Springfield Telephone Exchange\");\n\t\t\tlairNames.put(\"Te Puke\", \"Te Puke Telephone Exchange\");\n\t\t\tlairNames.put(\"Gore\", \"Gore Telephone Exchange\");\n\t\t\tlairNames.put(\"Ohakune\", \"Ohakune Telephone Exchange\");\n\t\t\tlairNames.put(\"Paeroa\", \"Paeroa Telephone Exchange\");\n\t\t\tlairNames.put(\"Taihape\", \"Taihape Telephone Exchange\");\n\t\t\tbreak;\n\n\t\tcase 4:\n\t\t\tlairNames.put(\"Springfield\", \"Christchurch District Court Chambers\");\n\t\t\tlairNames.put(\"Te Puke\", \"Te Awamutu District Court Chambers\");\n\t\t\tlairNames.put(\"Gore\", \"Gore District Court\");\n\t\t\tlairNames.put(\"Ohakune\", \"Ohakune District Court\");\n\t\t\tlairNames.put(\"Paeroa\", \"Hauraki District Court\");\n\t\t\tlairNames.put(\"Taihape\", \"Taihape District Court\");\n\t\t\tbreak;\n\n\t\tcase 5:\n\t\t\tlairNames.put(\"Springfield\", \"Springfield Giant Donut Statue\");\n\t\t\tlairNames.put(\"Te Puke\", \"Te Puke Giant Kiwifruit Statue\");\n\t\t\tlairNames.put(\"Gore\", \"Gore Giant Trout Statue\");\n\t\t\tlairNames.put(\"Ohakune\", \"Ohakune Giant Carrot Statue\");\n\t\t\tlairNames.put(\"Paeroa\", \"Paeroa L&P Statue\");\n\t\t\tlairNames.put(\"Taihape\", \"Taihape Giant Gumboot Statue\");\n\t\t\tbreak;\n\t\t}\t\n\t}", "default List<Source> representativeTypicalityQuery(int topk, Set<Source> resultSet, Set<String> domain) {\n final Map<Source, List<Source>> region = interestingRegion(topk, resultSet, domain);\n\n final Comparator<Map.Entry<Source, List<Source>>> byValue =\n (entry1, entry2) ->\n Ints.compare(entry1.getValue().size(), entry2.getValue().size());\n\n return region.entrySet().stream()\n .sorted(byValue.reversed())\n .map(Map.Entry::getKey)\n .collect(Collectors.toList());\n }", "public Ranking[] vaciarRanking()\n {\n for(int i=0;i<10;i++){\n clasificacion[i].setLogin(\" \");\n clasificacion[i].setMediana(0);\n }//END_FOR\n return clasificacion;\n }", "List<Rank> getRanks() {\n\t\ttry {\n\t\t\treturn analysisModel.getRanks();\n\t\t} catch (DatabaseException ex) {\n\t\t\tLOG.error(\"Failed to get result name list\", ex);\n\t\t}\n\t\treturn Collections.emptyList();\n\t}", "private CategoryDataset createDataset() {\n\t \n\t \tvar dataset = new DefaultCategoryDataset();\n\t \n\t\t\tSystem.out.println(bic);\n\t\t\t\n\t\t\tfor(Map.Entry<String, Integer> entry : bic.entrySet()) {\n\t\t\t String key = entry.getKey();\n\t\t\t Integer value = entry.getValue();\n\t\t\t dataset.setValue(value, \"# Bicicletas\", key);\n\t \n\t\t\t}\n\t return dataset;\n\t \n\t }", "public CouncillorsReserve(List<Councillor> councillors){\r\n\t\tthis.councillors=councillors;\r\n\t\tCollections.shuffle(this.councillors);\r\n\t}", "private void updateCategoryTree() {\n categoryTree.removeAll();\r\n fillTree(categoryTree);\r\n\r\n }", "public void rank(Hashtable<?, Integer> fname, int occur)\r\n\t{\r\n\t\t// Transfer as List and sort it\r\n\t\tArrayList<Map.Entry<?, Integer>> list = new ArrayList<Entry<?, Integer>>(fname.entrySet());\r\n\t\tCollections.sort(list, new Comparator<Map.Entry<?, Integer>>()\r\n\t\t{\r\n\t\t\tpublic int compare(Map.Entry<?, Integer> obj1, Map.Entry<?, Integer> obj2)\r\n\t\t\t{\r\n\t\t\t\treturn obj1.getValue().compareTo(obj2.getValue());\r\n\t\t\t}\r\n\t\t});\r\n\t\tCollections.reverse(list);\r\n\t\t\r\n\t\tif (occur != 0)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"\\nTop 5 Search Results\\n\");\r\n\t\t\tint num = 5;\r\n\t\t\tint j = 1;\r\n\t\t\twhile (list.size() > j && num > 0)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"(\" + j + \") \" + list.get(j) + \" times \");\r\n\t\t\t\tj++;\r\n\t\t\t\tnum--;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void updateUniversidades() {\n\t\t\n\t\tlistaUniversidades = (ArrayList<Universidades>)hibernateController.selectUniversidades();\n\t}", "private void addCities() {\n int random2 = 0;\n for (int i = 1; i < MAP_LENGTH-1; i++) {\n for (int j = 1; j < MAP_LENGTH-1; j++) {\n if (tileMap[i][j].getTerrain() instanceof Grass) { //Make cities on grass tiles only\n random2 = (int)(Math.round(Math.random()*18));\n if (!adjacentCity(i, j) && (random2 < 3)) {\n tileMap[i][j].setCity(new City(i, j, false)); //If randomly chosen and not in proximity of another city, create a city there (right now set as not a capital)\n }\n }\n }\n }\n }", "private void initRegister() {\n this.register = new TreeMap<>();\n register.put(BillDenomination.ONE, ZERO);\n register.put(BillDenomination.TWO, ZERO);\n register.put(BillDenomination.FIVE, ZERO);\n register.put(BillDenomination.TEN, ZERO);\n register.put(BillDenomination.TWENTY, ZERO);\n }", "public void setRank(int value);", "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}", "private List<ExploreSitesCategory> createDefaultCategoryTiles() {\n List<ExploreSitesCategory> categoryList = new ArrayList<>();\n\n // Sport category.\n ExploreSitesCategory category = new ExploreSitesCategory(\n SPORT, getContext().getString(R.string.explore_sites_default_category_sports));\n category.setDrawable(getVectorDrawable(R.drawable.ic_directions_run_blue_24dp));\n categoryList.add(category);\n\n // Shopping category.\n category = new ExploreSitesCategory(\n SHOPPING, getContext().getString(R.string.explore_sites_default_category_shopping));\n category.setDrawable(getVectorDrawable(R.drawable.ic_shopping_basket_blue_24dp));\n categoryList.add(category);\n\n // Food category.\n category = new ExploreSitesCategory(\n FOOD, getContext().getString(R.string.explore_sites_default_category_cooking));\n category.setDrawable(getVectorDrawable(R.drawable.ic_restaurant_menu_blue_24dp));\n categoryList.add(category);\n return categoryList;\n }", "public void fillDeck()\n {\n //start with an empty card at the 2 of clubs\n Card c = new Card(); \n int s = c.CLUB;\n int r = c.MIN_RANK;\n\n while (s <= c.SPADE)\n {\n while (r <= c.ACE)\n {\n Card dealing = new Card(s, r); \n dealer.enqueue(dealing); \n r++; \n }\n \n s++; \n r = c.MIN_RANK; \n }\n }", "public static Map<Integer, TaxCategory> alberta() {\n\n\t\t\tHashMap<Integer, TaxCategory> categories = new HashMap<Integer, TaxCategory>();\n\t\t\ttry {\n\t\t\t\t//INSERT YOUR CODE HERE - Using the specification given on Federal\n\t\t\t\t//You will need to study how Manitoba is being implemented\n\t\t\t\tTaxCategory cat1 = new TaxCategory(10, 0, 131220); // Tax Category 1 for Alberta\n\t\t\t\tcategories.put( 1, cat1 ); //puts both the key and the Taxcategory(value) into the hashmap for category 1\n\t\t\t\tTaxCategory cat2 = new TaxCategory(12,131220.01, 157464); // Tax Category 2 for Alberta\n\t\t\t\tcategories.put( 2, cat2 ); //puts both the key and the Taxcategory(value) into the hashmap for category 2\n\t\t\t\tTaxCategory cat3 = new TaxCategory(13, 157464.01, 209952); // Tax Category 3 for Alberta\n\t\t\t\tcategories.put( 3, cat3 );//puts both the key and the Taxcategory(value) into the hashmap for category 3\n\t\t\t\tTaxCategory cat4 = new TaxCategory(14, 209952.01, 314928); // Tax Category 4 for Alberta\n\t\t\t\tcategories.put( 4, cat4 );//puts both the key and the Taxcategory(value) into the hashmap for category 4\n\t\t\t\tTaxCategory cat5 = new TaxCategory(15, 314928.01, 10000000); // Tax Category 5 for Alberta\n\t\t\t\tcategories.put( 5, cat5 );//puts both the key and the Taxcategory(value) into the hashmap for category 5\n\n\t\t\t} catch( Exception e ) {}\n\n\t\t\treturn categories;\n\t\t}", "private DefaultCategoryDataset createDataset() {\n\t\t\n\t\tdataset.clear();\n\t\t\n\t\t// Query HIM to submit data for bar chart display \n\t\tHistoricalInfoMgr.getChartDataset(expNum);\n\n\n\t\treturn dataset; // add the data point (y-value, variable, x-value)\n\t}", "@Override\r\n\tpublic void fillByRows(List<Category> categorys,int row) {\n\t\t\tfill(categorys);\r\n\t\tfor(Category category : categorys) {\r\n\t\t\tList<Product> products = category.getProducts();\t\r\n\t\t\tint i = 0;\r\n\t\t\tList<List<Product>> list = new ArrayList<>();\r\n\t\t\tList<Product> p = new ArrayList<>();\r\n\t\t\tif(!category.getProducts().isEmpty()) {\r\n\t\t\tfor(Product product : products) {\r\n\t\t\t\tp.add(product);i++;\r\n\t\t\t\tif(i%8==0) {\r\n\t\t\t\t\tlist.add(p);\r\n\t\t\t\t\tp = new ArrayList<>();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tif(!p.isEmpty()) {\r\n\t\t\t\tlist.add(p);\r\n\t\t\t}\r\n\t\t\tcategory.setProductsByRows(list);\r\n\t\t}\r\n\t}\r\n\t}", "public static void fill_map(){\n\t\tcategory_links_map.put(\"Categories\", \"Movies\");\n\t\tcategory_links_map.put(\"Actors\", \"Movies\");\n\t\tcategory_links_map.put(\"Movies\", \"Actors\");\n\t\tcategory_links_map.put(\"Artists\", \"Creations\");\n\t\tcategory_links_map.put(\"Creations\", \"Artists\");\n\t\tcategory_links_map.put(\"Countries\", \"Locations\");\n\t\tcategory_links_map.put(\"Locations\", \"Countries\");\n\t\tcategory_links_map.put(\"NBA players\", \"NBA teams\");\n\t\tcategory_links_map.put(\"NBA teams\", \"NBA players\");\n\t\tcategory_links_map.put(\"Israeli soccer players\", \"Israeli soccer teams\");\n\t\tcategory_links_map.put(\"Israeli soccer teams\", \"Israeli soccer players\");\n\t\tcategory_links_map.put(\"World soccer players\", \"World soccer teams\");\n\t\tcategory_links_map.put(\"World soccer teams\", \"World soccer players\");\n\t}", "private static void determineFinalRanks(Fold fold, ParametersManager params) {\n for (int currRank = fold.getNumInst(); currRank >= 1; currRank--) {\n Instance instSmallestWeight = fold.getInstSmallestWeight(); // selects the next less important instance\n\n instSmallestWeight.setRank(currRank); // ranks the instance by its order of elimination\n instSmallestWeight.setWeight(Double.POSITIVE_INFINITY); // the instance will be disregarded from now\n\n // removes the traces of the ranked instance out of the other instances\n fold.clearInstTraces(instSmallestWeight);\n\n /* For instances with rank value smaller than the number of neighbors, the relative position in the ranking\n is irrelevant (and, by construction, impossible to determine). Therefore, only the first steps of the\n ranking are performed for these instances. */\n if (currRank <= params.getNumNeighbors()) continue;\n\n // updates the distances matrix, setting the distance to or from the ranked instance to infinite\n fold.updateDistMatrix(instSmallestWeight.getId());\n\n // updates the weights of instances that had the eliminated instance among its nearest neighbors\n InstanceWeighting.updateAssociatesWeights(fold, instSmallestWeight, params);\n }\n }", "public static void kategorien_aus_inhaltsverzeichnis_abfangen (String htmlfile)\n\t{\n\t\tmain mainobject = new main ();\n\t\t// System.out.println (\"Ermittle alle Kategorien (Gruppen, Oberkategorien)... 209\\n\");\n BufferedReader in = null;\n try {\n in = new BufferedReader(new FileReader(htmlfile));\n String zeile = null;\n int counter = 0;\n while ((zeile = in.readLine()) != null) {\n \t\n \t// hole kateogrienamen: aus inhaltsverziechnis:\n \tString kategoriename = \"\";\n \t\n \t// Oberkategorie Kategorie steht zwischen:\n \t// <p style=\"margin-top: 0.21cm; margin-bottom: 0.21cm; text-transform: uppercase\">\n \t// und\n \t// </a></font></font></p>\n \t\n \t\n \t\n \t// adde kategorienamen in combo:\n \n\t\t\n\n \t\tcount_kategorien = count_kategorien+1;\n \t\t//kategorienamen[count_kategorien] = kategoriename;\n \t\t//System.out.println (\"Kat Nr.\" + count_kategorien + \" ist \" + kategoriename+\"\\n\" );\n\n \t\t// Schreibe die Kategorien in Textfile:\n \t\tFile kategorienfile = new File (\"kategorien.txt\");\n \t\tif (kategorienfile.exists ())\n \t\t\t{\n \t\t\t\t// lösche die alte vorher damit es keine probleme gibt:\n \t\t\tkategorienfile.delete();\n \t\t\t}\n \t\tFile unterkategorienfile = new File (\"unterkategorien.txt\");\n \t\tif (unterkategorienfile.exists ())\n \t\t\t{\n \t\t\t\t// lösche die alte vorher damit es keine probleme gibt:\n \t\t\tunterkategorienfile.delete();\n \t\t\t}\n \t\t\n \t\tFileWriter fwk1 = new FileWriter (kategorienfile,true);\n \t\tfwk1.write(kategoriename+\"\\n\");\n \t\tfwk1.flush();\n \t\tfwk1.close();\n \t\t\n } // while\n } // try\n catch (Exception yx)\n {\n \tSystem.out.println (\"konnte kategorien aus inhaltverszeichnis nicht auslesen.\");\n }\n\t\t\n\t\t\n\t}", "public final void rule__Buchung__Group_11__1__Impl() throws RecognitionException {\r\n\r\n \t\tint stackSize = keepStackSize();\r\n \r\n try {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:5493:1: ( ( ( rule__Buchung__KategorieAssignment_11_1 ) ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:5494:1: ( ( rule__Buchung__KategorieAssignment_11_1 ) )\r\n {\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:5494:1: ( ( rule__Buchung__KategorieAssignment_11_1 ) )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:5495:1: ( rule__Buchung__KategorieAssignment_11_1 )\r\n {\r\n if ( state.backtracking==0 ) {\r\n before(grammarAccess.getBuchungAccess().getKategorieAssignment_11_1()); \r\n }\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:5496:1: ( rule__Buchung__KategorieAssignment_11_1 )\r\n // ../de.nie.fin.ui/src-gen/de/nie/fin/ui/contentassist/antlr/internal/InternalFin.g:5496:2: rule__Buchung__KategorieAssignment_11_1\r\n {\r\n pushFollow(FOLLOW_rule__Buchung__KategorieAssignment_11_1_in_rule__Buchung__Group_11__1__Impl11673);\r\n rule__Buchung__KategorieAssignment_11_1();\r\n\r\n state._fsp--;\r\n if (state.failed) return ;\r\n\r\n }\r\n\r\n if ( state.backtracking==0 ) {\r\n after(grammarAccess.getBuchungAccess().getKategorieAssignment_11_1()); \r\n }\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n finally {\r\n\r\n \trestoreStackSize(stackSize);\r\n\r\n }\r\n return ;\r\n }", "@Test\n public void givenTheUSCensusData_WhenSortedOnPopulationDensity_ShouldReturnSortedResult() {\n final String CSV_FILE_PATH = \"src/test/resources/USCensusData.csv\";\n try {\n usCensusAnalyzer.loadStateCensusCSVData(CensusAnalyser.Country.US, CSV_FILE_PATH);\n String sortedCensusData = usCensusAnalyzer.sortedStateCensusData(CensusAnalyser.SortingMode.DENSITY);\n CensusDAO[] censusDAO = new Gson().fromJson(sortedCensusData, CensusDAO[].class);\n Assert.assertEquals(\"District of Columbia\",censusDAO[0].StateName);\n } catch (CSVBuilderException e) {\n e.printStackTrace();\n }\n }", "@Override\r\n\tpublic void fill(List<Category> list) {\n\t\tfor(Category category : list) {\r\n\t\t\tfill(category);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "public void Unassigned_Cases()\n\t{\n\t\t//assigning a ContactTracer to a case\n\t\tif(coronaCase.size() > 0)\n\t\t{\n\t\t\tSystem.out.println(\"\\nDisplaying unassigned cases: \");\n\t\t\tfor(int i = 0; i < coronaCase.size(); i++)\n\t\t\t\tif(coronaCase.get(i).isAssignedCase() == false)\n\t\t\t\t\tSystem.out.println(coronaCase.get(i).toString());\n\n\t\t}\n\t\telse\n\t\t\tSystem.out.println(\"No unassigned cases to display.\");\n\t\t\n\t}", "public static Map<Integer, TaxCategory> saskatchewan() {\n\n\t\t\tHashMap<Integer, TaxCategory> categories = new HashMap<Integer, TaxCategory>();\n\t\t\ttry {\n\t\t\t\t//INSERT YOUR CODE HERE - Using the specification given on Federal\n\t\t\t\t//You will need to study how Manitoba is being implemented\n\t\t\t\tTaxCategory cat1 = new TaxCategory(10.5, 0, 45677.00); //Tax Category 1 for SK\n\t\t\t\tcategories.put( 1, cat1 );//puts both the key and the Taxcategory(value) into the hashmap for category 1\n\t\t\t\tTaxCategory cat2 = new TaxCategory(12.50, 45677.01, 130506.00);//Tax Category 2 for SK\n\t\t\t\tcategories.put( 2, cat2 );//puts both the key and the Taxcategory(value) into the hashmap for category 2\n\t\t\t\tTaxCategory cat3 = new TaxCategory(13.16, 130506.01, 10000000);//Tax Category 3 for SK\n\t\t\t\tcategories.put( 3, cat3 );//puts both the key and the Taxcategory(value) into the hashmap for category 3\n\n\t\t\t} catch( Exception e ) {}\n\n\t\t\treturn categories;\n\t\t}", "@Test\n public void testListMayors02() {\n System.out.println(\"listMayors\");\n\n Map expResult = new LinkedHashMap();\n\n City city1 = (new City(new Pair(41.237364, -8.846746), \"city1\", 72));\n city1.setMayor(new User(\"nick6\", \"[email protected]\"));\n expResult.put(city1, city1.getMayor());\n\n City city5 = (new City(new Pair(41.337408, -8.291943), \"city5\", 74));\n city5.setMayor(new User(\"nick6\", \"[email protected]\"));\n expResult.put(city5, city5.getMayor());\n\n City city6 = (new City(new Pair(41.314965, -8.423371), \"city6\", 80));\n city6.setMayor(new User(\"nick0\", \"[email protected]\"));\n expResult.put(city6, city6.getMayor());\n\n City city3 = (new City(new Pair(41.118700, -8.589700), \"city3\", 42));\n city3.setMayor(new User(\"nick8\", \"[email protected]\"));\n expResult.put(city3, city3.getMayor());\n\n City city4 = (new City(new Pair(41.467407, -8.964340), \"city4\", 64));\n city4.setMayor(new User(\"nick8\", \"[email protected]\"));\n expResult.put(city4, city4.getMayor());\n\n City city0 = (new City(new Pair(41.243345, -8.674084), \"city0\", 28));\n city0.setMayor(new User(\"nick2\", \"[email protected]\"));\n expResult.put(city0, city0.getMayor());\n\n City city2 = (new City(new Pair(40.519841, -8.085113), \"city2\", 81));\n city2.setMayor(new User(\"nick2\", \"[email protected]\"));\n expResult.put(city2, city2.getMayor());\n\n City city7 = (new City(new Pair(40.822244, -8.794953), \"city7\", 11));\n city7.setMayor(new User(\"nick5\", \"[email protected]\"));\n expResult.put(city7, city7.getMayor());\n\n City city9 = (new City(new Pair(40.851360, -8.136585), \"city9\", 65));\n city9.setMayor(new User(\"nick5\", \"[email protected]\"));\n expResult.put(city9, city9.getMayor());\n\n City city8 = (new City(new Pair(40.781886, -8.697502), \"city8\", 7));\n city8.setMayor(new User(\"nick3\", \"[email protected]\"));\n expResult.put(city8, city8.getMayor());\n\n Map result = sn10.listMayors();\n\n // To compare Values.\n assertArrayEquals(expResult.values().toArray(), result.values().toArray());\n }", "@Test\n public void testListMayors03() {\n System.out.println(\"listMayors\");\n\n Map expResult = new LinkedHashMap();\n\n City city1 = (new City(new Pair(41.237364, -8.846746), \"city1\", 72));\n city1.setMayor(new User(\"nick6\", \"[email protected]\"));\n expResult.put(city1, city1.getMayor());\n\n City city5 = (new City(new Pair(41.337408, -8.291943), \"city5\", 74));\n city5.setMayor(new User(\"nick6\", \"[email protected]\"));\n expResult.put(city5, city5.getMayor());\n\n City city6 = (new City(new Pair(41.314965, -8.423371), \"city6\", 80));\n city6.setMayor(new User(\"nick0\", \"[email protected]\"));\n expResult.put(city6, city6.getMayor());\n\n City city3 = (new City(new Pair(41.118700, -8.589700), \"city3\", 42));\n city3.setMayor(new User(\"nick8\", \"[email protected]\"));\n expResult.put(city3, city3.getMayor());\n\n City city4 = (new City(new Pair(41.467407, -8.964340), \"city4\", 64));\n city4.setMayor(new User(\"nick8\", \"[email protected]\"));\n expResult.put(city4, city4.getMayor());\n\n City city0 = (new City(new Pair(41.243345, -8.674084), \"city0\", 28));\n city0.setMayor(new User(\"nick2\", \"[email protected]\"));\n expResult.put(city0, city0.getMayor());\n\n City city2 = (new City(new Pair(40.519841, -8.085113), \"city2\", 81));\n city2.setMayor(new User(\"nick2\", \"[email protected]\"));\n expResult.put(city2, city2.getMayor());\n\n City city7 = (new City(new Pair(40.822244, -8.794953), \"city7\", 11));\n city7.setMayor(new User(\"nick5\", \"[email protected]\"));\n expResult.put(city7, city7.getMayor());\n\n City city9 = (new City(new Pair(40.851360, -8.136585), \"city9\", 65));\n city9.setMayor(new User(\"nick5\", \"[email protected]\"));\n expResult.put(city9, city9.getMayor());\n\n City city8 = (new City(new Pair(40.781886, -8.697502), \"city8\", 7));\n city8.setMayor(new User(\"nick3\", \"[email protected]\"));\n expResult.put(city8, city8.getMayor());\n\n Map result = new LinkedHashMap(sn10.listMayors());\n\n // To compare Values.\n assertThat(result, is(expResult));\n }", "@Test\n public void testListMayors01() {\n System.out.println(\"listMayors\");\n\n Map expResult = new LinkedHashMap();\n\n City city1 = (new City(new Pair(41.237364, -8.846746), \"city1\", 72));\n city1.setMayor(new User(\"nick6\", \"[email protected]\"));\n expResult.put(city1, city1.getMayor());\n\n City city5 = (new City(new Pair(41.337408, -8.291943), \"city5\", 74));\n city5.setMayor(new User(\"nick6\", \"[email protected]\"));\n expResult.put(city5, city5.getMayor());\n\n City city6 = (new City(new Pair(41.314965, -8.423371), \"city6\", 80));\n city6.setMayor(new User(\"nick0\", \"[email protected]\"));\n expResult.put(city6, city6.getMayor());\n\n City city3 = (new City(new Pair(41.118700, -8.589700), \"city3\", 42));\n city3.setMayor(new User(\"nick8\", \"[email protected]\"));\n expResult.put(city3, city3.getMayor());\n\n City city4 = (new City(new Pair(41.467407, -8.964340), \"city4\", 64));\n city4.setMayor(new User(\"nick8\", \"[email protected]\"));\n expResult.put(city4, city4.getMayor());\n\n City city0 = (new City(new Pair(41.243345, -8.674084), \"city0\", 28));\n city0.setMayor(new User(\"nick2\", \"[email protected]\"));\n expResult.put(city0, city0.getMayor());\n\n City city2 = (new City(new Pair(40.519841, -8.085113), \"city2\", 81));\n city2.setMayor(new User(\"nick2\", \"[email protected]\"));\n expResult.put(city2, city2.getMayor());\n\n City city7 = (new City(new Pair(40.822244, -8.794953), \"city7\", 11));\n city7.setMayor(new User(\"nick5\", \"[email protected]\"));\n expResult.put(city7, city7.getMayor());\n\n City city9 = (new City(new Pair(40.851360, -8.136585), \"city9\", 65));\n city9.setMayor(new User(\"nick5\", \"[email protected]\"));\n expResult.put(city9, city9.getMayor());\n\n City city8 = (new City(new Pair(40.781886, -8.697502), \"city8\", 7));\n city8.setMayor(new User(\"nick3\", \"[email protected]\"));\n expResult.put(city8, city8.getMayor());\n\n Map result = sn10.listMayors();\n\n // To compare Keys.\n assertArrayEquals(expResult.keySet().toArray(), result.keySet().toArray());\n }", "@Test\n public void getCities()\n {\n List<City> cities = new ArrayList<>();\n Map<City, List<Road>> networkEmpty = new HashMap<>();\n Country countryEmpty = new Country(\"CountryEmpty\", networkEmpty);\n assertTrue(countryEmpty.getCities().size()==0);\n assertEquals(cities,countryEmpty.getCities());\n //Sorted list returned.\n cities = new ArrayList<>(country1.getNetwork().keySet());\n Collections.sort(cities);\n assertEquals(cities,country1.getCities());\n }", "public void populateDeck(){\n\n //Add everything to r\n for(int i=0;i<LUMBER;i++){\n deck.add(new ResourceCard(container, Resource.WOOD, cardStartPoint));\n }\n\n for(int i=0;i<WOOL;i++){\n deck.add(new ResourceCard(container, Resource.WOOL, cardStartPoint));\n }\n\n for(int i=0;i<GRAIN;i++){\n deck.add(new ResourceCard(container, Resource.WHEAT, cardStartPoint));\n }\n\n for(int i=0;i<BRICK;i++){\n deck.add(new ResourceCard(container, Resource.BRICKS, cardStartPoint));\n }\n\n for(int i=0;i<ORE;i++){\n deck.add(new ResourceCard(container, Resource.ORE, cardStartPoint));\n }\n //Collections.shuffle(deck);\n\n }" ]
[ "0.5655871", "0.5483953", "0.5436565", "0.51895726", "0.5173504", "0.51673764", "0.5125036", "0.49789196", "0.49661744", "0.4953923", "0.48865503", "0.4878356", "0.48615137", "0.4854001", "0.48335284", "0.48295835", "0.4825123", "0.47771195", "0.47632653", "0.47362906", "0.4715644", "0.4706484", "0.4700637", "0.4694999", "0.46832728", "0.4638372", "0.46321008", "0.46222952", "0.46220323", "0.46214736", "0.46168867", "0.4614149", "0.46099314", "0.45906377", "0.4587597", "0.4583071", "0.45773798", "0.45725656", "0.456336", "0.45550483", "0.45548278", "0.45413283", "0.4535966", "0.45301095", "0.45190015", "0.45159137", "0.4507708", "0.4499893", "0.44983256", "0.44963145", "0.4495165", "0.4487151", "0.44839966", "0.4483534", "0.4482362", "0.4480433", "0.44751894", "0.44748467", "0.44606724", "0.44581762", "0.44576707", "0.44504192", "0.4449296", "0.44459864", "0.44450292", "0.44330525", "0.44300818", "0.44247", "0.44210708", "0.44173908", "0.44145522", "0.44103095", "0.44046408", "0.4403866", "0.44026726", "0.44000146", "0.43959886", "0.4389844", "0.43868032", "0.4384682", "0.43838745", "0.43822232", "0.4372148", "0.43718177", "0.43666872", "0.43660426", "0.43580186", "0.43538216", "0.43506268", "0.4348581", "0.43481386", "0.43470725", "0.43463942", "0.43411052", "0.43325505", "0.43318203", "0.43316826", "0.43308365", "0.43293184", "0.4327745", "0.43241334" ]
0.0
-1
Manager for ranking of courses in all major categories.
private static void rankCourses() { for (String subject : courses.keySet()) { LinkedList<Course> subjectCourses = courses.get(subject); for (int i = 1; i <= 8; i++) { switch (i) { case 1: // Subject rank intRanker(1, subjectCourses); break; case 2: // Student satisfaction intRanker(2, subjectCourses); break; case 3: // Nationwide ranking doubleRanker(3, subjectCourses); break; case 4: // Cost of living doubleRanker(4, subjectCourses); break; case 5: // Student to faculty ratio doubleRanker(5, subjectCourses); break; case 6: // Research Output intRanker(6, subjectCourses); break; case 7: // International students doubleRanker(7, subjectCourses); break; case 8: // Graduate prospects doubleRanker(8, subjectCourses); break; } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void intRanker(int i, LinkedList<Course> subjectCourses) {\r\n\t\tTreeMap<Integer, Course> map = new TreeMap<Integer, Course>(Collections.reverseOrder());\r\n\t\tfor (Course c : subjectCourses) {\r\n\t\t\tswitch (i) {\r\n\t\t\tcase 1:\r\n\t\t\t\tmap.put(1 - c.subjectRank, c); // In reverse order as lower is better.\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3:\r\n\t\t\t\tmap.put(1 - c.uni.nationwideRanking, c);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 6:\r\n\t\t\t\tmap.put(c.uni.researchOutput, c);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSet<Entry<Integer, Course>> integerSet = map.entrySet();\r\n\t\tIterator<Entry<Integer, Course>> integerIt = integerSet.iterator();\r\n\t\tint counter = 1;\r\n\t\twhile (integerIt.hasNext()) {\r\n\t\t\tMap.Entry<Integer, Course> me = (Map.Entry<Integer, Course>) integerIt.next();\r\n\t\t\tLinkedList<RankedCourse> ranked = rankedCourses.get(subjectCourses.getFirst().subject);\r\n\t\t\tRankedCourse rc = new RankedCourse();\r\n\t\t\tfor (RankedCourse course : ranked) {\r\n\t\t\t\tif (course.courseName.equals(me.getValue().courseName) && course.uni.equals(me.getValue().uni)) {\r\n\t\t\t\t\trc = course;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tswitch (i) {\r\n\t\t\tcase 1:\r\n\t\t\t\trc.subjectRank = counter;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3:\r\n\t\t\t\trc.nationwideRank = counter;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 6:\r\n\t\t\t\trc.researchOutputRank = counter;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tcounter++;\r\n\t\t}\r\n\t}", "private static void doubleRanker(int i, LinkedList<Course> subjectCourses) {\r\n\t\tTreeMap<Double, Course> map = new TreeMap<Double, Course>(Collections.reverseOrder());\r\n\t\tfor (Course c : subjectCourses) {\r\n\t\t\tswitch (i) {\r\n\t\t\tcase 2:\r\n\t\t\t\tmap.put(c.uni.studentSatisfaction, c);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 4:\r\n\t\t\t\tmap.put(1 - c.uni.costOfLiving, c); // In reverse order as lower is better.\r\n\t\t\t\tbreak;\r\n\t\t\tcase 5:\r\n\t\t\t\tmap.put(c.uni.studentFacultyRatio, c);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 7:\r\n\t\t\t\tmap.put(c.uni.internationalStudentsRatio, c);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 8:\r\n\t\t\t\tmap.put(c.uni.graduateProspects, c);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSet<Entry<Double, Course>> doubleSet = map.entrySet();\r\n\t\tIterator<Entry<Double, Course>> doubleIt = doubleSet.iterator();\r\n\t\tint counter = 1;\r\n\t\twhile (doubleIt.hasNext()) {\r\n\t\t\tMap.Entry<Double, Course> me = (Map.Entry<Double, Course>) doubleIt.next();\r\n\t\t\tLinkedList<RankedCourse> ranked = rankedCourses.get(subjectCourses.getFirst().subject);\r\n\t\t\tRankedCourse rc = new RankedCourse();\r\n\t\t\tfor (RankedCourse course : ranked) {\r\n\t\t\t\tif (course.courseName.equals(me.getValue().courseName) && course.uni.equals(me.getValue().uni)) {\r\n\t\t\t\t\trc = course;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tswitch (i) {\r\n\t\t\tcase 2:\r\n\t\t\t\trc.studentFacultyRatioRank = counter;\r\n\t\t\tcase 4:\r\n\t\t\t\trc.costOfLivingRank = counter;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 5:\r\n\t\t\t\trc.studentFacultyRatioRank = counter;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 7:\r\n\t\t\t\trc.internationalStudentsRatioRank = counter;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 8:\r\n\t\t\t\trc.graduateProspectsRank = counter;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tcounter++;\r\n\t\t}\r\n\t}", "public int getNumOfCourses() {\n return numOfCourses;\n }", "public void changeNumOfCourses() {\n\t\tshowPanelGrid = numberOfC > 0;\n\t\thouersNun = new ArrayList<Integer>(Collections.nCopies(numberOfC, null));\n\t\tgrades = new ArrayList<Float>(Collections.nCopies(numberOfC, null));\n\n\t}", "public int getNumberOfCourses(){}", "public void increaseCourseCount(){}", "private void updateCourses() {\n\t\tArrayList<Course> results = adCon.viewCourses();\n\n\t\tif (results == null)\n\t\t\treturn;\n\n\t\tclearTable();\n\n\t\tfor (Course c : results) {\n\t\t\taddTableData(c);\n\t\t}\n\t}", "public void assignCourses() {\n\n\t\t// Check for Third Year Student queue and if its not empty assign course\n\t\twhile (!tyStudents.isEmpty()) {\n\t\t\tStudent student = tyStudents.poll();\n\t\t\tassign(student);\n\n\t\t}\n\t\t// Check for Second Year Student queue and if its not empty assign course\n\t\twhile (!syStudents.isEmpty()) {\n\t\t\tStudent student = syStudents.poll();\n\t\t\tassign(student);\n\n\t\t}\n\t\t// Check for First Year Student queue and if its not empty assign course\n\t\twhile (!fyStudents.isEmpty()) {\n\t\t\tStudent student = fyStudents.poll();\n\t\t\tassign(student);\n\n\t\t}\n\n\t\tfinalAverage = sumOfStudents / numberofStudents;\n\t\tsb.append(\"\\n\");\n\t\tsb.append(\"AverageSatisfactionRating = \" + finalAverage);\n\t\tresults.writeOutput(sb, outputFilePath);\n\t}", "public CSCourses() {\n courseList = new LinkedList<Course>(); \n numOfCourses = 0;\n }", "public static void main(String[] args)\n {\n\n // open text file\n File courseFile = new File(\"courses.txt\");\n // open a Scanner to read data from File\n Scanner courseReader = null;\n try\n {\n courseReader = new Scanner(courseFile);\n }\n catch (FileNotFoundException e)\n {\n System.out\n .println(\"No courseList Course found- courseList is empty\");\n }\n\n\n\n // Instantiate the HashMap\n HashMap<Integer, Course> courseHM = new HashMap<>();\n\n\n\n // read the file one course at a time & determine which subject\n // it is before creating an instance of the course and adding it\n // to the HashMap\n while ( courseReader != null && courseReader.hasNext() )\n {\n\n String category = courseReader.nextLine();\n String name = courseReader.nextLine();\n String crnString = courseReader.nextLine();\n Integer crn = Integer.parseInt(crnString);\n\n if ( category.equalsIgnoreCase(\"English\") )\n {\n\n String level = courseReader.nextLine();\n String format = courseReader.nextLine();\n\n // Creates the English course & puts it in the HashMap\n English tempClass = new English(category, name, crn, level, format);\n courseHM.put(crn, tempClass);\n\n }\n else if ( category.equalsIgnoreCase(\"Math\") )\n {\n\n String temp = courseReader.nextLine();\n boolean stem = Boolean.parseBoolean(temp);\n String format = courseReader.nextLine();\n\n // Creates the Math course & puts it in the HashMap\n Math tempClass = new Math(category, name, crn, stem, format);\n courseHM.put(crn, tempClass);\n\n }\n else if ( category.equalsIgnoreCase(\"History\") )\n {\n\n String temp = courseReader.nextLine();\n boolean areaEligible = Boolean.parseBoolean(temp);\n String format = courseReader.nextLine();\n\n // Creates the History course & puts it in the HashMap\n History tempClass = new History(category, name, crn, areaEligible,\n format);\n courseHM.put(crn, tempClass);\n\n }\n else\n {\n System.out.println(\"Unknown Course type \" + category);\n }\n\n }\n\n\n\n\n // iterates through the key set of Integers\n Set<Integer> keySet = courseHM.keySet();\n for (Integer key : keySet)\n {\n Course course = courseHM.get(key);\n System.out.println(key + \" : \" + course.toString());\n }\n\n\n\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public entity.ReviewSummaryCategoryScore[] getCategoryScores();", "public PairwiseRanking(Classifier classifier) {\n\t\tthis.classifier = classifier;\n\t\tthis.set = new TrainingSet();\n\t}", "private void _generateCourses() {\n for (int i = 0; i < underCourses_.size(); i++) {\n _generateACourse( ( (CourseInfo) underCourses_.get(i)).globalIndex);\n }\n for (int i = 0; i < gradCourses_.size(); i++) {\n _generateAGraduateCourse( ( (CourseInfo) gradCourses_.get(i)).globalIndex);\n }\n for (int i = 0; i < webCourses_.size(); i++) {\n _generateAWebCourse( ( (CourseInfo) webCourses_.get(i)).globalIndex);\n }\n }", "static void initializeStudentSystem() {\r\n\r\n Course math = new Course(\"1000\", \"Mathematics\", \"College of Science\");\r\n Course computing = new Course(\"1001\", \"Computing\", \"College of Engineering\");\r\n Course english = new Course(\"1002\", \"English\", \"College of Liberal Arts\");\r\n Course history = new Course(\"1003\", \"History\", \"College of Liberal Arts\");\r\n Course biology = new Course(\"1004\", \"Biology\", \"College of Science\");\r\n courses.put(math.getCRN(), math);\r\n courses.put(computing.getCRN(), computing);\r\n courses.put(english.getCRN(), english);\r\n courses.put(history.getCRN(), history);\r\n courses.put(biology.getCRN(), biology);\r\n //\r\n User admin = new User();\r\n admin.setUsername(\"admin\");\r\n admin.setPassword(\"admin\");\r\n admin.setAccountType(4);\r\n accounts.put(admin.getUsername(), admin);\r\n //\r\n Student defaultStudent = new Student();\r\n defaultStudent.setName(\"Jose Cabrera\");\r\n defaultStudent.setUsername(\"John1\");\r\n defaultStudent.setPassword(\"123\");\r\n defaultStudent.setId(\"80539934\");\r\n defaultStudent.setMajor(\"CS\");\r\n defaultStudent.setAccountType(1);\r\n defaultStudent.setGraduationStatus(21);\r\n accounts.put(\"John1\", defaultStudent);\r\n //\r\n Student defaultStudent2 = new Student();\r\n defaultStudent2.setName(\"Raul Hinostroza\");\r\n defaultStudent2.setUsername(\"John2\");\r\n defaultStudent2.setPassword(\"123\");\r\n defaultStudent2.setId(\"805393\");\r\n defaultStudent2.setMajor(\"CS\");\r\n defaultStudent2.setAccountType(1);\r\n accounts.put(\"John2\", defaultStudent2);\r\n //\r\n Student defaultStudent3 = new Student();\r\n defaultStudent3.setName(\"Max Morales\");\r\n defaultStudent3.setUsername(\"John3\");\r\n defaultStudent3.setPassword(\"123\");\r\n defaultStudent3.setId(\"8053923\");\r\n defaultStudent3.setMajor(\"CS\");\r\n defaultStudent3.setAccountType(1);\r\n accounts.put(\"John3\", defaultStudent3);\r\n defaultStudent.addCourses(\"1000\");\r\n defaultStudent2.addCourses(\"1000\");\r\n defaultStudent3.addCourses(\"1000\");\r\n //\r\n Faculty defaultFaculty = new Faculty();\r\n defaultFaculty.setAccountType(2);\r\n defaultFaculty.setName(\"Smith\");\r\n defaultFaculty.setUsername(\"Smith1\");\r\n defaultFaculty.setPassword(\"123\");\r\n accounts.put(defaultFaculty.getUsername(), defaultFaculty);\r\n //\r\n Staff defaultStaff = new Staff();\r\n defaultStaff.setAccountType(3);\r\n defaultStaff.setName(\"Smith\");\r\n defaultStaff.setUsername(\"Smith2\");\r\n defaultStaff.setPassword(\"123\");\r\n accounts.put(defaultStaff.getUsername(), defaultStaff);\r\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic List<Course> getAllCourses() {\n\t\treturn this.getHibernateTemplate().find(\"from Course cs order by cs.cno\");\n\t \n\t}", "public Rules(Player player) {\n this.player = player;\n categoryCheck = new boolean[13];\n\n\n\n/* For later on\n\n // length i is starting at 0, Category 1 would be 0, and so on.\n for (int i = 0; i < categoryCheck.length;i++) {\n // Counting up to .length = [13]\n // Since i less than, will start 0-12, i is not <= so we -1 from regular categories to match them\n // When returned false and not true, then the category is available for this.player to use\n categoryCheck[i] = false;\n }\n*/\n\n\n //Creating categoryScore to 13 new int's 0-12 in index form\n // We use I as an index just to replicate a for () for temp use in this method\n categoryScore = new int[13];\n for (int i = 0; i < categoryScore.length; i++) {\n categoryScore[i] = 0;\n }\n\n }", "@Override\n\tpublic int hashCode() {\n\t\tfinal int prime = 31;\n\t\tint result = super.hashCode();\n\t\tresult = prime * result + maxCourses;\n\t\treturn result;\n\t}", "public int getMaxCourses() {\n\t\treturn this.maxCourses;\n\t}", "private void getCourseList(){\r\n\r\n CourseDAO courseDAO = new CourseDAO(Statistics.this);\r\n List<Course> courseList= courseDAO.readListofCourses();\r\n for(Course course: courseList) {\r\n courses.add(course.getName());\r\n }\r\n\r\n }", "private int _AssignCourse(int indexInFaculty) {\n //NOTE: this line, although overriden by the next one, is deliberately kept\n // to guarantee identical random number generation to the previous version.\n int pos = _getRandomFromRange(0, remainingUnderCourses_.size() - 1);\n pos = 0; //fetch courses in sequence\n\n CourseInfo course = new CourseInfo();\n course.indexInFaculty = indexInFaculty;\n course.globalIndex = ( (Integer) remainingUnderCourses_.get(pos)).intValue();\n underCourses_.add(course);\n\n remainingUnderCourses_.remove(pos);\n\n return course.globalIndex;\n }", "@Override\n\tpublic List<Course> getAllCourses() {\n\t\tList<Course> list = null;\n\t\tconn = DBUtils.connectToDb();\n\t\tCourse course = null;\n\t\tString query = \"select * from course;\";\n\t\ttry {\n\t\t\tst = conn.createStatement();\n\t\t\trs = st.executeQuery(query);\n\t\t\tif(rs!=null)\n\t\t\t{\n\t\t\t\tlist = new ArrayList<Course>();\n\t\t\t\twhile(rs.next())\n\t\t\t\t{\n\t\t\t\t\tcourse = new Course();\n\t\t\t\t\tcourse.setCourse_id(Integer.parseInt(rs.getString(1)));\n\t\t\t\t\tcourse.setCourse_name(rs.getString(2));\n\t\t\t\t\tcourse.setStart_date(rs.getString(3));\n\t\t\t\t\tcourse.setEnd_date(rs.getString(4));\n\t\t\t\t\tcourse.setCapacity(Integer.parseInt(rs.getString(5)));\n\t\t\t\t\tlist.add(course);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn list;\n\t}", "private void calculateCourseStats(int coursePos, int playerPos){\r\n\r\n initializeStatisticVariables();\r\n StatistisDAO statDAO = new StatistisDAO(Statistics.this);\r\n DAOUtilities daoUtil = new DAOUtilities(Statistics.this);\r\n PlayerDAO playerDAO = new PlayerDAO(Statistics.this);\r\n CourseDAO courseDAO = new CourseDAO(Statistics.this);\r\n BagDAO bagDAO = new BagDAO(Statistics.this);\r\n\r\n Player player = new Player();\r\n long pid = playerDAO.readIDFromName(players.get(playerPos));\r\n player.setID(pid);\r\n\r\n Course course = new Course();\r\n long cid = courseDAO.readIDFromName(courses.get(coursePos));\r\n course.setID(cid);\r\n\r\n averageScore = daoUtil.getAverageAdjustedScorePlayer(player, course);\r\n averagePlusMinus = averageScore - 72;\r\n averageFront9Score = daoUtil.getAverageAdjustedFrontNineScorePlayer(player, course);\r\n averageFront9PlusMinus = averageFront9Score - 36;\r\n averageBack9Score = daoUtil.getAverageAdjustedBackNineScorePlayer(player, course);\r\n averageBack9PlusMinus = averageBack9Score - 36;\r\n averageHoleScore = averageScore / 18;\r\n averageHolePlusMinus = averageHoleScore - 4;\r\n\r\n\r\n // get the number of each holes\r\n numberOfPar3Holes = statDAO.getNHolesPar(3, player, course);\r\n numberOfPar4Holes = statDAO.getNHolesPar(4, player, course);\r\n numberOfPar5Holes = statDAO.getNHolesPar(5, player, course);\r\n numberOfHoles = numberOfPar3Holes\r\n + numberOfPar4Holes\r\n + numberOfPar5Holes;\r\n\r\n // get the hole stats\r\n float nfairwayholes = numberOfPar4Holes + numberOfPar5Holes;\r\n fairways = nfairwayholes<=0 ? 0 : statDAO.getNFairways(player) / nfairwayholes * 100.;\r\n if (numberOfHoles > 0) {\r\n girs = statDAO.getNGiR(player, course) / (float) numberOfHoles * 100.;\r\n chips = statDAO.getNumofChips(player, course) / (float) numberOfHoles;\r\n putts = statDAO.getNumofPutts(player, course) / (float) numberOfHoles;\r\n penalties = statDAO.getNumofPenalties(player, course) / (float) numberOfHoles * 18.;\r\n }\r\n\r\n // get the counts for par 3's\r\n if (numberOfPar3Holes > 0) {\r\n par3Girs = statDAO.getNGiR(3, player, course) / (float)numberOfPar3Holes * 100.;\r\n par3Chips = statDAO.getNumofChips(3, player, course) / (float) numberOfPar3Holes;\r\n par3Putts = statDAO.getNumofPutts(3, player, course) / (float) numberOfPar3Holes;\r\n par3Penalties = statDAO.getNumofPenalties(3, player, course) / (float) numberOfPar3Holes;\r\n }\r\n par3EagleCount = statDAO.getNHolesParScore(3, -2, player, course);\r\n par3BirdieCount = statDAO.getNHolesParScore(3, -1, player, course);\r\n par3ParCount = statDAO.getNHolesParScore(3, 0, player, course);\r\n par3BogeyCount = statDAO.getNHolesParScore(3, 1, player, course);\r\n par3DoubleBogeyCount = statDAO.getNHolesParScore(3, 2, player, course);\r\n par3TripleBogeyCount = statDAO.getNHolesParScore(3, 3, player, course);\r\n par3QuadBogeyPlusCount = statDAO.getNHolesParGreaterThanScore(3, 4, player, course);\r\n\r\n // get the counts for par 4's\r\n if (numberOfPar4Holes > 0) {\r\n par4Girs = statDAO.getNGiR(4, player, course) / (float)numberOfPar4Holes * 100.;\r\n par4Chips = statDAO.getNumofChips(4, player, course) / (float) numberOfPar4Holes;\r\n par4Putts = statDAO.getNumofPutts(4, player, course) / (float) numberOfPar4Holes;\r\n par4Penalties = statDAO.getNumofPenalties(4, player, course) / (float) numberOfPar4Holes;\r\n }\r\n par4AlbatrossCount = statDAO.getNHolesParScore(4, -3, player, course);\r\n par4EagleCount = statDAO.getNHolesParScore(4, -2, player, course);\r\n par4BirdieCount = statDAO.getNHolesParScore(4, -1, player, course);\r\n par4ParCount = statDAO.getNHolesParScore(4, 0, player, course);\r\n par4BogeyCount = statDAO.getNHolesParScore(4, 1, player, course);\r\n par4DoubleBogeyCount = statDAO.getNHolesParScore(4, 2, player, course);\r\n par4TripleBogeyCount = statDAO.getNHolesParScore(4, 3, player, course);\r\n par4QuadBogeyPlusCount = statDAO.getNHolesParGreaterThanScore(4, 4, player, course);\r\n\r\n // get the counts for the par 5's\r\n if (numberOfPar5Holes > 0) {\r\n par5Girs = statDAO.getNGiR(5, player, course) / (float)numberOfPar5Holes * 100.;\r\n par5Chips = statDAO.getNumofChips(5, player, course) / (float) numberOfPar5Holes;\r\n par5Putts = statDAO.getNumofPutts(5, player, course) / (float) numberOfPar5Holes;\r\n par5Penalties = statDAO.getNumofPenalties(5, player, course) / (float) numberOfPar5Holes;\r\n }\r\n par5AlbatrossCount = statDAO.getNHolesParScore(5, -3, player, course);\r\n par5EagleCount = statDAO.getNHolesParScore(5, -2, player, course);\r\n par5BirdieCount = statDAO.getNHolesParScore(5, -1, player, course);\r\n par5ParCount = statDAO.getNHolesParScore(5, 0, player, course);\r\n par5BogeyCount = statDAO.getNHolesParScore(5, 1, player, course);\r\n par5DoubleBogeyCount = statDAO.getNHolesParScore(5, 2, player, course);\r\n par5TripleBogeyCount = statDAO.getNHolesParScore(5, 3, player, course);\r\n par5QuadBogeyPlusCount = statDAO.getNHolesParGreaterThanScore(5, 4, player, course);\r\n\r\n // sum various scores\r\n albatrossCount = par4AlbatrossCount + par5AlbatrossCount;\r\n eagleCount = par3EagleCount + par4EagleCount + par5EagleCount;\r\n birdieCount = par3BirdieCount + par4BirdieCount + par5BirdieCount;\r\n parCount = par3ParCount + par4ParCount + par5ParCount;\r\n bogeyCount = par3BogeyCount + par4BogeyCount + par5BogeyCount;\r\n doubleBogeyCount = par3DoubleBogeyCount\r\n + par4DoubleBogeyCount\r\n + par5DoubleBogeyCount;\r\n tripleBogeyCount = par3TripleBogeyCount\r\n + par4TripleBogeyCount\r\n + par5TripleBogeyCount;\r\n quadBogeyPlusCount = par3QuadBogeyPlusCount\r\n + par4QuadBogeyPlusCount\r\n + par5QuadBogeyPlusCount;\r\n\r\n clubs = bagDAO.readClubsInBag(player);\r\n // Remove the putter\r\n int idx = 0;\r\n int pidx = -1;\r\n for (Club club : clubs) {\r\n if (club.getClub().equals(\"Putter\"))\r\n pidx = idx;\r\n idx++;\r\n }\r\n if (pidx >= 0)\r\n clubs.remove(pidx);\r\n // Fill the distances and accuracy\r\n for (Club club : clubs) {\r\n club.setAvgDist(statDAO.getClubAvgDist(player, club, course));\r\n club.setAccuracy(statDAO.getClubAccuracy(player, club, course, (float)10));\r\n }\r\n\r\n // get the number of rounds played\r\n int courseCount = 0;\r\n //Calls the method that displays the stats on the screen\r\n fillInList(courseCount++);\r\n\t}", "public CourseSearch() {\n\n String json = null;\n\n try {\n json = new JsonReader(\"http://api.umd.io/v0/courses/list\")\n .readUrl();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n ArrayList<Course> allCourses = new Gson().fromJson(json, new\n TypeToken<ArrayList<Course>>(){}.getType());\n\n courses = new TreeMap<>();\n\n for (Course c : allCourses) {\n courses.put(c.getCourseId(), c);\n }\n }", "private static HashMap<Integer, Course> getCourses() {\r\n return IO.getCoursesFromInput(); // get courses from file\r\n }", "public CourseManager()\n\t{\n\t\tcourseOfferings = new TreeSet<>(new CourseComparator());\n\n\t\tnetwork = new TreeSet<>();\n\t}", "private void assignCourses() throws StudentEnrollmentException {\n\t\tCourse newCourse;\n\t\tfor (int id : courseID) {\n\t\t\tnewCourse = courseDao.getCourse(id);\n\t\t\tstudent.assignNewCourse(newCourse);\n\t\t}\n\t}", "@RequestMapping(\"/courses\")\n\tpublic List<Course> getAllCourses() {\n\t\treturn courseService.getAllCourses();\n\t}", "@Override\n\tprotected boolean rulesGeneration() {\n\t\tGlobal.logger.finer(\"--------------------- S101 rulesGeneration() ----------------- \");\n\t\t//Global.logger.finer(this.toString());\t\t\n\t\tif(activationGuards()){\n\t\t\ttry {\n\t\t\t\tthis.categories.beforeFirst();\n\t\t\t\t\n\t\t\t\twhile (!this.categories.isClosed() && this.categories.next()) {\n\t\t\t\t\tgroupName = this.categories.getString(\"name\");\n\t\t\t\t\tGlobal.logger.fine(\"Creating new S102 [\" + groupName + \", \" + 1 +\"] \");\n\t\t\t\t\tcreateRule(new S102(course_ID, groupName, 1));\n\t\t\t\t\t\n\t\t\t\t\tGlobal.logger.fine(\"Creating new S103 [\" + groupName + \", study ]\");\n\t\t\t\t\tcreateRule(new S103(course_ID, groupName, \"study\"));\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\telse \n\t\t\treturn false;\n\t\treturn true;\n\t}", "@Override\n\tpublic List<Course> findAllCourses() {\n\t\tList<Course> list = cd.findAllCourses();\n\t\tif (null == list)\n\t\t\tlist = new ArrayList<Course>();\n\t\treturn list;\n\t}", "@Override\r\n\tpublic List<Courses> getCourses() {\n\t\treturn coursesdao.findAll();\r\n\t}", "public int countBycourse_id(long course_id);", "private void sortCourses() {\n ctrl.sortCourses().forEach(System.out::println);\n }", "public List<String> getRankedCourses(String user) {\n\n\t\tSet<String> usersL1 = new HashSet<String>();\n\t\tSet<String> usersL2 = new HashSet<String>();\n\t\tusersL1.addAll(getDirectFriendsForUser(user));\n\n\t\tfor (String u : usersL1) {\n\t\t\tusersL2.addAll(getDirectFriendsForUser(u));\n\t\t}\n\t\tSet<String> users = usersL1;\n\t\tusers.addAll(usersL2);\n\n\t\tMap<String, CourseCounter> courses = new HashMap<>();\n\n\t\tfor (String u : users) {\n\t\t\tList<String> courseListByUser = getAttendedCoursesForUser(u);\n\n\t\t\tfor (String c : courseListByUser) {\n\t\t\t\tCourseCounter counter = courses.get(c);\n\t\t\t\tif (counter == null) {\n\t\t\t\t\tcounter = new CourseCounter(c);\n\t\t\t\t\tcourses.put(c, counter);\n\t\t\t\t} else {\n\t\t\t\t\tcounter.increaseCounter();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tList<String> coursesByUser = getAttendedCoursesForUser(user);\n\t\tfor (String c : coursesByUser) {\n\t\t\tcourses.remove(c);\n\t\t}\n\n\t\tList<CourseCounter> coursesAll = new ArrayList<>(courses.values());\n\n\t\tCollections.sort(coursesAll, new Comparator<CourseCounter>() {\n\t\t\t@Override\n\t\t\tpublic int compare(CourseCounter arg0, CourseCounter arg1) {\n\t\t\t\treturn -arg0.getCounter().compareTo(arg1.getCounter());\n\t\t\t}\n\t\t});\n\n\t\tList<String> recommendedCourses = new ArrayList<>();\n\t\tfor (CourseCounter c:coursesAll){\n\t\t\trecommendedCourses.add(c.getName());\n\t\t}\n\t\t\n\t\treturn recommendedCourses;\n\t}", "@GetMapping(\"/courses\")\n\tpublic List<Courses> getAllCourses() {\n\t\treturn this.cservice.getAllCourses();\n\t\t//return course;\n\t}", "public List<Course> getAllCourses() {\n return allCourses;\n }", "@Override\n public List<Course> getCourses() {\n return courseDao.findAll();\n }", "public interface CategoryManager {\n public List<Category> getAllCategories();\n\n public Category getCategoryById(int cid);\n\n public int addCategory(String cname);\n\n public int updateCategoryById(int cid, String cname);\n\n public int deleteCategoryById(int cid);\n}", "public List<Course> rankedKeywordSearch(String entireSearch) {\n entireSearch = entireSearch.toLowerCase().trim();\n\n List<Course> finalCourseList = new ArrayList<>();\n\n if (entireSearch.toLowerCase().trim().isEmpty()) {\n return finalCourseList;\n }\n\n\n if (StringUtils.isNumeric(entireSearch)) {\n List<Course> numericSearchRes = courseCodeSearch\n .suggestNumeric(entireSearch);\n for (Course c : numericSearchRes) {\n if (!finalCourseList.contains(c)) {\n finalCourseList.add(c);\n }\n }\n\n List<Course> titleSuggestionsFull = titleSearch.suggest(entireSearch);\n for (Course c : titleSuggestionsFull) {\n if (!finalCourseList.contains(c)) {\n finalCourseList.add(c);\n }\n }\n\n List<Course> descriptionSuggestionsFull = descriptionSearch\n .suggest(entireSearch);\n for (Course c : descriptionSuggestionsFull) {\n if (!finalCourseList.contains(c)) {\n finalCourseList.add(c);\n }\n }\n } else {\n finalCourseList = courseCodeSearch.suggest(entireSearch);\n\n List<Course> numericSearchRes = courseCodeSearch\n .suggestNumeric(entireSearch);\n for (Course c : numericSearchRes) {\n if (!finalCourseList.contains(c)) {\n finalCourseList.add(c);\n }\n }\n\n String sugg = searchNumberSuggestion(entireSearch);\n if (sugg != null) {\n List<Course> courseCodeResultsOuter = courseCodeSearch.suggest(sugg);\n for (Course c : courseCodeResultsOuter) {\n if (!finalCourseList.contains(c)) {\n finalCourseList.add(c);\n }\n }\n }\n\n if (finalCourseList.size() == 0) {\n List<Course> titleSuggestionsFull = titleSearch.suggest(entireSearch);\n for (Course c : titleSuggestionsFull) {\n if (!finalCourseList.contains(c)) {\n finalCourseList.add(c);\n }\n }\n\n List<Course> descriptionSuggestionsFull = descriptionSearch\n .suggest(entireSearch);\n for (Course c : descriptionSuggestionsFull) {\n if (!finalCourseList.contains(c)) {\n finalCourseList.add(c);\n }\n }\n }\n\n String[] searchWordsSplit = entireSearch.trim().split(\" \");\n if (searchWordsSplit.length == 2) {\n String putTogether = searchWordsSplit[0] + searchWordsSplit[1];\n List<Course> courseCodeResults = courseCodeSearch.suggest(putTogether);\n for (Course c : courseCodeResults) {\n if (!finalCourseList.contains(c)) {\n finalCourseList.add(c);\n }\n }\n\n String suggN = searchNumberSuggestion(putTogether);\n if (suggN != null) {\n List<Course> courseCodeResults2 = courseCodeSearch.suggest(suggN);\n for (Course c : courseCodeResults2) {\n if (!finalCourseList.contains(c)) {\n finalCourseList.add(c);\n }\n }\n }\n }\n\n\n\n if (finalCourseList.size() == 0) {\n List<String> wordsToSearch = new ArrayList<>();\n if (searchWordsSplit.length <= 5) {\n // search on each word\n for (int i = 0; i < searchWordsSplit.length; i++) {\n if (cache.getDeptForCode(searchWordsSplit[i].toUpperCase()) == null\n && !StringUtils.isNumeric(searchWordsSplit[i])\n && !smallWords.contains(searchWordsSplit[i])) {\n wordsToSearch.add(searchWordsSplit[i]);\n }\n\n }\n searchIndividualWords(finalCourseList, wordsToSearch);\n\n } else {\n // search on only the last 5 words\n for (int i = searchWordsSplit.length - 1; i > searchWordsSplit.length - 5; i--) {\n if (cache.getDeptForCode(searchWordsSplit[i].toUpperCase()) == null\n && !StringUtils.isNumeric(searchWordsSplit[i])\n && !smallWords.contains(searchWordsSplit[i])) {\n wordsToSearch.add(searchWordsSplit[i]);\n }\n }\n searchIndividualWords(finalCourseList, wordsToSearch);\n }\n }\n }\n\n return finalCourseList;\n }", "int getRanking();", "public Set<Course> getCoursesWithLearner(UserProfile learner)\n\t{\n\t\tSet<Course> rVal = null;\n\n\t\tif ((learner.getPermLevel() == UserProfile.STUDENT) || (learner.getPermLevel() == UserProfile.TA))\n\t\t{\n\t\t\trVal = new HashSet<Course>();\n\n\t\t\tfor (Connector e : network)\n\t\t\t{\n\t\t\t\tif (e.relationship == COURSE_LEARNER_RELATIONSHIP)\n\t\t\t\t{\n\t\t\t\t\tif (e.person.equals(learner))\n\t\t\t\t\t{\n\t\t\t\t\t\trVal.add(getCourse(e.courseCRN));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn rVal;\n\t}", "public TreeMap<String, Course> getCourses(String params) {\n\n StringBuffer json = new StringBuffer();\n ArrayList<Course> allCourses = new ArrayList<>();\n\n try {\n\n int i = 1;\n while (true) {\n if (params == null) {\n json.append(new JsonReader(\"http://api.umd.io/v0/courses?per_page=100&page=\" + i).readUrl());\n } else {\n json.append(new JsonReader(\"http://api.umd.io/v0/courses?per_page=100&page=\" + i + \"&\" + params).readUrl());\n }\n\n allCourses.addAll(new Gson().fromJson(json.toString().replace\n (\"][\", \",\"),\n new TypeToken<ArrayList<Course>>(){}.getType()));\n\n if (allCourses.size() % 100 == 0) {\n i++;\n continue;\n } else {\n break;\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n TreeMap<String, Course> genCourses = new TreeMap<>();\n\n for (Course c : allCourses) {\n genCourses.put(c.getCourseId(), c);\n }\n\n return genCourses;\n }", "private void listCourses() {\n Call<List<Course>> callListCourses = mService.listCourses(new HashMap<String, String>() {{\n put(\"wstoken\", mToken);\n put(\"wsfunction\", \"core_course_get_courses\");\n put(\"moodlewsrestformat\", \"json\");\n }});\n callListCourses.enqueue(new Callback<List<Course>>() {\n @Override\n public void onResponse(Call<List<Course>> call, Response<List<Course>> response) {\n List<Course> courses = response.body();\n mCourseAdapter.updateCourses(courses);\n }\n\n @Override\n public void onFailure(Call<List<Course>> call, Throwable t) {\n Log.e(\"ListCourses\", t.getMessage());\n }\n });\n }", "public List<CMCourse> getCMCourses(String startsWith) {\r\n\tlong start = System.currentTimeMillis();\r\n\tlog.debug(\"getCMCourses that starts with \" + startsWith);\r\n\tList<CMCourse> cmCourses = new ArrayList<CMCourse>();\r\n\tSet<CourseSet> courseSets = courseManagementService.getCourseSets();\r\n\tSet<CourseOffering> courseOffs = null;\r\n\tSet<Section> sections = null;\r\n\tCourseSet courseSet = null;\r\n\tCourseOffering courseOff = null;\r\n\tString courseOffEid = null;\r\n\tSection courseS = null;\r\n\tif (courseSets == null)\r\n\t return null;\r\n\tList<AcademicSession> acadSessions =\r\n\t\tcourseManagementService.getCurrentAcademicSessions();\r\n\tDate endDate = null;\r\n\tDate startDate = null;\r\n\r\n\tfor (AcademicSession acadSession : acadSessions) {\r\n\r\n\t for (Iterator<CourseSet> cSets = courseSets.iterator(); cSets\r\n\t\t .hasNext();) {\r\n\t\tcourseSet = cSets.next();\r\n\t\tcourseOffs =\r\n\t\t\tcourseManagementService.findCourseOfferings(\r\n\t\t\t\tcourseSet.getEid(), acadSession.getEid());\r\n\t\tfor (Iterator<CourseOffering> cOffs = courseOffs.iterator(); cOffs\r\n\t\t\t.hasNext();) {\r\n\t\t courseOff = cOffs.next();\r\n\t\t courseOffEid = courseOff.getEid();\r\n\t\t sections =\r\n\t\t\t courseManagementService.getSections(courseOffEid);\r\n\t\t if (courseOffEid.startsWith(startsWith)) {\r\n\t\t\tfor (Iterator<Section> cSs = sections.iterator(); cSs\r\n\t\t\t\t.hasNext();) {\r\n\t\t\t courseS = cSs.next();\r\n\t\t\t String courseTitle =\r\n\t\t\t\t courseManagementService.getCanonicalCourse(\r\n\t\t\t\t\t courseOff.getCanonicalCourseEid())\r\n\t\t\t\t\t .getTitle();\r\n\t\t\t String courseSId = courseS.getEid();\r\n\t\t\t String session =\r\n\t\t\t\t courseOff.getAcademicSession().getTitle();\r\n\t\t\t String sigle = courseOff.getCanonicalCourseEid();\r\n\t\t\t String section =\r\n\t\t\t\t (SHARABLE_SECTION.equals(courseSId\r\n\t\t\t\t\t .substring(courseSId.length() - 2,\r\n\t\t\t\t\t\t courseSId.length()))) ? SHARABLE_SECTION\r\n\t\t\t\t\t : courseSId.substring(\r\n\t\t\t\t\t\t courseSId.length() - 3,\r\n\t\t\t\t\t\t courseSId.length());\r\n\r\n\t\t\t String instructorsString = \"\";\r\n\t\t\t int studentNumber = -1;\r\n\t\t\t EnrollmentSet enrollmentSet =\r\n\t\t\t\t courseS.getEnrollmentSet();\r\n\t\t\t if (enrollmentSet != null) {\r\n\t\t\t\t// Retrieve official instructors\r\n\t\t\t\tSet<String> instructors =\r\n\t\t\t\t\tenrollmentSet.getOfficialInstructors();\r\n\t\t\t\tUser user = null;\r\n\t\t\t\tString name = null;\r\n\t\t\t\tfor (String instructor : instructors) {\r\n\t\t\t\t try {\r\n\t\t\t\t\tuser =\r\n\t\t\t\t\t\tuserDirectoryService\r\n\t\t\t\t\t\t\t.getUserByEid(instructor);\r\n\t\t\t\t\tname = user.getDisplayName();\r\n\t\t\t\t\tinstructorsString += name + \" & \";\r\n\t\t\t\t } catch (UserNotDefinedException e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t }\r\n\t\t\t\t}\r\n\t\t\t\t// retrieve student number\r\n\t\t\t\tSet<Enrollment> enrollments =\r\n\t\t\t\t\tcourseManagementService\r\n\t\t\t\t\t\t.getEnrollments(enrollmentSet\r\n\t\t\t\t\t\t\t.getEid());\r\n\t\t\t\tif (enrollments != null)\r\n\t\t\t\t studentNumber = enrollments.size();\r\n\t\t\t }\r\n\t\t\t if (!instructorsString.equals(\"\"))\r\n\t\t\t\tinstructorsString =\r\n\t\t\t\t\tinstructorsString.substring(0,\r\n\t\t\t\t\t\tinstructorsString.length() - 3);\r\n\r\n\t\t\t CMCourse cmCourse = new CMCourse();\r\n\t\t\t cmCourse.setId(courseS.getEid());\r\n\t\t\t cmCourse.setSession(session);\r\n\t\t\t cmCourse.setName(courseTitle);\r\n\t\t\t cmCourse.setSigle(sigle);\r\n\t\t\t cmCourse.setSection(section);\r\n\t\t\t cmCourse.setInstructor(instructorsString);\r\n\t\t\t cmCourse.setStudentNumber(studentNumber);\r\n\t\t\t cmCourses.add(cmCourse);\r\n\t\t\t}\r\n\t\t }\r\n\t\t}\r\n\t }\r\n\t}\r\n\tlog.debug(\"getCMCourses \" + elapsed(start) + \" for \" + cmCourses.size()\r\n\t\t+ \" courses\");\r\n\treturn cmCourses;\r\n }", "@Override\n\t\t\tpublic int getCount() {\n\t\t\t\treturn course_list.size();\n\t\t\t}", "@Override\n\tpublic int countByG_L_C(long groupId, String language, boolean categorizable) {\n\t\tFinderPath finderPath = FINDER_PATH_COUNT_BY_G_L_C;\n\n\t\tObject[] finderArgs = new Object[] { groupId, language, categorizable };\n\n\t\tLong count = (Long)finderCache.getResult(finderPath, finderArgs, this);\n\n\t\tif (count == null) {\n\t\t\tStringBundler query = new StringBundler(4);\n\n\t\t\tquery.append(_SQL_COUNT_VCMSPORTION_WHERE);\n\n\t\t\tquery.append(_FINDER_COLUMN_G_L_C_GROUPID_2);\n\n\t\t\tboolean bindLanguage = false;\n\n\t\t\tif (language == null) {\n\t\t\t\tquery.append(_FINDER_COLUMN_G_L_C_LANGUAGE_1);\n\t\t\t}\n\t\t\telse if (language.equals(StringPool.BLANK)) {\n\t\t\t\tquery.append(_FINDER_COLUMN_G_L_C_LANGUAGE_3);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tbindLanguage = true;\n\n\t\t\t\tquery.append(_FINDER_COLUMN_G_L_C_LANGUAGE_2);\n\t\t\t}\n\n\t\t\tquery.append(_FINDER_COLUMN_G_L_C_CATEGORIZABLE_2);\n\n\t\t\tString sql = query.toString();\n\n\t\t\tSession session = null;\n\n\t\t\ttry {\n\t\t\t\tsession = openSession();\n\n\t\t\t\tQuery q = session.createQuery(sql);\n\n\t\t\t\tQueryPos qPos = QueryPos.getInstance(q);\n\n\t\t\t\tqPos.add(groupId);\n\n\t\t\t\tif (bindLanguage) {\n\t\t\t\t\tqPos.add(language);\n\t\t\t\t}\n\n\t\t\t\tqPos.add(categorizable);\n\n\t\t\t\tcount = (Long)q.uniqueResult();\n\n\t\t\t\tfinderCache.putResult(finderPath, finderArgs, count);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tfinderCache.removeResult(finderPath, finderArgs);\n\n\t\t\t\tthrow processException(e);\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\tcloseSession(session);\n\t\t\t}\n\t\t}\n\n\t\treturn count.intValue();\n\t}", "public ArrayList getCourses();", "protected abstract void calcScores();", "@GET\n \tpublic Response listCourses() throws JsonProcessingException {\n \t\tList<Course> courses = ofy().load().type(Course.class).list();\n \t\t\n \t\t// convert to json\n \t\tString json = new ObjectMapper().writeValueAsString(courses);\n \t\treturn Response.ok(Utils.JsonPad + json).build();\n \t}", "@Override\n public ResultSet getCourses(String year, String season) throws SQLException {\n StringBuilder statement = new StringBuilder(75);\n int count = 0;\n statement.append(\"SELECT DISTINCT name FROM (\\n\");\n if (year != null && !year.isEmpty()) {\n count++;\n statement.append(\"SELECT * FROM course WHERE term_id IN (SELECT id FROM term WHERE year = ?)\");\n }\n if (season != null && !season.isEmpty()) {\n count++;\n if (statement.length() > 16) {\n statement.append(\"\\nUNION ALL\\n\");\n }\n statement.append(\"SELECT * FROM course WHERE term_id IN (SELECT id FROM term WHERE season = ?)\");\n }\n statement.append(\"\\n) AS course GROUP BY id HAVING count(*) = \").append(count).append(\";\");\n if (count == 0) {\n statement.setLength(0);\n statement.append(\"SELECT DISTINCT name FROM course\");\n }\n //System.out.println(statement.toString());\n PreparedStatement pstmt = connection.prepareStatement(statement.toString());\n int i = 1;\n if (year != null && !year.isEmpty()) {\n pstmt.setInt(i++, Integer.parseInt(year));\n }\n if (season != null && !season.isEmpty()) {\n pstmt.setString(i, season);\n }\n return pstmt.executeQuery();\n }", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic List<Course> getAllCourse() {\n\t\treturn (List<Course>) sessionFactory.getCurrentSession().createCriteria(Course.class).list();\n\t}", "public void setCourselist(Department dept,int grade,int cClass) {\n\t\tthis.courseList.clear();\n\t\tString sql = \"select T.courseID,C.name,C.type from teacher_course AS T,course as C where C.id=T.courseID\" + \n\t\t\t\t\" and departmentId=\" + dept.getId() + \" and teacherID=\" + teacher.getId() +\n\t\t\t\t \" and grade=\" + grade +\" and class=\" + cClass + \" group by CourseID\";\n\t\tResultSet rs = this.db.getRs(sql) ;\n\t\ttry {\n\t\t\twhile(rs.next()) {\n\t\t\t\tCourse course = new Course(rs.getInt(1),rs.getString(2),rs.getString(3)) ;\n\t\t\t\tthis.courseList.add(new CourseTreeNode(course)) ;\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\t\n\t\tfor(Course course : coursesList) {\n\t\t\tif(course.getType().equals(ctype))\n\t\t\t\tthis.courseList.add(new CourseTreeNode(course));\n\t\t}\n*/\n\t}", "@RequestMapping(value = \"/staff/compulsorycourseslist/{id}\")\n\tpublic ModelAndView listCompulsoryCourses(@PathVariable(\"id\") Long majorID,\t@RequestParam(required = false) Integer page, \n\t\t\t@RequestParam(required = false) Integer pageSize, HttpSession session) {\n\t\t\n\t\tPagedListHolder<Course> resultList = (PagedListHolder<Course>) session.getAttribute(\"StaffController_compulsoryCoursesList\");\n\t\t\n\t\tif ((page == null && pageSize == null) || resultList == null) {\t// first request (not page navigation) - get prerequisites from service\n\t\t\tpage = 0;\n\t\t\tresultList = new PagedListHolder<Course>(majorService.getAvailableCompulsoryCourses(majorID));\n\t\t\tsession.setAttribute(\"StaffController_compulsoryCoursesList\", resultList);\n\t\t\tif (pageSize == null) {\n\t\t\t\tpageSize = DEFAULT_PAGE_SIZE;\n\t\t\t}\n\t\t}\n\t\tif (page == null) {\n\t\t\tpage = 0;\n\t\t}\n\t\tresultList.setPage(page);\n\t\tif (pageSize != null) {\n\t\t\tresultList.setPageSize(pageSize);\n\t\t}\n\t\t\n\t\tModelAndView modelAndView = new ModelAndView(\"staff/courseselectlist\", \"resultList\", resultList);\n\t\tmodelAndView.addObject(\"majorID\", majorID);\n\t\tmodelAndView.addObject(\"actionType\", \"addCompulsoryCourses\");\n\t\t\n\t\treturn modelAndView;\n\t}", "public static void updateCourses(String termCode) throws Exception\r\n {\r\n if (isValidTermCode(termCode))\r\n {\r\n\r\n DatabaseHelper.open();\r\n\r\n subjects = (ArrayList<Subject>) Subject.selectAllSubjects(\"\", DatabaseHelper.getConnection());\r\n teachers = (ArrayList<Teacher>) Teacher.selectAllTeacher(\"\", DatabaseHelper.getConnection());\r\n courses = (ArrayList<Course>) Course.selectAllCourse(\"\", DatabaseHelper.getConnection());\r\n categories = (ArrayList<Category>) Category.selectAllCategory(\"\", DatabaseHelper.getConnection());\r\n\r\n if (teachers.size() > 0)\r\n {\r\n autoIncValTeach = teachers.get(teachers.size() - 1).getTeacherID();\r\n System.out.println(\"AUTO INC Teachers: \" + autoIncValTeach);\r\n }\r\n\r\n if (subjects.size() > 0)\r\n {\r\n autoIncValSub = subjects.get(subjects.size() - 1).getSubjectID();\r\n System.out.println(\"AUTO INC SUBJECTS: \" + autoIncValSub);\r\n }\r\n\r\n if (courses.size() > 0)\r\n {\r\n autoIncValCourse = courses.get(courses.size() - 1).getCourseID();\r\n }\r\n\r\n\r\n URL url = new URL(\"http://apps.hpu.edu/cis/web/index.php/search/search?term=\" + termCode);\r\n BufferedReader reader = new BufferedReader(new InputStreamReader(url.openStream()));\r\n\r\n String line;\r\n boolean concat = false;\r\n boolean read = false;\r\n\r\n\r\n String content = \"\";\r\n int count = 0;\r\n String lname = \"\", fname = \"\", abbrev = \"\";\r\n int level = 0;\r\n\r\n while ((line = reader.readLine()) != null)\r\n {\r\n\r\n if (line.contains(\"<td>\"))\r\n {\r\n concat = true;\r\n }\r\n if (line.contains(\"</td>\"))\r\n {\r\n content += line;\r\n concat = false;\r\n read = true;\r\n }\r\n if (concat)\r\n {\r\n content += line;\r\n }\r\n\r\n if (read)\r\n {\r\n String value = content.substring(content.indexOf(\">\") + 1, content.lastIndexOf(\"<\")).trim();\r\n\r\n read = false;\r\n content = \"\";\r\n count++;\r\n\r\n if (count % 5 == 2)\r\n {\r\n String[] values = value.split(\" \");\r\n abbrev = values[0].trim();\r\n level = Integer.parseInt(values[1].trim());\r\n }\r\n else if (count % 5 == 4)\r\n {\r\n String[] values = value.split(\" \");\r\n fname = values[0].trim();\r\n lname = values[1].trim();\r\n\r\n insertData(lname, fname, abbrev, level);\r\n }\r\n }\r\n }\r\n\r\n for (int s = 0; s < newsubjects.size(); s++)\r\n {\r\n DatabaseHelper.insert(Subject.getValues(newsubjects.get(s)), Subject.SubjectTable.getTable());\r\n }\r\n for (int s = 0; s < newteachers.size(); s++)\r\n {\r\n DatabaseHelper.insert(Teacher.getValues(newteachers.get(s)), Teacher.TeacherTable.getTable());\r\n }\r\n for (int s = 0; s < newcourses.size(); s++)\r\n {\r\n DatabaseHelper.insert(Course.getValues(newcourses.get(s)), Course.CourseTable.getTable());\r\n }\r\n\r\n DatabaseHelper.close();\r\n if (newsubjects.size() > 0 || newteachers.size() > 0 || newcourses.size() > 0)\r\n {\r\n JOptionPane.showMessageDialog(null, \"Term successfully imported\");\r\n }\r\n else\r\n {\r\n JOptionPane.showMessageDialog(null, \"Term courses/teachers/subjects are already in database\");\r\n }\r\n\r\n\r\n }\r\n else\r\n {\r\n JOptionPane.showMessageDialog(null, \"The term code entered is not valid! Or the web address has changed\");\r\n }\r\n }", "public void updateCourse(Course curs) throws SQLException, ClassNotFoundException {\r\n Iterable<Student> allStuds = students.findAll();\r\n List<Student> toUpdate = new ArrayList<>();\r\n Course before = courses.findOne(curs.getId());\r\n\r\n for(Student stud : allStuds){\r\n if(stud.getEnrolledCourses().contains(before)){\r\n //if the student was enrolled to the course in the first place\r\n if(stud.getTotalCredits() - before.getCredits() + curs.getCredits() > 30){\r\n //new course exceeds student max credits therefore must be removed\r\n //delete student from courses enrolled students list\r\n\r\n List<Student> newStudents = curs.getStudentsEnrolled();\r\n newStudents.remove(stud);\r\n curs.setStudentsEnrolled(newStudents);\r\n\r\n //delete course from student list + decrease credits\r\n\r\n List<Course> newCourses = stud.getEnrolledCourses();\r\n newCourses.remove(before);\r\n int newCredits = stud.getTotalCredits() - before.getCredits();\r\n\r\n stud.setTotalCredits(newCredits);\r\n stud.setEnrolledCourses(newCourses);\r\n toUpdate.add(stud);\r\n\r\n //remove the data from the enrolled table\r\n removeEnrolled(curs, stud);\r\n }\r\n else{\r\n //new course does not exceed max credits\r\n //modify student credits\r\n int newCredits = stud.getTotalCredits() - before.getCredits() + curs.getCredits();\r\n stud.setTotalCredits(newCredits);\r\n toUpdate.add(stud);\r\n }\r\n courses.update(curs);\r\n\r\n }\r\n }\r\n for(Student stud2: toUpdate){\r\n students.update(stud2);\r\n }\r\n }", "public List<Course> getTopNCourses(int N) throws CannotGetCoursesException{\n if(N < 1) return null;\n PriorityQueue<Course> topNCourses = new PriorityQueue<>(N,\n Comparator.comparingInt(Course::getLearnersCount));\n StepikResponse stepikResponse;\n int currentPage = 1;\n try {\n do {\n if(showProgress) System.out.println(\"Просмотр страницы #\" + currentPage);\n Call<StepikResponse> getCoursesCaller = stepikService.getCourses(currentPage);\n stepikResponse = getCoursesCaller.execute().body();\n if(stepikResponse == null){\n throw new CannotGetCoursesException(\"Response is null\");\n }\n if(stepikResponse.getCourses() == null){\n throw new CannotGetCoursesException(\"Response has not courses\");\n }\n for(Course course : stepikResponse.getCourses()){\n topNCourses.offer(course);\n if(topNCourses.size() > N){\n topNCourses.poll(); //removing course with less learners count\n }\n }\n currentPage++;\n } while(stepikResponse.getMeta() != null && stepikResponse.getMeta().isHasNext());\n }catch (IOException ioe){\n throw new CannotGetCoursesException(ioe.getMessage());\n }\n\n List<Course> courseList = new ArrayList<>(topNCourses);\n courseList.sort(Comparator.comparingInt(Course::getLearnersCount).reversed());\n\n return courseList;\n }", "@Override\n public ResultSet getCurrentAssignments(String type, String course, String section) throws SQLException {\n StringBuilder statement = new StringBuilder(100);\n int count = 1;\n statement.append(\"SELECT * FROM (\\n\");\n statement.append(\"SELECT * FROM assignment_catalog WHERE course_id IN (SELECT id FROM course WHERE term_id IN (SELECT id FROM term WHERE current = TRUE))\");\n if (type != null && !type.isEmpty()) {\n count++;\n statement.append(\"\\nUNION ALL\\n\");\n statement.append(\"SELECT * FROM assignment_catalog WHERE assignment_type_id IN (SELECT id FROM assignment_type WHERE name = ?)\");\n }\n if (course != null && !course.isEmpty()) {\n count++;\n statement.append(\"\\nUNION ALL\\n\");\n statement.append(\"SELECT * FROM assignment_catalog WHERE course_id IN (SELECT id FROM course WHERE name = ?)\");\n }\n if (section != null && !section.isEmpty()) {\n count++;\n statement.append(\"\\nUNION ALL\\n\");\n statement.append(\"SELECT * FROM assignment_catalog WHERE course_id IN (SELECT id FROM course WHERE section = ?)\");\n }\n statement.append(\"\\n) AS assignment_catalog GROUP BY id HAVING count(*) = \").append(count).append(\";\");\n if (count == 0) {\n statement.setLength(0);\n statement.append(\"SELECT * FROM assignment_catalog\");\n }\n //System.out.println(statement.toString());\n PreparedStatement pstmt = connection.prepareStatement(statement.toString());\n int i = 1;\n if (type != null && !type.isEmpty()) {\n pstmt.setString(i++, type);\n }\n if (course != null && !course.isEmpty()) {\n pstmt.setString(i++, course);\n }\n if (section != null && !section.isEmpty()) {\n pstmt.setInt(i++, Integer.parseInt(section));\n }\n //System.out.println(pstmt.toString());\n return pstmt.executeQuery();\n }", "int getCategoryId();", "public int Rank();", "public Vector<CourseSubject> getCourses() throws IOException{\n\n\t\tVector<CourseSubject> coursesVector = new Vector<CourseSubject>();\t\n\t\tString sourceLine = \"\";\n\t\tString content = \"\";\t\n\t\t\n\t\tInputStreamReader pageInput = new InputStreamReader(address.openStream());\n\t\tBufferedReader source = new BufferedReader(pageInput);\n\t\twhile( (sourceLine = source.readLine()) != null){\n\t\t\tcontent += sourceLine + \"\\n\";\n\t\t}\n\t\tPattern style = null;\n\t\tPattern p = null;\n\t\tString regex0 = \"\";\t\t// required for the split\n\t\tString regex1 = \"\";\t\t// required for the split\n\t\t\n\t\tswitch (flag) {\t// dependent on different schools\n \tcase 0:\n \t\tregex0 = \"<div class=\\\"ws-course-title\\\"><a href.*?>\";\n \t\tstyle = Pattern.compile(\"<div class=\\\"ws-course-title\\\"><a href.*?>.*?</a></div>\");\n \t\tp = Pattern.compile(\"<a href=\\\".*?skinId=2169\\\">\");\n \t\tregex1 = \"</a></div>\";\n \tbreak;\n }\n\t\t\n\n Matcher mstyle = style.matcher(content);\n String address = null;\n Matcher pstyle = null;\n if( p != null)\n \tpstyle = p.matcher(content);\n \n String tag = \"\";\n String[] str = null;\n // need to change counter for Stanford mstyle has more values then pstyle\n int counter = 0;\n boolean done = false;\n while (mstyle.find() ){\n \tdone = pstyle.find();\n \ttag = mstyle.group();\n \tstr = tag.split(regex0, 3);\n \tif(str.length != 1)\n \t\tstr = str[str.length-1].split(regex1, 3);\t\t// str[0] holds the name of the course\n \tCourseSubject courseSub = new CourseSubject(str[0], null);\t\t// no subclasses yet.\n \t\n \tif(flag == 3){\t\t// for berkeley\n \t\taddress = str[0].trim().replace(' ', '+');\n \t\taddress = cleanURL(address, flag);\n \t}\n \telse{\n \t\tif(flag == 2 && (counter < 9 || !done) )\t// done for stanford\n \t\t\taddress = \"http://www.fail.com\";\t// fail this will be removed in linkedcoursesApp\n \t\telse\n \t\t\taddress = pstyle.group();\n \t\taddress = cleanURL(address, flag);\n \t}\n \tcourseSub.setURL(new URL(address));\n \t\n \tcoursesVector.add(courseSub);\n \tcounter++;\n }\n \n\t\tpageInput.close();\n\t\tsource.close();\n\t\treturn coursesVector;\n\t}", "protected abstract boolean approvedForClass(Course c);", "public void gamemodeSetUp(ArrayList<Player> players, int numberOfQuestions, Categories categories){\n for (int i = 0; i < numberOfQuestions; i++) {\n String categoriesToAsk = categories.getRandomCategory();\n Question questionToBeAsked;\n System.out.format(\"The category is %s\\n\", categoriesToAsk);\n switch (categoriesToAsk) {\n case \"Math\":\n if (categories.getMathArray().isEmpty()){\n categories.initializeTheArrayWithMathQuestions();\n }\n questionToBeAsked = this.setUpQuestion(categories.getMathArray());\n gamemodePlay(players, questionToBeAsked);\n break;\n case \"General Knowledge\":\n if (categories.getGeneralKnowledgeArray().isEmpty()){\n categories.initializeTheArrayWithGeneralKnowledgeQuestions();\n }\n questionToBeAsked = this.setUpQuestion(categories.getGeneralKnowledgeArray());\n gamemodePlay(players, questionToBeAsked);\n break;\n case \"Science\":\n if (categories.getScienceArray().isEmpty()){\n categories.initializeTheArrayWithScienceQuestions();\n }\n questionToBeAsked = this.setUpQuestion(categories.getScienceArray());\n gamemodePlay(players, questionToBeAsked);\n break;\n case \"Movies\":\n if (categories.getMoviesArray().isEmpty()){\n categories.initializeTheArrayWithMoviesQuestions();\n }\n questionToBeAsked = this.setUpQuestion(categories.getMoviesArray());\n gamemodePlay(players, questionToBeAsked);\n break;\n }\n }\n scoreSumUp(players);\n }", "long getRank();", "@Override\n\tpublic List<Course> findAllCourses(String name) {\n\t\treturn cd.findAllCoursesByName(name);\n\t}", "public int calcPassedCourseNum(){\n int score = 0;\n \n score += course1.isPassed() ? 1 : 0;\n score += course2.isPassed() ? 1 : 0;\n score += course3.isPassed() ? 1 : 0;\n \n return score;\n }", "@GetMapping(\"/courses\")\r\n\tpublic List<Courses> getCourses() {\r\n\t\treturn this.cs.getCourses();\r\n\r\n\t}", "public List<Course> getCourses() {\n\t\tList<Course> courses = new ArrayList<Course>();\n\t\tfor (Registration reg : registrations) {\n\t\t\tcourses.add(reg.getIndex().getCourse());\n\t\t}\n\t\treturn courses;\n\t}", "public void rank(){\n\n\t}", "private static Map<String, List<List<String>>> getActualResults(Connection conn) {\n\t\tMap<String, List<List<String>>> courseResults = new HashMap<String, List<List<String>>>();\n\t\tString sqlQuery = \"SELECT name,score,course FROM results;\";\n\t\tResultSet rs = SQLManager.queryFromDB(conn, sqlQuery); \n\t\ttry {\n\t\t\tString course = \"\";\n\t\t\twhile (!rs.isAfterLast()) {\n\t\t\t\tList<String> resultRound = new ArrayList<String>();\n\t\t\t\tif (rs.isBeforeFirst()) {\n\t\t\t\t\trs.next();\n\t\t\t\t}\n\t\t\t\tint prevScore = Integer.MAX_VALUE;\n\t\t\t\tcourse = rs.getString(3);\n\t\t\t\twhile (!rs.isAfterLast() && rs.getInt(2) < prevScore) {\n\t\t\t\t\tresultRound.add(rs.getString(1));\n\t\t\t\t\tprevScore = rs.getInt(2);\n\t\t\t\t\trs.next();\n\t\t\t\t}\n\t\t\t\tupdateCourseResults(courseResults, course, resultRound);\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn courseResults;\n\t}", "void addTestTermsAndCourses() {\n // Creates Terms\n addTerm(\"Term 1\", \"5/19/2019\", \"6/23/2019\");\n addTerm(\"Term 2\", \"5/19/2019\", \"6/23/2019\");\n addTerm(\"Term 3\", \"5/19/2019\", \"6/23/2019\");\n addTerm(\"Term 4\", \"5/19/2019\", \"6/23/2019\");\n addTerm(\"Term 5\", \"5/19/2019\", \"6/23/2019\");\n addTerm(\"Term 6\", \"5/19/2019\", \"6/23/2019\");\n addTerm(\"Term 7\", \"5/19/2019\", \"6/23/2019\");\n addTerm(\"Term 8\", \"5/19/2019\", \"6/23/2019\");\n addTerm(\"Term 9\", \"5/19/2019\", \"6/23/2019\");\n addTerm(\"Term 10\", \"5/19/2019\", \"6/23/2019\");\n addTerm(\"Term 11\", \"5/19/2019\", \"6/23/2019\");\n addTerm(\"Term 12\", \"5/19/2019\", \"6/23/2019\");\n int term1Id = getTermIdFromIndex(0);\n int term2Id = getTermIdFromIndex(1);\n// int term3Id = getTermIdFromIndex(2);\n\n // Creates Courses\n addCourse(\"course 1\", \"5/29/2019\", \"5/29/19\",\n \"Working On\", \"Dr. Phil\", \"80183834433\",\n \"[email protected]\", \"TESTING OPTIONAL NOTE\", term1Id);\n addCourse(\"course 2\", \"5/29/2019\", \"5/29/19\",\n \"Working On\", \"Dr. Phil\", \"80183834433\",\n \"[email protected]\", \"TESTING OPTIONAL NOTE\", term1Id);\n addCourse(\"course 3\", \"5/29/2019\", \"5/29/19\",\n \"Working On\", \"Dr. Phil\", \"80183834433\",\n \"[email protected]\", \"TESTING OPTIONAL NOTE\", term2Id);\n addCourse(\"course 4\", \"5/29/2019\", \"5/29/19\",\n \"Working On\", \"Dr. Phil\", \"80183834433\",\n \"[email protected]\", \"TESTING OPTIONAL NOTE\", term1Id);\n addCourse(\"course 5\", \"5/29/2019\", \"5/29/19\",\n \"Working On\", \"Dr. Phil\", \"80183834433\",\n \"[email protected]\", \"TESTING OPTIONAL NOTE\", term1Id);\n addCourse(\"course 6\", \"5/29/2019\", \"5/29/19\",\n \"Working On\", \"Dr. Phil\", \"80183834433\",\n \"[email protected]\", \"TESTING OPTIONAL NOTE\", term2Id);\n int course1Id = getCourseIdFromIndex(0);\n int course2Id = getCourseIdFromIndex(1);\n\n // Creates Assignments\n addAssignment(\"Assignment 1\", \"this shit is whack\", \"5/29/2019\", course1Id);\n addAssignment(\"Assignment 2\", \"this shit is whack\", \"5/29/2019\", course2Id);\n addAssignment(\"Assignment 3\", \"this shit is whack\", \"5/29/2019\", course2Id);\n addAssignment(\"Assignment 4\", \"this shit is whack\", \"5/29/2019\", course2Id);\n addAssignment(\"Assignment 5\", \"this shit is whack\", \"5/29/2019\", course1Id);\n addAssignment(\"Assignment 6\", \"this shit is whack\", \"5/29/2019\", null);\n addAssignment(\"Assignment 7\", \"this shit is whack\", \"5/29/2019\", course1Id);\n addAssignment(\"Assignment 8\", \"this shit is whack\", \"5/29/2019\", course2Id);\n addAssignment(\"Assignment 9\", \"this shit is whack\", \"5/29/2019\", course2Id);\n addAssignment(\"Assignment 10\", \"this shit is whack\", \"5/29/2019\", course2Id);\n addAssignment(\"Assignment 11\", \"this shit is whack\", \"5/29/2019\", course1Id);\n addAssignment(\"Assignment 12\", \"this shit is whack\", \"5/29/2019\", null);\n }", "public int getNumCategories(){\n\n return numCategories;\n }", "private void playGame() {\n\t\tcategoryChosenChecker = new boolean[nPlayers + 1][N_CATEGORIES];\n\t\t// next one is for upper score.\n\t\tupperScore = new int[nPlayers + 1];\n\t\t// for lower score.\n\t\tlowerScore = new int[nPlayers + 1];\n\t\t// and finally, for total score.\n\t\ttotalScore = new int[nPlayers + 1];\n\t\t// here we have for loop, because we want our game to go for\n\t\t// N_SCORING_CATEGORIES times.\n\t\tfor (int i = 0; i < N_SCORING_CATEGORIES; i++) {\n\t\t\t// and here is another for loop, because each player should roll the\n\t\t\t// dice.\n\t\t\tfor (int j = 1; j <= nPlayers; j++) {\n\t\t\t\t// first roll.\n\t\t\t\tfirstRoll(j);\n\t\t\t\t// and the last for loop, because second and third rolls are\n\t\t\t\t// similar and can be written in one method and we want this\n\t\t\t\t// method to happen 2 times.\n\t\t\t\tfor (int k = 1; k <= 2; k++) {\n\t\t\t\t\t// second and third rolls.\n\t\t\t\t\totherRolls();\n\t\t\t\t}\n\t\t\t\t// after rolls, player will choose category.\n\t\t\t\tcategory(j);\n\t\t\t}\n\t\t}\n\t\t// when the game ends program will tell who is the winner.\n\t\twhoIsTheWinner();\n\t}", "Main(int citizens)\n {\n\n this.citizens = citizens;\n rank = new int[citizens];\n id = new int[citizens];\n for (int i = 0; i < citizens; i++){\n\n rank[i] = 1;\n id[i] = i;\n }\n }", "private void viewCourses() {\n Iterable<Course> courses = ctrl.getCourseRepo().findAll();\n courses.forEach(System.out::println);\n }", "public ConScores getConScores() {\n\t\tint inheritedLevel = getLevel(subNetGenes, globalLevelFile,\n\t\t\t\tinheritedLocalLevelFile);\n\t\t// Now we can calculate the zscores on that inheritedLocalLevelFile.\n\n\t\tZScore zscoreInherited = new ZScore(subNetFile,\n\t\t\t\tinheritedLocalLevelFile, penaltyType);\n\t\tScores scoreInherited = zscoreInherited.getZScore(totalGraphs,\n\t\t\t\tpenaltyType);\n\n\t\t/* local the global level */\n\t\tHPNUlilities.createLevelFile(codePath, subNetFile, inheritedLevel,\n\t\t\t\tcalculateLocalLevelFile, penaltyType, partitionSize);\n\n\t\t/* get the global ZScore and penalty */\n\n\t\tZScore zscoreCalculated = new ZScore(subNetFile,\n\t\t\t\tcalculateLocalLevelFile, penaltyType);\n\t\tScores scoreCalculated = zscoreCalculated.getZScore(totalGraphs,\n\t\t\t\tpenaltyType);\n\n\t\tPrintWriter out = null;\n\t\ttry {\n\t\t\tout = new PrintWriter(new FileWriter(outFile));\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\tConScores score = new ConScores(scoreInherited.getZScore(),\n\t\t\t\tscoreInherited.getPenalty(), scoreCalculated.getZScore(),\n\t\t\t\tscoreCalculated.getPenalty());\n\n\t\tout.println(\"zScoreInherited: \" + score.zScoreInherited\n\t\t\t\t+ \" penaltyInherited: \" + score.penaltyInherited\n\t\t\t\t+ \" zScorecalculated: \" + score.zScorecalculated\n\t\t\t\t+ \" penaltyCalculated: \" + score.penaltyCalculated);\n\n\t\tout.close();\n\n\t\treturn score;\n\n\t}", "public Collection<? extends Course> findAll() {\n\t\treturn crepo.findAll();\r\n\t}", "public void addToAllCourses(Course c) {\n allCourses.add(c);\n }", "private int _AssignGraduateCourse(int indexInFaculty) {\n //NOTE: this line, although overriden by the next one, is deliberately kept\n // to guarantee identical random number generation to the previous version.\n int pos = _getRandomFromRange(0, remainingGradCourses_.size() - 1);\n pos = 0; //fetch courses in sequence\n\n CourseInfo course = new CourseInfo();\n course.indexInFaculty = indexInFaculty;\n course.globalIndex = ( (Integer) remainingGradCourses_.get(pos)).intValue();\n gradCourses_.add(course);\n\n remainingGradCourses_.remove(pos);\n\n return course.globalIndex;\n }", "private static void displayAvailableCourses(Student currentStudent,ArrayList<Course> courses){\n\t\tCollections.sort(courses, new courseCompare());\n\t\tArrayList<CourseOffering> offeringNum = new ArrayList<CourseOffering>();\n\t\tint i = 0;\n\n\t\t// Loop through all the courses and print them\n\t\tfor(Course course : courses) {\n\t\t\tSystem.out.println(course.toString());\n\n\t\t\t// If a course has available offerings display them\n\t\t\tfor(CourseOffering offering : course.getCourseOfferings()) {\n\t\t\t\t// if the current student is not enrolled, then display the offering\n\t\t\t\tif(!offering.isStudentEnrolled(currentStudent) && !offering.isStudentWaitlisted(currentStudent)) {\n\t\t\t\t\tSystem.out.print(\"\\t\"+(i+1) + \": \");\n\t\t\t\t\t// Display if they are enrolling vs. adding to waitlist\n\t\t\t\t\tif(offering.getEnrolledStudents().size() < offering.getMaxStudents())\n\t\t\t\t\t\tSystem.out.print(\"Add->\");\n\t\t\t\t\telse\n\t\t\t\t\t\tSystem.out.print(\"Waitlist->\");\n\t\t\t\t\tSystem.out.println(offering.toString());\n\t\t\t\t\tofferingNum.add(i, offering);\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Check to see if there are no available courses\n\t\tif(offeringNum.size() == 0) {\n\t\t\tSystem.out.println(\"No available courses.\");\n\t\t\treturn; \n\t\t}\n\n\t\t// Prompt the user for their selection\n\t\tSystem.out.println(\"Enter the number of the course offering you would like to add\");\n\t\tSystem.out.print(\"or enter zero to return to main menu: \");\n\t\tString selection = input.nextLine();\n\t\ttry{\n\t\t\tint optionNum = Integer.parseInt(selection);\n\t\t\tif(optionNum > 0 && optionNum <= i){\n\t\t\t\tofferingNum.get(optionNum-1).enrollStudent(currentStudent);\n\t\t\t} \n\t\t}\n\t\tcatch (NumberFormatException e) {\n\t\t\tSystem.out.println(\"Invalid selection. Returning to main menu.\");\n\t\t}\n\t}", "public void setCategoryScores(entity.ReviewSummaryCategoryScore[] value);", "List<TrainingsCategory> getAllTrainingstype() throws PersistenceException;", "public void returnCourse(int courseIndex) {\n\t\tswitch (courseIndex) {\n\n\t\tcase 1:\n\t\t\tcourseA++;\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tcourseB++;\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tcourseC++;\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tcourseD++;\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tcourseE++;\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\tcourseF++;\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\tcourseG++;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\n\t\t}\n\n\t}", "private void retrieveStudentsEnrolledForACourse() {\n Scanner sc = new Scanner(System.in);\n Course c;\n while (true) {//Der Kursname sollte existieren\n System.out.print(\"Course ID: \");\n Long id = Long.parseLong(sc.next());\n c = ctrl.getCourse(id);\n if (c == null)\n System.out.println(\"Course with this ID doesn't exist! Please try again!\");\n else\n break;\n }\n\n //Wir rufen die eingeschriebenen Studenten Funktion von dem Controller\n System.out.println(\"Students enrolled for the course: \");\n ctrl.retrieveStudentsEnrolledForACourse(c);\n }", "private void updateRanking(boolean byTime, char[] allTyreTypes)\n {\n if(byTime) // if required to sort by time\n {\n getDrivers().adjustDriversListByTime(allTyreTypes);\n }\n else // if required to sort by championship score\n {\n getDrivers().sortByScore();\n }\n for(int i = 0 ; i < getDrivers().getSize() ; i++)\n {\n getDrivers().getDriver(i).setRanking(i + 1); // update ranking\n }\n }", "public ArrayList<CollegeFootballTeam> rankTeams();", "public int score() {\n int sum = 0;\n for (Candidate c : chosen) {\n sum += c.score(compatibilityScoreSet);\n }\n return sum;\n }", "@Override\npublic ArrayList<String> courses() {\n\tArrayList<String> studentCourses = new ArrayList<String>();\n\tstudentCourses.add(\"CMPE - 273\");\n\tstudentCourses.add(\"CMPE - 206\");\n\tstudentCourses.add(\"CMPE - 277\");\n\tSystem.out.println(this.name+\" has take these courses\");\n\tfor(int i = 0 ; i < studentCourses.size() ; i++){\n\t\tSystem.out.println( studentCourses.get(i));\n\t}\n\treturn null;\n}", "public static void main(String[] args) {\n\t\tint numCourses = 5;\n\t\tint[][] prerequisites = {\n\t\t\t\t{0,1},\n\t\t\t\t{2,4},\n\t\t\t\t{3,4},\n\t\t\t\t{1,3},\n\t\t\t\t{2,3}\n\t\t\t};\n\t\t\n\t\tint res[] = findOrder(numCourses, prerequisites);\n\t\t\n\t\tfor(int val: res)\n\t\t\tSystem.out.print(\" \" + val);\n\t\t\n\t}", "public int getRank();", "public int getRank();", "private static void displayEnrolledCourses(Student currentStudent,ArrayList<Course> courses){\n\t\tCollections.sort(courses, new courseCompare());\n\t\tArrayList<CourseOffering> offeringNum = new ArrayList<CourseOffering>();\n\t\tint i = 0;\n\n\t\t// Loop through the enrolled courses\n\t\tfor(Course course : courses) {\n\t\t\tfor(CourseOffering offering : course.getCourseOfferings()) {\n\t\t\t\tif(offering.isStudentEnrolled(currentStudent) || offering.isStudentWaitlisted(currentStudent)){\n\t\t\t\t\tSystem.out.println(course.toString());\n\t\t\t\t\tSystem.out.print(\"\\t\" + (i+1) + \": \");\n\t\t\t\t\t// Display if they are dropping vs. removing from waitlist\n\t\t\t\t\tif(offering.isStudentEnrolled(currentStudent))\n\t\t\t\t\t\tSystem.out.print(\"Drop->\");\n\t\t\t\t\telse\n\t\t\t\t\t\tSystem.out.print(\"Remove from waitlist->\");\n\t\t\t\t\tSystem.out.println(offering.toString());\n\t\t\t\t\tofferingNum.add(i, offering);\n\t\t\t\t\ti++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Check to see if the list of courses is empty\n\t\tif(offeringNum.size() == 0){\n\t\t\tSystem.out.println(\"No enrolled or waitlisted courses.\");\n\t\t\treturn;\n\t\t}\n\n\t\t// Prompt the user for their selection\n\t\tSystem.out.println(\"Enter the number of the course offering you would like to drop\");\n\t\tSystem.out.print(\"or enter zero to return to main menu: \");\n\t\tString selection = input.nextLine();\n\t\ttry {\n\t\t\tint optionNum = Integer.parseInt(selection);\n\t\t\tif(optionNum > 0 && optionNum <= i){\n\t\t\t\tofferingNum.get(optionNum-1).dropStudent(currentStudent);\n\t\t\t}\n\t\t} catch (NumberFormatException e) {\n\t\t\tSystem.out.println(\"Invalid selection. Returning to main menu.\");\n\t\t}\n\n\t}", "public int[] get_ranking() {\n\t\treturn null;\r\n\t}", "ScoreManager createScoreManager();", "public java.util.List<com.ms3.training.services.model.Course> findAll()\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "Category(int num) {\n this.num = num;\n }", "@GetMapping(\"/showAllCourses\")\n\tpublic List<Courses> allcourses() throws CoursesNotFoundException {\n\t\ttry {\n\t\t\treturn courseService.allCourse();\n\t\t} catch (CoursesNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tthrow new CoursesNotFoundException(\"No courses\");\n\t\t}\n\t}", "@Override\n\tpublic int UpdateCategoryScore(String parVisitorId, String parCategoryName) {\n\t\tint mStatus = mGameCategoryScoreDao.UpdateCategoryScore(parVisitorId, parCategoryName);\n\t\treturn mStatus;\n\t}", "public List<Course> findByTopicId(int topicId);", "@GET @Path(\"/assignments\")\n\tpublic Response listCourseHomework(@PathParam(\"courseId\") Long courseId) throws JsonProcessingException {\n\t\tCourse course = ofy().load().type(Course.class).id(courseId).now();\n\t\t\n\t\tList<Assignment> assignments = ofy().load().type(Assignment.class).ancestor(course).list();\n\t\t\n\t\t// convert to json\n\t\tString json = new ObjectMapper().writeValueAsString(courses);\n\t\treturn Response.ok(Utils.JsonPad + json).build();\n\t}", "public static ArrayList<Course> getAll() {\n return courses;\n }", "private void obtainCourseSafely() {\n System.out.println(\"What is the name of the Course you wish to add (eg. CPSC 210)\");\n String name = scanner.nextLine();\n\n System.out.println(\"How many Sub-Classes does this have? (eg. CPSC 210 201 and CPSC 210 202 would mean 2)\");\n subClassNames = getNames(obtainIntSafely(1, 999, \"Enter int > 0\"), \"Class\");\n subClassTimes = getTimes(name, subClassNames);\n\n boolean response1 = yesNoQuestion(\"Does this class have a separate lab component?\");\n if (response1) {\n System.out.println(\"How many Labs does this have?\");\n labNames = getNames(obtainIntSafely(1, 999, \"Enter int > 0\"), \"Lab\");\n labTimes = getTimes(name, labNames);\n }\n\n boolean response2 = yesNoQuestion(\"Does this class have a separate tutorial component?\");\n if (response2) {\n System.out.println(\"How many Tutorials does this have?\");\n tutorialNames = getNames(obtainIntSafely(1, 999, \"Enter int > 0\"), \"Tutorial\");\n tutorialTimes = getTimes(name, tutorialNames);\n }\n\n if (response1 || response2) {\n activeCourseList.add(new Course(name, subClassNames, subClassTimes, response1, labNames, labTimes,\n response2, tutorialNames, tutorialTimes));\n } else {\n activeCourseList.add(new Course(name, subClassNames, subClassTimes));\n }\n }" ]
[ "0.60274416", "0.5525151", "0.5355004", "0.53278834", "0.52902013", "0.5245836", "0.5165962", "0.5119808", "0.50949526", "0.5090696", "0.50482726", "0.5044352", "0.49528036", "0.4908258", "0.48873043", "0.48860174", "0.48727712", "0.48430642", "0.4840326", "0.48357394", "0.48249546", "0.48227447", "0.48183268", "0.4812105", "0.47947225", "0.47820324", "0.47680613", "0.4747551", "0.4735321", "0.4711269", "0.47052774", "0.47033074", "0.469904", "0.4694258", "0.46931344", "0.4684687", "0.46764758", "0.46715936", "0.4668976", "0.46673042", "0.46550772", "0.46471572", "0.46460548", "0.4632204", "0.46080855", "0.4599552", "0.4573552", "0.45625106", "0.45478952", "0.45463714", "0.45441458", "0.4543448", "0.45400998", "0.45396438", "0.45333707", "0.4532397", "0.45322898", "0.4517851", "0.4515195", "0.4509049", "0.45013836", "0.44859478", "0.44846016", "0.44832712", "0.44710717", "0.44706407", "0.44665113", "0.44637522", "0.4462915", "0.44543836", "0.44456154", "0.44442114", "0.4439122", "0.44374663", "0.44340107", "0.4429105", "0.44290543", "0.44289345", "0.4425792", "0.4425101", "0.44223318", "0.441236", "0.4411354", "0.4408397", "0.44020993", "0.43929324", "0.4389745", "0.4389576", "0.4389576", "0.43893057", "0.43877482", "0.43869966", "0.43854284", "0.43851662", "0.4380835", "0.43769282", "0.4375981", "0.4374481", "0.4369502", "0.4368921" ]
0.7122095
0
Generates all universities from stored csv file of university data.
private static void generateUnis() { String[] lines = readFile("resources/unidata.csv"); int numOfUnis = lines.length + 1; for (String line : lines) { String[] attributes = line.split(","); University temp = new University(); temp.name = attributes[0]; temp.type = attributes[1]; temp.isRussellGroup = Boolean.parseBoolean(attributes[2]); temp.studentSatisfaction = Double.parseDouble(attributes[3]); temp.nationwideRanking = numOfUnis - Integer.parseInt(attributes[4]); temp.costOfLiving = Double.parseDouble(attributes[5]); temp.studentFacultyRatio = Double.parseDouble(attributes[6]); temp.researchOutput = (int) Double.parseDouble(attributes[7]); // THIS LINE IS INCORRECT temp.internationalStudentsRatio = Double.parseDouble(attributes[8]); temp.graduateProspects = Double.parseDouble(attributes[9]); /* * Structure of CSV file containing general university data: NAME, TYPE (City or * Campus), RUSSELL GROUP, STUDENT SATISFACTION, NATIONWIDE RANKING (Overall), * COST OF LIVING (According to appropriate cost of living index), STUDENT * FACULTY RATIO, RESEARCH OUTPUT, INTERNATIONAL STUDENT RATIO and GRADUATE * PROSPECTS (How many graduates in full-time employment or education after an * appropriate period). */ unis.put(temp.name, temp); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void getUniversities() {\n ProgressDialog dialog = new ProgressDialog(this, \"Caricamento...\");\n application.databaseCall(\"universities.php\", UNIVERSITY_SELECTION_TAG, dialog);\n }", "@Override\n\tpublic List<UniversityDTO> getUniversities() throws DatabaseException {\n\t\t\n\t\t con =DbUtil.getConnection();\n\t\t\n\t\t srdao=new StudentRegistrationValidationDaoimpl();\n\t\t\n\t\tList<UniversityDTO> list=srdao.getUniversities(con);\n\t\treturn list;\n\t}", "public List<Utilisateur> generateData() throws FileNotFoundException, IOException {\n Reader reader = new FileReader(\"F:\\\\Bibliothèques\\\\Documents\\\\MIAGE M1\\\\WEB\\\\TPWeb\\\\src\\\\main\\\\webapp\\\\data.csv\");\n\n CSVReader<Utilisateur> csvPersonReader = new CSVReaderBuilder<Utilisateur>(reader).entryParser(new UtilisateurEntryParser()).build();\n\n List<Utilisateur> persons = csvPersonReader.readAll();\n\n return persons;\n\n }", "public void university(){\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(\"Registry:\");\n\t\tString registry = reader.nextLine();\n\t\tSystem.out.println(\"Number of years accredited:\");\n\t\tint accreditedYears = reader.nextInt();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Rector name:\");\n\t\tString rectorName = reader.nextLine();\n\t\tSystem.out.println(\"Number of students in stratum 1 and 2:\");\n\t\tint studentsStratum = reader.nextInt();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Number of students:\");\n\t\tint students = reader.nextInt();\n\t\treader.nextLine();\n\t\tSystem.out.println(\"Position in the saberPro test:\");\n\t\tint nationalPositionPro = reader.nextInt();\n\t\treader.nextLine();\n\t\tUniversity toAdd = new University(nameRegistered, nit, address, contactNumber, employees, value, legalRepresentative, constitution, rows, type, registry, accreditedYears, rectorName, studentsStratum, students, nationalPositionPro);\n\t\ttheHolding.addSubordinate(toAdd);\n\t\tSystem.out.println(\"The company were added successfuly\");\n\t}", "@Override\n\tpublic void executeParser() {\n\t\tString filepath = (!filePath.isEmpty() && !filePath.equals(null)) ? filePath : \"faculty.csv\";\n\n\t\tList<String> linesFromFile = loadLinesFromFile(filepath);\n\t\t// Convert the list to an Array of Strings.\n\t\tString[] lines = linesFromFile.toArray(new String[0]);\n\t\tList<AuthorAffiliation> authorAffiliationList = new ArrayList<AuthorAffiliation>();\n\n\t\tfor (int i = 1; i < lines.length; i++) {\n\t\t\tString[] nameAffiliation = lines[i].split(\",\");\n\n\t\t\tif (nameAffiliation.length == 2) {\n\t\t\t\tAuthorAffiliation authorAffiliation = new AuthorAffiliation();\n\t\t\t\tauthorAffiliation.setName(nameAffiliation[0]);\n\t\t\t\tauthorAffiliation.setAffiliation(nameAffiliation[1]);\n\t\t\t\tauthorAffiliationList.add(authorAffiliation);\n\t\t\t}\n\t\t}\n\n\t\tHandleFacultyAffiliation facultyAffiliation;\n\t\ttry {\n\t\t\tfacultyAffiliation = new HandleFacultyAffiliation();\n\t\t\tfacultyAffiliation.insertRecords(authorAffiliationList);\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"Error while processing faculty affilications.\");\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "@SuppressWarnings(\"resource\")\r\n\tpublic static ArrayList<UserInfo> getUserDataFromCsvFile()\r\n\t{\r\n\t\t\r\n\t\tArrayList<UserInfo> unfList=null;\r\n\t\ttry{\r\n\t\t\tFile myObj= new File(\"E:\\\\Selenium Setup\\\\datadriven.csv\");\r\n\t\t\tunfList = new ArrayList<UserInfo>();\r\n\t\t\tScanner myReader= new Scanner(myObj);\r\n\t\t\tint count=0;\r\n\t\t\twhile (myReader.hasNextLine()) \r\n\t\t\t{\r\n\t\t\t\tString data= myReader.nextLine();\r\n\t\t\t\tif (count !=0)\r\n\t\t\t\t{\r\n\t\t\t\t\tString[] info =data.split(\"\\\\,\");\r\n\t\t\t\t\tunfList.add(new UserInfo(info[0],info[1]));\r\n\t\t\t\t\t//unfList.add(new UserInfo(info[0], info[1]));\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t++count;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}catch (Exception e)\r\n\t\t\t{\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\t// TODO: handle exception\r\n\t\t\t}\r\n\t\t\treturn unfList;\r\n\t}", "public void readInOrganizations() {\n // read CSV file for Organizations\n allOrganizations = new ArrayList<Organization>();\n InputStream inputStream = getResources().openRawResource(R.raw.organizations);\n CSVFile csvFile = new CSVFile(inputStream);\n List scoreList = csvFile.read();\n // ignore first row because it is the title row\n for (int i = 1; i < scoreList.size(); i++) {\n String[] organizationInfo = (String[]) scoreList.get(i);\n\n // inputs to Organization constructor:\n // String name, int logoPhotoID, int photo1ID, int photo2ID, int photo3ID\n\n // group together description\n String description = getDescription(5, organizationInfo);\n\n // get all image IDs according to the names\n int logoPhotoID = context.getResources().getIdentifier(organizationInfo[1], \"drawable\", context.getPackageName());\n int photo1ID = context.getResources().getIdentifier(organizationInfo[2], \"drawable\", context.getPackageName());\n int photo2ID = context.getResources().getIdentifier(organizationInfo[3], \"drawable\", context.getPackageName());\n int photo3ID = context.getResources().getIdentifier(organizationInfo[4], \"drawable\", context.getPackageName());\n allOrganizations.add(new Organization(organizationInfo[0], logoPhotoID, photo1ID, photo2ID, photo3ID, description));\n\n //System.out.println(\"organizationInfo: \" + organizationInfo[0] + \" \" + organizationInfo[1] + \" \" + organizationInfo[2] + \" \" + organizationInfo[3] + \" \" + organizationInfo[4]);\n }\n }", "public static ArrayList<Student> get_student_users() throws IOException {\n\t\tArrayList<Student> studentList = new ArrayList<Student>();\n\t\tReadCSV readStudentlist = new ReadCSV(\"students.csv\");\n\t\ttry {\n\t\t\t// auto-generated primary key for authors table\n\t\t\t\n\t\t\twhile (true) {\n\t\t\t\tList<String> tuple = readStudentlist.next();\n\t\t\t\tif (tuple == null) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t//Reads each value in from our string list and inserts them into the appropriate attribute of our student object\n\t\t\t\tIterator<String> i = tuple.iterator();\n\t\t\t\tStudent students = new Student();\n\t\t\t\tstudents.setName(i.next());\n\t\t\t\tString password = MD5.getMd5(i.next());\n\t\t\t\tstudents.setPassword(password);\n\t\t\t\tstudents.setEmail(i.next());\n\t\t\t\tstudents.set_faculty_code(i.next());\n\t\t\t\tstudents.setType(Integer.parseInt(i.next()));\n\t\t\t\tstudentList.add(students);\n\t\t\t}\n\t\t\treturn studentList;\n\t\t} finally {\n\t\t\treadStudentlist.close();\n\t\t}\n\t}", "@OneToMany(mappedBy=\"universityCollege\")\n\tpublic Set<StudentUniversity> getStudentUniversities() {\n\t\treturn this.studentUniversities;\n\t}", "public String university() {\n return faker.fakeValuesService().resolve(\"educator.name\", this, faker) \n + \" \" \n + faker.fakeValuesService().resolve(\"educator.tertiary.type\", this, faker);\n }", "public void loadListFromCsv() {\n List<Publication> list = new ArrayList<>();\n String line;\n try(BufferedReader bufferedReader = new BufferedReader(new FileReader(\"saves/data.csv\"))){\n while ((line = bufferedReader.readLine()) != null){\n String[] attributes = line.split(\",(?=([^\\\"]*\\\"[^\\\"]*\\\")*[^\\\"]*$)\");\n String[] formattedAttributes = formatAttributes(attributes);\n Publication book = createPublicationFromAttributes(formattedAttributes);\n list.add(book);\n }\n } catch (IOException e){\n System.out.println(\"IOException occurred: \" + e.getMessage());\n }\n\n this.library = list;\n }", "public University getalluniversitybyId(int id) {\n\t\treturn universityrespo.getOne(id);\n\n}", "public List<Country> readCountriesFromCSV(String fileName){\n try {\n Scanner scanner = new Scanner(new File(fileName));\n scanner.useDelimiter(\",\");\n scanner.nextLine();\n while(scanner.hasNextLine()){\n lsta.add(createCountry(scanner.nextLine().split(\",\")));\n// System.out.println(pyr.get_pharaoh()+\"|\"+pyr.get_modern_name()+\"|\"+pyr.get_site()+\"|\"+pyr.get_height()+\"|\");\n }\n scanner.close();\n } catch (FileNotFoundException ex) {\n Logger.getLogger(CityCSVDAO.class.getName()).log(Level.SEVERE, null, ex);\n }\n return lsta;\n }", "public void updateUniversidades() {\n\t\t\n\t\tlistaUniversidades = (ArrayList<Universidades>)hibernateController.selectUniversidades();\n\t}", "static void createAuthorsFile () throws IOException {\n\t\tBufferedReader dataFile = new BufferedReader(new FileReader(DATAFILE));\n\t\tString inputLine;\n\t\t\n\t\tPrintWriter isbnLabeledDataFile = new PrintWriter(new FileWriter(ISBNLABELLEDDATAFILE));\n\t\t\n\t\tSet<String> books = new HashSet<String>();\n\t\twhile ((inputLine = dataFile.readLine()) != null) {\n\t\t\tif (inputLine.indexOf('\\t') == -1) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tString[] fields = inputLine.split(\"\\t\");\n\t\t\tif (fields.length != 4) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tfinal String bookId = fields[1];\n\t\t\tif (books.contains(bookId)) {\n\t\t\t\tcontinue;\n\t\t\t} else {\n\t\t\t\tbooks.add(bookId);\n\t\t\t\tString authorString = getAuthorString(bookId);\n\t\t\t\tisbnLabeledDataFile.println(bookId + \"\\t\" + authorString);\n\t\t\t\tout.println(bookId + \"\\t\" + authorString);\n\t\t\t}\n\t\t}\n\t\tdataFile.close();\n\t\tisbnLabeledDataFile.close();\n\t}", "public void read_india_states() throws IOException {\r\n\t\tString line = \"\";\r\n\t\tString splitBy = \",\";\r\n\t\tString path = \".\\\\src\\\\main\\\\java\\\\com\\\\covidProject\\\\covid19\\\\Datasets\\\\Indian Cities Database.csv\";\r\n\t\tHashMap<String, List<String>> state_city = new HashMap<>();\r\n\t\t\r\n\t\ttry {\r\n\t\t\t// parsing a CSV file into BufferedReader class constructor\r\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(path));\r\n\t\t\twhile ((line = br.readLine()) != null) // returns a Boolean value\r\n\t\t\t{\r\n\t\t\t\tString[] info = line.split(splitBy); // use comma as separator\r\n\t\t\t\tString City = info[0].toLowerCase();\r\n\t\t\t\tString State = info[5].toLowerCase();\r\n\r\n\t\t\t\tif (state_city.get(State) == null) {\r\n\t\t\t\t\tList<String> temp_list = new ArrayList<>();\r\n\t\t\t\t\ttemp_list.add(City);\r\n\t\t\t\t\tstate_city.put(State, temp_list);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tList<String> temp_list = state_city.get(State);\r\n\t\t\t\t\ttemp_list.add(City);\r\n\t\t\t\t\tstate_city.put(State, temp_list);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tList<Document> list = new ArrayList<Document>();\r\n\t\t\t\r\n\t\t\t//Initialize country\r\n\t\t\tCovidCountry countryDoc = new CovidCountry();\r\n\t\t\tcountryDoc.setName(\"India\");\r\n\t\t\t\r\n\t\t\t//Initialize state list\r\n\t\t\tList<CovidState> states_list = new ArrayList<>();\r\n\t\t\t\r\n\t\t\tfor (Map.Entry<String, List<String>> entry : state_city.entrySet()) {\r\n\t\t\t\t\r\n\t\t\t\t//get state and cities from the map we created \r\n\t\t\t\tString state = entry.getKey();\r\n\t\t\t\tList<String> cities = entry.getValue();\r\n\r\n\t\t\t\tList<CovidSubCity> city_list = new ArrayList<>();\r\n\r\n\t\t\t\t//Cities are created before states.\r\n\t\t\t\tfor (String city : cities) {\r\n\t\t\t\t\tCovidCity covidCity = new CovidCity(city,state,countryDoc.getName());\r\n\t\t\t\t\tthis.covidCityRepository.save(covidCity);\r\n\t\t\t\t\tCovidSubCity subCity = new CovidSubCity(city,covidCity.getId());\r\n\t\t\t\t\tcity_list.add(subCity);\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//create state\r\n\t\t\t\tCovidState covidState = new CovidState(state,city_list);\r\n\t\t\t\t//this.covidStateRepository.save(covidState);\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tstates_list.add(covidState);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tcountryDoc.setStates(states_list);\r\n\t\t\tthis.covidCountryRepository.save(countryDoc);\r\n\t\t\t\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "private void downloadUCIData() throws Exception {\r\n\r\n String query = \"\";\r\n String strTableHeading = \"\";\r\n int numTableColumns = 89;\r\n //boolean overwrite = false; // Flag to avoid SQL calls if we are okay with using existing files\r\n sqlConnector.outSqlToCSV(query, strTableHeading, numTableColumns, false);\r\n\r\n /*\r\n if (baseDir.exists()) return; //Data already exists, don't download it again\r\n\r\n String url = \"https://archive.ics.uci.edu/ml/machine-learning-databases/synthetic_control-mld/synthetic_control.data\";\r\n String data = IOUtils.toString(new URL(url));\r\n\r\n String[] lines = data.split(\"\\n\");\r\n\r\n //Create directories\r\n baseDir.mkdir();\r\n baseTrainDir.mkdir();\r\n featuresDirTrain.mkdir();\r\n labelsDirTrain.mkdir();\r\n baseTestDir.mkdir();\r\n featuresDirTest.mkdir();\r\n labelsDirTest.mkdir();\r\n\r\n int lineCount = 0;\r\n List<Pair<String, Integer>> contentAndLabels = new ArrayList<>();\r\n for (String line : lines) {\r\n String transposed = line.replaceAll(\" +\", \"\\n\");\r\n\r\n //Labels: first 100 examples (lines) are label 0, second 100 examples are label 1, and so on\r\n contentAndLabels.add(new Pair<>(transposed, lineCount++ / 100));\r\n }\r\n\r\n //Randomize and do a train/test split:\r\n Collections.shuffle(contentAndLabels, new Random(12345));\r\n\r\n int nTrain = 450; //75% train, 25% test\r\n int trainCount = 0;\r\n int testCount = 0;\r\n for (Pair<String, Integer> p : contentAndLabels) {\r\n //Write output in a format we can read, in the appropriate locations\r\n File outPathFeatures;\r\n File outPathLabels;\r\n if (trainCount < nTrain) {\r\n outPathFeatures = new File(featuresDirTrain, trainCount + \".csv\");\r\n outPathLabels = new File(labelsDirTrain, trainCount + \".csv\");\r\n trainCount++;\r\n } else {\r\n outPathFeatures = new File(featuresDirTest, testCount + \".csv\");\r\n outPathLabels = new File(labelsDirTest, testCount + \".csv\");\r\n testCount++;\r\n }\r\n\r\n FileUtils.writeStringToFile(outPathFeatures, p.getFirst());\r\n FileUtils.writeStringToFile(outPathLabels, p.getSecond().toString());\r\n }\r\n */\r\n }", "public Set<Airport> loadFile(final String csvFile) throws CoreException;", "@GetMapping(\"/get/{id}\")\n\tpublic universites getUniversiteById(@PathVariable Long id) {\n\t return IF.getId(id);\n\t}", "public TreeSet<Product> readCSV() throws IOException, NumberFormatException {\n\r\n TreeSet<Product> products = new TreeSet<>();\r\n\r\n try (BufferedReader reader = new BufferedReader(new FileReader(\"src/Collection/file.csv_2.txt\"));) {\r\n while ((line = reader.readLine()) != null) {\r\n String[] row = line.split(\",\");\r\n\r\n Location location = new Location(\r\n Double.parseDouble(row[14]),\r\n Integer.parseInt(row[15]),\r\n Float.parseFloat(row[16]),\r\n row[17]);\r\n Address address = new Address(\r\n row[12],\r\n row[13],\r\n location\r\n );\r\n Organization organization = new Organization(\r\n Integer.parseInt(row[8]),\r\n row[9],\r\n row[10],\r\n OrganizationType.valueOf(row[11]),\r\n address\r\n );\r\n Coordinates coordinates = new Coordinates(\r\n Float.parseFloat(row[3]),\r\n Double.parseDouble(row[4])\r\n );\r\n try {\r\n\r\n\r\n Product product = new Product (\r\n Integer.parseInt(row[0]),\r\n row[1],\r\n LocalDate.parse(row[2].replace(\"/\", \"-\")),\r\n coordinates,\r\n Integer.parseInt(row[5]),\r\n row[6],\r\n UnitOfMeasure.valueOf(row[7]),\r\n organization\r\n );\r\n products.add(product);}\r\n catch (NumberFormatException e){\r\n System.out.println(\"wrong format\");\r\n }\r\n\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n products.forEach(System.out::println);\r\n return products;\r\n }", "public Set<Airport> loadFile(final File csvFile) throws CoreException;", "@Transactional\n\tpublic List<University> listAllUniversity() {\n\n\t\tCriteriaBuilder builder = getSession().getCriteriaBuilder();\n\t\tCriteriaQuery<University> criteriaQuery = builder.createQuery(University.class);\n\t\tRoot<University> root = criteriaQuery.from(University.class);\n\t\tcriteriaQuery.select(root);\n\t\tQuery<University> query = getSession().createQuery(criteriaQuery);\n\n\t\t// query.setFirstResult((page - 1) * 5);\n\t\t// query.setMaxResults(5);\n\t\treturn query.getResultList();\n\t}", "private static ArrayList<Glootie> loadAliensFromFile(String pathToCSV) throws Exception{\r\n\t\tArrayList<Glootie> alienArray = new ArrayList<>();\r\n\t\tBufferedReader csvReader = new BufferedReader(new FileReader(pathToCSV));\r\n\t\t//Read and ignore header row:\r\n\t\tString row = csvReader.readLine();\r\n\t\t//Read remain data from CSV file\r\n\t\twhile ((row = csvReader.readLine()) != null) {\r\n\t\t\tString[] data = row.split(\",\");\r\n\t\t\t// Add new Glootie to array\r\n\t\t\talienArray.add(new Glootie(data));\r\n\t\t}\r\n\t\tcsvReader.close();\r\n\r\n\t\treturn alienArray;\r\n\t}", "public static void main(String[] args) {\n\n //\tThis code is given to you. There is NO NEED TO CHANGE IT\n AltFinal altFinal = new AltFinal(\"College.csv\");\n\n //\tThis is some sample code to show all students in the Students List and how to iterate through the list\n //\tmany of your tasks will need to do something similar.\n //\t\tloop through the list, look for some value in each student record and\n // \t\teither count that value or compare to another value\n //\tNothing TODO here - just some sample code to list the students. You'll use this for loop often\n for (Student student : altFinal.students) {\n System.out.println(\"student = \" + student);\n }\n\n //\t----------------------------------------------------------------------------------------------\n //\tNow that we have all of the data loaded let's do some analysis on the information\n\n //\tBelow here is the code to use for the the Final\n\n //\tCommented out until you write the code for the highScholarshipStateStudent method.\n Student bigMoney;\n bigMoney = altFinal.highScholarshipStateStudent(\"Texas\");\n System.out.println(bigMoney.getName() + \" is from \" + bigMoney.getHomeState() + \" and received a $\" + bigMoney.getScholarship() + \" scholarship!\");\n bigMoney = altFinal.highScholarshipStateStudent(\"California\");\n System.out.println(bigMoney.getName() + \" is from \" + bigMoney.getHomeState() + \" and received a $\" + bigMoney.getScholarship() + \" scholarship!\");\n bigMoney = altFinal.highScholarshipStateStudent(\"Utah\");\n System.out.println(bigMoney.getName() + \" is from \" + bigMoney.getHomeState() + \" and received a $\" + bigMoney.getScholarship() + \" scholarship!\");\n bigMoney = altFinal.highScholarshipStateStudent(\"Washington\");\n System.out.println(bigMoney.getName() + \" is from \" + bigMoney.getHomeState() + \" and received a $\" + bigMoney.getScholarship() + \" scholarship!\");\n bigMoney = altFinal.highScholarshipStateStudent(\"Oregon\");\n System.out.println(bigMoney.getName() + \" is from \" + bigMoney.getHomeState() + \" and received a $\" + bigMoney.getScholarship() + \" scholarship!\");\n bigMoney = altFinal.highScholarshipStateStudent(\"Nevada\");\n System.out.println(bigMoney.getName() + \" is from \" + bigMoney.getHomeState() + \" and received a $\" + bigMoney.getScholarship() + \" scholarship!\");\n //\tThe test is to create methods that will look at the student List and\n // \tcount different values or compare them to find what we are interested in\n\n //\tTODO At the top of this file there is a highestScholarship method.\n // \t\t\tYou have to add code to that method for this to work\n //\twhen you have created the method you can uncomment these two lines of code to see your results\n Student student = altFinal.highestScholarship();\n System.out.println(student.getName() + \" has the biggest Scholarship for: $\" + student.getScholarship());\n\n //\tTODO print how many students are from Texas\n int texans = altFinal.countHomeState(\"Texas\");\n System.out.println(\"Students in Texas: \" + texans);\n //\tTODO print how many students are from outside the US (Their homeState is Foreign)\n int foreign = altFinal.countHomeState(\"Foreign\");\n System.out.println(\"Students in Foreign: \" + foreign);\n //\tTODO print which of these two cities has the most students\n //\tYou must compare the counts for the two groups of students (Texans and Foreign)\n // \tthen print which has the most students. Your code must tell you. You must use an if-else statement\n if (texans > foreign) {\n System.out.println(\"Texans has the most students\" + texans);\n } else System.out.println(\"Foreign has the most students\"+ foreign);\n\n\n //\tTODO \thow many Freshman students appear in the list?\n //\tTODO \thow many Senior students appear in the list?\n //\tTODO \thow many Masters students appear in the list?\n //\t\t\tuse the countYearInSchool method to answer the above questions\n int yearInSchoolX = altFinal.getCountYearInSchoolAndMinor(\"Freshman\", \"Comp Sci\");\n System.out.println(\"There were \" + yearInSchoolX + \" Comp Sci Freshman students\");\n\n int yearInSchool = altFinal.getCountYearInSchoolAndMinor(\"Freshman\", \"Math\");\n System.out.println(\"There were \" + yearInSchool + \" Freshman students\");\n\n //\tTODO \thow many students have scholarships greater than $XX,000?\n //\t\t\tyou will have to create the scholarshipsGreaterThan method to get your answer\n //\t\t\tthen you can uncomment the lines below to print it out\n int bigScholarships = altFinal.getScholarshipsGreaterThan(5000);\n System.out.println(\"Scholarships greater than $5000: \" + bigScholarships);\n\n//\t\t//\tTODO \tprint how many students have scholarships greater than $8,000?\n int testScholarshipMethod = altFinal.getScholarshipsGreaterThan(8000);\n System.out.println(\"there are this many students \" + testScholarshipMethod + \" that have scholarships greater than 8000\");\n\n System.out.println(\"Scholarships for Texans studying anything $\" + altFinal.scholarshipTotal(\"Texas\", null));\n System.out.println(\"Scholarships for anyone studying Statistics $\" + altFinal.scholarshipTotal(null, \"Statistics\"));\n System.out.println(\"Scholarships for Texans studying Statistics $\" + altFinal.scholarshipTotal(\"Texas\", \"Statistics\"));\n System.out.println(\"Scholarships for anyone studying anything $\" + altFinal.scholarshipTotal(null, null));\n }", "public CityList() throws FileNotFoundException {\n\t\tScanner sc = new Scanner(new File(\"Resources\\\\MapOfIreland.csv\"));\n\t\treadNodes(); // Call method to read in all nodes\n\t\tsc.nextLine(); //Skip first line of headers\n\t\twhile(sc.hasNext()) {\n\t\t\tCSVdata = sc.nextLine().split(\",\");\n\t\t\tint link1 = -1, link2 = -1; // Holds index of two nodes to be connected\n\t\t\tfor(int i = 0; i < nodes.size(); i++) {\n\t\t\t\tif(nodes.get(i).data.equals(CSVdata[2])) // If node data == first node to be connected\n\t\t\t\t\tlink1 = i;\n\t\t\t\tif(nodes.get(i).data.equals(CSVdata[3])) // If node data == second node to be connected\n\t\t\t\t\tlink2 = i;\n\t\t\t}\n\t\t\t// If one or both nodes weren't found\n\t\t\tif(link1 < 0 || link2 < 0) {\n\t\t\t\tSystem.out.println(\"ERROR: ONE OR BOTH NODES DO NOT EXIST\");\n\t\t\t\tSystem.out.println(CSVdata[2] + \"|\" + CSVdata[3]);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// Connect two links\n\t\t\telse\n\t\t\t\tnodes.get(link1).connectToNodeUndirected(nodes.get(link2), Double.parseDouble(CSVdata[1]), CSVdata[0]);\n\t\t}\n\t\tsc.close();\n\t}", "public ResultSet getUniversityById(int specificUniversityId)\r\n\t{\r\n\t\tResultSet rs=null;\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tString sql=\" SELECT * FROM university where universityId =\"+specificUniversityId;\t\r\n\t\t\trs=stm.executeQuery(sql);\r\n\t\t\t\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn rs;\r\n\t}", "public void setORM_Fac_has_university(model.University value) {\n\t\tthis.fac_has_university = value;\n\t}", "public static void main(String[] args) {\n Map<Integer, ArrayList<String>> citiesMap = new HashMap<>();\n\n CityDAO cityDAO = new CityDAO();\n CountryDAO countryDAO = new CountryDAO();\n\n ArrayList<City> cities = cityDAO.ReadCitiesFormCSV(\"src/main/resources/cities.csv\");\n Collections.sort(cities, Comparator.comparing(City::getPopulation));\n ArrayList<Country> countries = countryDAO.ReadCountriesFormCSV(\"src/main/resources/countries.csv\");\n\n //Add list of cities to their countries\n for (int countryIdx = 0; countryIdx < countries.size(); countryIdx++) {\n for (int cityIdx = 0; cityIdx < cities.size(); cityIdx++) {\n if (cities.get(cityIdx).getCode() == countries.get(countryIdx).getId())\n countries.get(countryIdx).addCityToCountry(cities.get(cityIdx));\n }\n }\n\n //Print list of cities in each country\n// for(Country country : countries) {\n// ArrayList<City> citiesL = country.getListOfCities();\n// for (City city : citiesL)\n// System.out.print(city.getCityName() + \" \");\n// System.out.println();\n// }\n\n for(City city : cities) {\n if (citiesMap.get(city.getCode()) == null)\n citiesMap.put(city.getCode(), new ArrayList<>());\n citiesMap.get(city.getCode()).add(city.getCityName());\n }\n System.out.println(\"Print List of cities sorted according to population sorted from lowest to highest\");\n citiesMap.forEach((k,v) -> System.out.println(\"Code: \" + k + \", List of cities: \" + v));\n\n System.out.println(\"\\n\");\n }", "private void populateYears(){\n try{\n Connection conn = DriverManager.getConnection(\n \"jdbc:sqlite:\\\\D:\\\\Programming\\\\Java\\\\Assignments\\\\CIS_452\\\\Music_Library\\\\album_library.sqlite\");\n Statement stmnt = conn.createStatement();\n ResultSet results = stmnt.executeQuery(\"SELECT DISTINCT year FROM album ORDER BY year\");\n\n while(results.next()){\n Integer year = results.getInt(1);\n yearList.add(year);\n }\n conn.close();\n } catch(SQLException e) {\n System.out.println(\"Error connecting to database: \" + e.getMessage());\n }\n }", "private static List<Student> getStudents() {\n \t\n List<Student> studentList = new ArrayList<>();\n Scanner readStudents=null;\n try {\n\t\t\treadStudents = new Scanner(new File(\"src/Student.csv\"));\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.out.println(\"Student file not found.\");\n\t\t}\n\t\twhile(readStudents.hasNextLine()) {\n\t\t\tString[] studentLine = readStudents.nextLine().split(\",\");\n\t\t\tlong studentId= Long.parseLong(studentLine[0]);\n\t\t\tint age = Integer.parseInt(studentLine[4]);\n\t\t\tlong recordId = Long.parseLong(studentLine[5]);\n \tStudent newStudent = new Student(studentId,age,studentLine[1],studentLine[2],studentLine[3],recordId);\n \tstudentList.add(newStudent);\n\t\t}\n \n readStudents.close();\n return studentList;\n }", "public void readFileInHashSet() throws IOException {\n\t\tFileReader fileR = new FileReader(MOCK_DATAPath);\n\t\tBufferedReader buffR = new BufferedReader(fileR);\n\t\tcitiesSet = new HashSet<>();\n\t\tcountriesSet = new HashSet<>();\n\t\tString line = \"\";\n\t\twhile ((line = buffR.readLine()) != null) {\n\t\t\tString tempWithComma = line;\n\t\t\tString tempOutComma[] = tempWithComma.split(\",\");\n\t\t\tcitiesSet.add(tempOutComma[0]);\n\t\t\tcountriesSet.add(tempOutComma[1]);\n\t\t}\n\t}", "public void saveUniversity(Context context){\n\t\tUniversitiesSQLiteHelper sesdbh = new UniversitiesSQLiteHelper(context, \"universities\", null,1);\n\n\t\t//Abre la base de datos\n\t\tSQLiteDatabase db = sesdbh.getWritableDatabase();\n\n\t\ttry {\n\t\t\tdb.execSQL(\"INSERT INTO universities (web_id, name, acronym) \" +\n\t\t\t\t\t\"VALUES ('\"+this.getID()+\"', '\"+this.getName()+\"','\"+this.getAcronym()+\"')\");\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tdb.close();\n\t}", "public ArrayList<User> getUsers(){\n\t\tArrayList<User> users = new ArrayList<User>();\n\t\tcreateFile(usersFile);\n\t\ttry {\n\t\t\tString[] data;\n\t\t\treader = new BufferedReader(new FileReader(usersFile));\n\n\t\t\tString strLine;\n\t\t\twhile((strLine = getLine()) != null){\n\t\t\t\tdata = strLine.split(\",\");\n\n\t\t\t\tUser user = new User(data[0], data[1],data[2],data[3]);\n\t\t\t\tusers.add(user);\n\n\t\t\t}\n\t\n\t\t}catch (IOException e){\n\t\t\t//TODO auto generated catch block\n\t\t\tSystem.err.println(e);\n\t\t}\n\n\t\treturn users;\n\t}", "public void readFile() \n\t{\n\t\tArrayList<String> tempStations = new ArrayList<>();\n\t\t//create arraylist local variable tempStations which will hold the list of stations temporarily for a specific line to be added to the stations hashmap \n\n\t\tString mtrSystemFile = \"MTRsystem_partial.csv\";\n\t\t//store the csv file name in a string\n\t\tFile file = new File(mtrSystemFile);\n\t\t//create a file object for the MTRSystems csv file\n\n\t\ttry \n\t\t{\n\t\t\tScanner inputStream = new Scanner(file);\n\t\t\t//pass the file through to new scanner object to be scanned\n\n\t\t\twhile (inputStream.hasNext())\n\t\t\t//so long as the scanner object has another token to read from the csv file\n\t\t\t{\n\t\t\t\tString line = inputStream.nextLine();\n\t\t\t\t//store the next line in the string variable\n\t\t\t\tcells = line.split(\",\");\n\t\t\t\t//split each line into cells separated by a comma\n\t\t\t\tint celli = 1;\n\t\t\t\t//assign int index to 1, so that only stations are read excluding line name stored at position 0\n\n\t\t\t\twhile (celli <= cells.length - 1)\n\t\t\t\t//whilst the index is less than or equal the last position of the array\n\t\t\t\t{\n\t\t\t\t\tif (celli == 1 || celli == cells.length - 1)\n\t\t\t\t\t//if the index is at the second position in the array or at the last\n\t\t\t\t\t{\n\t\t\t\t\t\tallTermini.add((cells[celli]));\n\t\t\t\t\t\t//add termini to the ArrayList\n\t\t\t\t\t}\n\t\t\t\t\ttempStations.add(cells[celli]);\n\t\t\t\t\t//add station to the ArrayList\n\t\t\t\t\tcelli++;\n\t\t\t\t}\n\n\t\t\t\taddToStations(cells[0], tempStations);\n\t\t\t\t//add the line name and the list of stations for that line to the hashmap\n\t\t\t\ttempStations.clear();\n\t\t\t\t//Clear the temporary list for the next line\n\n\t\t\t\tcells = null;\n\t\t\t}\n\t\t\tinputStream.close();\n\t\t} catch (FileNotFoundException e) \n\t\t{\n\t\t\tSystem.out.println(\"file not found\");\n\t\t}\n\t}", "private void readVenueFile(String path)\n {\n FileIO fileIO = new FileIO();\n fileIO.setFileName(path);\n String fileData = fileIO.readFile();\n String[] data = fileData.split(\"\\\\n\"); // split data by new line character\n for(int i = 0 ; i < data.length ; i++)\n {\n String[] values = data[i].split(\",\"); //split each row by ,\n getVenues().addVenue(values[0], Integer.parseInt(values[1]),Integer.parseInt(values[2]), Double.parseDouble(values[3])); // add a venue to the collection\n } \n }", "private static ArrayList<CIty> duxushuji(File file) throws IOException {\n\t\tArrayList<CIty>city=new ArrayList<>();\r\n\t\tInputStreamReader isr = new InputStreamReader(new FileInputStream(file), \"GBK\");\r\n\t\tBufferedReader br=new BufferedReader(isr);\r\n\tString str;\r\n\t\twhile((str=br.readLine())!=null){\r\n\t\tString[] strings=str.split(\"[|]\");\r\n\t\tcity.add(new CIty(Integer.parseInt(strings[0]), strings[1],strings[2]));\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tisr.close();\r\n\t\treturn city;\r\n\t}", "public void loadData()\n\t{\n\t\tString fileName = \"YouthTobaccoUse.csv\"; //file to be read and loaded in\n\t\tScanner input = FileUtils.openToRead(fileName).useDelimiter(\",\");\n\t\tint count = 0;\n\t\tboolean isNewState = false;\n\t\tString state = \"\", measure = \"\", stateAbbr = \"\";\n\t\tdouble percent = 0.0;\n\t\tint stateDate = 0;\n\t\twhile(input.hasNext())\n\t\t{\n\t\t\tString line = input.nextLine();\n\t\t\tint tokenCount = 0;\n\t\t\ttokens[tokenCount] = \"\";\n\t\t\t//each line tokenized\n\t\t\tfor(int i = 0; i < line.length(); i++)\n\t\t\t{\n\t\t\t\tif(line.charAt(i) == ',')\n\t\t\t\t{\n\t\t\t\t\ttokenCount++;\n\t\t\t\t\ttokens[tokenCount] = \"\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\ttokens[tokenCount] += line.charAt(i);\n\t\t\t}\n\t\t\t//loads values into variables, converts String into integers and doubles\n\t\t\tString abbr = tokens[1];\n\t\t\tString name = tokens[2];\n\t\t\tString measureDesc = tokens[5];\n\t\t\tint date = convertInteger(tokens[0]);\n\t\t\tdouble percentage = 0.0;\n\t\t\tif(tokens[10].equals(\"\") == false)\n\t\t\t\tpercentage = convertDouble();\n\t\t\tif(abbr.equals(stateAbbr))\n\t\t\t{\n\t\t\t\tif(measureDesc.equals(\"Smoking Status\") \n\t\t\t\t\t\t\t\t\t|| measureDesc.equals(\"User Status\"))\n\t\t\t\t\tpercent += percentage;\n\t\t\t}\n\t\t\telse\n\t\t\t\tisNewState = true;\n\t\t\tif(isNewState)\n\t\t\t{\n\t\t\t\t//calculates the average values for each state, then adds to \n\t\t\t\t//array list, stored as fields\n\t\t\t\tpercent = (double)(percent/count);\n\t\t\t\tif(state.equals(\"Arizona\") && stateDate == 2017)\n\t\t\t\t\ttobacco.add(new StateTobacco(state, stateAbbr, 3.75, 2017));\n\t\t\t\telse if(state.equals(\"Guam\") == false && count != 0 && count != 1\n\t\t\t\t&& stateAbbr.equals(\"US\") == false)\n\t\t\t\t\ttobacco.add(new StateTobacco(state, stateAbbr, percent, stateDate));\n\t\t\t\tstate = name;\n\t\t\t\tstateAbbr = abbr; \n\t\t\t\tstateDate = date;\n\t\t\t\tisNewState = false;\n\t\t\t\tpercent = 0.0;\n\t\t\t\tcount = 0;\n\t\t\t}\n\t\t\tcount++;\n\t\t}\n\t}", "public static void main(String[] args) throws Exception {\r\n\t\t\r\n\t\tString csv = \"regional-us-weekly-latest.txt\";\r\n\t\t//String to hold file name\r\n\t\tScanner sc = new Scanner(new File(csv));\r\n\t\t//Scanner object to read the csv file\r\n\t\tPrintWriter outputFile = new PrintWriter(\"Artists-WeekOf08272020.txt\");\r\n\t\t//printwriter object to print the report to an output file\t\t\r\n\r\n\t\tString header = sc.nextLine(); //gets header\r\n\t\tString artistName = \"\"; //string for holding artist name\r\n\t\tArrayList<String> top200 = new ArrayList<>(); \r\n\t\t//arraylist for all the top 200 names, in the order they're in from the csv file\r\n\t\tArrayList<ArrayList<String>> nameList = new ArrayList<ArrayList<String>>(); \r\n\t\t//nested arraylist, one for names in report and another for the amount of times each appears\r\n\t\t\r\n\t\tString line = sc.nextLine(); //gets the first line after header before the while loop starts since it is irrelevant data\r\n\t\t/*this while loop gets all the names from the csv file and ignores the rest of the data as it is unneeded for the report\r\n\t\tit then adds all the names to the top200 arraylist in the order that they were in in the csv file (including duplicates)*/\r\n while(sc.hasNext()) { //loop continues to the end of the file\r\n \tline = sc.nextLine(); //reads in an entire line\r\n String [] name = line.split(\",\"); //splits lines by commas as the data values are separated by commas\r\n artistName = name[name.length-3];\r\n /*originally I wanted to assign values[2] to artist because the names were the third value of the data (the element is\r\n 2 due to arrays starting at 0), but there was a problem, some values had commas within them. So, I improvised, no matter\r\n what the column with the names will always be the 3rd to last column, so instead I made the array element be the length \r\n of the array minus 3 to ensure I always get the artist's name.*/\r\n top200.add(artistName); //adds artist name to the top200 arraylist\r\n } //end of while loop\r\n \r\n \r\n /*this loop sorts the top200 names in alphabetical order, the first character of an element is compared to the first character \r\n of the next element, then it swaps the two names if the name after it starts with a letter that comes before it in the alphabet*/\r\n for (int i = 1; i < top200.size(); i++) {\r\n \tString temp = \"\";\r\n \tfor (int j = 0; j < top200.size()-1; j++) {\r\n \t\tif(top200.get(i).charAt(0) < top200.get(j).charAt(0)) { //compares first letter of strings\r\n \t\t\ttemp = top200.get(i); \r\n \t\t\ttop200.set(i, top200.get(j));\r\n \t\t\ttop200.set(j, temp);\r\n \t\t}\r\n \t} //end of second for loop\r\n } //end of for loop\r\n \r\n nameList.add(top200); //this adds the list of names to the nested arraylist \r\n \r\n ArrayList<String> appearanceCount = new ArrayList<>(); \r\n //arraylist to be parallel to the names and will say how many times the name appeared on the top 200 list\r\n \r\n /*the job of this for loop is to go through the first loop in the nested arraylist, which is currently the only one, and it\r\n looks through it for duplicates, by comparing every single element with every element after it, when it finds a duplicate \r\n it deletes it, then it adds 1 to the corresponding element value on the appearanceCount arraylist, otherwise it will add \"1\" to \r\n the appearanceCount arraylist as it didnt have a duplicate for the corresponding element value, thus it will only appear once*/\r\n for (int i = 0; i < nameList.get(0).size(); i++) { // this loop goes through the arraylist containing the list of 200 names 1 by 1\r\n \tint cnt = 1; //this is the default count, if a name appears once on the list, its corresponding array will hold the string \"1\"\r\n \tString stringNum = \"\"; //this String is there to hold the count of appearances, it will hold the int when converted to a string\r\n \tfor (int j = i+1; j < nameList.get(0).size(); j++) { //this loop will compare the current element with the rest of the array\r\n \t\tif(nameList.get(0).get(i).equals(nameList.get(0).get(j))) { //this condition checks for duplicates\r\n \t\t\tnameList.get(0).remove(j); //when a duplicate is found it will be removed\r\n \t\t\tj--; //j is decreased by 1, since an element was removed the arraylist is shorter now, so the loop wont throw it out of bounds\r\n \t\t\tcnt++; //when a duplicate is found, cnt is incremented \r\n \t\t\tstringNum = Integer.toString(cnt); //the int value of cnt is converted to a string\r\n appearanceCount.set(i, stringNum); //this places the amount of times the artist appears in the parallel appearanceCount arraylist\r\n \t\t}//end of if\r\n \t\telse appearanceCount.add(\"1\"); //if there is no duplicate, that means it appears only once, so \"1\" is added to appearanceCount\r\n \t}//end of second for loop\r\n } //end of for loop\r\n \r\n /*when the loop ends, appearanceCount should be full and have all the amount of times an artist appeared on the list and its elements\r\n will correspond to the values of the arraylist containing all the names*/\r\n nameList.add(appearanceCount); //then the appearance count arraylist is added to the nested nameList arrayList\r\n \r\n //prints report for header of the report to the output file\r\n outputFile.println(\"This is a report of the list of artists that appear on Spotify's\");\r\n outputFile.println(\"Top 200 list in the United States for the week of August 27, 2020.\");\r\n outputFile.println(\"The following names in the report are in alphabetical order.\\n\");\r\n \r\n int cnt = 0; //this is to count how many names are on the list altogether\r\n //this for loop is to print out the report to the output file\r\n for (int i = 0; i < nameList.get(0).size(); i++) {\r\n \tint a = Integer.parseInt(nameList.get(1).get(i)); //this converts the appearance count of every name into an int \r\n \tif (a > 1) //this if will check if the appearance count is greater than 1\r\n \t\toutputFile.println(nameList.get(0).get(i) + \" appears \" + nameList.get(1).get(i) + \" times on the list.\");\r\n \t\t//if it is greater than 1, than to be grammatically correct it will print \"appears i times\", (times being plural)\r\n \telse outputFile.println(nameList.get(0).get(i) + \" appears \" + nameList.get(1).get(i) + \" time on the list.\");\r\n \t\t//otherwise, if its not bigger than 1, then it will say \"appears 1 time\", (time being singular)\r\n \tcnt++; //increments the count of names\r\n } //end of for loop\r\n \r\n outputFile.println(\"\\nThere are \" + cnt + \" artists on the list.\");\r\n \r\n sc.close();\r\n outputFile.close();\r\n \r\n\t}", "private void loadAllCountData(){\n // load from csv\n try{\n FileReader file = new FileReader(\"/home/ubuntu/user_counts_small.csv\");\n //FileReader file = new FileReader(\"/Users/YHWH/Desktop/cloud computing/team project/user_counts.csv\");\n BufferedReader buff = new BufferedReader(file);\n String line = \"\";\n boolean eof = false;\n\n while(!eof){\n line = buff.readLine();\n if(line == null){\n eof = true;\n }\n else{\n String[] data = line.split(\"\\t\"); //0->id, 1->selfCount, 2->prevCount\n wholeCountData.put(data[0], Integer.parseInt(data[2]));\n }\n }\n buff.close();\n }\n catch(IOException e){\n e.printStackTrace();\n }\n }", "@PostConstruct\n public void loaddata() throws IOException {\n File file = ResourceUtils.getFile(configProvider.getFilePath());\n Reader in = new FileReader(file.getPath());\n Iterable<CSVRecord> records = CSVFormat.RFC4180.withHeader(\n \"locationid\", \"Applicant\", \"FacilityType\", \"cnn\", \"LocationDescription\", \"Address\", \"blocklot\", \"block\", \"lot\",\n \"permit\", \"Status\", \"FoodItems\", \"X\", \"Y\", \"Latitude\", \"Longitude\", \"Schedule\",\n \"dayshours\", \"NOISent\", \"Approved\", \"Received\", \"PriorPermit\", \"ExpirationDate\",\n \"Location\", \"Fire Prevention Districts\", \"Police Districts\",\n \"Supervisor Districts\", \"Zip Codes\", \"Neighborhoods (old)\"\n ).parse(in);\n\n Iterator<CSVRecord> iterator = records.iterator();\n iterator.next();\n // use our own ids because of how atomic integers work, we can't have a 0 for an id, so can't rely on outside sources.\n int i = 0;\n while (iterator.hasNext()) {\n CSVRecord record = iterator.next();\n FoodTruck truck = new FoodTruck(Float.parseFloat(record.get(\"Latitude\")), Float.parseFloat(record.get(\"Longitude\")),\n record.get(\"Address\"), record.get(\"FoodItems\"), ++i);\n //add food truck to datastore\n truckDataStore.addTruck(truck.getId(), truck);\n\n final Rectangle rect = new Rectangle(truck.getLat(), truck.getLon(),\n truck.getLat(), truck.getLon());\n //add food truck location + id to location data store.\n locationDataStore.getSpatialIndex().add(rect, truck.getId());\n }\n }", "private void fillCitiesTable() {\n try (Connection connection = this.getConnection();\n Statement statement = connection.createStatement();\n ResultSet rs = statement.executeQuery(INIT.GET_CITY.toString())) {\n if (!rs.next()) {\n try (PreparedStatement ps = connection.prepareStatement(INIT.FILL_CITIES.toString())) {\n connection.setAutoCommit(false);\n ParseSiteForCities parse = new ParseSiteForCities();\n for (City city : parse.parsePlanetologDotRu()) {\n ps.setString(1, city.getCountry());\n ps.setString(2, city.getCity());\n ps.addBatch();\n }\n ps.executeBatch();\n connection.commit();\n connection.setAutoCommit(true);\n }\n }\n\n } catch (SQLException e) {\n logger.error(e.getMessage(), e);\n }\n }", "public static void main(String[] args) {\n\t\tFileUTL fUtl = new FileUTL();\n\t\tString fileAddres = \"C:\\\\Users\\\\lenovo\\\\Desktop\\\\医嘱和对应路径信息\\\\\";\n\t\tString filename = fileAddres+\"12个病人的医嘱信息-utf8.csv\";\n\t\tString splitSign = \",\";\n\t\tString dateSign = \"/\";\n\t\tfUtl.readFile(filename, splitSign, dateSign);\n\t}", "public void createArrayList() throws IOException,ParseException\r\n\t {\n\t \t\r\n\t try(ICsvBeanReader beanReader = new CsvBeanReader(new FileReader(CSV_FILENAME), \r\n\t \t\tCsvPreference.STANDARD_PREFERENCE))\r\n\t {\r\n\t // the header elements are used to map the values to the bean\r\n\t final String[] headers = beanReader.getHeader(true);\r\n\t final CellProcessor[] processors = getProcessors();\r\n\t Complete customer;\r\n\t String gender,fullname;\r\n\t while ((customer = beanReader.read(Complete.class, headers, processors)) != null)\r\n\t {\r\n\t fullname = customer.getFirstname() + \" \" + customer.getLastname();\r\n\t if(customer.getGender().equals(\"f\"))\r\n\t \t gender = \"female\";\r\n\t \telse\r\n\t gender = \"male\";\r\n\t Date dob=new SimpleDateFormat(\"MM/dd/yyyy\").parse(customer.getDob()); \r\n\t String pattern = \"dd/MM/yyyy\";\r\n\t SimpleDateFormat simpleDateFormat = new SimpleDateFormat(pattern);\r\n \tString date = simpleDateFormat.format(dob);\r\n\t String age = calcAge(date);\r\n\t if(customer.getCategory().equals(\"student\"))\r\n\t {\r\n\t \tString grade = calcGrade(customer.getSec_percent());\r\n\t \tstudentList.add(new Student(customer.getId(),fullname,gender,date,age,customer.getAadhar_number(),customer.getCity(),\r\n\t \tcustomer.getContact_number(),Integer.parseInt(customer.getRoll_no()),customer.getClass_no(),Integer.parseInt(customer.getTotal_marks())\r\n\t \t,grade,Integer.parseInt(customer.getSec_percent()),customer.getHs_stream()));\r\n\t \t\t\r\n\t } \r\n\t else //for teacher\r\n\t {\r\n\t \tDate doj=new SimpleDateFormat(\"MM/dd/yyyy\").parse(customer.getDoj()); \r\n\t \tString pattern1 = \"dd/MM/yyyy\";\r\n\t SimpleDateFormat simpleDateFormat1 = new SimpleDateFormat(pattern);\r\n \tString join_date = simpleDateFormat.format(doj);\r\n\t \tString str_sub_teachers = customer.getSubject_teaches();\r\n\t \tString service_period = calService(join_date);\r\n\t \tList<String> sub_teachers = new ArrayList<String>(Arrays.asList(str_sub_teachers.split(\"-\")));\r\n\t \t\t\t\r\n\t \t\tteacherList.add(new Teacher(customer.getId(),fullname,gender,date,age,customer.getAadhar_number(),customer.getCity(),\r\n \t\t\t\tcustomer.getContact_number(),customer.getEmp_no(),customer.getClass_teacher_of(),join_date,service_period\r\n \t\t\t\t,customer.getPrevious_school(),customer.getPost(),Integer.parseInt(customer.getSalary()),sub_teachers));\r\n }\r\n\t \r\n\t } //while\r\n\t }\r\n\t System.out.println(\"ArrayList Sucessfully Created\");\t\r\n\t \t\r\n\t }", "public void getDataForRegion(String dataType, String[] countrys, String year){\r\n String line = \"\"; \r\n int i=0;\r\n double[] rez= new double[countrys.length];\r\n int count=0;\r\n ArrayList<String> coun= new ArrayList<>();\r\n ArrayList<Double> dat= new ArrayList<>();\r\n try{ \r\n BufferedReader br = new BufferedReader(new FileReader(\"dataSets//\"+dataType+\".csv\")); \r\n while ((line = br.readLine()) != null){\r\n String lineArr[]=line.split(\",\");\r\n if(i==0){\r\n for(int j=1; j!=lineArr.length; j++){\r\n if(lineArr[j].equals(year)){\r\n i=j;\r\n }\r\n }\r\n }\r\n else{\r\n for(int j=0; j!=countrys.length; j++){\r\n if(lineArr[0].equals(countrys[j]) || lineArr[0].contains(countrys[j]) || countrys[j].contains(lineArr[0])){\r\n coun.add(lineArr[0]);\r\n dat.add(Double.parseDouble(lineArr[i]));\r\n }\r\n }\r\n }\r\n } \r\n }catch(Exception e){}\r\n c= new String[coun.size()];\r\n data= new double[coun.size()];\r\n for(int j=0; j!=c.length; j++){\r\n c[j]=coun.get(j);\r\n data[j]=dat.get(j);\r\n }\r\n }", "private static ArrayList<User> loadInitialData(){\n\t\tArrayList<User> users = new ArrayList<User>();\n\t\t// From the users list get all the user names\n\t\tfor (String username:Utils.FileUtils.getFileLines(Global.Constants.LIST_OF_USERS)){ // refers \"users\" file\n\t\t\tArrayList<Directory> directories = new ArrayList<Directory>();\n\t\t\t// For a user name, read the names of directories registered\n\t\t\t// Note: All directory names are provided in the file bearing user name\n\t\t\tif (Utils.FileUtils.exists(Global.Constants.DIRECTORY_LOCATION + username)) { // refers to a specific user file \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t // that has directories\n\t\t\t\tfor (String dir:Utils.FileUtils.getFileLines(Global.Constants.DIRECTORY_LOCATION + username)) {\n\t\t\t\t\tArrayList<String> documents = new ArrayList<String>();\n\t\t\t\t\t// For each directory, read names of files saved\n\t\t\t\t\t// Note: All file names are provided in the file bearing username$dirname\n\t\t\t\t\tif (Utils.FileUtils.exists(Global.Constants.DIRECTORY_LOCATION, username + \"$\" + dir)) {\n\t\t\t\t\t\tfor (String doc:Utils.FileUtils.getFileLines(Global.Constants.DIRECTORY_LOCATION + username + \"$\" + dir)) {\n\t\t\t\t\t\t\tdocuments.add(doc);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tdirectories.add(new Directory(dir, documents));\n\t\t\t\t}\n\t\t\t}\n\t\t\tusers.add(new User(username, directories));\n\t\t}\n\t\treturn users;\n\t}", "public Map<Integer, List<String>> getUsers() {\n\t\tMap<Integer, List<String>> userMap = new HashMap<Integer, List<String>>();\n\t\tList<String> userData = new ArrayList<String>();\n\t\t\n\t\t// Step 1: read the data.csv file\n\t\t// STep 2: fill out the userMap and userData\n\t\t// userID is the key, everything else is userData\n\t\t\n\t\treturn userMap;\n\t}", "public void readInCategories() {\n // read CSV file for Categories\n allCategories = new ArrayList<Category>();\n InputStream inputStream = getResources().openRawResource(R.raw.categories);\n CSVFile csvFile = new CSVFile(inputStream);\n List scoreList = csvFile.read();\n // ignore first row because it is the title row\n for (int i = 1; i < scoreList.size(); i++) {\n String[] categoryInfo = (String[]) scoreList.get(i);\n\n // inputs to Category constructor:\n // String name, int smallPhotoID, int bannerPhotoID\n\n // get all image IDs according to the names\n int smallPhotoID = context.getResources().getIdentifier(categoryInfo[1], \"drawable\", context.getPackageName());\n int bannerPhotoID = context.getResources().getIdentifier(categoryInfo[2], \"drawable\", context.getPackageName());\n allCategories.add(new Category(categoryInfo[0],smallPhotoID, bannerPhotoID));\n\n //System.out.println(\"categoryInfo: \" + categoryInfo[0] + \" \" + categoryInfo[1] + \" \" + categoryInfo[2]);\n }\n }", "public static void main(String[] args) throws ParserConfigurationException, IOException, TransformerException, OWLOntologyCreationException, OWLOntologyStorageException, SAXException {\n\t\tFile dis = new File(args[0]);\n\t\tFile csv = new File(args[1]);\n\t\tString dir = args[2];\n\t\tFile justDir = new File(args[3]);\n\t\tFile equvCSV = new File(args[4]);\n\t\t/**\n\t\tListManager lm = new ListManager();\n\t\tList<Case> caseList = lm.constructCaseListFromCSV(csv);\n\t\tXMLCaseWriter xcw = new XMLCaseWriter();\n\t\tFile xml = new File(dir + \"/cases.xml\");\n\t\txml.canWrite();\n\t\txcw.createXMLCaseFileFromList(csv, xml, caseList, \"iswc-2014\");\n\t\t/**\n\t\tint i = 0;\n\t\tList<Map<String,String>> records = CSVUtilities.getRecords(csv);\n\t\tfor(Map<String,String> r:records)\n\t\t{\n\t\t\t\n\t\t\tSystem.out.println(\"Map \" + i);\n\t\t\tfor(String k:r.keySet())\n\t\t\t{\n\t\t\t\tSystem.out.println(k);\n\t\t\t\tSystem.out.println(r.get(k));\n\t\t\t\tSystem.out.println(\"\");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t\ti++;\n\t\t}\n\t\t**/\n\t\t\n\t\tListManager lm = new ListManager();\n\t\tList<Case> caseList = lm.constructCaseListFromCSV(csv);\n\t\tMap<String,List<Case>> splitMap = new HashMap<String,List<Case>>();\n\t\tMap<String,List<String>> equvMap = lm.getIDMapForEQClasses(equvCSV);\n\t\tXMLCaseWriter xcw = new XMLCaseWriter();\n\t\txcw.createOntologySortedXMLCaseFilesFromList(csv, new File(dir), justDir, equvMap, caseList, \"iswc-2014\");\n\t\t/**\n\t\tfor(Case c:caseList)\n\t\t{\n\t\t\tif(!splitMap.keySet().contains(c.getOntology()))\n\t\t\t{\n\t\t\t\tList<Case> list = new ArrayList<Case>();\n\t\t\t\tlist.add(c);\n\t\t\t\tsplitMap.put(c.getOntology().toString(), list);\n\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tList<Case> list = splitMap.get(c.getOntology().toString());\n\t\t\t\tlist.add(c);\n\t\t\t\tsplitMap.replace(c.getOntology().toString(), list);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tfor(String key:splitMap.keySet())\n\t\t{\n\t\t\tList<Case> clist = splitMap.get(key);\n\t\t\tXMLCaseWriter xcw = new XMLCaseWriter();\n\t\t\tFile xml = new File(dir + key + \".cases.xml\");\n\t\t\txml.canWrite();\n\t\t\txcw.createXMLCaseFileFromList(csv, xml, justDir, equvCSV, clist, \"iswc-2014\");\n\t\t\t\n\t\t}\n\t\t//List<Case> list = lm.constructCaseListFromDisFile(dis);\n\t\t//Map<Case,ArrayList<String>> m =lm.getCaseListMetaData(list, csv);\n\t\t\n\t\t/**\n\t\tfor(Case c:m.keySet())\n\t\t{\n\t\t\tSystem.out.println(c.getOntology().toString());\n\t\t\tSystem.out.println(c.getEntailment().toString());\n\t\t\tfor(String s: m.get(c))\n\t\t\t{\n\t\t\t\tSystem.out.println(s);\n\t\t\t}\n\t\t}\n\t\t**/\n\t\t/**\n\t\tArrayList<CaseData> cd = lm.constructCaseDataFromCSV(list, csv);\n\t\tfor(CaseData data:cd)\n\t\t{\n\t\t\tSystem.out.println(data.getCase().getOntology());\n\t\t\tSystem.out.println(data.getCase().getEntailment().toString());\n\t\t\tSystem.out.println(\"METADATA: \" + data.getMetaData().getMetaData());\n\t\t\tSystem.out.println(\"EVIDENCE \" + data.getEvidence().getMetaData());\n\t\t\tSystem.out.println(\"RV:\");\n\t\t\tfor(ReasonerVerdict rv:data.getReasonerVerdicts())\n\t\t\t{\n\t\t\t\tSystem.out.println(rv.getReasoner());\n\t\t\t\tSystem.out.println(rv.getValue());\n\t\t\t}\n\t\t\tSystem.out.println(\"SUBCASES:\");\n\t\t\tfor(Subcase s:data.getSubcases())\n\t\t\t{\n\t\t\t\tSystem.out.println(s.getJustification());\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t\tList<Subcase> sc = lm.extractSubcasesFromCaseData(cd);\n\t\tArrayList<SubcaseData> scd = lm.constructSubCaseDataFromCSV(sc, csv);\n\t\tfor(SubcaseData data:scd)\n\t\t{\n\t\t\tSystem.out.println(data.getCase().getOntology());\n\t\t\tSystem.out.println(data.getCase().getEntailment().toString());\n\t\t\tSystem.out.println(data.getCase().getJustification());\n\t\t\tSystem.out.println(\"GEN REASONER: \" + data.getGeneratingReasoner());\n\t\t\tSystem.out.println(\"METADATA: \" + data.getMetaData().getMetaData());\n\t\t\tSystem.out.println(\"EVIDENCE \" + data.getEvidence().getMetaData());\n\t\t\tSystem.out.println(\"RV:\");\n\t\t\tfor(ReasonerVerdict rv:data.getReasonerVerdicts())\n\t\t\t{\n\t\t\t\tSystem.out.println(rv.getReasoner());\n\t\t\t\tSystem.out.println(rv.getValue());\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t\t\n\t\tXMLCaseWriter xcw = new XMLCaseWriter();\n\t\txcw.createXMLCaseFileFromDisAndCSV(dis, csv, xml, \"iswc-2014\");\n\t\t//xcw.createXMLCaseFileFromDis(csv, xml, \"iswc\");\n\t\t * \n\t\t */\n\t\t}", "private void importCountries(JTFFile file) {\n for (SimpleData country : file.getCountries()) {\n if (countriesService.exist(country)) {\n country.setId(countriesService.getSimpleData(country.getName()).getId());\n } else {\n countriesService.create(country);\n }\n }\n }", "@Test\n void testVariableUNFs() throws IOException, UnfException {\n long expectedNumberOfVariables = 13L;\n long expectedNumberOfCases = 24L; // aka the number of lines in the TAB file produced by the ingest plugin\n\n String[] expectedUNFs = {\n \"UNF:6:wb7OATtNC/leh1sOP5IGDQ==\",\n \"UNF:6:0V3xQ3ea56rzKwvGt9KBCA==\",\n \"UNF:6:0V3xQ3ea56rzKwvGt9KBCA==\",\n \"UNF:6:H9inAvq5eiIHW6lpqjjKhQ==\",\n \"UNF:6:Bh0M6QvunZwW1VoTyioRCQ==\",\n \"UNF:6:o5VTaEYz+0Kudf6hQEEupQ==\",\n \"UNF:6:eJRvbDJkIeDPrfN2dYpRfA==\",\n \"UNF:6:JD1wrtM12E7evrJJ3bRFGA==\",\n \"UNF:6:xUKbK9hb5o0nL5/mYiy7Bw==\",\n \"UNF:6:Mvq3BrdzoNhjndMiVr92Ww==\",\n \"UNF:6:KkHM6Qlyv3QlUd+BKqqB3Q==\",\n \"UNF:6:EWUVuyXKSpyllsrjHnheig==\",\n \"UNF:6:ri9JsRJxM2xpWSIq17oWNw==\"\n };\n\n TabularDataIngest ingestResult;\n File file = getFile(\"csv/ingest/election_precincts.csv\");\n\n try (BufferedInputStream stream = new BufferedInputStream(new FileInputStream(file))) {\n CSVFileReader instance = createInstance();\n ingestResult = instance.read(Tuple.of(stream, file), null);\n }\n\n File generatedTabFile = ingestResult.getTabDelimitedFile();\n DataTable generatedDataTable = ingestResult.getDataTable();\n\n assertThat(generatedDataTable).isNotNull();\n assertThat(generatedDataTable.getDataVariables()).isNotNull();\n assertThat(generatedDataTable.getVarQuantity()).isEqualTo((long) generatedDataTable.getDataVariables().size());\n assertThat(generatedDataTable.getVarQuantity()).isEqualTo(expectedNumberOfVariables);\n assertThat(generatedDataTable.getCaseQuantity()).isEqualTo(expectedNumberOfCases);\n\n IngestDataProvider dataProvider = new InMemoryIngestDataProvider();\n dataProvider.initialize(generatedDataTable, generatedTabFile);\n\n for (int i = 0; i < expectedNumberOfVariables; i++) {\n String unf = null;\n\n if (generatedDataTable.getDataVariables().get(i).isIntervalContinuous()) {\n Double[] columnVector = dataProvider.getDoubleColumn(i);\n unf = UNFUtil.calculateUNF(columnVector);\n }\n if (generatedDataTable.getDataVariables().get(i).isIntervalDiscrete()\n && generatedDataTable.getDataVariables().get(i).isTypeNumeric()) {\n Long[] columnVector = dataProvider.getLongColumn(i);\n unf = UNFUtil.calculateUNF(columnVector);\n }\n if (generatedDataTable.getDataVariables().get(i).isTypeCharacter()) {\n String[] columnVector = dataProvider.getStringColumn(i);\n String[] dateFormats = null;\n\n // Special handling for Character strings that encode dates and times:\n if (\"time\".equals(generatedDataTable.getDataVariables().get(i).getFormatCategory())\n || \"date\".equals(generatedDataTable.getDataVariables().get(i).getFormatCategory())) {\n\n dateFormats = new String[(int) expectedNumberOfCases];\n for (int j = 0; j < expectedNumberOfCases; j++) {\n dateFormats[j] = generatedDataTable.getDataVariables().get(i).getFormat();\n }\n }\n unf = dateFormats == null ? UNFUtil.calculateUNF(columnVector) : UNFUtil.calculateUNF(columnVector, dateFormats);\n }\n\n assertThat(unf).isEqualTo(expectedUNFs[i]);\n }\n }", "private void cargarJugadoresRetirados() {\n\n\t\tString nombreFichero = \"jugadoresRetirados.csv\";\n\n\t\tListaJugadores.jugadoresRetirados = GestionCSV.obtenerJugadores(nombreFichero);\n\n\t}", "private void _generateAUniv(int index) {\n writer_.startSection(CS_C_UNIV, _getId(CS_C_UNIV, index));\n writer_.addProperty(CS_P_NAME, _getRelativeName(CS_C_UNIV, index), false);\n writer_.endSection(CS_C_UNIV);\n }", "protected static ArrayList<String> load() throws Exception {\r\n\t\tArrayList<String> list;\r\n\t\tFileReader fileRead = new FileReader(csv);\r\n\t\tBufferedReader buff = Files.newBufferedReader(Paths.get(\"story.csv\"));\r\n\t\tlist = buff.lines().map(line -> line.split(\",\")).flatMap(Arrays::stream)\r\n\t\t\t\t.collect(Collectors.toCollection(ArrayList::new));\r\n\t\tbuff.close();\r\n\t\tfileRead.close();\r\n\r\n\t\treturn list;\r\n\t}", "public ArrayList<Player> importPlayerData() {\n \n try {\n //Try to access player.csv in the given directory\n\t\t\tFile file = new File(\"data\\\\player.csv\");\n Scanner fileIn = new Scanner(file);\n \n fileIn.skip(\"userName,fullName,password,gold,exp,noOfLand\");\n \n\t\t\t//Use comma as delimiter in extracting various player info\n\t\t\tfileIn.useDelimiter(\",|\\r\\n|\\n\");\n \n while (fileIn.hasNext()) {\n String userName = fileIn.next().trim();\n String fullName = fileIn.next().trim();\n String password = fileIn.next().trim();\n int gold = fileIn.nextInt();\n int exp = fileIn.nextInt();\n\t\t\t\tint noOfLand = fileIn.nextInt();\n\t\t\t\t\n\t\t\t\t//Create new players based on extracted info\n Player player = new Player(userName, fullName, password, gold, exp, noOfLand);\n\t\t\t\t\n\t\t\t\t//Add players to playerList\n playerList.add(player);\n }\n \n }\n \n catch (IOException e) {\n //Specify the location of IOException\n\t\t\te.printStackTrace();\n }\n\t\t\n\t\treturn playerList;\n\t}", "public static void getXMLUserList() {\n\t\t// Make some local arrays to use below\n\t\tArrayList<Student> activeList = new ArrayList<Student>();\n\t\tArrayList<Student> archiveList = new ArrayList<Student>();\n\t\ttry {\n\t\t\tFile xmlFile = new File(\"Users.xml\");\n\t\t\tDocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder builder = factory.newDocumentBuilder();\n\t\t\tDocument users = builder.parse(xmlFile);\n\t\t\t\n\t\t NodeList studentNodes = users.getElementsByTagName(\"student\");\n\t\t for(int i = 0; i < studentNodes.getLength(); i++) { // Go through each student node\n\t\t \t\n\t\t Node studentNode = studentNodes.item(i);\n\t\t if(studentNode.getNodeType() == Node.ELEMENT_NODE) {\n\t\t Element studentEl = (Element) studentNode;\n\t\t // Get the student's info (and convert types when necessary)\n\t\t String fn = studentEl.getElementsByTagName(\"firstName\").item(0).getTextContent();\n\t\t String ln = studentEl.getElementsByTagName(\"lastName\").item(0).getTextContent();\n\t\t String id = studentEl.getElementsByTagName(\"ucid\").item(0).getTextContent();\n\t\t int ucid = Integer.parseInt(id);\n\t\t String cB = studentEl.getElementsByTagName(\"currentBorrowing\").item(0).getTextContent();\n\t\t int cb = Integer.parseInt(cB);\n\t\t String iA = studentEl.getElementsByTagName(\"isActive\").item(0).getTextContent();\n\t\t boolean ia = Boolean.parseBoolean(iA);\n\t\t String username = studentEl.getElementsByTagName(\"username\").item(0).getTextContent();\n\t\t String pW = studentEl.getElementsByTagName(\"password\").item(0).getTextContent();\n\t\t String iL = studentEl.getElementsByTagName(\"isLibrarian\").item(0).getTextContent();\n\t\t boolean isLib = Boolean.parseBoolean(iL);\n\t\t \n\t\t // And then create all a new instance of Student with the info\n\t\t\t Student newStudent = new Student(fn, ln, ucid, cb, ia, username, pW, isLib);\n\t\t\t // Put the newly created student in the right list\n\t\t\t if(ia) {\n\t\t\t \tactiveList.add(newStudent);\n\t\t\t } else {\n\t\t\t \tarchiveList.add(newStudent);\n\t\t\t }\n\t\t }\n\t\t }\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Something went wrong with the Users.xml parsing\");\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\t// Store our arrays so they are accessible elsewhere\n\t\tManageUsers.setActiveList(activeList);\n\t\tManageUsers.setArchiveList(archiveList);\n\t}", "public static void main(String args[]) throws IOException\n {\n String path = \"user.csv\";\n Reader reader = Files.newBufferedReader(Paths.get(path));\n CSVReader csvReader = new CSVReader(reader);\n //Reading all records one by one\n String[] nextRecords;\n while ((nextRecords = csvReader.readNext()) != null) {\n System.out.println(\"Name:\" + nextRecords[0]);\n System.out.println(\"Email:\" + nextRecords[1]);\n System.out.println(\"Phone no:\" + nextRecords[2]);\n System.out.println(\"Country:\" + nextRecords[3]);\n System.out.println(\"=======================\");\n }\n //Reading all records at once\n List<String[]> records = csvReader.readAll();\n for (String[] record : records) {\n System.out.println(\"Name:\" + record[0]);\n System.out.println(\"Email:\" + record[1]);\n System.out.println(\"Phone No:\" + record[2]);\n System.out.println(\"Country:\" + record[3]);\n System.out.println(\"========================\");\n }\n }", "private void loadData(){\n\t\t \n\t\t model.getDataVector().clear();\n\t\t ArrayList<Person> personList = DataBase.getInstance().getPersonList();\n\t\t for(Person person : personList){\n\t\t\t addRow(person.toBasicInfoStringArray());\n\t\t }\n\t\t \n\t }", "public void loadBooks(){\n\t\tSystem.out.println(\"\\n\\tLoading books from CSV file\");\n\t\ttry{\n\t\t\tint iD=0, x;\n\t\t\tString current = null;\n\t\t\tRandom r = new Random();\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(\"../bin/books.csv\"));\n\t\t\twhile((current = br.readLine()) != null){\n\t\t\t\tString[] data = current.split(\",\");\n\t\t\t\tx = r.nextInt(6) + 15;\n\t\t\t\tfor(int i =0;i<x;i++){\n\t\t\t\t\tBook b= new Book(Integer.toHexString(iD), data[0], data[1], data[2], data[3]);\n\t\t\t\t\tif(bookMap.containsKey(data[0]) != true){\n\t\t\t\t\t\tbookMap.put(data[0], new ArrayList<Book>());\n\t\t\t\t\t}\t\n\t\t\t\t\t\t\n\t\t\t\t\tbookMap.get(data[0]).add(b);\n\t\t\t\t\tiD += 1;\n\t\t\t\t}\t\n\t\t\t}\t\t\t\n\t\t\tbr.close();\n\t\t\tSystem.out.println(\"\\tBooks Added!\");\n\t\t}catch(FileNotFoundException e){\n\t\t\tSystem.out.println(\"\\tFile not found\");\n\t\t}catch(IOException e){\n System.out.println(e.toString());\n }\n\t}", "private ArrayList<Entrant> getEntrants(File path,ArrayList<Course> courses)\n {\n Start.log(\"Getting Entrants\");\n ArrayList<Entrant> tempEntrants = new ArrayList<Entrant>();\n ArrayList<String> file = getFile(path);\n for (int i = 0; i < file.size();i++)\n {\n //scan and pharse the data into th relivant feilds\n Scanner scan = new Scanner(file.get(i));\n int entrantNo = scan.nextInt();\n char course = scan.next().charAt(0);\n String name = scan.next() + \" \" + scan.next();\n Course tcourse = null;\n //find the correct course for the entrant and add it in \n for (int j = 0;j < courses.size();j++)\n {\n if (courses.get(j).getIdent() == course)\n {\n tcourse = courses.get(j);\n break; \n }\n } \n tempEntrants.add(new Entrant(entrantNo,tcourse,name));\n }\n \n return tempEntrants;\n }", "public static void main(String[] args) throws IOException {\n\t\tString filePath = \"C:/Users/urban/OneDrive/OD-Documents/DEV/Diginamic/Java/workspaceSTS/recensement-jdbc/resources/recensement.csv\";\n//\t\tRecensement recens = new Recensement(filePath);\n\t\tPath pathFile = Paths.get(filePath);\n\t\t// Récupération des lignes du fichier CSV dans une liste de String\n\t\tList<String> infosBrutesVilles = Files.readAllLines(pathFile);\n\t\tinfosBrutesVilles.remove(0); // Je retire la ligne d'entête\n\n\t\tConnection connection = DbManager.connection();\n\n\t\t// Insertion des lignes du fichier recensement (les villes) dans la table ville\n\t\t// de la DB\n\t\tStatement statement = null;\n\t\ttry {\n\t\t\tstatement = connection.createStatement();\n\t\t\tfor (String line : infosBrutesVilles) {\n\n\t\t\t\t// Conversion de chaque ligne CSV en tableau de String\n\t\t\t\tString[] tabInfosVilles = line.split(\";\");\n\n\t\t\t\t// Récupération des colonnes du CSV qui nous intéressent\n\t\t\t\tString codeRegion = tabInfosVilles[0];\n\t\t\t\tString codeDep = tabInfosVilles[2];\n\t\t\t\tString nomCommune = tabInfosVilles[6];\n\t\t\t\tint populationTotale = Integer.parseInt(tabInfosVilles[9].replaceAll(\" \", \"\"));\n\n\t\t\t\tPreparedStatement prepStatement = connection\n\t\t\t\t\t\t.prepareStatement(\"INSERT INTO \" + \"ville(nom, population) \" + \"VALUES (?, ?)\");\n\n\t\t\t\tprepStatement.setString(1, nomCommune);\n\t\t\t\tprepStatement.setInt(2, populationTotale);\n\n\t\t\t\tprepStatement.executeUpdate();\n\t\t\t}\n\n\t\t\tstatement.close();\n\t\t\tconnection.close();\n\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"Echec de la requête SQL : \" + e.getMessage());\n\t\t}\n\n\t}", "public void loadData() {\n String[] animalsListRaw = loadStrings(\"data/animalList.csv\");\n //String[] animalsListRaw = loadStrings(\"data/mythical.creatures.csv\");\n String[] animalList = getList(animalsListRaw);\n SearchQuery newSearch = new SearchQuery(animalList); \n allMaps = newSearch.getMap();\n \n map = new UnfoldingMap(this);\n map.setBackgroundColor(color(179, 223, 222, 255));\n map.zoomAndPanTo(width/2, height/2, 2);\n //MapUtils.createDefaultEventDispatcher(this, map);\n countries = GeoJSONReader.loadData(this, \"countries.geo.json\");\n marks = new MarkerMaker(allMaps, countries);\n map.draw();\n}", "public void load() throws CityException{\r\n \r\n allRanks = new ArrayList<Rank>();\r\n File file = new File(RANK_DATA_DIRECTORY);\r\n Scanner rankDataReader = null;\r\n Scanner lineReader = null;\r\n\r\n try {\r\n\r\n rankDataReader = new Scanner(file);\r\n\r\n ArrayList<String> rankDataArray = new ArrayList<String>();\r\n int count = 0;\r\n\r\n while (rankDataReader.hasNext()) {\r\n\r\n String rankDataLine = rankDataReader.nextLine();\r\n\r\n if (count > 0) {\r\n\r\n String[] rankData = rankDataLine.split(\",\");\r\n\r\n String rankName = rankData[0];\r\n int xp = Integer.parseInt(rankData[1]);\r\n int plotAvailable = Integer.parseInt(rankData[2]);\r\n\r\n allRanks.add(new Rank(rankName, xp, plotAvailable));\r\n }\r\n\r\n count++;\r\n }\r\n\r\n } catch (FileNotFoundException e) {\r\n throw new CityException(\"InvalidFile\");\r\n } finally {\r\n rankDataReader.close();\r\n }\r\n }", "@Override\n\tpublic List<Personne> generateStudents(MultipartFile file) throws IllegalStateException, IOException{\n\t\tList<Personne> students=new ArrayList<Personne>();\n\t\tPersonne student=new Personne();\n\t\tString line = \"\";\n\t\tfile.transferTo(new File(\"D:\\\\files\\\\\" + file.getOriginalFilename()));\n\t\ttry {\n\t\t\tBufferedReader br;\n\t\t\tbr = new BufferedReader( new FileReader(\"D:\\\\files\\\\\" + file.getOriginalFilename()));\n\t\t\twhile((line = br.readLine())!=null)\n\t\t\t{\n\t\t\t\tString [] data =line.split(\",\");\n\t\t\t\tPersonne etudiant = new Personne();\n\t\t\t // etudient.setId((long) Integer.parseInt(data[0]));\n\t\t\t\tetudiant.setNom(data[0]);\n\t\t\t\tetudiant.setPrenom(data[1]);\n\t\t\t\tetudiant.setCin(data[2]);\n\t\t\t\tetudiant.setCin(data[2]);\n\t\t\t\tetudiant.setCin(data[2]);\n\t\t\t\tetudiant.setCin(data[2]);\n\t\t\t\tetudiant.setCin(data[2]);\n\t\t\t\t//etudiant.setNom(data[3]);\n\t\t\t\tstudent=persoRepo.save(etudiant);\n\t\t\t\tif(student !=null) {\n\t\t\t\t\tstudents.add(student);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\tbr.close();\n\t\t\t\n\t\t}\n\t\tcatch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn students;\n\t\t\n\t}", "public void Read_Csv() {\n\t\t\n\t\tFile file = new File(\"Faucets.csv\");\n\t\tif(file.exists() == false) {\n\t\t\ttry {\n\t\t\t\t if (file.createNewFile()) {\n\t\t\t\t System.out.println(\"File created: \" + file.getName());\n\t\t\t\t } else {\n\t\t\t\t System.out.println(\"File already exists... Error\");\n\t\t\t\t }\n\t\t\t\t \n\t\t\t\tFileWriter myWriter = new FileWriter(\"Faucets.csv\");\n\t\t\t\tmyWriter.write(\"Freebitco.in,3600,228,\");\n\t\t\t\tmyWriter.close();\n\t\t\t\t\n\t\t\t\t\n\t\t\t}catch (IOException e) {\n\t\t\t\tSystem.out.println(\"Error\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t//Reading the file\n\t\tString line = null;\n\t\ttry {\n\t\t\tFileReader fileReader = new FileReader(\"Faucets.csv\");\n\t\t\tBufferedReader bufferedReader = new BufferedReader(fileReader);\n\t\t\t\n\t\t\tint x = 0;\n\t\t\tint commacounter = 0;\n\t\t\tint commaposition[] = new int[3];\n\t\t\twhile((line = bufferedReader.readLine()) != null) {\n\t\t\t\t\n\t\t\t\twhile(x < line.length()) {\n\t\t\t\t\t\n\t\t\t\t\tif(line.charAt(x) == ',') {\n\t\t\t\t\t\tcommaposition[commacounter] = x;\n\t\t\t\t\t\tcommacounter +=1;\n\t\t\t\t\t}\n\t\t\t\t\tif(commacounter == 3) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tFaucets.site[amount_counter] = line.substring(0, commaposition[0]);\n\t\t\t\t\t\tFaucets.time[amount_counter] = Integer.parseInt(line.substring(commaposition[0]+1, commaposition[1]));\n\t\t\t\t\t\tFaucets.amount[amount_counter] = Integer.parseInt(line.substring(commaposition[1]+1, commaposition[2]));\n\t\t\t\t\t\tamount_counter += 1;\n\t\t\t\t\t\tcommacounter=0;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tx+=1;\n\t\t\t\t}\n\t\t\t\tx=0;\n\t\t\t}\n\t\t\tbufferedReader.close();\n\t\t\t\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\t\n\t\n\t\t\t\n\t}", "public void cadastrarOfertasQuad3(){\n String[] palavras;\n \n //Primeiro quadrimestre\n try {\n try (BufferedReader lerArq = new BufferedReader(new InputStreamReader(new FileInputStream(\"/home/charles/alocacao/Arquivos Alocação/Arquivos CSV/Planejamento2017_q3.csv\"), \"UTF-8\"))) {\n String linha = lerArq.readLine(); //cabeçalho\n \n linha = lerArq.readLine();\n\n// linha = linha.replaceAll(\"\\\"\", \"\");\n while (linha != null) {\n\n linha = linha.replaceAll(\"\\\"\", \"\");\n\n palavras = linha.split(\";\", -1);\n\n oferta = new OfertaDisciplina();\n\n oferta.setCurso(palavras[0]);//2\n\n String nome = palavras[2];//4\n \n String codigo = palavras[1];//3\n \n Disciplina d = disciplinaFacade.findByCodOrName(codigo, nome);\n\n if (d != null) {\n// Disciplina d = disciplinaFacade.findByName(nome).get(0);\n oferta.setDisciplina(d);\n }\n oferta.setT(Integer.parseInt(palavras[3]));//5\n oferta.setP(Integer.parseInt(palavras[4]));//6\n oferta.setTurno(palavras[6]);//11\n oferta.setCampus(palavras[7]);//12\n if (!palavras[8].equals(\"\")) {\n oferta.setNumTurmas(Integer.parseInt(palavras[8]));//13\n }\n if (!palavras[9].equals(\"\")) {\n oferta.setPeriodicidade(palavras[9]);//19\n } else{\n oferta.setPeriodicidade(\"semanal\");\n }\n oferta.setQuadrimestre(3);\n\n salvarNoBanco();\n\n linha = lerArq.readLine();\n// linha = linha.replaceAll(\"\\\"\", \"\");\n }\n } //cabeçalho\n ofertas3LazyModel = null;\n\n } catch (IOException e) {\n System.err.printf(\"Erro na abertura do arquivo: %s.\\n\", e.getMessage());\n } \n }", "private void loadCSVFileIntoHashmap(){\n try {\n postCodesFileReader = new FileReader(postCodesFileLocation);\n String line;\n //Open up the buffered reader so we can start looping through our CSV file\n BufferedReader br = new BufferedReader(postCodesFileReader);\n while ((line = br.readLine()) != null) {\n String[] country = line.split(fieldSeperator);\n if(country.length<=3){\n //Add the region code and matching country to the hashmap\n postCodesMap.put(country[0].trim(), country[2].trim());\n }\n }\n br.close();\n } \n catch (Exception e) {\n //Ideally we would use a custom log file, but for the sake of a quick demo use the stderr \n e.printStackTrace();\n } \n }", "void read() {\n try {\n pre_list = new ArrayList<>();\n suf_list = new ArrayList<>();\n p_name = new ArrayList<>();\n stem_word = new ArrayList<>();\n\n //reading place and town name\n for (File places : place_name.listFiles()) {\n fin = new FileInputStream(places);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n place.add(temp);\n }\n\n }\n\n //reading month name\n for (File mont : month_name.listFiles()) {\n fin = new FileInputStream(mont);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n month.add(temp);\n }\n }\n\n //reading compound words first\n for (File comp_word : com_word_first.listFiles()) {\n fin = new FileInputStream(comp_word);\n scan = new Scanner(fin);\n while (scan.hasNextLine()) {\n temp = scan.nextLine();\n temp = Normalization(temp);\n comp_first.add(temp);\n }\n }\n //reading next word of the compound\n for (File comp_word_next : com_word_next.listFiles()) {\n fin = new FileInputStream(comp_word_next);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n comp_next.add(temp);\n }\n }\n //reading chi square feature\n for (File entry : chifile.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n chiunion.add(temp);\n }\n newunions.clear();\n newunions.addAll(chiunion);\n chiunion.clear();\n chiunion.addAll(newunions);\n chiunion.removeAll(stop_word_list);\n chiunion.removeAll(p_name);\n chiunion.removeAll(month);\n chiunion.removeAll(place);\n }\n //reading short form from abbrivation \n for (File short_list : abbrivation_short.listFiles()) {\n fin = new FileInputStream(short_list);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n shortform.add(temp);\n }\n }\n //reading long form from the abrivation \n for (File long_list : abbrivation_long.listFiles()) {\n fin = new FileInputStream(long_list);\n scan = new Scanner(fin);\n while (scan.hasNextLine()) {\n temp = scan.nextLine();\n temp = Normalization(temp);\n longform.add(temp);\n }\n }\n //reading file from stop word\n for (File stoplist : stop_word.listFiles()) {\n fin = new FileInputStream(stoplist);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n stop_word_list.add(temp);\n }\n }\n\n //reading person name list\n for (File per_name : person_name.listFiles()) {\n fin = new FileInputStream(per_name);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n p_name.add(temp);\n }\n }\n\n //reading intersection union\n for (File entry : interfile.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (temp.length() < 2 && temp.length() > 9) {\n\n } else {\n interunion.add(temp);\n }\n }\n newunions.clear();\n newunions.addAll(interunion);\n interunion.clear();\n interunion.addAll(newunions);\n interunion.removeAll(stop_word_list);\n interunion.removeAll(p_name);\n interunion.removeAll(month);\n interunion.removeAll(place);\n }\n // reading ig union\n for (File entry : igfile.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (temp.length() < 2 && temp.length() > 9) {\n\n } else {\n igunion.add(temp);\n }\n }\n for (String str : igunion) {\n int index = igunion.indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n igunion.set(index, stem_word.get(i));\n }\n }\n }\n newunions.clear();\n newunions.addAll(igunion);\n igunion.clear();\n igunion.addAll(newunions);\n igunion.removeAll(stop_word_list);\n igunion.removeAll(p_name);\n igunion.removeAll(month);\n igunion.removeAll(place);\n }\n //read df uinfion\n for (File entry : dffile.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (temp.length() < 2 && temp.length() > 9) {\n\n } else {\n dfunion.add(temp);\n }\n }\n for (String str : dfunion) {\n int index = dfunion.indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n dfunion.set(index, stem_word.get(i));\n }\n }\n }\n newunions.clear();\n newunions.addAll(dfunion);\n dfunion.clear();\n dfunion.addAll(newunions);\n dfunion.removeAll(stop_word_list);\n dfunion.removeAll(p_name);\n dfunion.removeAll(month);\n dfunion.removeAll(place);\n }\n //reading unified model\n for (File entry : unionall_3.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (temp.length() < 2 && temp.length() > 9) {\n\n } else {\n union_3.add(temp);\n }\n }\n for (String str : union_3) {\n int index = union_3.indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n union_3.set(index, stem_word.get(i));\n }\n }\n }\n newunions.clear();\n newunions.addAll(union_3);\n union_3.clear();\n union_3.addAll(newunions);\n union_3.removeAll(stop_word_list);\n union_3.removeAll(p_name);\n union_3.removeAll(month);\n union_3.removeAll(place);\n }\n //unified feature for the new model\n for (File entry : unified.listFiles()) {\n\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n newunion.add(temp);\n\n }\n for (String str : newunion) {\n int index = newunion.indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n newunion.set(index, stem_word.get(i));\n }\n }\n }\n newunions.clear();\n newunions.addAll(newunion);\n newunion.clear();\n newunion.addAll(newunions);\n newunion.removeAll(stop_word_list);\n newunion.removeAll(p_name);\n newunion.removeAll(month);\n newunion.removeAll(place);\n\n // newunion.addAll(newunions);\n }\n // reading test file and predict the class\n for (File entry : test_doc.listFiles()) {\n fin = new FileInputStream(entry);\n scan = new Scanner(fin);\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n file_test.add(temp);\n\n }\n newunions.clear();\n newunions.addAll(file_test);\n file_test.clear();\n file_test.addAll(newunions);\n file_test.removeAll(stop_word_list);\n file_test.removeAll(p_name);\n file_test.removeAll(month);\n file_test.removeAll(place);\n }\n //reading the whole document under economy class\n for (File entry : economy.listFiles()) {\n fill = new File(economy + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n economydocument[count1] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n economydocument[count1].add(temp);\n if (temp.length() < 2) {\n economydocument[count1].remove(temp);\n }\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n economydocument[count1].remove(temp);\n }\n }\n for (String str : economydocument[count1]) {\n int index = economydocument[count1].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n economydocument[count1].set(index, stem_word.get(i));\n }\n }\n }\n }\n economydocument[count1].removeAll(stop_word_list);\n economydocument[count1].removeAll(p_name);\n economydocument[count1].removeAll(month);\n economydocument[count1].removeAll(place);\n allecofeature.addAll(economydocument[count1]);\n ecofeature.addAll(economydocument[count1]);\n allfeature.addAll(ecofeature);\n all.addAll(allecofeature);\n count1++;\n\n }\n //reading the whole documents under education category \n for (File entry : education.listFiles()) {\n fill = new File(education + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n educationdocument[count2] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n educationdocument[count2].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n educationdocument[count2].remove(temp);\n }\n }\n }\n\n for (String str : educationdocument[count2]) {\n int index = educationdocument[count2].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n educationdocument[count2].set(index, stem_word.get(i));\n }\n }\n }\n educationdocument[count2].removeAll(stop_word_list);\n educationdocument[count2].removeAll(p_name);\n educationdocument[count2].removeAll(month);\n educationdocument[count2].removeAll(place);\n alledufeature.addAll(educationdocument[count2]);\n edufeature.addAll(educationdocument[count2]);\n allfeature.addAll(edufeature);\n all.addAll(alledufeature);\n count2++;\n }\n// //reading all the documents under sport category\n for (File entry : sport.listFiles()) {\n fill = new File(sport + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n sportdocument[count3] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n sportdocument[count3].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n sportdocument[count3].remove(temp);\n }\n }\n }\n\n for (String str : sportdocument[count3]) {\n int index = sportdocument[count3].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n sportdocument[count3].set(index, stem_word.get(i));\n }\n }\n }\n sportdocument[count3].removeAll(stop_word_list);\n sportdocument[count3].removeAll(p_name);\n sportdocument[count3].removeAll(month);\n sportdocument[count3].removeAll(place);\n allspofeature.addAll(sportdocument[count3]);\n spofeature.addAll(sportdocument[count3]);\n allfeature.addAll(spofeature);\n all.addAll(allspofeature);\n count3++;\n }\n\n// //reading all the documents under culture category\n for (File entry : culture.listFiles()) {\n fill = new File(culture + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n culturedocument[count4] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n\n culturedocument[count4].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n culturedocument[count4].remove(temp);\n }\n }\n\n }\n for (String str : culturedocument[count4]) {\n int index = culturedocument[count4].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n culturedocument[count4].set(index, stem_word.get(i));\n }\n }\n }\n culturedocument[count4].removeAll(stop_word_list);\n culturedocument[count4].removeAll(p_name);\n culturedocument[count4].removeAll(month);\n culturedocument[count4].removeAll(place);\n allculfeature.addAll(culturedocument[count4]);\n culfeature.addAll(culturedocument[count4]);\n allfeature.addAll(culfeature);\n all.addAll(allculfeature);\n count4++;\n\n }\n\n// //reading all the documents under accident category\n for (File entry : accident.listFiles()) {\n fill = new File(accident + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n accedentdocument[count5] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n accedentdocument[count5].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n accedentdocument[count5].remove(temp);\n }\n }\n\n }\n\n for (String str : accedentdocument[count5]) {\n int index = accedentdocument[count5].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n accedentdocument[count5].set(index, stem_word.get(i));\n }\n }\n }\n accedentdocument[count5].removeAll(stop_word_list);\n accedentdocument[count5].removeAll(p_name);\n accedentdocument[count5].removeAll(month);\n accedentdocument[count5].removeAll(place);\n allaccfeature.addAll(accedentdocument[count5]);\n accfeature.addAll(accedentdocument[count5]);\n allfeature.addAll(accfeature);\n all.addAll(allaccfeature);\n count5++;\n }\n\n// //reading all the documents under environmental category\n for (File entry : environmntal.listFiles()) {\n fill = new File(environmntal + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n environmntaldocument[count6] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n environmntaldocument[count6].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n environmntaldocument[count6].remove(temp);\n }\n }\n }\n\n for (String str : environmntaldocument[count6]) {\n int index = environmntaldocument[count6].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n environmntaldocument[count6].set(index, stem_word.get(i));\n }\n }\n }\n environmntaldocument[count6].removeAll(stop_word_list);\n environmntaldocument[count6].removeAll(p_name);\n environmntaldocument[count6].removeAll(month);\n environmntaldocument[count6].removeAll(place);\n allenvfeature.addAll(environmntaldocument[count6]);\n envfeature.addAll(environmntaldocument[count6]);\n allfeature.addAll(envfeature);\n all.addAll(allenvfeature);\n count6++;\n }\n\n// //reading all the documents under foreign affairs category\n for (File entry : foreign_affair.listFiles()) {\n fill = new File(foreign_affair + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n foreign_affairdocument[count7] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n foreign_affairdocument[count7].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n foreign_affairdocument[count7].remove(temp);\n }\n }\n\n }\n for (String str : foreign_affairdocument[count7]) {\n int index = foreign_affairdocument[count7].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n foreign_affairdocument[count7].set(index, stem_word.get(i));\n }\n }\n }\n foreign_affairdocument[count7].removeAll(stop_word_list);\n foreign_affairdocument[count7].removeAll(p_name);\n foreign_affairdocument[count7].removeAll(month);\n foreign_affairdocument[count7].removeAll(place);\n alldepfeature.addAll(foreign_affairdocument[count7]);\n depfeature.addAll(foreign_affairdocument[count7]);\n allfeature.addAll(depfeature);\n all.addAll(alldepfeature);\n count7++;\n }\n\n// //reading all the documents under law and justices category\n for (File entry : law_justice.listFiles()) {\n fill = new File(law_justice + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n law_justicedocument[count8] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n law_justicedocument[count8].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n law_justicedocument[count8].remove(temp);\n }\n }\n\n }\n for (String str : law_justicedocument[count8]) {\n int index = law_justicedocument[count8].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n law_justicedocument[count8].set(index, stem_word.get(i));\n }\n }\n }\n law_justicedocument[count8].removeAll(stop_word_list);\n law_justicedocument[count8].removeAll(p_name);\n law_justicedocument[count8].removeAll(month);\n law_justicedocument[count8].removeAll(month);\n alllawfeature.addAll(law_justicedocument[count8]);\n lawfeature.addAll(law_justicedocument[count8]);\n allfeature.addAll(lawfeature);\n all.addAll(alllawfeature);\n count8++;\n }\n\n// //reading all the documents under other category\n for (File entry : agri.listFiles()) {\n fill = new File(agri + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n agriculture[count9] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n agriculture[count9].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n agriculture[count9].remove(temp);\n }\n }\n\n }\n for (String str : agriculture[count9]) {\n int index = agriculture[count9].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n agriculture[count9].set(index, stem_word.get(i));\n }\n }\n }\n agriculture[count9].removeAll(stop_word_list);\n agriculture[count9].removeAll(p_name);\n agriculture[count9].removeAll(month);\n agriculture[count9].removeAll(place);\n allagrifeature.addAll(agriculture[count9]);\n agrifeature.addAll(agriculture[count9]);\n allfeature.addAll(agrifeature);\n all.addAll(allagrifeature);\n count9++;\n }\n //reading all the documents under politics category\n for (File entry : politics.listFiles()) {\n fill = new File(politics + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n politicsdocument[count10] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n politicsdocument[count10].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n politicsdocument[count10].remove(temp);\n }\n }\n }\n for (String str : politicsdocument[count10]) {\n int index = politicsdocument[count10].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n politicsdocument[count10].set(index, stem_word.get(i));\n }\n }\n }\n politicsdocument[count10].removeAll(stop_word_list);\n politicsdocument[count10].removeAll(p_name);\n politicsdocument[count10].removeAll(month);\n politicsdocument[count10].removeAll(place);\n allpolfeature.addAll(politicsdocument[count10]);\n polfeature.addAll(politicsdocument[count10]);\n allfeature.addAll(polfeature);\n all.addAll(allpolfeature);\n count10++;\n }\n //reading all the documents under science and technology category\n for (File entry : science_technology.listFiles()) {\n fill = new File(science_technology + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n science_technologydocument[count12] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n science_technologydocument[count12].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n science_technologydocument[count12].remove(temp);\n }\n }\n\n }\n for (String str : science_technologydocument[count12]) {\n int index = science_technologydocument[count12].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n science_technologydocument[count12].set(index, stem_word.get(i));\n }\n }\n }\n science_technologydocument[count12].removeAll(stop_word_list);\n science_technologydocument[count12].removeAll(p_name);\n science_technologydocument[count12].removeAll(month);\n science_technologydocument[count12].removeAll(place);\n allscifeature.addAll(science_technologydocument[count12]);\n scifeature.addAll(science_technologydocument[count12]);\n allfeature.addAll(scifeature);\n all.addAll(allscifeature);\n count12++;\n\n }\n\n //reading all the documents under health category\n for (File entry : health.listFiles()) {\n fill = new File(health + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n healthdocument[count13] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n healthdocument[count13].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n healthdocument[count13].remove(temp);\n }\n }\n }\n for (String str : healthdocument[count13]) {\n int index = healthdocument[count13].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n healthdocument[count13].set(index, stem_word.get(i));\n }\n }\n }\n healthdocument[count13].removeAll(stop_word_list);\n healthdocument[count13].removeAll(p_name);\n healthdocument[count13].removeAll(month);\n healthdocument[count13].removeAll(place);\n allhelfeature.addAll(healthdocument[count13]);\n helfeature.addAll(healthdocument[count13]);\n allfeature.addAll(helfeature);\n all.addAll(allhelfeature);\n count13++;\n }\n\n //reading all the file of relgion categories \n for (File entry : army_file.listFiles()) {\n fill = new File(army_file + \"\\\\\" + entry.getName());\n fin = new FileInputStream(fill);\n scan = new Scanner(fin);\n army[count14] = new ArrayList<>();\n while (scan.hasNext()) {\n temp = scan.next();\n temp = Normalization(temp);\n set.add(temp);\n if (comp_first.contains(temp)) {\n int index = comp_first.indexOf(temp);\n next = comp_next.get(index);\n if (comp_next.contains(next)) {\n temp = temp + next;\n }\n }\n if (shortform.contains(temp)) {\n int i = shortform.indexOf(temp);\n temp = longform.get(i);\n }\n army[count14].add(temp);\n for (char dig : temp.toCharArray()) {\n if (Character.isDigit(dig)) {\n army[count14].remove(temp);\n }\n }\n\n }\n for (String str : army[count14]) {\n int index = army[count14].indexOf(str);\n for (int i = 0; i < stem_word.size(); i++) {\n if (inf_derv[i].contains(str)) {\n army[count14].set(index, stem_word.get(i));\n }\n }\n }\n army[count14].removeAll(stop_word_list);\n army[count14].removeAll(p_name);\n army[count14].removeAll(month);\n army[count14].removeAll(place);\n allarmfeature.addAll(army[count14]);\n armfeature.addAll(army[count14]);\n allfeature.addAll(armfeature);\n all.addAll(allarmfeature);\n count14++;\n }\n } catch (Exception ex) {\n System.out.println(\"here\");\n }\n }", "protected void readCSVToMap(String filename) throws Exception{ // IMPORTANT FUNCTION\n db = new HashMap<String, List<String>>();\n keys = new ArrayList<String>();\n InputStream is = getAssets().open(\"ABBREV_2.txt\");\n //File f = new File(path.toURI());\n //File f = new File(path.getFile());\n BufferedReader in = new BufferedReader(new InputStreamReader(is));//new BufferedReader(new FileReader(\"ABBREV_2.txt\"));\n String line = \"\";\n while ((line = in.readLine()) != null) {\n String parts[] = line.split(\"\\t\");\n List<String> nutrition = new ArrayList();\n for (int i = 1; i < parts.length; i++){\n nutrition.add(parts[i]);\n }\n db.put(parts[0], nutrition);\n keys.add(parts[0]);\n }\n in.close();\n\n }", "private static City[] fileInterpreter(Scanner file,int numberOfLines){\n City[] cities = new City [numberOfLines];\n for(int i = 0 ; file.hasNextLine(); i++){\n String line = file.nextLine();\n Scanner string = new Scanner(line); //String Scanner to consume the line into city and country and rainfall...\n String cityName = string.next();\n String countryName = string.next();\n double[] data = extractRainfallInformation(line.split(\"[ \\t]+[ \\t]*\")); //to create the array of monthly rainfall\n cities[i] = new City(cityName , countryName , data);\n string.close();\n }\n file.close();\n return cities;\n }", "@Override\r\n public void build() throws IOException, TwitterException {\r\n // Read the csv file\r\n CSVReader csvr = new CSVReader(\";\", sourcePath);\r\n // Will contains the csv file rows\r\n ArrayList<String[]> rows;\r\n // Set builder params\r\n setBuilderParams(indexPath);\r\n // Get the whole CSV rows\r\n rows = csvr.readCSV();\r\n \r\n TweetsIndexManager tim = new TweetsIndexManager(\"index/AllTweetsIndex\");\r\n\r\n // Mantain the id of a user\r\n String id;\r\n // Manatain the id and the number of the followers of the user\r\n String[] result;\r\n // Mantain the number of followers of that user\r\n int followers;\r\n \r\n int tNotFound = 0;\r\n int tFound = 0;\r\n \r\n // For each politicians in the file read\r\n for (String[] row : rows) {\r\n // Get the politician name\r\n String name = row[0];\r\n // Get the politician surname\r\n //String surname = row[1];\r\n // Get all users that have the same name of the politician\r\n result = findUserTwitterId(name, tim);\r\n // Get the userId\r\n id = result[0]; // row[1]; \r\n // Get the number of followers\r\n followers = Integer.parseInt(result[1]);\r\n \r\n //System.out.println(\"Current twitter ID: \" + id);\r\n \r\n if(id.equals(\"\")) {\r\n tNotFound++;\r\n id= row[1];\r\n followers = 800;\r\n } else {\r\n tFound++;\r\n }\r\n \r\n //System.out.println(\"Politicians Builder index path: \" + this.indexPath);\r\n \r\n //System.out.println(\"Search for : \" + name + \", followers: \" + followers);\r\n // If a user was found and it has at list a certain value of followers\r\n if (!id.equals(\"\") && followers >= 800) {\r\n // Create a new document for the index\r\n this.name.setStringValue((name).toLowerCase());\r\n this.screenName.setStringValue(id);\r\n\r\n //System.out.println(\"\");\r\n //System.out.println(this.politician.get(\"name\"));\r\n //System.out.println(this.politician.get(\"screenName\"));\r\n\r\n // Define the politician vote\r\n // If the pol vote is equal to his group vote\r\n /*if (row[2].equals(groupVote.get(row[3]))) {\r\n // Return his vote and write the document\r\n this.vote.setStringValue(row[2]);\r\n this.writer.addDocument(this.politician);\r\n System.out.println(this.politician.get(\"vote\"));\r\n // If the pol vote is defined in the csv file\r\n } else if (row[2].equals(\"si\") || row[2].equals(\"no\")) {\r\n // Return his vote and write the document\r\n this.vote.setStringValue(row[2]);\r\n this.writer.addDocument(this.politician);\r\n System.out.println(this.politician.get(\"vote\"));\r\n // If the pol vote is not defined in the csv file\r\n } else if (row[2].equals(\"-\") && !row[3].equals(\"MISTO\")) {\r\n // Return his group vote and write the document\r\n this.vote.setStringValue(groupVote.get(row[3]));\r\n this.writer.addDocument(this.politician);\r\n System.out.println(this.politician.get(\"vote\"));\r\n }*/\r\n \r\n \r\n this.vote.setStringValue(groupVote.get(row[2]));\r\n \r\n //this.vote.setStringValue(\"si\");\r\n \r\n //System.out.println(this.politician.get(\"vote\"));\r\n \r\n this.writer.addDocument(this.politician);\r\n }\r\n \r\n //System.out.println(\"Party: \" + row[2]);\r\n //System.out.println(\"----------------\");\r\n \r\n this.writer.commit();\r\n \r\n }\r\n \r\n System.out.println(\"Twitter IDs not found: \" + tNotFound);\r\n \r\n System.out.println(\"Twitter IDs found: \" + tFound);\r\n \r\n this.writer.close();\r\n }", "public void readFile(File inputFile) throws FileNotFoundException, IOException, ClassNotFoundException {\n\n ArrayList<Student> studentList = null;\n int noOfStudents = 1; int noOfProjects = 0;\n int count = 1;\n String title; String school; String supervisor; Project project = null; \n ArrayList<Project> projectList = new ArrayList<>();\n\n Scanner scan = new Scanner(new FileReader(inputFile));\n String line = null;\n\n while (scan.hasNextLine()) {\n studentList = new ArrayList<>();\n \n if (count == 1) {\n line = scan.nextLine();\n noOfProjects = Integer.parseInt(line);\n System.out.println(line);\n }\n\n line = scan.nextLine();\n String[] projectInfo = line.split(\",\", 5);\n noOfStudents = Integer.parseInt(projectInfo[3]);\n String[] studentInfo = projectInfo[4].split(\",\");\n\n Student student = null;\n \n for (int k = 0; k < studentInfo.length; k+=4) {\n //new Student(AdminNo, Name, Course, Gender)\n student = new Student(studentInfo[k], studentInfo[k+1], studentInfo[k+2], studentInfo[k+3]);\n studentList.add(student); //Add new Student to List\n }\n\n title = projectInfo[0];\n school = projectInfo[1];\n supervisor = projectInfo[2];\n project = new Project(title, school, supervisor, noOfStudents, studentList);\n \n System.out.println(line);\n count++;\n \n projectList.add(project);\n }\n\n for (Student stud: studentList) {\n System.out.println(stud.getAdminNo() + stud.getCourse() + stud.getGender() + stud.getName());\n }\n \n writeToFile(project);\n \n scan.close();\n }", "private static void populateZipcodeList() {\n\t\t// only load the data once...\n\t\tif (ZipCodes.zipCodesList.size() > 0) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tList<String> headers = null;\n\t\tList<String> values = null;\n\t\tString line = null;\n\t\t\n\t\t// create handle the source data file\n\t\tInputStream stream = ZipCodes.class.getResourceAsStream(\"zipCodes.csv\");\n\t\tBufferedReader buffer = new BufferedReader(new InputStreamReader(stream));\n\n try {\n\t\t\t// pull header row\n \theaders = Arrays.asList(buffer.readLine().split(\",\"));\n \t\n \t// add data rows\n \twhile((line = buffer.readLine()) != null) {\n \t\n \t\tHashMap<String, String> zip = new HashMap<String, String>();\n \t\tvalues = Arrays.asList(line.split(\",\"));\n \t\tfor (int i = 0; i < headers.size(); i++) {\n \t\t\tzip.put(headers.get(i), values.get(i));\n \t\t}\n \t\tZipCodes.zipCodesList.add(zip);\n\t\t\t}\n\t\t\tstream.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\t}", "private void inflateFromFile() {\n\t\t\n\t\tFile file = null;\t\t\n\t\ttry {\n\t\t\tfile = new File(FILE_PATH);\n\t\t} catch (NullPointerException e) {\n\t\t\tSystem.exit(1);\n\t\t}\n\t\t\n\t\tFileReader reader = null;\t\t\n\t\ttry {\n\t\t\treader = new FileReader(file);\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"Can't find source (json file)\");\n\t\t\tSystem.err.println(e.getMessage());\n\t\t\tSystem.exit(1);\n\t\t\t\n\t\t}\n\t\t\n\t\tJSONObject jsonObject = new JSONObject(\n\t\t\t\tnew JSONTokener(reader)\n\t\t\t\t);\n\t\t\n\t\tJSONArray array = jsonObject.getJSONArray(\"students\");\n\t\t\n\t\tfor (int i = 0; i < array.length(); i++) {\t\t\t\n\t\t\tJSONObject student = array.getJSONObject(i);\t\t\t\n\t\t\tString name = student.getString(\"name\");\n\t\t\tString secondName = student.getString(\"secondName\");\n\t\t\tString surname = student.getString(\"surname\");\n\t\t\tString birthday = student.getString(\"birthday\");\n\t\t\tString facultet = student.getString(\"facultet\");\n\t\t\tint groupNumber = student.getInt(\"groupNumber\");\n\t\t\t\n\t\t\tDate dateBirthday = null; \n\t\t\t//делаем Date из строки\t\t\t\n\t\t\ttry {\n\t\t\t\tdateBirthday = new SimpleDateFormat(\"dd.MM.yyyy\").parse(birthday);\n\t\t\t} catch(ParseException e) {\n\t\t\t\tSystem.err.println(\"Can't understand the date format from source.\");\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\tstudents.add(\n\t\t\t\t\tStudent.get(name, secondName, surname, dateBirthday, facultet, groupNumber)\n\t\t\t\t\t);\t\t\t\n\t\t}\t\t\t\n\t}", "public void generateAuthorBibFile(String FILE_URL, String autor_name, String institution) throws IOException {\n\t\t\t \n\t\t\t String FILE_NAME = \"C:\\\\Users\\\\Usuário\\\\eclipse-workspace\\\\DesambAgent_v3\\\\src\\\\bibfolder\\\\todas_unis\\\\\" + autor_name + \"_\" + institution + \".bib\";\n\t\t\t \n\t\t\t InputStream in = new URL(FILE_URL).openStream();\n\t\t\t Files.copy(in, Paths.get(FILE_NAME), StandardCopyOption.REPLACE_EXISTING);\n\t\t\t \n\t\t\t \n\t\t }", "public void cadastrarOfertasQuad2(){\n \n String[] palavras;\n \n //Primeiro quadrimestre\n try {\n try (BufferedReader lerArq = new BufferedReader(new InputStreamReader(new FileInputStream(\"/home/charles/alocacao/Arquivos Alocação/Arquivos CSV/Planejamento2017_q2.csv\"), \"UTF-8\"))) {\n String linha = lerArq.readLine(); //cabeçalho\n \n linha = lerArq.readLine(); \n\n// linha = linha.replaceAll(\"\\\"\", \"\");\n while (linha != null) {\n\n linha = linha.replaceAll(\"\\\"\", \"\");\n\n palavras = linha.split(\";\", -1);\n\n oferta = new OfertaDisciplina();\n\n oferta.setCurso(palavras[0]);//2\n\n String nome = palavras[2];//4\n \n String codigo = palavras[1];//3\n \n Disciplina d = disciplinaFacade.findByCodOrName(codigo, nome);\n\n if (d != null) {\n// Disciplina d = disciplinaFacade.findByName(nome).get(0);\n oferta.setDisciplina(d);\n }\n oferta.setT(Integer.parseInt(palavras[3]));//5\n oferta.setP(Integer.parseInt(palavras[4]));//6\n oferta.setTurno(palavras[6]);//11\n oferta.setCampus(palavras[7]);//12\n if (!palavras[8].equals(\"\")) {\n oferta.setNumTurmas(Integer.parseInt(palavras[8]));//13\n }\n if (!palavras[9].equals(\"\")) {\n oferta.setPeriodicidade(palavras[9]);//19\n } else{\n oferta.setPeriodicidade(\"semanal\");\n }\n oferta.setQuadrimestre(2);\n\n salvarNoBanco();\n\n linha = lerArq.readLine();\n// linha = linha.replaceAll(\"\\\"\", \"\");\n }\n } //cabeçalho\n ofertas2LazyModel = null;\n\n } catch (IOException e) {\n System.err.printf(\"Erro na abertura do arquivo: %s.\\n\", e.getMessage());\n }\n }", "public void run() {\n CsvParser parser = this.initializeParser();\n\n // Initialize data structures\n String[] firstLine = parser.parseNext();\n List<MutableRoaringBitmap> dataset = new ArrayList<>(firstLine.length);\n for (int i = 0; i < firstLine.length; i++) {\n dataset.add(new MutableRoaringBitmap());\n this.columnPlisMutable = ImmutableList.copyOf(dataset);\n }\n\n // Start parsing the file\n if (this.configuration.isNoHeader()) {\n this.addRow(firstLine);\n } else {\n this.columnIndexToNameMapping = firstLine;\n }\n\n String[] nextRow;\n while ((nextRow = parser.parseNext()) != null) {\n this.addRow(nextRow);\n this.nRows++;\n }\n\n this.transformRows();\n this.transformColumns();\n log.info(\"Deduplicated {} rows to {}, {} columns to {}\", this.nRows, this.nRowsDistinct,\n this.columnPlisMutable.size(), this.columnPlis.size());\n }", "public static String ReadCSV() {\n File file = new File(\"Words.csv\");\n System.out.println(\"*****Program Started***** \" + Time.valueOf(LocalTime.now()));\n\n try {\n FileReader fRead = new FileReader(file);\n BufferedReader bfr = new BufferedReader(fRead);\n String line;\n line = bfr.readLine();\n line = line.replace(\"\\\"\", \"\");\n\n\n words = line.split(\",\");\n int count = 0;\n\n/** Next, read each line of numbers and put them into an Integer array.\n *\t\t\t Finally, store them in a hashmap (genre and related int array)and return\n */\n\n while ((line = bfr.readLine()) != null) {\n String[] temp = line.split(\",\");\n int[] wordCount = new int[words.length];\n for (int i = 0; i < temp.length; i++) {\n\n wordCount[i] = Integer.parseInt(temp[i]);\n }\n\n /**\n * Other than taking the count, we normalize them to improve the accuracy\n * */\n\n double[] temp2 = new double[wordCount.length];\n double total = 0;\n for (int i = 0; i < temp2.length; i++) {\n for (int j = 0; j < temp2.length; j++) {\n total = total + wordCount[j];\n }\n temp2[i] = 100.0 * wordCount[i] / total;\n\n }\n\n hMap.put(genres[count], temp2);\n count++;\n\n }\n System.out.println(\"*****Matrix Created successfully.***** \" + Time.valueOf(LocalTime.now()));\n return \"OK\";\n\n } catch (IOException e) {\n System.out.println(\"*****Creating matrix failed*****\");\n return \"END\";\n }\n }", "public static ListOfUsers readUsersFromFile(String filePath, SocialNetwork r) throws FileNotFoundException {\n Scanner scan = new Scanner(new File(filePath));\n ListOfUsers instance = r.getListOfUsers();\n Map<String, User> userMap = new LinkedHashMap<>();\n String nickName = \"\";\n String email = \"\";\n List<City> cities = new LinkedList();\n Map<User, Set<String>> friendsMap = new HashMap<>();\n Set<String> friends = new HashSet();\n Map<User, Set<User>> finalmap = new HashMap<>();\n while (scan.hasNext()) {\n \n friends = new HashSet();\n String firstLine = scan.next();\n String secondLine = scan.next();\n String[] splitFirstLine = firstLine.split(\",\");\n nickName = splitFirstLine[0];\n email = splitFirstLine[1];\n cities = getCitiesFromString(firstLine, r);\n friends = getFriendsFromString(secondLine, r);\n Object[] aux = cities.toArray();\n City currentCity = (City) aux[0];\n\n User newUser = new User(nickName, email, currentCity.getCityName(), cities, 0);\n \n for (City c : newUser.getCitiesVisited()) {\n newUser.setVisitPoints(newUser.getVisitPoints() + c.getNumberOfPointsAwarded());\n }\n \n friendsMap.put(newUser, friends);\n userMap.put(newUser.getNickname(), newUser);\n \n }\n instance.setUserMap(userMap);\n for (User u :userMap.values()) {\n for (User u2 :friendsMap.keySet()) \n {\n if(u.equals(u2)){\n for (String friend : friendsMap.get(u2)) {\n instance.addFriend(u.getNickname(),friend);\n }\n \n }\n }\n }\n// for (User u : friendsMap.keySet()) {\n// \n// Set<User> aux=new HashSet<>();\n//\n// finalmap.put(u, aux);\n// \n// }\n return instance;\n\n }", "public static void main(String[] args) {\n String dictionaryPath = \"/Users/johtani/tmp/dictionary/unidic-mecab-2.1.2_src\";\n // UniDic 2.3.0\n //String dictionaryPath = \"/Users/johtani/tmp/dictionary/unidic-cwj-2.3.0\";\n CsvParserSettings settings = new CsvParserSettings();\n CsvFormat format = new CsvFormat();\n format.setComment('\\0');\n settings.setFormat(format);\n CsvParser parser = new CsvParser(settings);\n\n try (DirectoryStream<Path> ds = Files.newDirectoryStream(Paths.get(dictionaryPath), \"*.csv\")){\n for (Path file : ds) {\n checkFile(parser, file);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n System.out.println(\"Finished!\");\n }", "private void loadInformation(){\n\t\ttry{\n\t\t\tFileReader fr = new FileReader(\"SpaceProgramGaussDistribution.txt\");\n\t\t\tBufferedReader br = new BufferedReader(fr);\n\t\t\tScanner sc = new Scanner(br);\n\t\t\t\n\t\t\tString info = \"\";\n\t\t\t\n\t\t\twhile(sc.hasNextLine()){\n\t\t\t\tinfo += sc.nextLine();\n\t\t\t}\n\t\t\t\n\t\t\tString split[] = info.split(\"#\");\n\t\t\t\n\t\t\tfor(int i = 0; i < split.length; i++){\n\t\t\t\tpopulationInfo += split[i]+\"\\n\";\n\t\t\t}\n\t\t\tsc.close();\n\t\t\tbr.close();\n\t\t\tfr.close();\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\tSystem.out.println(\"File not found: SpaceProgramGaussDistribution.txt\");\n\t\t}\n\t}", "private static Wine[] read() {\r\n\t\t// We can add files we would like to parse in the following array. We use an array list\r\n\t\t// because it allows us to add dynamically.\r\n\t\tString[] file_adr = { \"data/winemag-data_first150k.txt\", \"data/winemag-data-130k-v2.csv\" };\r\n\t\tArrayList<Wine> arr_list = new ArrayList<Wine>();\r\n\t\t\r\n\t\tint k = 0;\r\n\t\twhile (k < file_adr.length) {\r\n\t\t\tboolean flag = false;\r\n\t\t\tif (file_adr[k].endsWith(\".csv\")) {\r\n\t\t\t\tflag = true;\r\n\t\t\t}\r\n\t\t\tFile f = new File(file_adr[k]);\r\n\t\t\tScanner sc = null;\r\n\t\t\ttry {\r\n\t\t\t\tsc = new Scanner(f, \"UTF-8\");\r\n\t\t\t} catch (FileNotFoundException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tsc.nextLine();\r\n\t\t\tInteger id_count = 0;\r\n\t\t\tif(!flag) {\r\n\t\t\t\twhile (sc.hasNextLine()) {\r\n\t\t\t\t\tString scanned = sc.nextLine();\r\n\t\t\t\t\t// if there is a blank line, skip it before a fail.\r\n\t\t\t\t\tif (scanned.isEmpty()) {\r\n\t\t\t\t\t\tscanned = sc.nextLine();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// use this instead of StringTokenizer because it won't skip empty fields.\r\n\t\t\t\t\tString[] st = scanned.split(\",\");\r\n\t\t\t\t\t\r\n\t\t\t\t\t/* was put here to make sure all fields show up.\r\n\t\t\t\t\tString toString = \"\";\r\n\t\t\t\t\tfor (int i = 0; i < st.length; i++) {\r\n\t\t\t\t\t\ttoString += st[i] + \", \";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t*/\r\n\t\r\n\t\t\t\t\tString country = st[1];\r\n\t\t\t\t\tString description = \"\";\r\n\t\t\t\t\t// This piece grabs our entire description! this paragraph has our delimiters so it gets split.\r\n\t\t\t\t\tint count = 0;\r\n\t\t\t\t\tfor (int i = 2; i < (st.length - 10) + 2; i++) {\r\n\t\t\t\t\t\tif (st[i].endsWith(\"\\\"\")) {\r\n\t\t\t\t\t\t\tdescription += st[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tdescription += st[i] + \", \";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcount++;\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\tString designation = st[count+2];\r\n\t\t\t\t\t\r\n\t\t\t\t\t// next two fields will fail if the field is empty, so make sure we assign it something.\r\n\t\t\t\t\tInteger points = !(st[count+3].isEmpty()) ? Integer.parseInt(st[count+3]) : -1;\r\n\t\t\t\t\t\r\n\t\t\t\t\tDouble price = !(st[count+4].isEmpty()) ? Double.parseDouble(st[count+4]) : -1.0;\r\n\t\t\t\t\t\r\n\t\t\t\t\tString province = st[count+5];\r\n\t\t\t\t\tString[] region = {\r\n\t\t\t\t\t\t\tst[count+6],\r\n\t\t\t\t\t\t\tst[count+7]\r\n\t\t\t\t\t};\r\n\t\t\t\t\tString variety = st[count+8];\r\n\t\t\t\t\tString winery = st[count+9];\r\n\t\t\t\t\t//System.out.println(id_count);\r\n\t\t\t\t\t// unique ID system because some wine bottles have empty names.\r\n\t\t\t\t\tInteger unique_id = id_count++;\r\n\t\t\t\t\t\r\n\t\t\t\t\tString[] items = {\r\n\t\t\t\t\t\t\tcountry,\r\n\t\t\t\t\t\t\tdescription,\r\n\t\t\t\t\t\t\tdesignation,\r\n\t\t\t\t\t\t\tprovince,\r\n\t\t\t\t\t\t\twinery,\r\n\t\t\t\t\t\t\tvariety\r\n\t\t\t\t\t};\r\n\t\t\t\t\t\r\n\t\t\t\t\tString[] reviewer = {\r\n\t\t\t\t\t\t\t\"\",\r\n\t\t\t\t\t\t\t\"\"\r\n\t\t\t\t\t};\r\n\t\t\t\t\t\r\n\t\t\t\t\tString[] taste = {};\r\n\t\t\t\t\t// Object constructor.\r\n\t\t\t\t\tWine curr_obj = new Wine(items, taste, region, points, unique_id, price, reviewer);\r\n\t\t\t\t\t\r\n\t\t\t\t\tarr_list.add(curr_obj);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tk++;\r\n\t\t\t\tsc.close();\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\twhile (sc.hasNextLine()) {\r\n\t\t\t\t\tString scanned = sc.nextLine();\r\n\t\t\t\t\t// if there is a blank line, skip it before a fail.\r\n\t\t\t\t\tif (scanned.isEmpty()) {\r\n\t\t\t\t\t\tscanned = sc.nextLine();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// use this instead of StringTokenizer because it won't skip empty fields.\r\n\t\t\t\t\tString[] st = scanned.split(\",\");\r\n\t\t\t\t\t//System.out.println(arr_list.size());\r\n\t\t\t\t\tid_count = arr_list.size();\r\n\t\t\t\t\t/* was put here to make sure all fields show up.\r\n\t\t\t\t\tString toString = \"\";\r\n\t\t\t\t\tfor (int i = 0; i < st.length; i++) {\r\n\t\t\t\t\t\ttoString += st[i] + \", \";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t*/\r\n\t\t\t\t\t//System.out.println(st[0]);\r\n\t\t\t\t\t/*if(Integer.parseInt(st[0]) == 30350) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t*/\r\n\t\t\t\t\tString country = st[1];\r\n\t\t\t\t\tString description = \"\";\r\n\t\t\t\t\t// This piece grabs our entire description! this paragraph has our delimiters so it gets split.\r\n\t\t\t\t\tint count = 0;\r\n\t\t\t\t\tfor (int i = 2; i < (st.length - 12) + 2; i++) {\r\n\t\t\t\t\t\tif (st[i].endsWith(\"\\\"\")) {\r\n\t\t\t\t\t\t\tdescription += st[i];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tdescription += st[i] + \", \";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tcount++;\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\tString designation = st[count+2];\r\n\t\t\t\t\t\r\n\t\t\t\t\t// next two fields will fail if the field is empty, so make sure we assign it something.\r\n\t\t\t\t\tInteger points = !(st[count+3].isEmpty()) ? Integer.parseInt(st[count+3]) : -1;\r\n\t\t\t\t\t\r\n\t\t\t\t\tDouble price = !(st[count+4].isEmpty()) ? Double.parseDouble(st[count+4]) : -1.0;\r\n\t\t\t\t\t\r\n\t\t\t\t\tString province = st[count+5];\r\n\t\t\t\t\tString[] region = {\r\n\t\t\t\t\t\t\tst[count+6],\r\n\t\t\t\t\t\t\tst[count+7]\r\n\t\t\t\t\t};\r\n\t\t\t\t\tString taster_name = st[count+8];\r\n\t\t\t\t\tString taster_handle = st[count+9];\r\n\t\t\t\t\tString variety = st[count+10];\r\n\t\t\t\t\tString winery = st[count+11];\r\n\t\t\t\t\t//System.out.println(id_count);\r\n\t\t\t\t\t// unique ID system because some wine bottles have empty names.\r\n\t\t\t\t\tInteger unique_id = id_count++;\r\n\t\t\t\t\t\r\n\t\t\t\t\tString[] items = {\r\n\t\t\t\t\t\t\tcountry,\r\n\t\t\t\t\t\t\tdescription,\r\n\t\t\t\t\t\t\tdesignation,\r\n\t\t\t\t\t\t\tprovince,\r\n\t\t\t\t\t\t\twinery,\r\n\t\t\t\t\t\t\tvariety\r\n\t\t\t\t\t};\r\n\t\t\t\t\tString[] reviewer = {\r\n\t\t\t\t\t\t\ttaster_name,\r\n\t\t\t\t\t\t\ttaster_handle\r\n\t\t\t\t\t};\r\n\t\t\t\t\t\r\n\t\t\t\t\tString[] taste = {};\r\n\t\t\t\t\t// Object constructor.\r\n\t\t\t\t\tWine curr_obj = new Wine(items, taste, region, points, unique_id, price, reviewer);\r\n\t\t\t\t\t\r\n\t\t\t\t\tarr_list.add(curr_obj);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tk++;\r\n\t\t\t\tsc.close();\r\n\t\t\t}\r\n\t\t}\r\n\t\t// We no longer need an array list. we have our size required. Put into an array.\r\n\t\tWine[] array_wines = new Wine[arr_list.size()];\r\n\t\tarray_wines = arr_list.toArray(array_wines);\r\n\t\t\r\n\t\treturn array_wines;\r\n\t\r\n\t}", "private void testDataReader() {\n File csv = new File(pathTest);\n try (FileReader fr = new FileReader(csv); BufferedReader bfr = new BufferedReader(fr)) {\n Logger.printInfo(\"Reading test data\");\n for (String line; (line = bfr.readLine()) != null; ) {\n String[] split = line.split(\",\");\n String data = textCleaner(split[indexData].toLowerCase());\n int label = Integer.parseInt(split[indexLabel].toLowerCase());\n\n linesTest.add(data);\n labelsTest.add(label);\n Logger.print(\"Reading size: \" + linesTest.size());\n }\n for (String l : linesTest) {\n matrixTest.add(wordVectorizer(l));\n }\n } catch (IOException ex) {\n Logger.printError(\"!! Test Data Not Reading !!\");\n System.exit(0);\n }\n }", "private void populateStudentAndFaculty() {\n for (int i = 0; i < 25; i++) {\n System.out\n .println(\"INSERT INTO `4400`.`StudentAndFaculty` (`username`, `firstName`, `lastName`, `dob`, `gender`, `email`, `address`, `isFaculty`, `isDebarred`, `dept`, `penalty`) VALUES ('user\"\n + i\n + \"', '\"\n + MALE_NAMES[i]\n + \"', '\"\n + LAST_NAMES[i]\n + \"', '19\"\n + randomInt(50, 96)\n + \"-\"\n + MONTHS[randomInt(0, MONTHS.length - 1)]\n + \"-\"\n + randomInt(1, 27)\n + \"', 'male', '\"\n + MALE_NAMES[i]\n + LAST_NAMES[i]\n + \"@\"\n + EMAILS[randomInt(0, EMAILS.length - 1)]\n + \"', '\"\n + ADDRESSES[i] + \"', '0', '0', NULL, '0.00');\");\n }\n for (int i = 0; i < 25; i++) {\n System.out\n .println(\"INSERT INTO `4400`.`StudentAndFaculty` (`username`, `firstName`, `lastName`, `dob`, `gender`, `email`, `address`, `isFaculty`, `isDebarred`, `dept`, `penalty`) VALUES ('user\"\n + (i + 25)\n + \"', '\"\n + FEMALE_NAMES[i]\n + \"', '\"\n + LAST_NAMES[i + 25]\n + \"', '19\"\n + randomInt(50, 96)\n + \"-\"\n + MONTHS[randomInt(0, MONTHS.length - 1)]\n + \"-\"\n + randomInt(1, 27)\n + \"', 'female', '\"\n + FEMALE_NAMES[i]\n + LAST_NAMES[i + 25]\n + \"@\"\n + EMAILS[randomInt(0, EMAILS.length - 1)]\n + \"', '\"\n + ADDRESSES[i + 25] + \"', '0', '0', NULL, '0.00');\");\n }\n }", "private static ArrayList<Ms3Person> readCSV(String fileName) {\r\n\t\tArrayList<Ms3Person> personsList = new ArrayList<>();\r\n\t\ttry (Scanner sc = new Scanner(new File(fileName))) {\r\n\t\t\t// skip the first line which is having column headers name\r\n\t\t\tsc.nextLine();\r\n\t\t\tint index = 1;\r\n\t\t\t// loop will go till end of file is reached ie.\r\n\t\t\twhile (sc.hasNextLine()) {\r\n\t\t\t\t// read single line at a time\r\n\t\t\t\tString personData = sc.nextLine();\r\n\t\t\t\tif(index >=5999)\r\n\t\t\t\t\tSystem.out.println(index+\" index\"+personData);\r\n\t\t\t\t//System.out.println(personData);\r\n\t\t\t\t//split the string by delimiter ,\r\n\t\t\t\tif(personData.length()>2) {\r\n\t\t\t\t\tString singlePersonRecord[] = personData.split(\",\");\r\n\t\t\t\t\t//the data we get is in form of sTring we need to convert\r\n\t\t\t\t\t//it to required data type for usage\r\n\t\t\t\t\tMs3Person person = convertDataToRequiredDataType(singlePersonRecord,index);\r\n\t\t\t\t\tif (person != null) {\r\n\t\t\t\t\t\t// add the person object in ArrayList\r\n\t\t\t\t\t\tpersonsList.add(person);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// bad data so create new file & write data\r\n // writing to the logfile\r\n \r\n \r\n\t\t\t\t\t}\r\n\t\t\t\t\tSystem.out.println(\"index: \" + index);\r\n\t\t\t\t}else {\r\n\t\t\t\t\tif(personData.length()<1) {//if no more line is there or only empty lines left\r\n\t\t\t\t\t\tSystem.out.println(\"finished reading the file...\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tindex++;\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\t// if any exception arises while reading the file data that exception\r\n\t\t\t// will be caught in this block\r\n\t\t\tSystem.out.println(\"EXCEPTION: \" + e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn personsList;\r\n\t}", "@Override\n public void csvImport(String filename) {\n try {\n FileReader r = new FileReader(filename);\n Scanner in = new Scanner(r);\n\n while (in.hasNext()) {\n String firstInput = in.next().trim();\n String firstName = firstInput.substring(0, firstInput.length() - 1).trim();\n String lastInput = in.next().trim();\n String lastName = lastInput.substring(0, lastInput.length() - 1).trim();\n String ID = in.next().substring(0, 5);\n int pID = Integer.parseInt(ID);\n String grade = in.next();\n\n Student s = new Student(firstName, lastName, pID);\n Grade g = new Grade(grade);\n\n map.put(s, g);\n }\n checker = true;\n } catch (FileNotFoundException ex) {\n System.out.println(\"File was not found\");\n checker = false;\n }\n }", "private static List<City> getCitiesFromString(String line, SocialNetwork r) {\n List<City> cities = new LinkedList<City>();\n String[] splitString = line.split(\",\");\n for (int i = 2; i < splitString.length; i++) {\n City city = r.getListOfCities().getCityByName(splitString[i]);\n cities.add(city);\n }\n return cities;\n }", "private void populateEducation() {\n try {\n vecEducationKeys = new Vector();\n vecEducationLabels = new Vector();\n //MSB -09/01/05 -- Changed configuration file and Keys\n // config = new ConfigMgr(\"customer.cfg\");\n // String strSubTypes = config.getString(\"EDUCATION_TYPES\");\n// config = new ConfigMgr(\"ArmaniCommon.cfg\");\n config = new ArmConfigLoader();\n String strSubTypes = config.getString(\"EDUCATION\");\n StringTokenizer stk = null;\n int i = -1;\n if (strSubTypes != null && strSubTypes.trim().length() > 0) {\n stk = new StringTokenizer(strSubTypes, \",\");\n } else\n return;\n if (stk != null) {\n types = new String[stk.countTokens()];\n while (stk.hasMoreTokens()) {\n types[++i] = stk.nextToken();\n String key = config.getString(types[i] + \".CODE\");\n vecEducationKeys.add(key);\n String value = config.getString(types[i] + \".LABEL\");\n vecEducationLabels.add(value);\n }\n }\n cbxEducation.setModel(new DefaultComboBoxModel(vecEducationLabels));\n } catch (Exception e) {}\n }", "public DataProcessor(String filename) throws FileNotFoundException{\n\tlst = new ArrayList();\n\tScanner input = new Scanner(new FileReader(filename));\n //skip the first line of the csv file\n\tString escapedLine = input.nextLine();\n \twhile(input.hasNextLine()){\n\t recordCount++;\n\t String line = input.nextLine();\n\t //CORRECTION BLOC to skip quoted commas\n\t if (line.contains(\"\\\"\")){\n\t\tint first= line.indexOf(\"\\\"\");\n\t\twhile(first >0 ){\n\t\t String problem = line.substring(first,line.indexOf(\"\\\"\",first+1)+1);\n\t\t \tint second = line.indexOf(\"\\\"\",first+1);\n\t\t\t//look for comma between quoted\n\t\t\tif(problem.contains(\",\")){\n\t\t\t //replace comma by space not to change string indices\n\t\t\t problem=problem.replace(\",\",\" \");\n\t\t\t line=line.replace(line.substring(first,line.indexOf(\"\\\"\",first+1)+1),problem);\n\t\t\t}\n\t\t\t//look for another quote symbol\n\t\t\tfirst = line.indexOf(\"\\\"\",second+1);\n\t\t}\n\t }\n\t String[] fields = line.split(\",\");\n\t //create Person object to store the suspect's data\n\t Person suspect = new Person(fields[SEX].charAt(0),fields[RACE].charAt(0),Integer.parseInt(fields[DOB]),Integer.parseInt(fields[HEIGHTFT]),fields[EYECOLOR],fields[BUILD].charAt(0));\n\t lst.add(suspect);\n\t}\n\t//close scanner\n\tinput.close();\n }", "private void parseCSVToBean(String url) throws Exception {\r\n\r\n\t\t// later we have to implement to check created time of the CSV file\r\n\r\n\t\tColumnPositionMappingStrategy<DealerDetails> strat = new ColumnPositionMappingStrategy<>();\r\n\t\tstrat.setType(DealerDetails.class);\r\n\t\tString[] columns = new String[] { \"firstName\", \"lastName\", \"username\",\r\n\t\t\t\t\"contactNumber\", \"panNumber\", \"vatNumber\", \"bankName\",\r\n\t\t\t\t\"bankAccountNumber\", \"websiteUrl\", \"address\",\r\n\t\t\t\t\"branchTelNumber\", \"country\", \"state\", \"city\", \"zipcode\" };\r\n\t\tstrat.setColumnMapping(columns);\r\n\r\n\t\tCsvToBean<DealerDetails> csvToBean = new CsvToBean<DealerDetails>();\r\n\r\n\t\t// URL fileURL = new URL(url);\r\n\t\t// BufferedReader br = new BufferedReader(new InputStreamReader(\r\n\t\t// fileURL.openStream()));\r\n\r\n\t\tURL csvFileURL = new URL(url);\r\n\t\tBufferedReader bufferedReader = new BufferedReader(\r\n\t\t\t\tnew InputStreamReader(csvFileURL.openStream()));\r\n\r\n\t\tCSVReader reader = new CSVReader(bufferedReader);\r\n\r\n\t\tList<DealerDetails> dealers = csvToBean.parse(strat, reader);\r\n\r\n\t\tfor (DealerDetails dealerDetails : dealers) {\r\n\t\t\t// create user\r\n\t\t\tcreateUser(dealerDetails);\r\n\t\t}\r\n\r\n\t}", "public void cadastrarOfertasQuad1(){\n \n String[] palavras;\n \n //Primeiro quadrimestre\n try {\n try (BufferedReader lerArq = new BufferedReader(new InputStreamReader(new FileInputStream(\"/home/charles/alocacao/Arquivos Alocação/Arquivos CSV/Planejamento2017_q1.csv\"), \"UTF-8\"))) {\n String linha = lerArq.readLine(); //cabeçalho\n \n linha = lerArq.readLine();\n\n// linha = linha.replaceAll(\"\\\"\", \"\");\n while (linha != null) {\n\n linha = linha.replaceAll(\"\\\"\", \"\");\n\n palavras = linha.split(\";\", -1);\n\n oferta = new OfertaDisciplina();\n\n oferta.setCurso(palavras[0]);//2\n\n String nome = palavras[2];//4\n \n String codigo = palavras[1];//3\n \n Disciplina d = disciplinaFacade.findByCodOrName(codigo, nome);\n\n if (d != null) {\n// Disciplina d = disciplinaFacade.findByName(nome).get(0);\n oferta.setDisciplina(d);\n }\n oferta.setT(Integer.parseInt(palavras[3]));//5\n oferta.setP(Integer.parseInt(palavras[4]));//6\n oferta.setTurno(palavras[6]);//11\n oferta.setCampus(palavras[7]);//12\n if (!palavras[8].equals(\"\")) {\n oferta.setNumTurmas(Integer.parseInt(palavras[8]));//13\n }\n if (!palavras[9].equals(\"\")) {\n oferta.setPeriodicidade(palavras[9]);//19\n } else{\n oferta.setPeriodicidade(\"semanal\");\n }\n oferta.setQuadrimestre(1);\n\n salvarNoBanco();\n\n linha = lerArq.readLine();\n// linha = linha.replaceAll(\"\\\"\", \"\");\n }\n } //cabeçalho\n ofertas1LazyModel = null;\n } catch (IOException e) {\n System.err.printf(\"Erro na abertura do arquivo: %s.\\n\", e.getMessage());\n } \n }", "public void read(String csvFilepath) {\n\t\t String line = \"\";\n\t\t\tString cvsSplitBy = \",\";\n\t\t\t\n\t\t\tMyGIS_layer layer = new MyGIS_layer();\n\t\t\ttry (BufferedReader br = new BufferedReader(new FileReader(csvFilepath))) \n\t\t\t{\n\t\t\t\t\n\t\t\t\t br.readLine();\n\t\t\t\tString[] headline = br.readLine().split(cvsSplitBy);\n\t\t\t\twhile ((line = br.readLine()) != null) \n\t\t\t\t{\n\t\t\t\t\tString[] data = line.split(cvsSplitBy);\n\t\t\t\t\tMyGIS_element elemnt = new MyGIS_element(headline,data);\n\t\t\t\t\tlayer.add(elemnt);\n\t\t\t\t}\n\t\t\t\t\n\n\t\t\t} \n\t\t\tcatch (IOException e) \n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tproject.add(layer);\n\t\t}", "public void importFile() {\n \ttry {\n\t File account_file = new File(\"accounts/CarerAccounts.txt\");\n\n\t FileReader file_reader = new FileReader(account_file);\n\t BufferedReader buff_reader = new BufferedReader(file_reader);\n\n\t String row;\n\t while ((row = buff_reader.readLine()) != null) {\n\t String[] account = row.split(\",\"); //implementing comma seperated value (CSV)\n\t String[] users = account[6].split(\"-\");\n\t int[] usersNew = new int[users.length];\n\t for (int i = 0; i < users.length; i++) {\n\t \tusersNew[i] = Integer.parseInt(users[i].trim());\n\t }\n\t this.add(Integer.parseInt(account[0]), account[1], account[2], account[3], account[4], account[5], usersNew);\n\t }\n\t buff_reader.close();\n } catch (IOException e) {\n System.out.println(\"Unable to read text file this time.\");\n \t}\n\t}", "@Override\n public void importCSV(File file) {\n System.out.println(\"oi\");\n System.out.println(file.isFile()+\" \"+file.getAbsolutePath());\n if(file.isFile() && file.getPath().toLowerCase().contains(\".csv\")){\n System.out.println(\"Entro\");\n try {\n final Reader reader = new FileReader(file);\n final BufferedReader bufferReader = new BufferedReader(reader);\n String[] cabecalho = bufferReader.readLine().split(\",\");\n int tipo;\n if(cabecalho.length == 3){\n if(cabecalho[2].equalsIgnoreCase(\"SIGLA\")){\n tipo = 1;\n System.out.println(\"TIPO PAIS\");\n }\n else {\n tipo = 2;\n System.out.println(\"TIPO CIDADE\");\n }\n }else {\n tipo = 3;\n System.out.println(\"TIPO ESTADO\");\n }\n \n while(true){\n String linha = bufferReader.readLine();\n if(linha == null){\n break;\n }\n String[] row = linha.split(\",\");\n switch (tipo) {\n case 1:\n Pais pais = new Pais();\n pais.setId(Long.parseLong(row[0]));\n pais.setNome(row[1]);\n pais.setSigla(row[2]);\n new PaisDaoImpl().insert(pais);\n break;\n case 2:\n Cidade cidade = new Cidade();\n cidade.setId(Long.parseLong(row[0]));\n cidade.setNome(row[1]);\n cidade.setEstado(Long.parseLong(row[2]));\n new CidadeDaoImpl().insert(cidade);\n break;\n default:\n Estado estado = new Estado();\n estado.setId(Long.parseLong(row[0]));\n estado.setNome(row[1]);\n estado.setUf(row[2]);\n estado.setPais(Long.parseLong(row[3]));\n new EstadoDaoImpl().insert(estado);\n break;\n }\n }\n \n } catch (FileNotFoundException ex) {\n Logger.getLogger(SQLUtilsImpl.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(SQLUtilsImpl.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }", "public static void main(String[] args) throws IOException {\n FileInputStream fis = new FileInputStream(\"out/cities.txt\");\r\n \r\n // Create DataInputStream object wrap 'fis'.\r\n DataInputStream dis = new DataInputStream(fis);\r\n \r\n //\r\n // Read data.\r\n //\r\n int cityId1 = dis.readInt();\r\n System.out.println(\"Id: \" + cityId1);\r\n String cityName1 = dis.readUTF();\r\n System.out.println(\"Name: \" + cityName1);\r\n int cityPopulation1 = dis.readInt();\r\n System.out.println(\"Population: \" + cityPopulation1);\r\n float cityTemperature1 = dis.readFloat();\r\n System.out.println(\"Temperature: \" + cityTemperature1);\r\n \r\n //\r\n // Read data.\r\n //\r\n int cityId2 = dis.readInt();\r\n System.out.println(\"Id: \" + cityId2);\r\n String cityName2 = dis.readUTF();\r\n System.out.println(\"Name: \" + cityName2);\r\n int cityPopulation2 = dis.readInt();\r\n System.out.println(\"Population: \" + cityPopulation2);\r\n float cityTemperature2 = dis.readFloat();\r\n System.out.println(\"Temperature: \" + cityTemperature2);\r\n \r\n dis.close();\r\n }", "private void readFile() {\r\n\t\tcsvEntrys = new ArrayList<>();\r\n\t\tString line = \"\";\r\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(new File(filepath)))) {\r\n\t\t\twhile ((line = br.readLine()) != null) {\r\n\t\t\t\tif (!line.contains(\"id\")) {\r\n\t\t\t\t\tcsvEntrys.add(line);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "private void loadData() throws Exception {\n List<Student> listOfStudents = new ArrayList<>();\n DocumentBuilderFactory documentBuilderFactory =\n DocumentBuilderFactory.newInstance();\n\n DocumentBuilder documentBuilder =\n documentBuilderFactory.newDocumentBuilder();\n Document document = documentBuilder.parse(XMLfile);\n Element root = document.getDocumentElement();\n\n NodeList nodes = root.getChildNodes();\n int len = nodes.getLength();\n for (int i = 0; i < len; i++) {\n Node studentNode = nodes.item(i);\n if (studentNode instanceof Element) {\n Student b = createStudent((Element) studentNode);\n listOfStudents.add(b);\n }\n }\n Map<Long, Student> map= new HashMap<>();\n for (Student s : listOfStudents){\n map.putIfAbsent(s.getId(),s);\n }\n this.setEntities(map);\n }", "public void loadCSVData() throws IOException, SQLException {\r\n //SQL statement to load csv information into data table\r\n String insertvaluesSQL = \"INSERT INTO data\"\r\n + \"(InvoiceNo, StockCode, Description, Quantity, InvoiceDate, UnitPrice, CustomerID, Country)\"\r\n + \" VALUES (?,?,?,?,?,?,?,?);\";\r\n\r\n //code to read csv file taken from W03 practical\r\n BufferedReader br = new BufferedReader(new FileReader(filePath));\r\n String line = br.readLine();\r\n String[] informationArray;\r\n while (line != null) {\r\n informationArray = line.split(\",\");\r\n PreparedStatement preparedStatement = connection.prepareStatement(insertvaluesSQL);\r\n //the first '?' corresponds to the 0th term in the information array\r\n //the second '?' corresponds to the 1st term in the information array\r\n for (int i = 1; i < 9; i++) {\r\n preparedStatement.setString(i, informationArray[i - 1]);\r\n }\r\n preparedStatement.executeUpdate();\r\n line = br.readLine();\r\n }\r\n Statement statement = connection.createStatement();\r\n statement.executeUpdate(\"DELETE FROM data WHERE InvoiceNo = 'InvoiceNo';\");\r\n statement.close();\r\n }", "public void readToCsv() {\r\n\r\n String seperator = \";\";\r\n\r\n try (BufferedReader reader = new BufferedReader(\r\n new FileReader(\"Products.csv\"))){\r\n\r\n String line = null;\r\n for(int i=1; (line = reader.readLine()) != null; i++) {\r\n String[] fields = line.split(seperator, -1);\r\n\r\n // For nutrients objects to read\r\n if(fields.length ==5){\r\n Nutrient object= new Nutrient();\r\n object.name = fields[0];\r\n object.price = Double.parseDouble(fields[1]);\r\n object.tag=fields[2];\r\n object.content = fields[3];\r\n object.numOfProduct = Integer.parseInt(fields[4]);\r\n //object.addFeatures(object.name,object.price,object.size,object.gender,object.tag,object.content,object.numOfProduct);\r\n NutrientList.add(object);\r\n allProducts.add(object);\r\n }\r\n // For Cosmetics objects to read\r\n if (fields.length==6){\r\n Cosmetics object2=new Cosmetics();\r\n object2.name = fields[0];\r\n object2.price = Double.parseDouble(fields[1]);\r\n object2.gender = fields[2];\r\n object2.tag=fields[3];\r\n object2.content = fields[4];\r\n object2.numOfProduct = Integer.parseInt(fields[5]);\r\n //object2.addFeatures(object2.name,object2.price,object2.size,object2.gender,object2.tag,object2.content,object2.numOfProduct);\r\n CosmeticsList.add(object2);\r\n allProducts.add(object2);\r\n }\r\n // For clothes objects to read\r\n if(fields.length ==7){\r\n\r\n Clothes object3=new Clothes();\r\n object3.name = fields[0];\r\n object3.price = Double.parseDouble(fields[1]);\r\n object3.size= fields[2];\r\n object3.tag=fields[4];\r\n object3.content = fields[5];\r\n object3.numOfProduct = Integer.parseInt(fields[6]);\r\n object3.addFeatures(object3.name,object3.price,object3.size,\"E\",object3.tag,object3.content,object3.numOfProduct);\r\n ClothesList.add(object3);\r\n allProducts.add(object3);\r\n }\r\n\r\n }}\r\n catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }", "public static void load() {\r\n\t\ttransList = new ArrayList<Transaction>();\r\n\t\ttry {\r\n\t\t\tSystem.out.println(\"loading all trans...\");\r\n\t\t\tBufferedReader reader = new BufferedReader(new FileReader(\"src/transaction.csv\"));\r\n\t\t\treader.readLine();\r\n\t\t\tString line = null;\r\n\t\t\twhile ((line = reader.readLine()) != null) {\r\n\t\t\t\tString item[] = line.split(\",\");\r\n\t\t\t\tString type = item[0];\r\n\t\t\t\tint acc = Integer.parseInt(item[1]);\r\n\t\t\t\tdouble amount = Double.parseDouble(item[2]);\r\n\t\t\t\tint year = Integer.parseInt(item[3]);\r\n\t\t\t\tint month = Integer.parseInt(item[4]);\r\n\t\t\t\tint date = Integer.parseInt(item[5]);\r\n\t\t\t\tCalendar cal = Calendar.getInstance();\r\n\t\t\t\tcal.set(year, month - 1, date);\r\n\t\t\t\tif (type.charAt(0) == 'w') {\r\n\t\t\t\t\tWithdrawal trans = new Withdrawal(acc, amount, cal);\r\n\t\t\t\t\ttransList.add(trans);\r\n\t\t\t\t\tSystem.out.println(trans.toFile());\r\n\t\t\t\t} else if (type.charAt(0) == 'd') {\r\n\t\t\t\t\tboolean cleared = Boolean.parseBoolean(item[6]);\r\n\t\t\t\t\tDeposit trans = new Deposit(acc, amount, cal, cleared);\r\n\t\t\t\t\ttransList.add(trans);\r\n\t\t\t\t\tSystem.out.println(trans.toFile());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treader.close();\r\n\t\t\tSystem.out.println(\"loading finished\");\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@Override\n\tpublic String getFortune() {\n\t\t\n\t\t\tString[] tokens = null;\n\n\t\ttry {\n\t\t\n\t\tFileReader in=new FileReader(inputFile);\n\t\t\n\t\tBufferedReader inputStream=new BufferedReader(in);\n\t\t\n\t\tString l;\n\t\t\n\t\twhile((l=inputStream.readLine()) != null)\n\t\t\t\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t tokens = l.split(\",\");\n\t\t\t\t}\n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tint l=tokens.length;\n\t\tl=l-1;\n\t\tint i=(int) ((Math.random() * ((l- 0) + 1)) + 0);\n\t\treturn tokens[i];\n\t}" ]
[ "0.63182676", "0.6289652", "0.59353334", "0.5896875", "0.57570666", "0.57507634", "0.56465024", "0.5605378", "0.556696", "0.55512464", "0.5442466", "0.54093313", "0.5386163", "0.5355474", "0.5331569", "0.5267452", "0.5240653", "0.52235836", "0.5195761", "0.51915073", "0.51786625", "0.51315844", "0.5112928", "0.5050087", "0.50275934", "0.50089854", "0.4996038", "0.49793026", "0.4977779", "0.49537537", "0.49483404", "0.49437857", "0.49401352", "0.49393937", "0.49341685", "0.49316815", "0.49267188", "0.49257302", "0.49137306", "0.48761687", "0.4861669", "0.484042", "0.4826371", "0.48220265", "0.48028594", "0.47926727", "0.47732058", "0.4773058", "0.47702944", "0.47681844", "0.47649455", "0.4762626", "0.47625336", "0.47420573", "0.47349784", "0.4734519", "0.4729199", "0.47271788", "0.4720857", "0.47173893", "0.4709142", "0.47072116", "0.47045276", "0.47041267", "0.46980745", "0.4691734", "0.4689258", "0.468862", "0.46835726", "0.46777546", "0.4672992", "0.46724644", "0.46666908", "0.46656716", "0.46630135", "0.46568948", "0.46489692", "0.4647873", "0.46314278", "0.46302775", "0.46260718", "0.46213928", "0.46194616", "0.46169928", "0.46097034", "0.46096352", "0.46020725", "0.4600916", "0.4599405", "0.4588596", "0.4587243", "0.45866564", "0.45846152", "0.45719635", "0.45705298", "0.45650488", "0.45612785", "0.45589766", "0.45579368", "0.45534986" ]
0.78599155
0
TODO Autogenerated method stub
@Override public void onClick(View v) { Intent intent = new Intent(context, CustomerDueDetails.class); intent.putExtra("shopper_id", ""+list.get(position).get_shopper_id()); intent.putExtra("name", ""+list.get(position).get_shopper_name()); intent.putExtra("amount", ""+list.get(position).get_outstanding_amount()); intent.putExtra("order_id", ""+list.get(position).getOrder_id()); intent.putExtra("strdt", txt_str_date.getText().toString()); intent.putExtra("enddt", txt_str_end.getText().toString()); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(intent); }
{ "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
suppress this because redefining a variable is necessary
@SuppressWarnings("PMD.DataflowAnomalyAnalysis") @ParameterizedTest @CsvSource({ "RIGHT, 1, 0", "LEFT, -1, 0", "UP, 0, 1", "DOWN, 0, -1", }) void moveSnakeTest(Direction dir, int dx, int dy) { this.snakeBody = new SnakeBody(Sizes.DEFAULT_MINIMUM_MAP_TILES, Sizes.DEFAULT_MINIMUM_MAP_TILES); assertEquals(Direction.RIGHT, snakeBody.getCurrDir()); snakeBody.moveSnake(dir); Coordinate newHead = new Coordinate( (Sizes.DEFAULT_MINIMUM_MAP_TILES / 2) + dx, (Sizes.DEFAULT_MINIMUM_MAP_TILES / 2) + dy); assertEquals(snakeBody.getHeadCoord(), newHead); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setOriginalVariable(GlobalVariable var) {\n originalVariable = var;\n }", "public void reassignIfNeeded() {\n\t}", "private void assignment() {\n\n\t\t\t}", "@Deprecated\n private void assertNotDefined(String name) {\n if (values.containsKey(name))\n throw new RedefineVariableError(null, \"Attempting to redefine scope variable '\" + name + \"'.\");\n }", "private zzfl$zzg$zzc() {\n void var3_1;\n void var2_-1;\n void var1_-1;\n this.value = var3_1;\n }", "private void assignUninitialisedGlobalVar(Variable lastAppearanceOfVar,String valueName)throws\r\n\t\t\tTypeNotSupportedException{\r\n\t\t\tVariable variablesCopy = vFactory.createVariable(true, false, lastAppearanceOfVar.isArgument(),\r\n\t\t\t\t\tlastAppearanceOfVar.getType(), true);\r\n\t\t\tuninitialisedGlobalVariables.put(valueName, variablesCopy);\r\n\t}", "private CacheBuilder$OneWeigher() {\n void var2_-1;\n void var1_-1;\n }", "public final void mo51373a() {\n }", "public void fixupVariables(List<QName> vars, int globalsSize)\n {\n // no-op\n }", "private void m146984b(C47008ac acVar) {\n if (this.f120643a == null) {\n this.f120643a = acVar;\n }\n if (this.f120644b == null) {\n this.f120644b = acVar;\n }\n }", "private void privateUnsynchSetThis(Bug1815013 p) {\n this.x = p.get()[0];\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "void doStuff() {\n\t\tfinal int y = 20; \n\t\t\n\t}", "public void swrap() throws NoUnusedObjectExeption;", "public void lavar() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "public final void mo91715d() {\n }", "static void setNotCopying(){isCopying=false;}", "void method_6615(class_1303 var1) {\r\n this.field_6524 = var1;\r\n super();\r\n }", "@Override\n protected void variableAddedDuringReplication(Aggregatable variable) {\n }", "void setUnused(){\n assert this.used == true;\n\n //let the parent pointer remain\n this.hf = 0;\n this.used = false;\n\n }", "public void method_2244() {\r\n this.field_1858 = 0;\r\n }", "protected void initVars() {}", "public void reuse() {}", "public static void m34958a(Consumer<? super Throwable> gVar) {\n if (!f27431p) {\n f27416a = gVar;\n return;\n }\n throw new IllegalStateException(\"Plugins can't be changed anymore\");\n }", "@Override\r\n\tpublic void initVariables() {\n\t\t\r\n\t}", "private void updateVars()\n {\n\n }", "@Override\n\tpublic void beforeVariableChanged(ProcessVariableChangedEvent arg0) {\n\n\t}", "public void method_8074(Throwable var1) {\r\n super();\r\n this.field_7865 = var1;\r\n }", "static void setNotAutoCopy(){isAutoCopying=false;}", "public void method_887(double var1) {\n this.field_666 = var1;\n }", "public void defender(){setModopelea(1);}", "public void setUsed(){\n\t\talreadyUsed = true;\n\t}", "void method_5902(ahb var1) {\r\n this.field_5516 = var1;\r\n super();\r\n }", "double defendre();", "@Override\n protected void resetVariables(){\n super.resetVariables();\n pointUp = false;\n }", "@Override\n protected void variableRemovedDuringReplication(Aggregatable variable) {\n }", "@Test\n\tpublic void testMakeSureVarVariablesCanShadowLetVariables()\n\t{\n\t\tString[] code = {\n\t\t\t\"let a = 1;\",\n\t\t \"let b = 2;\",\n\t\t \"var c = 3;\",\n\n\t\t \"function sup(a) {\",\n\t\t \"var b = 4;\",\n\t\t \"let c = 5;\",\n\t\t \"let d = 6;\",\n\t\t \"if (false) {\",\n\t\t \"var d = 7;\",\n\t\t \"}\",\n\t\t \"return b + c + a + d;\",\n\t\t \"}\",\n\n\t\t \"sup();\"\n\t\t};\n\t\t\n\t\tth.addError(1, 5, \"'a' is defined but never used.\");\n\t th.addError(2, 5, \"'b' is defined but never used.\");\n\t th.addError(3, 5, \"'c' is defined but never used.\");\n\t th.addError(9, 5, \"'d' has already been declared.\");\n\t\tth.test(code, new LinterOptions().set(\"esnext\", true).set(\"unused\", true).set(\"undef\", true).set(\"funcscope\", true));\n\t}", "public /* synthetic */ void mo14074a(C1379a aVar) throws Exception {\n m17130I();\n }", "private void resetTemporary(){\n temporaryConstants = null;\n temporaryVariables = null;\n }", "public void mo33816a() {\n this.f15942j = null;\n }", "@Override\n public void func_104112_b() {\n \n }", "static void m7753b() {\n f8029a = false;\n }", "private void privateUnsynchSetP(Bug1815013 p) {\n p.x = get()[0];\n }", "public void method_6438(int var1) {\r\n this.field_6227 = var1;\r\n }", "public GlobalVariable getOriginalVariable() {\n return originalVariable;\n }", "public void reAssign(Object o) {\n\t}", "@Override\n public void visitLocalVariable(String name, String descriptor, String signature, Label start, Label end, int index) {\n if(this.preserveDebuggability){\n super.visitLocalVariable(name, descriptor, signature, start, end, index);\n }\n }", "private Mask$MaskMode() {\n void var2_-1;\n void var1_-1;\n }", "protected boolean func_70041_e_() { return false; }", "private boolean isUnunsedVariable(final String message) {\n\t\treturn message.contains(\"Unused variable\"); //$NON-NLS-1$\n\t}", "void m1864a() {\r\n }", "protected void m3599a(en enVar) throws RemoteException {\n try {\n enVar.m3052b(null, null, this);\n } catch (IllegalStateException e) {\n m3243x(2001);\n }\n }", "public void m23075a() {\n }", "private static void m114828a(C35565a aVar) {\n f93235Q = aVar;\n }", "private void m50366E() {\n }", "private void resetDataForAddAfterSchoolAlly() \r\n\t{\n\t\tStaticVariables.showAllyName1InAfterSchool = false;\r\n\t\tStaticVariables.showAllyName2InAfterSchool = false;\r\n\r\n\t\t/*\tStaticVariables.allySetFor1 = null;\r\n\t\tStaticVariables.allySetFor2 = null;*/\r\n\r\n\t}", "private void m3417d(C0933b bVar) {\n m3422v(bVar);\n }", "public final /* bridge */ /* synthetic */ void mo43566a() {\n super.mo43566a();\n }", "static void ignore() {\n }", "public void mo38117a() {\n }", "@Override\n\tpublic ServerServices upstreamGlobalVarsInit() throws Exception {\n\t\treturn null;\n\t}", "public void o_()\r\n/* 533: */ {\r\n/* 534:539 */ this.e = true;\r\n/* 535: */ }", "public void testing() {\n\t\tprotectedInstanceVariable = \"\";\n\t}", "@Override // androidx.databinding.ViewDataBinding\n /* renamed from: d */\n public void mo5926d() {\n synchronized (this) {\n long j = this.f67002l;\n this.f67002l = 0;\n }\n }", "d(a aVar) {\n super(0);\n this.this$0 = aVar;\n }", "@Override\n public void retrack() {\n }", "public void smell() {\n\t\t\n\t}", "public void method_873(double var1) {\n this.field_658 = var1;\n }", "public void method_103(boolean var1) {\n this.field_4130 = var1;\n }", "public void n() {\n this.f80658c.a(new f() {\n public void a(Object obj, boolean z) {\n p unused = m.this.f80658c = (p) obj;\n }\n }, \"__ag_of\");\n }", "static void m7752a() {\n f8029a = true;\n }", "public void method_897(double var1) {\n this.field_671 = var1;\n }", "public boolean isVariable() {\n return false;\n }", "public /* synthetic */ void mo14076a(C3764a aVar) throws Exception {\n m17130I();\n }", "static /* synthetic */ void m7142g(AuthActivity authActivity) {\n C1636a aVar = authActivity.f7134e;\n if (aVar != null) {\n aVar.mo14510b();\n }\n authActivity.f7134e = null;\n }", "static void setNotSaved(){saved=false;}", "public void method_4270() {}", "public static void m36106a(an anVar) {\n anVar.m36105b();\n anVar.f30013a = new C10576e();\n }", "public static void main(String[] args) \n {\n int x = 3;\n System.out.println(x);\n int x = 5;\n System.out.println(x);\n // ANS: Can't declare the same variable twice in the same scope\n }", "public void mo33816a() {\n this.f15330j = null;\n }", "public abstract void mo56922b(@NonNull C4125a aVar);", "public void method_893(Double var1) {\n this.field_669 = var1;\n }", "final public void varcall() throws ParseException {\n jj_consume_token(VARIABLE);\n if(userVals.get(token.image)==null) {\n {if (true) throw new ParseException(\"La variable no ha sido definida.\");}\n }\n }", "public void method_1068(@NotNull f0l var1) {\n this.field_734 = var1;\n }", "public void setName(String newName) { throw new NotImplementedException(\"Variable names are final!\"); }", "public void mo77109a(AbstractC14725a aVar) {\n this.f52668a = aVar;\n }", "public abstract void mo56919a(@NonNull C4125a aVar);", "public void method_895(double var1) {\n this.field_670 = var1;\n }", "public static void method_1145(boolean var0) {\r\n field_988 = var0;\r\n }", "public void method_1142(bdw var1) {\r\n super.method_651();\r\n this.field_987 = -16;\r\n this.field_971 = var1;\r\n }", "public void method_899(double var1) {\n this.field_672 = var1;\n }", "@Override // androidx.databinding.ViewDataBinding\n /* renamed from: d */\n public void mo5926d() {\n synchronized (this) {\n long j = this.f102361i;\n this.f102361i = 0;\n }\n }", "private Rekenhulp()\n\t{\n\t}", "@Override\n\t\tprotected void reset()\n\t\t{\n\t\t}", "private stendhal() {\n\t}", "private void m33489a() {\n Action<String> aVar = f26277a;\n if (aVar != null) {\n aVar.mo21403a(this.f26281e);\n }\n f26277a = null;\n f26278b = null;\n finish();\n }", "public void mo12930a() {\n }", "void berechneFlaeche() {\n\t}", "@Override\n public void enterVariableAssignmentStatement(MiniJavaParser.VariableAssignmentStatementContext ctx) {\n Symbol variable = currentScope.lookup(ctx.Identifier().getText());\n if (variable.isField()) {\n mg.loadThis();\n }\n }", "public final void mo74763d(C29296g gVar) {\n }", "public void method_891(double var1) {\n this.field_668 = var1;\n }" ]
[ "0.64121914", "0.6389749", "0.6376436", "0.60451156", "0.6010251", "0.5983671", "0.59600806", "0.58666366", "0.58517", "0.58351374", "0.5711556", "0.570671", "0.56355906", "0.5623032", "0.5592867", "0.5586479", "0.5584833", "0.5545953", "0.5544569", "0.55324346", "0.55312", "0.5528266", "0.5514176", "0.55113256", "0.5504078", "0.5494449", "0.549346", "0.5489542", "0.54817677", "0.5463112", "0.5462799", "0.5458396", "0.5442586", "0.5433118", "0.5411616", "0.5408142", "0.5403381", "0.54020345", "0.53970814", "0.53958076", "0.539435", "0.53933775", "0.53890365", "0.5378426", "0.53768635", "0.53663915", "0.536004", "0.53580505", "0.5357391", "0.5357013", "0.53512144", "0.5347957", "0.53448766", "0.5344464", "0.53434366", "0.53350204", "0.53255343", "0.5321359", "0.53204566", "0.5318149", "0.5315005", "0.53135884", "0.5306858", "0.5296194", "0.52821976", "0.5268509", "0.52609116", "0.5260259", "0.525612", "0.52514523", "0.5249981", "0.5245979", "0.5241382", "0.5240921", "0.523663", "0.5234832", "0.5227112", "0.52270967", "0.5223527", "0.5211717", "0.5200967", "0.5195801", "0.5190037", "0.5187883", "0.5182643", "0.51778287", "0.5176974", "0.517614", "0.5172361", "0.51688397", "0.5168594", "0.51673955", "0.5166416", "0.5166047", "0.51632637", "0.51598775", "0.5159697", "0.5157048", "0.51531625", "0.51505655", "0.5148156" ]
0.0
-1
suppress this because redefining a variable is necessary
@SuppressWarnings("PMD.DataflowAnomalyAnalysis") @ParameterizedTest @CsvSource({ "RIGHT, 1, 0", "LEFT, -1, 0", "UP, 0, 1", "DOWN, 0, -1" }) //DONT ANNOTATE WITH @Test void update3BodyPartsPositionTest(Direction dir, int dx, int dy) { int x = 26; int y = 25; BodyPart zeroHead = new BodyPart(x, y); System.out.println("zero " + zeroHead.getCoordinate().toString()); x -= dx; y -= dy; BodyPart one = new BodyPart(x, y); System.out.println("one " + one.getCoordinate().toString()); x -= dx; y -= dy; BodyPart two = new BodyPart(x, y); System.out.println("two " + two.getCoordinate().toString()); LinkedList<BodyPart> linkedList = new LinkedList<>(); linkedList.add(zeroHead); linkedList.add(one); linkedList.add(two); snakeBody.setBodyParts(linkedList); //snakeBody.moveSnake(Direction.UP); Direction temp = dir; snakeBody.setCurrDir(temp); snakeBody.updateBodyPartsPosition(snakeBody.getHeadCoord()); LinkedList<BodyPart> allBP = snakeBody.getBodyParts(); assertEquals(allBP.get(1).getCoordinate(), allBP.get(0).getCoordinate()); assertEquals(new Coordinate(allBP.get(1).getCoordinate().getCoordinateX() - dx, allBP.get(1).getCoordinate().getCoordinateY() - dy), allBP.get(2).getCoordinate()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setOriginalVariable(GlobalVariable var) {\n originalVariable = var;\n }", "public void reassignIfNeeded() {\n\t}", "private void assignment() {\n\n\t\t\t}", "@Deprecated\n private void assertNotDefined(String name) {\n if (values.containsKey(name))\n throw new RedefineVariableError(null, \"Attempting to redefine scope variable '\" + name + \"'.\");\n }", "private zzfl$zzg$zzc() {\n void var3_1;\n void var2_-1;\n void var1_-1;\n this.value = var3_1;\n }", "private void assignUninitialisedGlobalVar(Variable lastAppearanceOfVar,String valueName)throws\r\n\t\t\tTypeNotSupportedException{\r\n\t\t\tVariable variablesCopy = vFactory.createVariable(true, false, lastAppearanceOfVar.isArgument(),\r\n\t\t\t\t\tlastAppearanceOfVar.getType(), true);\r\n\t\t\tuninitialisedGlobalVariables.put(valueName, variablesCopy);\r\n\t}", "private CacheBuilder$OneWeigher() {\n void var2_-1;\n void var1_-1;\n }", "public final void mo51373a() {\n }", "public void fixupVariables(List<QName> vars, int globalsSize)\n {\n // no-op\n }", "private void m146984b(C47008ac acVar) {\n if (this.f120643a == null) {\n this.f120643a = acVar;\n }\n if (this.f120644b == null) {\n this.f120644b = acVar;\n }\n }", "private void privateUnsynchSetThis(Bug1815013 p) {\n this.x = p.get()[0];\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "void doStuff() {\n\t\tfinal int y = 20; \n\t\t\n\t}", "public void swrap() throws NoUnusedObjectExeption;", "public void lavar() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "public final void mo91715d() {\n }", "static void setNotCopying(){isCopying=false;}", "void method_6615(class_1303 var1) {\r\n this.field_6524 = var1;\r\n super();\r\n }", "@Override\n protected void variableAddedDuringReplication(Aggregatable variable) {\n }", "void setUnused(){\n assert this.used == true;\n\n //let the parent pointer remain\n this.hf = 0;\n this.used = false;\n\n }", "public void method_2244() {\r\n this.field_1858 = 0;\r\n }", "protected void initVars() {}", "public void reuse() {}", "public static void m34958a(Consumer<? super Throwable> gVar) {\n if (!f27431p) {\n f27416a = gVar;\n return;\n }\n throw new IllegalStateException(\"Plugins can't be changed anymore\");\n }", "@Override\r\n\tpublic void initVariables() {\n\t\t\r\n\t}", "private void updateVars()\n {\n\n }", "@Override\n\tpublic void beforeVariableChanged(ProcessVariableChangedEvent arg0) {\n\n\t}", "public void method_8074(Throwable var1) {\r\n super();\r\n this.field_7865 = var1;\r\n }", "static void setNotAutoCopy(){isAutoCopying=false;}", "public void method_887(double var1) {\n this.field_666 = var1;\n }", "public void defender(){setModopelea(1);}", "public void setUsed(){\n\t\talreadyUsed = true;\n\t}", "void method_5902(ahb var1) {\r\n this.field_5516 = var1;\r\n super();\r\n }", "double defendre();", "@Override\n protected void resetVariables(){\n super.resetVariables();\n pointUp = false;\n }", "@Override\n protected void variableRemovedDuringReplication(Aggregatable variable) {\n }", "@Test\n\tpublic void testMakeSureVarVariablesCanShadowLetVariables()\n\t{\n\t\tString[] code = {\n\t\t\t\"let a = 1;\",\n\t\t \"let b = 2;\",\n\t\t \"var c = 3;\",\n\n\t\t \"function sup(a) {\",\n\t\t \"var b = 4;\",\n\t\t \"let c = 5;\",\n\t\t \"let d = 6;\",\n\t\t \"if (false) {\",\n\t\t \"var d = 7;\",\n\t\t \"}\",\n\t\t \"return b + c + a + d;\",\n\t\t \"}\",\n\n\t\t \"sup();\"\n\t\t};\n\t\t\n\t\tth.addError(1, 5, \"'a' is defined but never used.\");\n\t th.addError(2, 5, \"'b' is defined but never used.\");\n\t th.addError(3, 5, \"'c' is defined but never used.\");\n\t th.addError(9, 5, \"'d' has already been declared.\");\n\t\tth.test(code, new LinterOptions().set(\"esnext\", true).set(\"unused\", true).set(\"undef\", true).set(\"funcscope\", true));\n\t}", "public /* synthetic */ void mo14074a(C1379a aVar) throws Exception {\n m17130I();\n }", "private void resetTemporary(){\n temporaryConstants = null;\n temporaryVariables = null;\n }", "public void mo33816a() {\n this.f15942j = null;\n }", "@Override\n public void func_104112_b() {\n \n }", "static void m7753b() {\n f8029a = false;\n }", "private void privateUnsynchSetP(Bug1815013 p) {\n p.x = get()[0];\n }", "public void method_6438(int var1) {\r\n this.field_6227 = var1;\r\n }", "public GlobalVariable getOriginalVariable() {\n return originalVariable;\n }", "public void reAssign(Object o) {\n\t}", "@Override\n public void visitLocalVariable(String name, String descriptor, String signature, Label start, Label end, int index) {\n if(this.preserveDebuggability){\n super.visitLocalVariable(name, descriptor, signature, start, end, index);\n }\n }", "private boolean isUnunsedVariable(final String message) {\n\t\treturn message.contains(\"Unused variable\"); //$NON-NLS-1$\n\t}", "private Mask$MaskMode() {\n void var2_-1;\n void var1_-1;\n }", "protected boolean func_70041_e_() { return false; }", "void m1864a() {\r\n }", "protected void m3599a(en enVar) throws RemoteException {\n try {\n enVar.m3052b(null, null, this);\n } catch (IllegalStateException e) {\n m3243x(2001);\n }\n }", "private static void m114828a(C35565a aVar) {\n f93235Q = aVar;\n }", "public void m23075a() {\n }", "private void m50366E() {\n }", "private void resetDataForAddAfterSchoolAlly() \r\n\t{\n\t\tStaticVariables.showAllyName1InAfterSchool = false;\r\n\t\tStaticVariables.showAllyName2InAfterSchool = false;\r\n\r\n\t\t/*\tStaticVariables.allySetFor1 = null;\r\n\t\tStaticVariables.allySetFor2 = null;*/\r\n\r\n\t}", "private void m3417d(C0933b bVar) {\n m3422v(bVar);\n }", "public final /* bridge */ /* synthetic */ void mo43566a() {\n super.mo43566a();\n }", "static void ignore() {\n }", "public void mo38117a() {\n }", "@Override\n\tpublic ServerServices upstreamGlobalVarsInit() throws Exception {\n\t\treturn null;\n\t}", "public void o_()\r\n/* 533: */ {\r\n/* 534:539 */ this.e = true;\r\n/* 535: */ }", "public void testing() {\n\t\tprotectedInstanceVariable = \"\";\n\t}", "@Override // androidx.databinding.ViewDataBinding\n /* renamed from: d */\n public void mo5926d() {\n synchronized (this) {\n long j = this.f67002l;\n this.f67002l = 0;\n }\n }", "d(a aVar) {\n super(0);\n this.this$0 = aVar;\n }", "@Override\n public void retrack() {\n }", "public void method_873(double var1) {\n this.field_658 = var1;\n }", "public void smell() {\n\t\t\n\t}", "public void method_103(boolean var1) {\n this.field_4130 = var1;\n }", "public void n() {\n this.f80658c.a(new f() {\n public void a(Object obj, boolean z) {\n p unused = m.this.f80658c = (p) obj;\n }\n }, \"__ag_of\");\n }", "static void m7752a() {\n f8029a = true;\n }", "public void method_897(double var1) {\n this.field_671 = var1;\n }", "public boolean isVariable() {\n return false;\n }", "public /* synthetic */ void mo14076a(C3764a aVar) throws Exception {\n m17130I();\n }", "static /* synthetic */ void m7142g(AuthActivity authActivity) {\n C1636a aVar = authActivity.f7134e;\n if (aVar != null) {\n aVar.mo14510b();\n }\n authActivity.f7134e = null;\n }", "static void setNotSaved(){saved=false;}", "public static void m36106a(an anVar) {\n anVar.m36105b();\n anVar.f30013a = new C10576e();\n }", "public void method_4270() {}", "public static void main(String[] args) \n {\n int x = 3;\n System.out.println(x);\n int x = 5;\n System.out.println(x);\n // ANS: Can't declare the same variable twice in the same scope\n }", "public void mo33816a() {\n this.f15330j = null;\n }", "public abstract void mo56922b(@NonNull C4125a aVar);", "public void method_893(Double var1) {\n this.field_669 = var1;\n }", "final public void varcall() throws ParseException {\n jj_consume_token(VARIABLE);\n if(userVals.get(token.image)==null) {\n {if (true) throw new ParseException(\"La variable no ha sido definida.\");}\n }\n }", "public void method_1068(@NotNull f0l var1) {\n this.field_734 = var1;\n }", "public void setName(String newName) { throw new NotImplementedException(\"Variable names are final!\"); }", "public void mo77109a(AbstractC14725a aVar) {\n this.f52668a = aVar;\n }", "public abstract void mo56919a(@NonNull C4125a aVar);", "public void method_895(double var1) {\n this.field_670 = var1;\n }", "public static void method_1145(boolean var0) {\r\n field_988 = var0;\r\n }", "public void method_899(double var1) {\n this.field_672 = var1;\n }", "public void method_1142(bdw var1) {\r\n super.method_651();\r\n this.field_987 = -16;\r\n this.field_971 = var1;\r\n }", "@Override // androidx.databinding.ViewDataBinding\n /* renamed from: d */\n public void mo5926d() {\n synchronized (this) {\n long j = this.f102361i;\n this.f102361i = 0;\n }\n }", "private Rekenhulp()\n\t{\n\t}", "@Override\n\t\tprotected void reset()\n\t\t{\n\t\t}", "private stendhal() {\n\t}", "private void m33489a() {\n Action<String> aVar = f26277a;\n if (aVar != null) {\n aVar.mo21403a(this.f26281e);\n }\n f26277a = null;\n f26278b = null;\n finish();\n }", "public void mo12930a() {\n }", "void berechneFlaeche() {\n\t}", "@Override\n public void enterVariableAssignmentStatement(MiniJavaParser.VariableAssignmentStatementContext ctx) {\n Symbol variable = currentScope.lookup(ctx.Identifier().getText());\n if (variable.isField()) {\n mg.loadThis();\n }\n }", "public final void mo74763d(C29296g gVar) {\n }", "public void method_891(double var1) {\n this.field_668 = var1;\n }" ]
[ "0.6413542", "0.63903654", "0.6376055", "0.60459304", "0.6010754", "0.5984296", "0.59606034", "0.58661383", "0.58518505", "0.5835901", "0.5711625", "0.5706797", "0.56355864", "0.5624255", "0.5592627", "0.5585899", "0.55847824", "0.5546238", "0.5544824", "0.55315983", "0.553144", "0.5527172", "0.55143255", "0.5511614", "0.55032593", "0.54946387", "0.5494034", "0.5490024", "0.54815555", "0.5464267", "0.5462098", "0.5458305", "0.54427314", "0.54321605", "0.541147", "0.5408928", "0.5404326", "0.5402951", "0.5398029", "0.5395704", "0.539358", "0.53924567", "0.5389073", "0.5379236", "0.5378451", "0.5367409", "0.53602445", "0.53579795", "0.5357737", "0.53562856", "0.535056", "0.53491664", "0.5345449", "0.5344091", "0.53427625", "0.5334963", "0.5326137", "0.53212625", "0.53207344", "0.5317985", "0.53139156", "0.5313305", "0.5307537", "0.5296108", "0.52821916", "0.5268802", "0.5261701", "0.52604485", "0.5256079", "0.52523124", "0.5249152", "0.52470136", "0.5242179", "0.5241938", "0.52362704", "0.5234886", "0.5227514", "0.5226525", "0.5223885", "0.5211223", "0.52016187", "0.51969963", "0.51904374", "0.5188059", "0.5182236", "0.51784563", "0.5177732", "0.5177161", "0.51724136", "0.51695246", "0.51693904", "0.5167414", "0.51652986", "0.5165226", "0.5162071", "0.51601803", "0.5159451", "0.5156769", "0.51536614", "0.51509804", "0.51492065" ]
0.0
-1
String url = " String url = " String url = " /String url = " String params = "" + "" + "" + "1348831860" + "" + "" + "1234567890123456" + ""; String[] rss = NetworkUtil.query4Stream(url, params, "POST", "UTF8", 5000, null); System.out.println(rss[1]);
public static void main(String[] args){ String path = FileLogic.createDateSplitDirYYYYMMDDHH("d:/test"); NetworkUtil.downloadImage("http://www.51homevip.com/portal/web/images/home-top.png", path + "/gg.png"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static InputStream postQuery(String url) throws IOException {\n\t\tURL u = new URL(SERVICE_LOCATION);\n\n\t\tString encodedUrl = URLEncoder.encode(url, \"UTF-8\");\n\n\t\tInputStream input = doPOST(u, encodedUrl);\n\n\t\treturn input;\n\t}", "private String getURL(String feedUrl) {\n\tStringBuilder sb = null;\n\ttry {\n for(int i = 3; i>0; i--) {\n\t sb = new StringBuilder();\n URL url = new URL(feedUrl);\n//User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.22) Gecko/20110902 Firefox/3.6.22 GTB7.1 ( .NET CLR 3.5.30729)\n//Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\n//Accept-Language: en-us,en;q=0.5\n//Accept-Encoding: gzip,deflate\n//Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\n//Keep-Alive: 115\n//Connection: keep-alive\n//\tHttpsURLConnection uc = (HttpsURLConnection) url.openConnection();\n\tHttpURLConnection uc = (HttpURLConnection) url.openConnection();\n\tuc.setRequestProperty(\"User-Agent\", \"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.22) Gecko/20110902 Firefox/3.6.22 GTB7.1 ( .NET CLR 3.5.30729)\");\n//Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\n\tuc.setRequestProperty(\"Accept\", \"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\");\n\tuc.setRequestProperty(\"Accept-Language\", \"en-us,en;q=0.5\");\n\tuc.setRequestProperty(\"Accept-Encoding\", \"gzip,deflate\");\n\tuc.setRequestProperty(\"Accept-Charset\", \"ISO-8859-1,utf-8;q=0.7,*;q=0.7\");\n\tuc.setRequestProperty(\"Keep-Alive\", \"115\");\n\tuc.setRequestProperty(\"Connection\", \"keep-alive\");\n//Keep-Alive: 115\n//Connection: keep-alive\n//\tif (userName != null && password != null) {\n//\t\tuc.setRequestProperty(\"Authorization\", \"Basic \" + encodedAuthenticationString);\n//\t}\n\t// ori setting??\n//\tuc.setReadTimeout(TIME_OUT);\n//\tuc.setFollowRedirects(true);\n//\tuc.setInstanceFollowRedirects(true);\n//\tuc.setAllowUserInteraction(true);\n\tuc.setDoOutput(true);\n\tuc.setDoInput(true);\n\tuc.setUseCaches(false);\n\tuc.setRequestMethod(\"POST\");\n\tuc.setRequestProperty(\"Content-Type\", \"text/xml\");\n\t\n\tBufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));//uc.getInputStream()\n\tString inputLine;\n//\t'aa7c.com')\" onmouseout=\"menuLayers.hide()\">Available</a>\n\tboolean refreshAgain = false;\n\twhile ((inputLine = in.readLine()) != null) {\n//\t\tSystem.out.println(inputLine);\n\t\tsb.append(inputLine);\n\t\tif( inputLine.contains(\"Refresh\") ) {\n\t\t\trefreshAgain = true;\n\t\t\tSystem.out.println(\"Refresh\");\n\t\t}\n\t}\n\tin.close();\n\tuc.disconnect();\t\t\n//\tRefresh\n\tif( refreshAgain ) {\n\t Thread.sleep(1000);\n\t}\n\telse break;\n }\n }catch(Exception ee){}\nreturn sb.toString();\n}", "private String getURL(String feedUrl) {\n\tStringBuilder sb = null;\n\ttry {\n for(int i = 3; i>0; i--) {\n\t sb = new StringBuilder();\n URL url = new URL(feedUrl);\n\tHttpURLConnection uc = (HttpURLConnection) url.openConnection();\n\tuc.setRequestProperty(\"User-Agent\", \"Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.22) Gecko/20110902 Firefox/3.6.22 GTB7.1 ( .NET CLR 3.5.30729)\");\n\tuc.setRequestProperty(\"Accept\", \"text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\");\n\tuc.setRequestProperty(\"Accept-Language\", \"en-us,en;q=0.5\");\n\tuc.setRequestProperty(\"Accept-Encoding\", \"gzip,deflate\");\n\tuc.setRequestProperty(\"Accept-Charset\", \"ISO-8859-1,utf-8;q=0.7,*;q=0.7\");\n\tuc.setRequestProperty(\"Keep-Alive\", \"115\");\n\tuc.setRequestProperty(\"Connection\", \"keep-alive\");\n\tuc.setDoOutput(true);\n\tuc.setDoInput(true);\n\tuc.setUseCaches(false);\n\tuc.setRequestMethod(\"POST\");\n\tuc.setRequestProperty(\"Content-Type\", \"text/xml\");\n\t\n\tBufferedReader in = new BufferedReader(new InputStreamReader(url.openStream()));//uc.getInputStream()\n\tString inputLine;\n\tboolean refreshAgain = false;\n\twhile ((inputLine = in.readLine()) != null) {\n\t\tsb.append(inputLine);\n\t\tif( inputLine.contains(\"Refresh\") ) {\n\t\t\trefreshAgain = true;\n\t\t\tSystem.out.println(\"Refresh\");\n\t\t}\n\t}\n\tin.close();\n\tuc.disconnect();\t\t\n//\tRefresh\n\tif( refreshAgain ) {\n\t Thread.sleep(1000);\n\t}\n\telse break;\n }\n }catch(Exception ee){}\nreturn sb.toString();\n}", "public String makeNetworkCall(String s) {\n\n try {\n URL url = new URL(s);\n\n HttpURLConnection httpURLConnection = (HttpURLConnection) url.openConnection();\n\n httpURLConnection.setRequestMethod(\"GET\");\n\n httpURLConnection.setConnectTimeout(3000);\n\n InputStream is = httpURLConnection.getInputStream();\n\n Scanner scanner = new Scanner(is);\n\n //This allows the scanner to read the entire file content in one go\n scanner.useDelimiter(\"\\\\A\");\n\n String result = \"\";\n\n if (scanner.hasNext()) {\n result = scanner.next();\n }\n\n return result;\n\n } catch (MalformedURLException e) {\n e.printStackTrace();\n Log.e(\"TAG\", \"makeNetworkCall: Incorrect URL : \" + s);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return \"Some unexpected error occurred!\";\n\n }", "@Override\n protected String doInBackground(String... params) {\n try {\n String NewsData;\n //define the url we have to connect with\n URL url = new URL(params[0]);\n //make connect with url and send request\n HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();\n //waiting for 7000ms for response\n urlConnection.setConnectTimeout(7000);//set timeout to 5 seconds\n\n try {\n //getting the response data\n InputStream in = new BufferedInputStream(urlConnection.getInputStream());\n //convert the stream to string\n Operations operations = new Operations(getApplicationContext());\n NewsData = operations.ConvertInputToStringNoChange(in);\n //send to display data\n publishProgress(NewsData);\n } finally {\n //end connection\n urlConnection.disconnect();\n }\n\n } catch (Exception ex) {\n }\n return null;\n }", "static String getPodcast(String queryString){\n HttpURLConnection urlConnection = null;\n BufferedReader reader = null;\n String podcastJSONString = null;\n try{\n URL requestUrl = new URL(queryString);\n urlConnection = (HttpURLConnection)requestUrl.openConnection();\n urlConnection.setRequestProperty(X_MASHAPE_KEY, X_MASHAPE_VALUE);\n urlConnection.setRequestProperty(ACCEPT_KEY, ACCEPT_VALUE);\n urlConnection.setRequestMethod(\"GET\");\n urlConnection.connect();\n\n\n InputStream inputStream = urlConnection.getInputStream();\n StringBuffer buffer = new StringBuffer();\n if(inputStream==null){\n return null;\n }\n\n reader = new BufferedReader(new InputStreamReader(inputStream));\n String line;\n while((line = reader.readLine())!=null){\n buffer.append(line+\"\\n\");\n }\n\n if(buffer.length()==0){\n return null;\n }\n podcastJSONString = buffer.toString();\n\n }catch (Exception e){\n e.printStackTrace();\n return null;\n }finally {\n if(urlConnection!=null){\n urlConnection.disconnect();\n }\n if(reader!=null){\n try {\n reader.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n return podcastJSONString;\n }", "@TargetApi(Build.VERSION_CODES.KITKAT)\n public String sendPost1() throws Exception {\n String urlParameters=parameter;\n byte[] postData = urlParameters.getBytes(\"UTF-8\");\n int postDataLength = postData.length;\n URL url;\n HttpURLConnection urlConn;\n DataOutputStream printout;\n DataInputStream input;\n url = new URL(\"http://203.151.92.175:8080/\"+method);\n urlConn = (HttpURLConnection) url.openConnection();\n urlConn.setDoInput(true);\n urlConn.setDoOutput(true);\n urlConn.setUseCaches(false);\n urlConn.setInstanceFollowRedirects(false);\n urlConn.setRequestMethod(\"POST\");\n urlConn.setRequestProperty(\"charset\", \"utf-8\");\n urlConn.setRequestProperty(\"Content-Length\", Integer.toString(postDataLength));\n urlConn.setRequestProperty(\"User-Agent\", USER_AGENT);\n urlConn.connect();\n DataOutputStream wr = new DataOutputStream(urlConn.getOutputStream());\n wr.write(postData);\n\n BufferedReader in = new BufferedReader(\n new InputStreamReader(urlConn.getInputStream()));\n String inputLine;\n StringBuffer response = new StringBuffer();\n\n while ((inputLine = in.readLine()) != null) {\n response.append(inputLine);\n }\n in.close();\n urlConn.disconnect();\n return response.toString();\n\n }", "String getQuery(HashMap<String, String> params) throws UnsupportedEncodingException {\n StringBuilder query=new StringBuilder();\n boolean first = true;\n for (Map.Entry<String, String> entry : params.entrySet()) {\n if (first)\n first=false;\n else\n query.append('&');\n\n String key=entry.getKey();\n Log.d(\"NetworkCall\",key);\n query.append(URLEncoder.encode(key, \"UTF-8\"));\n query.append(\"=\");\n query.append(URLEncoder.encode(entry.getValue(), \"UTF-8\"));\n }\n return query.toString();\n }", "private String postMT(String xml) throws PrepException{\n\n StringBuilder responseXml = new StringBuilder();\n try{\n URL mtUrl = new URL(this.url);\n HttpURLConnection httpconn = (HttpURLConnection)mtUrl.openConnection();\n httpconn.setDoInput(true);\n httpconn.setDoOutput(true);\n\n OutputStreamWriter out = new OutputStreamWriter(httpconn.getOutputStream());\n out.write(xml);\n out.close();\n\n int responseCode = httpconn.getResponseCode();\n if(responseCode != 200){\n throw new PrepException(\"Error with HTTP connection in MTPrep.postMT(); HTTP response code: \"+responseCode);\n }\n //out.close();\n\n BufferedReader in = new BufferedReader( new InputStreamReader(httpconn.getInputStream()));\n\n String line;\n while (( line = in.readLine()) != null){\n responseXml.append(line);\n }\n in.close();\n\n }\n catch(MalformedURLException malex ){\n throw new PrepException(\"URL Error in MTPrep.postMT(): \"+malex.getMessage());\n }\n catch(IOException ioe){\n throw new PrepException(\"IO Error in MTPrep.postMT(): \"+ioe.getMessage());\n }\n return responseXml.toString();\n }", "private String readStream(InputStream is) throws IOException {\n StringBuilder sb = new StringBuilder();\n BufferedReader r = new BufferedReader(new InputStreamReader(is),1000);\n for (String line = r.readLine(); line != null; line =r.readLine()){\n sb.append(line);\n }\n is.close();\n return sb.toString();\n }", "private InputStream downloadUrl(String urlString) throws IOException {\n \tSystem.out.println(\"Inside downloadURL\");\n URL url = new URL(urlString);\n HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n \n conn.setReadTimeout(10000 /* milliseconds */);\n conn.setConnectTimeout(15000 /* milliseconds */);\n conn.setRequestMethod(\"GET\");\n conn.setDoInput(true);\n // Starts the query\n conn.connect();\n InputStream stream = conn.getInputStream();\n return stream;\n }", "private InputStream downloadStream(String urlString) throws IOException {\n\t\tURL url = new URL(urlString);\n\t\tHttpURLConnection conn = (HttpURLConnection) url.openConnection();\n\t\tconn.setReadTimeout(10000 /* milliseconds */);\n\t\tconn.setConnectTimeout(15000 /* milliseconds */);\n\t\tconn.setRequestMethod(\"GET\");\n\t\tconn.setDoInput(true);\n\t\t// Starts the query\n\t\tconn.connect();\n\t\tInputStream stream = conn.getInputStream();\n\t\treturn stream;\n\t}", "private String doPost(final String url, String... params) throws IOException {\n HttpURLConnection urlConnection = (HttpURLConnection) (new URL(url)).openConnection();\n urlConnection.setRequestMethod(\"POST\");\n urlConnection.setDoOutput(true);\n urlConnection.setDoInput(true);\n urlConnection.setUseCaches(false);\n urlConnection.setAllowUserInteraction(false);\n urlConnection.setRequestProperty(\"Content-type\", \"text/xml; charset=\" + \"UTF-8\");\n /** post the data */\n OutputStream out = urlConnection.getOutputStream();\n Writer writer = new OutputStreamWriter(out, \"UTF-8\");\n String data = \"\";\n for (String param : params) {\n data += URLEncoder.encode(param, \"UTF-8\") + \"&\";\n }\n writer.write(data);\n writer.close();\n out.close();\n try {\n InputStream inputStream = urlConnection.getInputStream();\n byte[] buffer = new byte[4096];\n int readBytes = inputStream.read(buffer);\n return readBytes == -1 ? \"\" : new String(buffer, 0, readBytes);\n } finally {\n urlConnection.disconnect();\n }\n }", "@Test\n public void test1 () throws Exception{\n URI uri = new URI(\"http://www.baidu.com\");\n\n URL url = uri.toURL();\n\n InputStream input = url.openStream();\n OutputStream output = new ByteArrayOutputStream();\n\n int i = 0;\n byte[] bytes = new byte[1024];\n int length = -1;\n while( (length = input.read(bytes)) != -1){\n output.write(bytes, 0, length);\n }\n\n System.out.println(new String(bytes));\n }", "public static String getSongUri(String songid) throws Exception {\n\t\tURL url1 = new URL(\"http://www.songtaste.com/playmusic.php?song_id=\" + songid + \"/\");\n\t\tHttpURLConnection conn = (HttpURLConnection) url1.openConnection();\n\t\tconn.setConnectTimeout(6 * 1000);\n\t\tconn.setRequestMethod(\"GET\");\n\t\tif (conn.getResponseCode() == 200) {\n\t\t\tSystem.out.println(\"歌曲网页读取成功\");\n\t\t\tInputStream inputStream = conn.getInputStream();\n\t\t\tbyte[] data = readStream(inputStream);\n\t\t\tString html = new String(data, \"gb2312\");\n\t\t\tPattern p = Pattern.compile(\"WrtSongLine((.*?),(.*?),(.*?),(.*?),(.*?),(.*?),(.*?));\",\n\t\t\t\t\tPattern.CASE_INSENSITIVE | Pattern.DOTALL);\n\t\t\tMatcher m = p.matcher(html);\n\t\t\tSystem.out.println(html);\n\t\t\twhile (m.find()) {\n\t\t\t\tsongUri = m.group(8);\n\t\t\t\tString regEx = \"\\\"+\"; // 表示一个或多个@\n\t\t\t\tPattern pat = Pattern.compile(regEx);\n\t\t\t\tMatcher mat1 = pat.matcher(songUri);\n\t\t\t\tsongUri= mat1.replaceAll(\"\");\n\t\t\t\tsongUri=songUri.substring(1, songUri.length()-1);\n\t\t\t\tLog.i(\"第一次正则取到的数据\", songUri);\n\t\t\t\tURI url = new URI(\"http://www.songtaste.com/time.php\");\n\t\t\t\tHttpPost httpRequest = new HttpPost(url);\n\t\t\t\t/*\n\t\t\t\t * Post运作传送变量必须用NameValuePair[]数组储存\n\t\t\t\t */\n\t\t\t\tList<NameValuePair> params = new ArrayList<NameValuePair>();\n\t\t\t\tparams.add(new BasicNameValuePair(\"str\", songUri));\n\t\t\t\tparams.add(new BasicNameValuePair(\"sid\", songid));\n\t\t\t\tparams.add(new BasicNameValuePair(\"t\", \"0\"));\n\t\t\t\ttry {\n\t\t\t\t\t/* 发出HTTP request */\n\t\t\t\t\thttpRequest.setEntity(new UrlEncodedFormEntity(params,\n\t\t\t\t\t\t\tHTTP.UTF_8));\n\t\t\t\t\t/* 取得HTTP response */\n\t\t\t\t\tHttpResponse httpResponse = new DefaultHttpClient()\n\t\t\t\t\t\t\t.execute(httpRequest);\n\t\t\t\t\t/* 若状态码为200 ok */\n\t\t\t\t\tSystem.out.println(\"第2个取到数据了\");\n\t\t\t\t\tif (httpResponse.getStatusLine().getStatusCode() == 200) {\n\t\t\t\t\t\t/* 取出响应字符串 */\n\t\t\t\t\t\tsongUri = EntityUtils\n\t\t\t\t\t\t\t\t.toString(httpResponse.getEntity());\n\t\t\t\t\t\t// mTextView1.setText(strResult);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// mTextView1.setText(\"Error Response: \"+httpResponse.getStatusLine().toString());\n\t\t\t\t\t}\n\t\t\t\t} catch (ClientProtocolException e) {\n\t\t\t\t\t// mTextView1.setText(e.getMessage().toString());\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// mTextView1.setText(e.getMessage().toString());\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// mTextView1.setText(e.getMessage().toString());\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tLog.d(\"tureurl111\", songUri);\n\n\t\t\t}}\n\t\t\tif (songUri==\"http://songtaste.com/404.html?3=\") {\n\t\t\t\t\n\t\t\t\n\t\t\t\tURL url2 = new URL(\"http://www.songtaste.com/song/\" + songid + \"/\");\n//\t\t\t\tURL url1 = new URL(\"http://www.songtaste.com/playmusic.php?song_id=\" + songid + \"/\");\n\t\t\t\tHttpURLConnection conn2 = (HttpURLConnection) url2.openConnection();\n\t\t\t\tconn2.setConnectTimeout(6 * 1000);\n\t\t\t\tconn2.setRequestMethod(\"GET\");\n\t\t\t\tif (conn.getResponseCode() == 200) {\n\t\t\t\t\tSystem.out.println(\"歌曲网页读取成功\");\n\t\t\t\t\tInputStream inputStream2 = conn2.getInputStream();\n\t\t\t\t\tbyte[] data2 = readStream(inputStream2);\n\t\t\t\t\tString html2 = new String(data2, \"gb2312\");\n\t\t\t\t\tPattern p2 = Pattern.compile(\"strURL =(.*?)\\\"(.*?)\\\"\",\n\t\t\t\t\t\t\tPattern.CASE_INSENSITIVE | Pattern.DOTALL);\n\t\t\t\t\tMatcher m2 = p2.matcher(html2);\n\t\t\t\t\tif (m2.find()) {\n\t\t\t\t\t\tsongUri = m2.group(2);\n\t\t\t\t\t\t\n\t\t\t\t\t\tLog.i(\"第二次正则取到的数据\", songUri);\n\t\t\t\t\t\tURI url = new URI(\"http://www.songtaste.com/time.php\");\n\t\t\t\t\t\tHttpPost httpRequest = new HttpPost(url);\n\t\t\t\t\t\t/*\n\t\t\t\t\t\t * Post运作传送变量必须用NameValuePair[]数组储存\n\t\t\t\t\t\t */\n\t\t\t\t\t\tList<NameValuePair> params = new ArrayList<NameValuePair>();\n\t\t\t\t\t\tparams.add(new BasicNameValuePair(\"str\", songUri));\n\t\t\t\t\t\tparams.add(new BasicNameValuePair(\"sid\", songid));\n\t\t\t\t\t\tparams.add(new BasicNameValuePair(\"t\", \"0\"));\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t/* 发出HTTP request */\n\t\t\t\t\t\t\thttpRequest.setEntity(new UrlEncodedFormEntity(params,\n\t\t\t\t\t\t\t\t\tHTTP.UTF_8));\n\t\t\t\t\t\t\t/* 取得HTTP response */\n\t\t\t\t\t\t\tHttpResponse httpResponse = new DefaultHttpClient()\n\t\t\t\t\t\t\t\t\t.execute(httpRequest);\n\t\t\t\t\t\t\t/* 若状态码为200 ok */\n\t\t\t\t\t\t\tSystem.out.println(\"第2个取到数据了\");\n\t\t\t\t\t\t\tif (httpResponse.getStatusLine().getStatusCode() == 200) {\n\t\t\t\t\t\t\t\t/* 取出响应字符串 */\n\t\t\t\t\t\t\t\tsongUri = EntityUtils\n\t\t\t\t\t\t\t\t\t\t.toString(httpResponse.getEntity());\n\t\t\t\t\t\t\t\t// mTextView1.setText(strResult);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// mTextView1.setText(\"Error Response: \"+httpResponse.getStatusLine().toString());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (ClientProtocolException e) {\n\t\t\t\t\t\t\t// mTextView1.setText(e.getMessage().toString());\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// mTextView1.setText(e.getMessage().toString());\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t// mTextView1.setText(e.getMessage().toString());\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tLog.d(\"tureurl222\", songUri);\n\t\t\t\t\n\t\t\t}}}\n\n\t\t\tLog.d(\"doinback\", \"上面如果没有输出的话就是直接跳过了\"+songUri+songid);\n\t\treturn songUri;\n\n\t\t// URI url = new\n\t\t// URI(\"http://huodong.duomi.com/songtaste/?songid=\"+songid);\n\n\t\t// //\n\t}", "public static String sendRegData(String urls, String json) {\n\n String result = null;\n try {\n java.net.URL url = new URL(urls);//new AdIn().getURL());//\n\n\n URLConnection connection = url.openConnection();\n HttpURLConnection httpConnection = (HttpURLConnection) connection;\n\n httpConnection.setDoOutput(true);\n httpConnection.setChunkedStreamingMode(0);\n\n OutputStream out = new BufferedOutputStream(httpConnection.getOutputStream());\n // writeStream(out);\n out.write(json.getBytes());\n\n out.flush();\n out.close();\n\n InputStream in = new BufferedInputStream(httpConnection.getInputStream());\n //readStream(in);\n //finally {\n // httpConnection.disconnect();\n // }\n\n int responseCode = 0;\n responseCode = httpConnection.getResponseCode();\n\n if (responseCode == HttpURLConnection.HTTP_OK) {\n InputStream is = httpConnection.getInputStream();\n\n BufferedReader r = new BufferedReader(new InputStreamReader(in));\n result = r.readLine();\n } else {\n }\n } catch (MalformedURLException e) {\n } catch (IOException e1) {\n }\n return result;\n }", "public static void testQuery() {\n\t\tParameters parameters = new Parameters();\r\n\t\tparameters.setUrl(\"VchicleServlet.json?action=pagequery\");\r\n\t\tparameters.setList(new ArrayList<NameValuePair>());\r\n\t\tparameters.getList().add(new BasicNameValuePair(\"pageSize\", \"2\"));\r\n\t\tparameters.getList().add(new BasicNameValuePair(\"currPage\", \"3\"));\r\n\t\t@SuppressWarnings(\"unused\")\r\n\t\tString string = (String) MainUtilityTools.execute(parameters);\r\n\t}", "public static String query(String content, String url) throws ClientProtocolException, IOException {\n CloseableHttpClient httpclient = HttpClients.createDefault();\n// long qTest_end = System.currentTimeMillis();\n StringBuffer sb = new StringBuffer();\n// FileWriter fileWriter=new FileWriter(new File(\"/home/hadoop/wnd/usr/cmb/招行程序运行结果.txt\"),true);\n try {\n HttpPost httpPost = new HttpPost(url);\n HttpEntity entity = new ByteArrayEntity(content.getBytes());\n httpPost.setEntity(entity);\n// httpPost.setHeader(\"type\",\"0\");\n CloseableHttpResponse response = httpclient.execute(httpPost);\n try {\n// System.out.println(\"提交返回的状态:\"+response.getStatusLine());\n HttpEntity entity2 = response.getEntity();\n BufferedReader reader = new BufferedReader(new InputStreamReader(entity2.getContent()));\n String line = null;\n while ((line = reader.readLine()) != null) {\n// System.out.println(line);\n// fileWriter.write(line+\"\\n\");\n sb.append(line+\"\\n\");\n }\n EntityUtils.consume(entity2);\n } finally {\n// fileWriter.flush();\n// fileWriter.close();\n response.close();\n }\n } finally {\n httpclient.close();\n }\n// System.out.print(\"qTest:\");\n// System.out.println(qTest_end - qTest_st);\n return sb.toString();\n }", "public static String sendPostRequest(String urlString,String body,String[] head,boolean dom)\n\t{\n InputStream instream;\n BufferedReader bfreader = null;\n String response = null;\n \n \n \n \n \n try \n {\n java.net.URL url = new java.net.URL(urlString);\n java.net.HttpURLConnection connection = (java.net.HttpURLConnection)url.openConnection(); // have to cast connection\n connection.setRequestMethod(\"POST\");\n connection.setDoOutput(true);\n connection.setReadTimeout(60000);\n \n \n \n if(head!=null)\n {\n\t for(int i=0;i<head.length;i=i+2)\n\t {\n\t \tconnection.setRequestProperty(head[i], head[i+1]);\n\t \t\n\t }\n }\n \n String utf8body= new String(body.getBytes(\"UTF-8\"));\n \n //writeFile(utf8body,\"01aft\");\n //writeFile(body,\"01bef\");\n \n OutputStream os = connection.getOutputStream();\n \n BufferedWriter osw = new BufferedWriter(new OutputStreamWriter(os));\n if(dom)\n {\n\t osw.write(0x0A);\n\t osw.write(0x09);\n\t }\n osw.write(utf8body);\n osw.flush();\n osw.close();\n \n \n connection.connect();\n instream=connection.getInputStream();\n bfreader=new BufferedReader(new InputStreamReader(instream,\"UTF-8\"));\n response=bfreader.readLine();\n //writeFile(response,\"instr\");\n \n connection.disconnect();\n \n \n } \n \n \n catch (Exception e) {\n \n \n // get stack trace as a String to return as document data\n java.io.StringWriter stringWriter = new java.io.StringWriter();\n e.printStackTrace( new java.io.PrintWriter( stringWriter ) );\n //result.setResponseData( stringWriter.toString() );\n //System.out.println(stringWriter);\n response = stringWriter.toString();\n \n \n }\n\t\t\n \n \n return response;\n\t\t\n\t\t\n\t}", "private static String useAPI(String urlString) throws IOException {\n String inline = \"\";\n URL url = new URL(urlString);\n HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n conn.setRequestMethod(\"GET\");\n conn.connect();\n\n int responsecode = conn.getResponseCode();\n if(responsecode == 200) {\n Scanner sc = new Scanner(url.openStream());\n while(sc.hasNext()) {\n inline += sc.nextLine();\n }\n sc.close();\n conn.disconnect();\n return inline;\n }\n conn.disconnect();\n return \"[]\";\n }", "private String ExecuteRest(String urlServer,String params){\t\n\t\t\ttry {\t\t\t\n\t\t\t\tURL url = new URL(urlServer);\n\t\t\t\t\n\t\t\t\tHttpURLConnection connection = (HttpURLConnection) url.openConnection();\n\t \n\t if(params!=null){\n\t \tlog.warning(\"Requete post=\"+params);\n\t\t connection.setRequestProperty(\"Content-Length\", \"\"+params.getBytes().length);\n\t\t connection.setRequestProperty(\"Content-Type\",\"application/x-www-form-urlencoded\");\n\t\t connection.setRequestProperty(\"Content-Language\", \"en-US\"); \n\t\t connection.setUseCaches(false);\n\t\t connection.setDoOutput(true);\n\t\t connection.setDoInput(true);\n\t\t connection.setRequestMethod(\"POST\");\n\t\t DataOutputStream writer = new DataOutputStream(connection.getOutputStream());\n\t\t writer.writeBytes(params);\n\t\t writer.flush();\n\t\t writer.close();\n\t } else {\n\t \tconnection.setRequestMethod(\"GET\");\n\t }\n\t \n\t log.warning(\"Appel de \"+url+\" avec param=\"+params);\n\t \t\n\t //Delai de réponse fixé à 30 secondes\n\t connection.setReadTimeout(30*1000);\n\t connection.connect();\n\n\t //Récuperation de la réponse\n\t\t BufferedReader buffer=new BufferedReader(new InputStreamReader(connection.getInputStream()));\n\t\t String line=\"\";\n\t\t\t\tStringWriter writer=new StringWriter();\n\t\t\t\twhile ( null!=(line=buffer.readLine()))writer.write(line);\n\t\t \n\t\t\t\tint reponseCode=connection.getResponseCode();\n\t\t if (reponseCode == HttpURLConnection.HTTP_OK) { \t\n\t\t\t\t\tif(reponseCode==200)\t\t\t\t\t\n\t\t\t\t\t\tonSuccess(writer.toString()); \t\t\n\t\t\t\t\telse \n\t\t\t\t\t\tonFailure(reponseCode);\n\t\t }\n\t\t else onFailure(reponseCode); \n\t } \n\t\t\tcatch (MalformedURLException e) {} \n\t\t\tcatch (IOException e) {}\t\n\t\t\t\t\n\t\treturn null;\t\n\t}", "public static String exampleTwo(){\n HttpURLConnection connection = null;\n Scanner cs = null;\n try {\n URL url = buildURL(\"3\");\n connection = (HttpURLConnection) url.openConnection();\n connection.connect();\n InputStream inputStream = connection.getInputStream();\n cs = new Scanner(inputStream);\n boolean hasNext = cs.hasNext();\n if(hasNext){\n return cs.next();\n } else {\n return null;\n }\n } catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (connection != null){\n connection.disconnect();\n }\n if (cs != null){\n cs.close();\n }\n }\n return null;\n }", "@Override\n protected String doInBackground(String... params) {\n\n String data = \"\";\n\n HttpURLConnection httpURLConnection = null;\n try {\n\n httpURLConnection = (HttpURLConnection) new URL(params[0]).openConnection();\n httpURLConnection.setRequestMethod(\"POST\");\n\n httpURLConnection.setDoOutput(true);\n\n DataOutputStream wr = new DataOutputStream(httpURLConnection.getOutputStream());\n wr.writeBytes(\"PostData=\" + params[1]);\n wr.flush();\n wr.close();\n\n InputStream in = httpURLConnection.getInputStream();\n InputStreamReader inputStreamReader = new InputStreamReader(in);\n\n int inputStreamData = inputStreamReader.read();\n while (inputStreamData != -1) {\n char current = (char) inputStreamData;\n inputStreamData = inputStreamReader.read();\n data += current;\n }\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n if (httpURLConnection != null) {\n httpURLConnection.disconnect();\n }\n }\n return data;\n }", "public static String downloadContentUsingPostMethod(String urlString,String parameters) throws IOException {\n URL url = new URL(urlString);\n URLConnection conn = url.openConnection();\n conn.setDoOutput(true);\n OutputStreamWriter writer = new OutputStreamWriter(conn.getOutputStream());\n writer.write(\"value=1&anotherValue=1\");\n writer.flush();\n String line;\n BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));\n StringBuilder response = new StringBuilder();\n while ((line = reader.readLine()) != null) {\n response.append(line);\n }\n writer.close();\n reader.close();\n\n return response.toString();\n }", "JSONObject post(String url) {\n String json = \"\";\n try {\n URL address = new URL(url);\n HttpURLConnection conn = (HttpURLConnection) address.openConnection();\n conn.setRequestMethod(\"GET\");\n conn.setRequestProperty(\"Accept\", \"application/json\");\n json = \"{\\\"result\\\":\";\n Scanner scan = new Scanner(address.openStream());\n while (scan.hasNext())\n json += scan.nextLine();\n scan.close();\n json += \"}\";\n } catch (Exception e) {\n System.out.println(\"Failed to send the following request : \" + url);\n }\n return new JSONObject(json);\n }", "String serverRequest() throws UnsupportedEncodingException {\n String text = \"\";\n String urlData = reqestUrl +\n \"?pid=\" + patientId;\n HttpURLConnection conn = null;\n InputStream stream = null;\n // Send data\n try {\n\n // Defined URL where to send data\n URL url = new URL(urlData);\n\n // Send GET data request\n\n conn = (HttpURLConnection) url.openConnection();\n conn.setRequestMethod(\"GET\");\n conn.setDoInput(true);\n conn.connect();\n if (conn.getResponseCode() == 200) {\n\n stream = conn.getInputStream();\n Log.d(\"Get Request\", \"inside try -if\");\n if (stream != null) {\n BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(stream));\n StringBuilder builder = new StringBuilder();\n Log.d(\"click\", \"inside tr4y\");\n String line = null;\n while ((line = bufferedReader.readLine()) != null) {\n\n builder.append(line + \"\\n\");\n Log.d(\"line\", line);\n\n }\n\n text = builder.toString();\n Log.d(\"Response: \",text);\n }\n }\n }\n catch (Exception ex) {\n Log.d(\"ServerRequest Error\", \"error occurred\" + ex);\n\n }\n finally {\n try {\n if (stream != null) {\n stream.close();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (conn != null) {\n conn.disconnect();\n }\n }\n return text;\n }", "public static void main(String[] args) {\n\t\tHashMap responseMap;\n\t\ttry {\n\t\t HashMap reqparams = new HashMap(0);\n reqparams.put(\"msisdn\", \"94777335365\");\n \n responseMap = HttpPosterCommons.getInstance().executeGetRequestAsStream(\"http://192.168.71.225/interimbillpdfext.php\", reqparams, false);\n\t\t \n byte[] buf = (byte[])responseMap.get(\"response\");\n String statusCode = (String)responseMap.get(\"statusCode\");\n\t\t \n System.out.println(statusCode);\n System.out.println();\n System.out.println(buf);\n \n\t\t /*HashMap reqparams = new HashMap(0);\n\t\t reqparams.put(\"xml\", reqXML);*/\n\t\t //HashMap headerParams = new HashMap(0);\n\t\t //headerParams.put(\"SOAPAction\", \"http://tempuri.org/Sell_Product\");\n\t\t /*HashMap paraMap = new HashMap();\n\t\t paraMap.put(\"xml\", reqXML);*/\n\t\t\t/*responseMap = HttpPosterCommons.getInstance().executeAsWebService(XML_API_PATH, null, reqXML, \n\t\t\t HttpPosterCommons.REQUEST_CONTENT_TYPE, HttpPosterCommons.REQUEST_CHAR_SET,\n\t\t\t headerParams);*/\t \n\t\t //HttpPosterCommons.getInstance().setProxySettings(\"192.168.95.2\", \"8080\", \"charith_02380\", \"m1n1st1r1th\");\n\t\t //HttpPosterCommons.getInstance().setHttpConnectionSettings(30, 10000, 30, true, null);\n\t\t //responseMap = HttpPosterCommons.getInstance().executeAsHttpRequest(XML_API_PATH, null, reqXML, null);\n\t\t \n\t\t /*HashMap loginPara = new HashMap();\n\t\t loginPara.put(\"action\", \"login\");\n\t\t loginPara.put(\"username\", \"test\");\n\t\t loginPara.put(\"password\", \"test\");\n\t\t loginPara.put(\"fmt\", \"xml\");\n\t\t responseMap = HttpPosterCommons.getInstance().executeAsHttpRequest(\n\t\t \"http://172.22.6.64:7070/corporate/ctrl/mylogin/login.jsp\", \n\t\t loginPara, null, null);\t\t \n\t\t\tString res = (String)responseMap.get(\"response\");\n\t\t\tSystem.out.println(\"respXML : \"+res);*/\n\t\t \n\t\t /*HttpPosterCommons.updateProxySettings(\"192.168.95.2\", \"8080\", \"charith_02380\", \"xxx\");\n\t\t HashMap response = HttpPosterCommons.getInstance().executeAsHttpRequest(\"http://www.defence.lk/news/rss20.xml\", null, HttpPosterCommons.GET_METHOD);\n\t\t if(response.get(HttpPosterCommons.GET_RESPONSE_STATUS_CODE).toString().trim().equalsIgnoreCase(\"200\")) {\n\t\t System.out.println(response.get(HttpPosterCommons.GET_RESPONSE_ERR_CONTENT).toString());\n\t\t } else {\n\t\t System.out.println(response.get(HttpPosterCommons.GET_RESPONSE_CONTENT).toString());\n\t\t }*/\n\t\t \n\t\t /*String reqXML = \"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?>\"+\n \"<soap:Envelope xmlns:xsi=\\\"http://www.w3.org/2001/XMLSchema-instance\\\" xmlns:xsd=\\\"http://www.w3.org/2001/XMLSchema\\\" xmlns:soap=\\\"http://schemas.xmlsoap.org/soap/envelope/\\\">\"+\n \"<soap:Body>\"+\n \"<Sell_Product xmlns=\\\"http://tempuri.org/\\\">\"+\n \"<ezMARTUserName>princess_leia</ezMARTUserName>\"+\n \"<encryptedKey>string</encryptedKey>\"+\n \"<itemID>TEST0001</itemID>\"+\n \"<Price>10</Price>\"+\n \"<PriceRange>10</PriceRange>\"+\n \"<QuantityMin>1</QuantityMin>\"+\n \"<QuantityMax>10</QuantityMax>\"+\n \"<ValidityFrom>20100924</ValidityFrom>\"+\n \"<ValidityTo>20100930</ValidityTo>\"+\n \"<SpecialTerms>Testing</SpecialTerms>\"+\n \"<SendAlerts>0</SendAlerts>\"+\n \"</Sell_Product>\"+\n \"</soap:Body>\"+\n \"</soap:Envelope>\";\n\t\t \n\t\t HttpPosterCommons.updateProxySettings(\"proxy.dialog.dialoggsm.com\", \"8080\", \"charith_02380\", \"m1n1st1r1th!\");*/\n\t\t //HashMap response = HttpPosterCommons.getInstance().executeGetRequest(\"http://www.dinamani.com/edition/rssSectionXml.aspx?SectionId=164\", null, true, \"UTF-8\", null);\n\t\t //HashMap response = HttpPosterCommons.getInstance().executeGetRequest(\"http://www.jasminenews.com/lankanews/sinhala/feed\", null, true, \"UTF-8\");\n\t\t //HashMap response = HttpPosterCommons.getInstance().executeGetRequest(\"http://www.jasminenews.com/lankanews/sinhala/feed\", null, true);\n\t\t //HashMap response = HttpPosterCommons.getInstance().executeGetRequest(\"http://www.vimasuma.com/rss/dialog_rss_vimasuma.xml\", null, true);\n\t\t /*HashMap response = HttpPosterCommons.getInstance().executeAsWebService(\n\t\t \"http://172.26.66.30/Ws_eZMART_Upload/WS_eZMARTUpload.asmx\", \n\t\t null, reqXML, \n HttpPosterCommons.REQUEST_CONTENT_TYPE, HttpPosterCommons.REQUEST_CHAR_SET,\n headerParams);\n\t\t if(response.get(HttpPosterCommons.GET_RESPONSE_STATUS_CODE).toString().trim().equalsIgnoreCase(\"200\")) {\n\t\t String str = response.get(HttpPosterCommons.GET_RESPONSE_ERR_CONTENT).toString();\n\t\t Document doc = Utility.convertXMLStr2DOMDoc(str, \"UTF-8\");\n System.out.println(doc.getRootElement().getChildren());\n\t\t System.out.println(str);\n } else {\n System.out.println(response.get(HttpPosterCommons.GET_RESPONSE_CONTENT).toString());\n }*/\n\t\t\t\n\t\t\t/*HashMap addPara = new HashMap();\n loginPara.put(\"action\", \"AddNewDistCont\");\n loginPara.put(\"distID\", \"85\");\n loginPara.put(\"distContNo\", \"777335372\");\n loginPara.put(\"distContDesc\", \"Praveen Dangalla\");\n loginPara.put(\"fmt\", \"xml\");\n\t\t\tresponseMap = HttpPosterCommons.getInstance().executeAsHttpRequest(\n\t\t\t \"http://172.22.6.64:7070/corporate/ctrl/distributions/corpDistCtrl.jsp\", \n\t\t\t loginPara, null, null); \n res = (String)responseMap.get(\"response\");\n System.out.println(\"respXML : \"+res);*/\n\t\t\t//GenericResponse genRes = ResponseParser.parse2GenericResponse(res);\n\t\t\t//System.out.println(genRes);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t}", "public void sendToAdmin(String sessionid, Smsmodel sms, String vals) throws ProtocolException, MalformedURLException, IOException {\r\n String val = null;\r\n System.out.println(\"hello boy \" + vals);\r\n String sender = \"DND_BYPASSGetItDone\";\r\n URL url = new URL(\"http://www.smslive247.com/http/index.aspx?cmd=sendmsg&sessionid=\" + sessionid + \"&message=\" + sms.getVendorMessage() + \"&sender=\" + sender + \"&sendto=\" + vals + \"&msgtype=0\");\r\n //http://www.bulksmslive.com/tools/geturl/Sms.php?username=abc&password=xyz&sender=\"+sender+\"&message=\"+message+\"&flash=0&sendtime=2009-10- 18%2006:30&listname=friends&recipients=\"+recipient; \r\n //URL gims_url = new URL(\"http://smshub.lubredsms.com/hub/xmlsmsapi/send?user=loliks&pass=GJP8wRTs&sender=nairabox&message=Acct%3A5073177777%20Amt%3ANGN1%2C200.00%20CR%20Desc%3ATesting%20alert%20Avail%20Bal%3ANGN%3A1%2C342%2C158.36&mobile=08065711040&flash=0\");\r\n final String USER_AGENT = \"Mozilla/5.0\";\r\n\r\n HttpURLConnection con = (HttpURLConnection) url.openConnection();\r\n con.setRequestMethod(\"GET\");\r\n con.setRequestProperty(\"User-Agent\", USER_AGENT);\r\n int responseCode = con.getResponseCode();\r\n BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));\r\n String inputLine;\r\n StringBuffer response = new StringBuffer();\r\n // System.out.println(messageModel.getBody() + \" dude\");\r\n while ((inputLine = in.readLine()) != null) {\r\n response.append(inputLine);\r\n }\r\n in.close();\r\n String responseCod = response.toString();\r\n }", "String postRequest(String url);", "public static void query() {\n\n GPS = \"24.9684297,121.1959266\";\n\n SimpleDateFormat sdFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n Date nowDate = new Date();\n\n String startDayStr = \"2017-01-09\";\n Calendar cal = Calendar.getInstance();\n cal.setTime(nowDate);\n // cal.add(Calendar.MONTH, 3);\n cal.add(Calendar.MONTH, 1);\n String endDayStr = sdFormat.format(cal.getTime());\n\n String query = String.format(\"▽活動搜尋▼▽start_day▼%s▽end_day▼%s\", startDayStr, endDayStr);\n\n System.out.println(\"伺服器狀態測試查詢... \" + query + \" \" + GPS + \" \" + radius);\n Socket client = new Socket();\n InetSocketAddress isa = new InetSocketAddress(address, port);\n try {\n client.connect(isa, 10000);\n\n DataOutputStream out = new DataOutputStream(client.getOutputStream());\n out.writeUTF(query + \" \" + GPS + \" \" + radius + \" \" + whichFucntion + \" \" + \"test \" + quantity);\n client.shutdownOutput();\n ObjectInputStream in = new ObjectInputStream(client.getInputStream());\n Object obj = in.readObject();\n\n//\t\t\tSystem.out.println(obj.toString());\n SearchResultShopData searchResultShopData = (SearchResultShopData) obj;\n ArrayList<ShopData> a = (ArrayList<ShopData>) searchResultShopData.getShopDataList();\n//\t\t\tSystem.out.println(\"searchResultShopData.getStaut() : \" + searchResultShopData.getStaut());\n if (searchResultShopData.getStaut() == 1) {\n for (int i = 0; i < a.size(); i++) {\n if (a.get(i).getSearchEngine().equals(ShopData.SEARCH_ENGINE_ATTRIBUTE_FB_ACTIVITY_SOLR)) {\n FBShopActivityDescription fbShopActivityDescription = (FBShopActivityDescription) a.get(i);\n System.out.println(\"/////////////////////////start////////////////////////\");\n System.out.println(\"活動名稱:\" + fbShopActivityDescription.getTitle());\n System.out.println(\"活動發文連結:\" + fbShopActivityDescription.getHttp());\n System.out.println(\"GPS:\" + fbShopActivityDescription.getLatitude() + \",\" + fbShopActivityDescription.getLongitude());\n System.out.println();\n System.out.println(\"*******************活動摘要資訊********************\");\n System.out.println(\"活動開始時間:\" + fbShopActivityDescription.getStartDate());\n System.out.println(\"活動結束時間:\" + fbShopActivityDescription.getEndDate());\n System.out.println(\"活動地點:\" + fbShopActivityDescription.getAddress());\n System.out.println(\"~~~~~~~~~~~~~~~~~~HighlightFBPost~~~~~~~~~~~~~~~~~~~~\");\n System.out.println(fbShopActivityDescription.getDescription());\n System.out.println(\"////////////////////////end/////////////////////////\");\n System.out.println();\n }\n }\n }\n out.flush();\n out.close();\n out = null;\n in.close();\n in = null;\n client.close();\n client = null;\n } catch (java.io.IOException e) {\n System.err.println(\"SocketClient 連線有問題 !\");\n System.err.println(\"IOException :\" + e.toString());\n } catch (ClassNotFoundException e) {\n System.err.println(\"ClassNotFoundException :\" + e.toString());\n } catch (Exception e) {\n System.err.println(\"Exception :\" + e.toString());\n }\n\n }", "public static void main(String[] args) throws HttpException, IOException {\n\n\t\t\n\t\tString smsTemplate=\"你好, 测试短信通知为%s\";\n\t\tString parameter=\" \";\n\t\t\n\t\tString a[]=parameter.trim().split(\"\\\\|\");\n\t\t\n\t\tBoolean b=StringUtils.isBlank(parameter.trim());\n\t\tSystem.out.println(b);\n\t\tString smsContent = String.format(smsTemplate,a);\n\t\t\n\t\t//String smsContent = String.format(smsTemplate, (StringUtils.isBlank(parameter.trim()) ? \"\" :a));\n\t\t\n\t\tSystem.out.println(smsContent);\n\t\t\n\t\tLocalDateTime l=LocalDateTime.now();\n\t\tSystem.out.println(l);\n\t\t\n\t\tLocalTime midnight = LocalTime.MIDNIGHT;\n\t\tLocalDate tomorrow = LocalDate.now().plusDays(1);\n\t\tLocalDateTime x = LocalDateTime.of(tomorrow, midnight);\n\t\tSystem.out.println(x);\n\t\t\n\t\tLocalTime now=LocalTime.now();\n\t\tSystem.out.println(now.getHour());\n\t\tSystem.out.println(now.getMinute());\n\t\tSystem.out.println(now.getSecond());\n\t\t\n\t\t\n\t\tString s = \"templateCode==SMS_46165066&&signName==Radius服务&&msg==866834\";\n\t\tString[] str = s.split(\"&&\");\n\t\tfor (String s1 : str) {\n\t\t\tSystem.out.println(s1);\n\t\t}\n\t\t\n\t\tlong ll=1496751143000L;\n\t\tTimestamp reportTime=new Timestamp(ll);\n\t\tSystem.out.println(reportTime);\n\t\t\n\t\t LocalDateTime end=LocalDateTime.now();\n //三天之前\n LocalDateTime start=end.minusDays(3);\n \n Timestamp startTime=Timestamp.from(start.atZone(ZoneId.systemDefault()).toInstant());\n Timestamp endTime=Timestamp.from(end.atZone(ZoneId.systemDefault()).toInstant());\n \n System.out.println(startTime);\n System.out.println(endTime);\n \n int i=10;\n System.out.println(String.format(\"dsfasf %s\", i));\n \n System.out.println(LocalDateTime.now().toLocalDate());\n \n\n\t}", "@Override\n public void run() {\n byte[] response = Util.sendPost(readUrl, null);\n StringBuffer stringBuffer = new StringBuffer();\n Log.d(\"TEST\", response.length + \"\");\n for (int i = response.length - 1; i >= 0; i--) {\n String s = Integer.toString(response[i]);\n if (s.length() == 1) {\n s = '0' + s;\n }\n Log.d(\"TEST\", s + \"\");\n stringBuffer.append(s + \"\\n\");\n }\n Message message = Message.obtain();\n message.what = 1;\n message.obj = stringBuffer.toString();\n mHandler.sendMessage(message);\n }", "public String getSoundCloud(String urlString) {\n\t\tSystem.setProperty(\"http.keepAlive\", \"false\");\n\t\tHttpParams httpParameters = new BasicHttpParams();\n\n\t\tint timeoutConnection = 60000 * 20;\n\t\tHttpConnectionParams.setConnectionTimeout(httpParameters, timeoutConnection);\n\n\t\tint timeoutSocket = 60000 * 20;\n\t\tHttpConnectionParams.setSoTimeout(httpParameters, timeoutSocket);\n\n\t\tHttpProtocolParams.setVersion(httpParameters, HttpVersion.HTTP_1_1);\n\t\tHttpConnectionParams.setSocketBufferSize(httpParameters, 8*1024);\n\n\n\t\tDefaultHttpClient httpclient = new DefaultHttpClient(httpParameters);\n\t\t//HttpGet httppost = new HttpGet(\"https://api.hkgalden.com/f/l?ident=bw\");\n\t\t//\tString urlString = \"http://api.soundcloud.com/users/59420760/playlists.json?client_id=ff9ed5093f7a0302e7633bdfa77dd3f5\";\n\t\tSystem.out.println(\"link : \" + urlString);\n\t\tHttpGet httppost = new HttpGet(urlString);\n\t\t//https://api.soundcloud.com/tracks/163603018/stream.json?client_id=ff9ed5093f7a0302e7633bdfa77dd3f5\n\t\thttppost.addHeader(\"Client ID\", \"ff9ed5093f7a0302e7633bdfa77dd3f5\");\n\t\thttppost.addHeader(\"Client Secret\", \"13f5ba21c1e8ed11356c20804bae1ab1\");\n\n\n\t\ttry {\t\n\t\t\tSystem.out.println(\"Response:\"+ \"start execute\");\n\t\t\tHttpResponse response = httpclient.execute(httppost);\n\t\t\tSystem.out.println(\"Response:\"+response.getStatusLine().getStatusCode());\n\t\t\tHttpEntity getResponseEntity = response.getEntity();\n\t\t\tInputStream httpResponseStream = getResponseEntity.getContent();\n\t\t\tString result = slurp(httpResponseStream , 8192);\n\t\t\treturn result;\n\n\t\t} catch (ClientProtocolException e) {\n\t\t\te.printStackTrace();\t\t\t\n\t\t\treturn e.getMessage();\n\t\t} catch (ConnectTimeoutException e){ \n\t\t\te.printStackTrace();\t\t\t\n\t\t\treturn e.getMessage();\n\t\t}catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn e.getMessage();\n\t\t} \t\n\t}", "@Override\n protected JSONObject doInBackground(String... strings) {\n try {\n String query = strings[0];\n URL url = new URL(query);\n Scanner scanner = new Scanner(url.openConnection().getInputStream());\n StringBuilder responseBuilder = new StringBuilder();\n while(scanner.hasNextLine()) {\n responseBuilder.append(scanner.nextLine());\n }\n String response = responseBuilder.toString();\n JSONTokener tokener = new JSONTokener(response);\n JSONObject json = new JSONObject(tokener);\n return json;\n }\n catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n }", "public static void main(String[] args) {\n\t\tHttpClient client = new HttpClient();\n\t\tPostMethod myPost = new PostMethod(string );\n\t\ttry{\n\t\t\t//��������ͷ������ \n\t\t\tmyPost.setRequestHeader(\"Content-Type\", \"text/xml\");\n\t\t\tmyPost.setRequestHeader(\"charset\", \"utf-8\");\n\t\t\tmyPost.setRequestHeader(\"x-app-key\", \"c85d54f1\");\n\t\t\tmyPost.setRequestHeader(\"x-sdk-version\", \"3.1\");\n\n\t\t\tString date = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\").format(new Date());\n\t\t\tmyPost.setRequestHeader(\"x-request-date\", date);\n\t\t\tString x_task_config = \"capkey=hwr.cloud.letter\";\n\t\t\tmyPost.setRequestHeader(\"x-task-config\", x_task_config);\n//\t\t\tString b = new String(g_sShortData);\n\t\t\tString str = \"712ddd892cf9163e6383aa169e0454e3\" + date + x_task_config ;\n//\t\t\tSystem.out.println(str);\n\t\t\tmyPost.setRequestHeader(\"x-auth\", MD5.getMD5((str + g_sShortData.toString()).getBytes()));\n//\t\t\tmyPost.setRequestHeader(\"x-udid\", \"101:123456789\");\n\t\t\tSystem.out.println(g_sShortData.length);\n\t\t\tbyte[] b = new byte[g_sShortData.length];\n\t\t\tfor(int i=0; i<g_sShortData.length; i++){\n\t\t\t\tb[i] = (byte) g_sShortData[i];\n\t\t\t}\n\t\t\t\n\t\t\tRequestEntity entity = new StringRequestEntity(new String(b, \"iso-8859-1\"), \"application/octet-stream\", \"iso-8859-1\");\n\t\t\tmyPost.setRequestEntity(entity);\n\t\t\tint statusCode = client.executeMethod(myPost);\n\t\t\tString.format(\"%d\", statusCode);\n\t\t\tSystem.out.println(statusCode);\n\t\t\t\n\t\t\tif (statusCode == HttpStatus.SC_OK) {\n\t\t\t\tInputStream txtis = myPost.getResponseBodyAsStream(); \n\t\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(txtis, \"utf-8\"));\n\t\t\t\t\n\t\t\t\tString tempbf;\n\t\t\t\tStringBuffer html = new StringBuffer(256);\n\t\t\t\twhile((tempbf = br.readLine()) != null){\n\t\t\t\t\thtml.append(tempbf);\n\t\t\t\t}\n\t\t\t\tSystem.out.println(html.toString());\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n protected String doInBackground(String... params) {\n URL url;\n HttpURLConnection urlConnection = null;\n StringBuilder result = new StringBuilder();\n try {\n url = new URL(params[0]);\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setConnectTimeout(TIMEOUT_MS);\n urlConnection.setReadTimeout(TIMEOUT_MS);\n InputStream in = urlConnection.getInputStream();\n InputStreamReader isw = new InputStreamReader(in);\n\n int data = isw.read();\n while (data != -1) {\n char current = (char) data;\n data = isw.read();\n result.append(current);\n }\n } catch (Exception e) {\n // TODO: Proper logging\n } finally {\n if (urlConnection != null) {\n urlConnection.disconnect();\n }\n }\n return result.toString();\n }", "public static void main(String[] args) {\n try\n {\n \t// Document doc=Jsoup.connection(\"https://www.daum.net\").get() Jsoup\n \tURL url=new URL(\"http://newssearch.naver.com/search.naver?where=rss&query=%EC%98%81%ED%99%94\");\n \tHttpURLConnection conn=(HttpURLConnection)url.openConnection();\n \t// 프로그램에서 다음을 연결 \n \tif(conn!=null) // 연결되었다면\n \t{\n \t\tBufferedReader in=\n \t\t\t\tnew BufferedReader(new InputStreamReader(conn.getInputStream(),\"UTF-8\"));\n \t\t// conn.getInputStream() => conn(다음)에 있는 메모리에서 데이터를 읽어 온다 \n \t\twhile(true)\n \t\t{\n \t\t\tString data=in.readLine();\n \t\t\tif(data==null) break;\n \t\t\tSystem.out.println(data);\n \t\t}\n \t}\n }catch(Exception ex) {}\n\t}", "@Override\n protected String doInBackground(String... urls) {\n StringBuilder sb = new StringBuilder();\n StringBuilder sbCount = new StringBuilder();\n HttpURLConnection urlConnection = null;\n InputStream inputStream;\n try {\n URL url = new URL(urls[0]);\n URL urlCount = new URL(String.format(URL, url));\n\n // Open connection\n urlConnection = (HttpURLConnection) urlCount.openConnection();\n urlConnection.setChunkedStreamingMode(0);\n\n inputStream = new BufferedInputStream(urlConnection.getInputStream());\n if (inputStream != null){\n BufferedReader br = new BufferedReader(new InputStreamReader(inputStream));\n String line = null;\n\n // Read Server Response\n while((line = br.readLine()) != null){\n // Append server response in string\n sbCount.append(line + \"\");\n }\n }\n String str = sbCount.toString();\n int count = Integer.parseInt(str);\n if(count<50){\n // Open connection\n urlConnection = (HttpURLConnection) url.openConnection();\n urlConnection.setChunkedStreamingMode(0);\n \n inputStream = new BufferedInputStream(urlConnection.getInputStream());\n if (inputStream != null){\n BufferedReader br = new BufferedReader(new InputStreamReader(inputStream));\n String line = null;\n \n // Read Server Response\n while((line = br.readLine()) != null){\n // Append server response in string\n sb.append(line + \"\");\n }\n }\n }else{\n return null;\n }\n\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }finally{\n if (urlConnection!=null){\n urlConnection.disconnect();\n }\n }\n return sb.toString();\n }", "@Override\n protected String doInBackground(String... params) {\n StringBuilder results = new StringBuilder();\n\n try {\n URL url = new URL(params[0]);\n HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n\n int statusCode = conn.getResponseCode();\n if (statusCode == 200) {\n InputStream inputStream = new BufferedInputStream(conn.getInputStream());\n\n BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream, StandardCharsets.UTF_8));\n String line;\n while ((line = bufferedReader.readLine()) != null) {\n results.append(line);\n }\n }\n\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n\n return results.toString();\n }", "private InputStream dispatchSensorMessage (String uri, String xmlMsg) throws Exception\n {\n URL url = new URL(uri);\n HttpURLConnection httpConn = getURLobject(uri, xmlMsg, url);\n\n if (sessionCookie.length() > 0) {\n httpConn.setRequestProperty(\"Cookie\", sessionCookie.toString());\n if (verbose) {\n System.out.println(\" key [Cookie]\");\n System.out.println(\" value [\" +sessionCookie+ \"]\");\n }\n }\n\n httpConn.connect();\n\n if (xmlMsg != null && xmlMsg.length() > 0)\n {\n OutputStreamWriter wr = new OutputStreamWriter( httpConn.getOutputStream() );\n wr.write(xmlMsg.toString());\n wr.flush();\n wr.close();\n }\n String cookieHeader = httpConn.getHeaderField(\"Set-Cookie\");\n if(cookieHeader != null)\n {\n int index = cookieHeader.indexOf(\";\");\n if(index >= 0)\n {\n sessionCookie = new StringBuilder(cookieHeader.substring(0, index));\n }\n }\n\n if (verbose) {\n System.out.println(\"Header response lines\");\n Map<String, List<String>> map = httpConn.getHeaderFields();\n if (map != null) {\n Set<String> keySet = map.keySet();\n if (keySet != null) {\n Iterator<String> it = keySet.iterator();\n while (it.hasNext()) {\n String key = it.next();\n System.out.println(\" key [\" +key+ \"]\");\n List<String> list = map.get(key);\n if (list != null) {\n Iterator<String> it1 = list.iterator();\n while (it1.hasNext()) {\n String value = it1.next();\n System.out.println(\" value [\" +value+ \"]\");\n }\n }\n }\n }\n }\n }\n\n InputStream response;\n try {\n response = httpConn.getInputStream();\n // httpConn.disconnect();\n } catch (IOException e) {\n System.out.println(\"exception\");\n throw e;\n }\n\n return response;\n\n }", "public String getPostData(String topic , String page, String token) {\n\t\tSystem.setProperty(\"http.keepAlive\", \"false\");\n\t\tHttpParams httpParameters = new BasicHttpParams();\n\n\t\tint timeoutConnection = 60000 * 20;\n\t\tHttpConnectionParams.setConnectionTimeout(httpParameters, timeoutConnection);\n\n\t\tint timeoutSocket = 60000 * 20;\n\t\tHttpConnectionParams.setSoTimeout(httpParameters, timeoutSocket);\n\n\t\tHttpProtocolParams.setVersion(httpParameters, HttpVersion.HTTP_1_1);\n\t\tHttpConnectionParams.setSocketBufferSize(httpParameters, 8*1024);\n\n\n\t\tDefaultHttpClient httpclient = new DefaultHttpClient(httpParameters);\n\t\t//HttpGet httppost = new HttpGet(\"https://api.hkgalden.com/f/l?ident=bw\");\n\t\tString urlString = GaldenUtils.readPostUrl + topic + GaldenUtils.pageUrlParam + page;\n\n\t\tSystem.out.println(\"link : \" + urlString);\n\t\tHttpGet httppost = new HttpGet(urlString);\n\n\t\thttppost.addHeader(\"X-GALAPI-KEY\", GaldenUtils.apiKey);\n\t\thttppost.addHeader(\"X-GALUSER-KEY\", token);\n\n\t\ttry {\t\n\t\t\tSystem.out.println(\"Response:\"+ \"start execute\");\n\t\t\tHttpResponse response = httpclient.execute(httppost);\n\t\t\tSystem.out.println(\"Response:\"+response.getStatusLine().getStatusCode());\n\t\t\tHttpEntity getResponseEntity = response.getEntity();\n\t\t\tInputStream httpResponseStream = getResponseEntity.getContent();\n\t\t\tString result = slurp(httpResponseStream , 8192);\n\t\t\treturn result;\n\n\t\t} catch (ClientProtocolException e) {\n\t\t\te.printStackTrace();\t\t\t\n\t\t\treturn e.getMessage();\n\t\t} catch (ConnectTimeoutException e){ \n\t\t\te.printStackTrace();\t\t\t\n\t\t\treturn e.getMessage();\n\t\t}catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn e.getMessage();\n\t\t} \t\n\t}", "private InputStream downloadUrl(String urlString) throws IOException {\n URL url = new URL(urlString);\n HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n //conn.setReadTimeout(10000 /* milliseconds */);\n // conn.setConnectTimeout(15000 /* milliseconds */);\n conn.setRequestMethod(\"GET\");\n conn.setDoInput(true);\n conn.setRequestProperty(\"User-Agent\", \"Mozilla/5.0 ( compatible ) \");\n conn.setRequestProperty(\"Accept\", \"*/*\");\n // Starts the query\n conn.connect();\n\n return conn.getInputStream();\n }", "private InputStream downloadUrl(String urlString) throws IOException {\n URL url = new URL(urlString);\n HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n conn.setReadTimeout(100000 /* milliseconds */);\n conn.setConnectTimeout(150000 /* milliseconds */);\n conn.setRequestMethod(\"GET\");\n conn.setDoInput(true);\n // Starts the query\n conn.connect();\n return conn.getInputStream();\n\n }", "private HttpURLConnection getURLobject (String uri, String xmlMsg, URL url) throws Exception\n {\n URLConnection urlcon = url.openConnection();\n HttpURLConnection conn = (HttpURLConnection) urlcon;\n // ******** Filling of Default Request Header Properties ************\n conn.setUseCaches( false );\n HttpURLConnection.setFollowRedirects( false );\n if (xmlMsg != null && xmlMsg.length() > 0)\n conn.setRequestMethod(\"POST\");\n conn.setDoInput (true);\n conn.setDoOutput(true);\n\n // String encoding = null;\n\n conn.setRequestProperty( \"Accept\", \"text/xml\");\n conn.setRequestProperty( \"Content-type\", \"xml/txt\");\n conn.setRequestProperty( \"Accept-Charset\", \"iso-8859-1,*,utf-8\");\n conn.setRequestProperty( \"User-Agent\", \"CIDS Client/4.0\");\n conn.setRequestProperty( \"Pragma\", \"no-cache\");\n String xmlStr = \"XMLHttpRequest\";\n String contentTypeStr = \"application/x-www-form-urlencoded\";\n conn.setRequestProperty(\"X-Requested-With\", xmlStr);\n conn.setRequestProperty(\"Content-Type\", contentTypeStr);\n if (verbose) {\n // TODO: just get the data from conn \n System.out.println(\"Header request lines\");\n System.out.println(\" key [Accept]\");\n System.out.println(\" value [text/xml]\");\n System.out.println(\" key [Content-type]\");\n System.out.println(\" value [xml/txt]\");\n System.out.println(\" key [Accept-Charset]\");\n System.out.println(\" value [iso-8859-1,*,utf-8]\");\n System.out.println(\" key [User-Agent]\");\n System.out.println(\" value [CIDS Client/4.0]\");\n System.out.println(\" key [Pragma]\");\n System.out.println(\" value [no-cache]\");\n System.out.println(\" key[X-Requested-With]\");\n System.out.println(\" value[\"+xmlStr+\"]\");\n System.out.println(\" key[Content-Type]\");\n System.out.println(\" value[\"+contentTypeStr+\"]\");\n }\n\n return conn;\n }", "public String sendPushSMS(String username,String password,String message,String mobiles ,String smsId,String vendorID,String sender, String flash, String scheduleDate, String scheduleTime ){\n\t\tString user = \"mahaforest\";\n\t\tString pass = \"1327e811606505f48ce612a22b2979e6\";\n\t\tString route = \"4\";;\n\t\tString unicode = \"0\";\n\n\t\tString parameter = \"authkey=\" +vendorID+ \"mobiles=\"+ mobiles + \"&message=\" + message + \"&sender=\"\n\t\t\t\t+ sender + \"&route=\"+route+\"unicode=\"+unicode;\n\t\n\n\t\tbyte[] postData = parameter.getBytes(StandardCharsets.UTF_8);\n\t\tint postDataLength = postData.length;\n\n\t\tBufferedReader rd = null;\n\t\tStringBuilder sb = null;\n\t\tString line = null;\n\n\t\tString MainURL = \"https://control.msg91.com/api/sendhttp.php\";\n\n\t\tString FinalUrl = MainURL + parameter;\n\n\t\tURL url;\n\t\ttry {\n\t\t\t// url = new URL(\n\t\t\t// \"https://control.msg91.com/api/sendhttp.php?authkey=85509AJLB0vH7J55642514&mobiles=8149799364&message=Welcome to MahaOnline SMS Gateway&sender=MAHGOV&route=4&unicode=0\");\n\t\t\turl = new URL(MainURL);\n\n\t\t\tHttpURLConnection http = (HttpURLConnection) url\n\t\t\t\t\t.openConnection();\n\t\t\thttp.setDoOutput(true);\n\t\t\thttp.setInstanceFollowRedirects(false);\n\t\t\thttp.setRequestMethod(\"POST\");\n\t\t\thttp.setRequestProperty(\"Content-Type\",\n\t\t\t\t\t\"application/x-www-form-urlencoded\");\n\t\t\thttp.setRequestProperty(\"Content-Length\",\n\t\t\t\t\tInteger.toString(postDataLength));\n\t\t\thttp.setRequestProperty(\"charset\", \"UTF8\");\n\t\t\thttp.setUseCaches(false);\n\n\t\t\tDataOutputStream wr = new DataOutputStream(\n\t\t\t\t\thttp.getOutputStream());\n\t\t\twr.write(postData);\n\t\t\twr.flush();\n\t\t\twr.close();\n\t\t\t// http.connect();\n\n\t\t\tint statusCode;\n\t\t\tstatusCode = http.getResponseCode();\n\t\t\trd = new BufferedReader(new InputStreamReader(\n\t\t\t\t\thttp.getInputStream(), \"UTF8\"));\n\t\t\tsb = new StringBuilder();\n\n\t\t\tsb.append(\"{ data :\");\n\t\t\twhile ((line = rd.readLine()) != null) {\n\t\t\t\tsb.append(line + '\\n');\n\t\t\t}\n\n\t\t\tsb.append(\"}\");\n\t\t\trd.close();\n\n\t\t\tString jsonResponse = sb.toString();\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"RunJob Exception \" + e.toString());\n\t\t}\n\t\t\n\t\t\n\t\treturn null;\n\t}", "public static void doConnection(String text){\r\n URL targetURL = null;\r\n\ttry {\r\n\t\ttargetURL = new URL(\"http://ircsmibot.byethost18.com/writeLogToText.php\");\r\n\t} catch (MalformedURLException e) {\r\n\t\t// TODO Auto-generated catch block\r\n\t\te.printStackTrace();\r\n\t}\r\n HttpURLConnection conn = null;\r\n\ttry {\r\n\t\tconn = (HttpURLConnection)targetURL.openConnection();\r\n\t} catch (IOException e) {\r\n\t\t// TODO Auto-generated catch block\r\n\t\te.printStackTrace();\r\n\t}\r\n //data send via POST request\r\n String data = \"test=\"+text;\r\n conn.setDoOutput(true);\r\n conn.setInstanceFollowRedirects(true);\r\n try {\r\n\t\tconn.setRequestMethod(\"POST\");\r\n\t} catch (ProtocolException e) {\r\n\t\t// TODO Auto-generated catch block\r\n\t\te.printStackTrace();\r\n\t}\r\n //conn.setRequestProperty(\"Content-Type\", \"application/x-www-form-urlencoded\");\r\n ((HttpURLConnection) conn).setFixedLengthStreamingMode(data.length());\r\n conn.setRequestProperty(\"charset\", \"UTF-8\");\r\n conn.setRequestProperty(\"Content-Length\", Integer.toString(\r\n data.length()));\r\n\r\n conn.setUseCaches(false);\r\n for(int i=0;i<5;i++){\r\n \t \r\n try(OutputStreamWriter out = new OutputStreamWriter(\r\n conn.getOutputStream()))\r\n {\r\n out.write(data);\r\n break;\r\n } catch (IOException e) {\r\n\t\t//e.printStackTrace();\r\n\t\ttry {\r\n\t\t\tThread.sleep(200);\r\n\t\t} catch (InterruptedException e1) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n } \r\n }\r\n\r\n //reading code after POST request (here I want to have value from \"test\" field\r\n /* try(BufferedReader in = new BufferedReader(new InputStreamReader( \r\n conn.getInputStream())))\r\n {\r\n String currentLine;\r\n while((currentLine = in.readLine()) != null)\r\n {\r\n System.out.println(currentLine);\r\n }\r\n }\r\n ( */\r\n\r\n\r\n }", "@Override\n protected String doInBackground(String... params) {\n JSONObject jsonobj;\n jsonobj = new JSONObject();\n try {\n long val = Long.parseLong(Register.frequecy)*60 + System.currentTimeMillis()/1000;\n JSONArray arr = new JSONArray();\n arr.put(bp);arr.put(ecg);arr.put(pulse);\n jsonobj.put(\"sensorId\", arr);\n jsonobj.put(\"frequency\" , 5);\n jsonobj.put(\"tillWhen\" , val);\n StringEntity se = new StringEntity(jsonobj.toString());\n se.setContentType(\"application/json;charset=UTF-8\");\n se.setContentEncoding(new BasicHeader(HTTP.CONTENT_TYPE, \"application/json;charset=UTF-8\"));\n HttpClient httpclient = new DefaultHttpClient();\n URL url = new URL(\"http://10.42.0.58:6300/monitor/register_frequency\");\n HttpPost httppostreq = new HttpPost(url.toString());\n httppostreq.setEntity(se);\n HttpResponse response;\n response = httpclient.execute(httppostreq);\n String resp_text = EntityUtils.toString(response.getEntity());\n // Convert String to json object\n JSONObject json = new JSONObject(resp_text);\n id = json.getString(\"id\");\n while(true){\n Thread.sleep(5000);\n String urlGET = \"http://10.42.0.58:6300/monitor/getresults?id=\"+id;\n HttpGet getMethod = new HttpGet(urlGET);\n HttpResponse response1 = null;\n HttpClient httpClient = new DefaultHttpClient();\n response1 = httpClient.execute(getMethod);\n String resp_text1 = EntityUtils.toString(response1.getEntity());\n // Convert String to json object\n JSONObject json1 = new JSONObject(resp_text1);\n String message = json1.getString(\"Message\");\n if(message.equalsIgnoreCase(\"pending\")){\n //publishProgress(\"Session ended\");\n //break;\n continue;\n\n }\n Log.d(\"message\",resp_text1);\n String bpMsg = json1.getString(\"bp\");\n String ecgMsg = json1.getString(\"ecg\");\n String pulseMsg = json1.getString(\"pulse\");\n String msg = json1.getString(\"Message\");\n if(msg.equalsIgnoreCase(\"Last data packet\")){\n publishProgress(\"Session ended\");\n break;\n\n }\n\n /*String bpMsg = Register.bp;\n String ecgMsg = Register.ecg;\n String pulseMsg = Register.pulse;\n publishProgress(bpMsg+\",\"+ecgMsg+\",\"+pulseMsg);\n Random r = new Random();\n ecg = Integer.toString(r.nextInt(100));\n bp = Integer.toString(r.nextInt(100));\n pulse = Integer.toString(r.nextInt(100));*/\n publishProgress(bpMsg+\",\"+ecgMsg+\",\"+pulseMsg);\n }\n //bp = json.getString(\"bp\");\n //pulse = json.getString(\"pulse\");\n //Intent i = new Intent(getApplicationContext(),MainActivity.class);\n //startActivity(i);\n } catch (Exception e) {\n e.printStackTrace();\n }\n return null;\n }", "public String solicitarPin(String url, String numero) {\n\t HttpClient httpclient = new DefaultHttpClient();\r\n\t HttpPost httppost = new HttpPost(url);\r\n\t httppost.setHeader(\"User-Agent\", \"mimesic company\");\r\n\t String output = null;\r\n\t\r\n\t try {\r\n\t \r\n\t List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(1);\r\n\t nameValuePairs.add(new BasicNameValuePair(\"numero\", numero));\r\n\t \t \r\n\t httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));\r\n\t\r\n\t // Execute HTTP Post Request\r\n\t HttpResponse response = httpclient.execute(httppost);\r\n\t \r\n\t HttpEntity httpEntity = response.getEntity();\r\n output = EntityUtils.toString(httpEntity);\r\n \r\n\t \t \r\n\t } catch (ClientProtocolException e) {\r\n\t // TODO Auto-generated catch block\r\n\t } catch (IOException e) {\r\n\t // TODO Auto-generated catch block\r\n\t }\r\n\t return output;\r\n\t \t \r\n\t}", "public static byte[] getURL(String string_url) {\n ByteArrayOutputStream bais = new ByteArrayOutputStream();\n InputStream is = null;\n try {\n URL url = new URL(string_url);\n is = url.openStream();\n byte[] byteChunk = new byte[4096];\n int n;\n \n while ( (n = is.read(byteChunk)) > 0 ) {\n bais.write(byteChunk, 0, n);\n }\n \n is.close();\n }\n catch (IOException e) {\n }\n \n return bais.toByteArray();\n }", "private InputStream downloadUrl(String urlString) throws IOException {\n\t\tURL url = new URL(urlString);\n\t\tHttpURLConnection conn = (HttpURLConnection) url.openConnection();\n\t\tconn.setReadTimeout(10000 /* milliseconds */);\n\t\tconn.setConnectTimeout(15000 /* milliseconds */);\n\t\tconn.setRequestMethod(\"GET\");\n\t\tconn.setDoInput(true);\n\t\t// Starts the query\n\t\tconn.connect();\n\t\tInputStream stream = conn.getInputStream();\n\n\t\treturn stream;\n\t}", "private InputStream runSparqlQuery(String query) throws IOException {\n\t\ttry {\n\t\t\tString queryString = \"query=\" + URLEncoder.encode(query, \"UTF-8\")\n\t\t\t\t\t+ \"&format=json\";\n\t\t\tURL url = new URL(\"https://query.wikidata.org/sparql?\"\n\t\t\t\t\t+ queryString);\n\t\t\tHttpURLConnection connection = (HttpURLConnection) url\n\t\t\t\t\t.openConnection();\n\t\t\tconnection.setRequestMethod(\"GET\");\n\n\t\t\treturn connection.getInputStream();\n\t\t} catch (UnsupportedEncodingException | MalformedURLException e) {\n\t\t\tthrow new RuntimeException(e.getMessage(), e);\n\t\t}\n\t}", "private String[] parseResponseBody(InputStream aInputStream) {\n\t\tString param[] = new String[3];\n\t\tStringBuffer strBuff = new StringBuffer();\n\t\tStringBuffer allBuff = new StringBuffer();\n\t\tbyte buff[] = new byte[1024];\n\t\tint read;\t\t\n\t\tfinal String PREFIX_SEARCH =\"/watch_fullscreen?video_id=\";\n\t\t\n\t\ttry {\n\t\t\tboolean found1st = false;\n\t\t\tboolean foundPrm = false;\n\t\t\twhile((read = aInputStream.read(buff)) >= 0){\n\t\t\t\tallBuff.append(new String(buff));\n\t\t\t\tfor (int i = 0;i < read;i++){\n\t\t\t\t\tchar c = (char)buff[i];\n\t\t\t\t\tif (c == '/') {\n\t\t\t\t\t\tstrBuff.setLength(0);\n\t\t\t\t\t\tstrBuff.append(c);\n\t\t\t\t\t\tfound1st = true;\n\t\t\t\t\t} else if (found1st) {\n\t\t\t\t\t\tstrBuff.append(c);\n\t\t\t\t\t\tif (strBuff.length() == PREFIX_SEARCH.length()) {\n\t\t\t\t\t\t\tfound1st = false;\n\t\t\t\t\t\t\tif (strBuff.toString().contains(PREFIX_SEARCH)) {\n\t\t\t\t\t\t\t\t//yeah.. we found it\n\t\t\t\t\t\t\t\tfoundPrm = true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tstrBuff.setLength(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if (foundPrm) {\n\t\t\t\t\t\tif (c == '&') {\n\t\t\t\t\t\t\tfor (int y = 0;y < 3; y++) {\n\t\t\t\t\t\t\t\tif (param[y] == null){\n\t\t\t\t\t\t\t\t\t//remove parameter name and '=' \n\t\t\t\t\t\t\t\t\tparam[y] = y > 0 ? strBuff.toString().substring(2) : strBuff.toString();\n\t\t\t\t\t\t\t\t\tif (y == 2) {\n\t\t\t\t\t\t\t\t\t\treturn param;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tstrBuff.setLength(0);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tstrBuff.append(c);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tFile f = new File(String.valueOf(System.currentTimeMillis() + \".txt\"));\n\t\t\tFileOutputStream fos = new FileOutputStream(f);\n\t\t\tfos.write(allBuff.toString().getBytes());\n\t\t\tfos.close();\n\t\t\tSystem.out.println(allBuff.toString());\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t//If we go here, then the given parameter is not valid, or there's an exception\n\t\treturn null;\n\t}", "public static void main(String[] args) throws Exception {\n\n CloseableHttpClient aDefault = HttpClients.createDefault();\n\n\n /* HttpPost httpPost = new HttpPost(\"http://172.16.18.88:8080/toLogin.do\");\n List<NameValuePair> paramList = new ArrayList<>();\n paramList.add(new BasicNameValuePair(\"email\", \"hf\"));\n paramList.add(new BasicNameValuePair(\"pwd\", \"1234\"));\n paramList.add(new BasicNameValuePair(\"url\", \"\"));\n UrlEncodedFormEntity postEntity = new UrlEncodedFormEntity(paramList, \"UTF-8\");\n httpPost.setEntity(postEntity);\n HttpEntity entity = aDefault.execute(httpPost).getEntity();\n System.out.println(EntityUtils.toString(entity,DEFAULT_CHARSET));*/\n\n\n HttpGet httpGet = new HttpGet(\"http://e-hentai.org\");\n httpGet.setHeader(\"User-Agent\", DEFAULT_USER_AGENT);\n CloseableHttpResponse execute = aDefault.execute(httpGet);\n System.out.println(EntityUtils.toString(execute.getEntity(), DEFAULT_CHARSET));\n\n\n String phone = \"13920266937\";\n String code = \"北京,邢台,上海。\";\n String tplId = \"39638\";\n String url = \"http://v.juhe.cn/sms/send?mobile=\" + phone + \"&tpl_id=\" + tplId + \"&tpl_value=%23code%23%3D\" + code + \"&key=e3d4c483e58d86102bce4e05dcf071c1\";\n String s = httpPost(url);\n System.out.println(s);\n }", "@Override\n\t\t\tprotected String doInBackground(String... arg0) {\n\t\t\t\t\n \t\t\ttry{\n \t\t\tURL url=new URL(show_ques);\n\t\t\t\t\tHttpURLConnection httpUrlConnection=(HttpURLConnection)url.openConnection();\n\t\t\t\t\tInputStream is=httpUrlConnection.getInputStream();\n\t\t\t\t\tBufferedReader reader=new BufferedReader(new InputStreamReader(is));\n\t\t\t\t\tStringBuilder sb=new StringBuilder();\n\t\t\t\t\tString line=null;\n\t\t\t\t\twhile((line=reader.readLine())!=null){\n\t\t\t\t\t\tsb.append(line+\"\\n\");\n\t\t\t\t\t}\n\t\t\t\t\treader.close();\n\t\t\t\t\tis.close();\n\t\t\t\t\thttpUrlConnection.disconnect();\n\t\t\t\t\treturn sb.toString().trim();\n\t\t\t\t} catch(MalformedURLException e){\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n \t\t\tcatch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n \t\t\t\n \t\t\t\n \t\t\treturn null;\n \t\t\t\n \t\t\t\n\t\t\t\t\n\t\t\t}", "public static void main(String[] args) throws IOException {\n\t\tSocket s = new Socket(\"LAPTOP-I0RV3BSF\",7745);\r\n\t\tbyte[] byt = \"这是有反馈的,可以交流的\".getBytes();\r\n\t\tOutputStream os = s.getOutputStream();\r\n\t\tos.write(byt);\r\n\t\tInputStream is = s.getInputStream();\r\n\t\tbyte[] bytr = new byte[1024];\r\n\t\tis.read(bytr);\r\n\t\tString str = new String(bytr,0,bytr.length);\r\n\t\tSystem.out.println(str);\r\n\t\ts.close();\r\n\t\t\r\n\t}", "@Override\n protected String doInBackground(String... arrays) {\n\n try {\n\n // doi tuong URL, dung de khoi tao dia chi request\n URL url = new URL(arrays[0]);\n\n // mo ket noi toi dia chi url\n HttpURLConnection httpURLConnection = (HttpURLConnection) url.openConnection();\n\n\n // doc du lieu thong qua InputStream\n InputStream inputStream = httpURLConnection.getInputStream();\n\n // doc du lieu\n BufferedReader r = new BufferedReader(new InputStreamReader(inputStream));\n\n StringBuilder total = new StringBuilder();\n\n for (String line; (line = r.readLine()) != null; ) {\n total.append(line).append('\\n');\n\n }\n\n return total.toString();\n\n\n } catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return null;\n }", "public static void main(String[] args) throws MalformedURLException, InterruptedException\n\t{\n\n\t\tint meterNum = 10;\n//\t\tif(Integer.parseInt(args[1]) > 0) {\n//\t\t\tmeterNum = Integer.parseInt(args[1]);\n//\t\t}\n\t\t\n\t\tint threadNum = 5;\n\t\tint totalDocNum = 10;\n\t\t\n\t\tSystem.gc();\n\t\t\n\t\tmeterStream[] ms = new meterStream[meterNum]; \t\t\t\n\t\t\n\t\tfor(int i = 0 ; i < meterNum ; i++)\n\t\t{\n\t\t\tms[i] = new meterStream();\n\t\t\t//ms[i].setUrl(\"http://service2.allenworkspace.net/xml/xmldata/testxml\"+(i+1)+\".xml\");\n\t\t\tms[i].setUrl(\"http://program.allenworkspace.net/xml/xmldata/testxml\"+(i+1)+\".xml\");\t\t\t\t\t\t\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t/*\n\t\tString[] xpathArray = new String[] {\"/a0CC175B9C0F1B6A831C399E269772661/a92EB5FFEE6AE2FEC3AD71C777531578F/@aB80BB7740288FDA1F201890375A60C8F\",\n\t\t\t\t\"/a0CC175B9C0F1B6A831C399E269772661/a4A8A08F09D37B73795649038408B5F33/@a2063C1608D6E0BAF80249C42E2BE5804\"};\n\t\t*/\n\t\t\n\t\tString[] xpathArray = new String[] {\"/a0CC175B9C0F1B6A831C399E269772661/a92EB5FFEE6AE2FEC3AD71C777531578F/\",\n\t\t\t\t\"/a0CC175B9C0F1B6A831C399E269772661/a4A8A08F09D37B73795649038408B5F33/\"};//YFilter專用\n\t\t\n\t\tList<String> xpathList = new ArrayList<String>();\n\t\tCollections.addAll(xpathList, xpathArray);\n\t\t\n\t\t//List<XMLDogTask> taskPool = null;\n\t\t//List<SaxonTask> taskPool = null;\n\t\tList<YFilterTask> taskPool = null;\n\t\t\n\t\tif(threadNum > 0) {\n\t\t\t//taskPool = TaskPool.CreateXMLDogTasks(threadNum, xpathList);\n\t\t\t//taskPool = TaskPool.CreateSaxonTasks(threadNum, xpathList);\n\t\t\ttaskPool = TaskPool.CreateYFilterTasks(threadNum, xpathList);\n\t\t\t\n\t\t\t/*\n\t\t\tfor(int i = 0; i < threadNum; ++i) {\n\t\t\t\tDefaultNamespaceContext nsContext = new DefaultNamespaceContext(); // an implementation of javax.xml.namespace.NamespaceContext\n\t\t\t\tnsContext.declarePrefix(\"xsd\", Namespaces.URI_XSD);\n\t\t\t\tdog = new XMLDog(nsContext);\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tExpression xpath1 = dog.addXPath(\"/a0CC175B9C0F1B6A831C399E269772661/a92EB5FFEE6AE2FEC3AD71C777531578F/@aB80BB7740288FDA1F201890375A60C8F\");\n\t\t\t\t\tExpression xpath2 = dog.addXPath(\"/a0CC175B9C0F1B6A831C399E269772661/a4A8A08F09D37B73795649038408B5F33/@a2063C1608D6E0BAF80249C42E2BE5804\");\t\n\t\t\t\t} \n\t\t\t\tcatch (SAXPathException e) \n\t\t\t\t{\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} \n\t\t\t} */\n\t\t}\n\t\t\n\t\tExecutorService executorService = Executors.newFixedThreadPool(threadNum);\n\t\tExecutorService reducerService = Executors.newCachedThreadPool(); \n\t\tList<Future<List<String>>> resultList = null;\n\t\t\n\t\tlong starttime = System.currentTimeMillis();\n\t\t\n\t\tfor(int i = 0 ; i < totalDocNum ; i++ )\n\t\t{\n\t\t\t//callXMLDogFilter myFilter = new callXMLDogFilter(ms[i%meterNum].strURI);\n\t\t\t//callSaxonFilter myFilter = new callSaxonFilter(ms[i%meterNum].strURI);\n\t\t\tcallYFilter myFilter = new callYFilter(ms[i%meterNum].strURI);\n\t\t\t\n\t\t\tmyFilter.SetTaskList(taskPool);\n\t\t\t// myFilter.setStream(ms[i%meterNum].getStream());\n\t\t\t/* myThreads[t] = new Thread(testFilter[t]);\n\t\t\tmyThreads[t].start(); */\n\t\t\tFuture<List<String>> result = executorService.submit(myFilter);\n\t\t\tif(i % meterNum == 0) {\n\t\t\t\tresultList = new ArrayList<Future<List<String>>>();\n\t\t\t} \n\t\t\tresultList.add(result);\n\t\t\tif(resultList.size() == meterNum) {\n\t\t\t\t//ExecuteService myReducer = Executors.newFixedThreadPool(threadNum)\n\t\t\t\tString taskID = (i/meterNum)+\"\";\n\t\t\t\t\n\t\t\t\t//XMLDogTaskReducer reducer = (XMLDogTaskReducer) TaskReducerFactory.Create(\"XMLDogTaskReducer\");\n\t\t\t\t//SaxonTaskReducer reducer = (SaxonTaskReducer) TaskReducerFactory.Create(\"SaxonTaskReducer\");\n\t\t\t\tYFilterTaskReducer reducer = (YFilterTaskReducer) TaskReducerFactory.Create(\"YFilterTaskReducer\");\n\t\t\t\t\n\t\t\t\treducer.SetID(taskID);\n\t\t\t\treducer.resultList = resultList;\t\t\t\t\t\n\t\t\t\treducerService.execute(reducer);\n\t\t\t}\n\t\t\t// resultList.add(result);\n\t\t}\n\t\texecutorService.shutdown(); \n\t\texecutorService.awaitTermination(30, TimeUnit.MINUTES);\n\t\treducerService.shutdown();\n\t\treducerService.awaitTermination(30, TimeUnit.MINUTES);\n\t\t\t\t\n\t\tlong endTime = System.currentTimeMillis();\n\t\tSystem.out.println((\"duration:\" + (endTime - starttime)));\n\t}", "public InputStream sendGetRequest(String url) throws MCDSException {\n\t\tInputStream xmlDataStream = null;\n\t\tTransporter transporter = new Transporter();\n\t\txmlDataStream = transporter.execute(url);\n\t\treturn xmlDataStream;\n\t}", "public static String getWebData(String wepDocumet) {\n\n try {\n Log.d(JsonParse.class.getSimpleName(), \"Start the web-get documnet\");\n // Creates the parameters.\n HttpParams httpParams = new BasicHttpParams();\n // TIMEOUT_MILLISEC sets the timeout. If bad network higher liver is\n // needed.\n HttpConnectionParams.setConnectionTimeout(httpParams, TIMEOUT_MILLISEC);\n HttpConnectionParams.setSoTimeout(httpParams, TIMEOUT_MILLISEC);\n HttpParams p = new BasicHttpParams();\n // Sets parameters. For future use.\n p.setParameter(\"user\", \"1\");\n // Instantiate an HttpClient.\n HttpClient httpclient = new DefaultHttpClient(p);\n // WEBSERVER_ADDRESS, the address to the webserver. DO NOT USE IP!.\n String url = WEBSERVER_ADDRESS + wepDocumet;\n HttpPost httppost = new HttpPost(url);\n // Instantiate a GET HTTP method.\n try {\n ResponseHandler<String> responseHandler = new BasicResponseHandler();\n return httpclient.execute(httppost, responseHandler);\n\n } catch (ClientProtocolException e) {\n Log.e(\"Error\", e.toString());\n // Return a string with error to indicate that an error has\n // happened.\n return \"error\";\n }\n } catch (Exception e) {\n Log.e(\"Error\", e.toString());\n // Return a string with error to indicate that an error has\n // happened.\n return \"error\";\n }\n }", "private InputStream downloadUrl(String urlString) throws IOException {\n URL url = new URL(urlString);\n HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n conn.setReadTimeout(10000 /* milliseconds */);\n conn.setConnectTimeout(15000 /* milliseconds */);\n conn.setRequestMethod(\"GET\");\n conn.setDoInput(true);\n // Starts the query\n conn.connect();\n return conn.getInputStream();\n }", "public static void main(String[] args) {\r\n\r\n\t\tString pid = \"10010\";\r\n\t\tString key = \"7A82127C6A7B4263B5A041A2DAC18C83\";\r\n\r\n\t\tHttpClient client = new HttpClient();\r\n\r\n\t\tMap<String, String> params = new HashMap<String, String>();\r\n\r\n\t\t// ========================test1\r\n\t\t// params.put(\"c\", \"5\");\r\n\t\t// params.put(\"serverId\", \"5008\");\r\n\t\t// params.put(\"spid\", \"4104\");\r\n\t\t// params.put(\"pid\", pid);\r\n\t\t// String md5 = MD5Util.getMD5String(\"550084104\" + key);\r\n\t\t// params.put(\"sign\", md5);\r\n\t\t// String url = \"http://www.jiepu.local/OpenAPI/RoleCount.ashx\";\r\n\t\t// String str = client.httpPostRequest(url, params);\r\n\t\t// System.out.println(str);\r\n\r\n\t\t// ========================test2\r\n\t\tparams.put(\"gameId\", \"5\");\r\n\t\tparams.put(\"serverId\", \"5008\");\r\n\t\tparams.put(\"spid\", \"4104\");\r\n\t\tparams.put(\"pid\", pid);\r\n\t\tString md5 = MD5Util.getMD5String(\"550084104\" + key);\r\n\t\tSystem.out.println(md5);\r\n\t\tparams.put(\"sign\", md5);\r\n\t\tString url = \"http://www.jiepu.local/OpenAPI/GetPresents.ashx\";\r\n\t\tString str = client.httpPostRequest(url, params);\r\n\t\tSystem.out.println(str);\r\n\r\n\t\t// ==============test3\r\n\t\t// params.put(\"id\", \"45277\");\r\n\t\t// //params.put(\"name\", URLEncoder.encode(\"测试礼包1\",\"utf-8\"));\r\n\t\t// params.put(\"name\", \"test1\");\r\n\t\t// params.put(\"spid\", \"4104\");\r\n\t\t// params.put(\"num\", \"3\");\r\n\t\t// params.put(\"gameId\", \"5\");\r\n\t\t// params.put(\"serverId\", \"5008\");\r\n\t\t// params.put(\"expireDate\", \"365\");\r\n\t\t// params.put(\"onlyone\", \"0\");\r\n\t\t// params.put(\"pid\", pid);\r\n\t\t// String md5Str = params.get(\"id\") + params.get(\"name\") + params.get(\"num\") + params.get(\"spid\") + params.get(\"gameId\") + params.get(\"serverId\") +\r\n\t\t// params.get(\"expireDate\")\r\n\t\t// + params.get(\"onlyone\") + key;\r\n\t\t// System.out.println(md5Str);\r\n\t\t// String md5 = MD5Util.getMD5String(md5Str);\r\n\t\t// params.put(\"sign\", md5);\r\n\t\t// System.out.println(md5);\r\n\t\t// String url = \"http://www.jiepu.local/OpenAPI/CreatePresents.ashx\";\r\n\t\t// //url = URLEncoder.encode(\"测试礼包1\",\"utf-8\");\r\n\t\t// System.out.println(url);\r\n\t\t// String str = client.httpPostRequest(url, params);\r\n\t\t// System.out.println(str);\r\n\r\n\t\t// =====================test4\r\n\t\tparams.put(\"gameId\", \"5\");\r\n\t\tparams.put(\"serverId\", \"5001\");\r\n\t\tparams.put(\"userIds\", \"ntc02,chickenujs\");\r\n\t\tparams.put(\"createTime\", \"2012-01-01 12:00:00\");\r\n\t\tparams.put(\"endTime\", \"2012-12-20 12:00:00\");\r\n\t\tparams.put(\"pid\", pid);\r\n\t\t// String md5Str = params.get(\"gameId\") + params.get(\"serverId\") +\r\n\t\t// params.get(\"userIds\") + params.get(\"createTime\") +\r\n\t\t// params.get(\"endTime\") + key;\r\n\t\t// System.out.println(md5Str);\r\n\t\t// String md5 = MD5Util.getMD5String(md5Str);\r\n\t\t// params.put(\"sign\", md5);\r\n\t\t// System.out.println(md5);\r\n\t\t// String url = \"http://www.jiepu.local/OpenAPI/RoleArrives.ashx\";\r\n\t\t// String str = client.httpPostRequest(url, params);\r\n\t\t// System.out.println(str);\r\n\r\n\t\t// =================test5\r\n\t\tparams.put(\"gameId\", \"5\");\r\n\t\tparams.put(\"serverId\", \"5001\");\r\n\t\tparams.put(\"spId\", \"4040\");\r\n\t\tparams.put(\"presentname\", \"测试礼包1\");\r\n\t\tparams.put(\"pid\", pid);\r\n\t\t// String md5Str = params.get(\"gameId\") + params.get(\"serverId\") +\r\n\t\t// params.get(\"spId\") + params.get(\"presentname\") + key;\r\n\t\t// System.out.println(md5Str);\r\n\t\t// String md5 = MD5Util.getMD5String(md5Str);\r\n\t\t// params.put(\"sign\", md5);\r\n\t\t// System.out.println(md5);\r\n\t\t// String url = \"http://www.jiepu.local/OpenAPI/GetPresentKeys.ashx\";\r\n\t\t// String str = client.httpPostRequest(url, params);\r\n\t\t// System.out.println(str);\r\n\r\n\t}", "@Override\n protected String doInBackground(String... args) {\n // rss link url\n String query_url = args[0];\n\n // weather object of rss.\n woeid = parser.getRSSFeedWeather2(query_url);\n\n // updating UI from Background Thread\n runOnUiThread(new Runnable() {\n public void run() {\n /**\n * Updating parsed data into text view.\n * */\n Intent intent = new Intent(MainActivity.this, Summit.class);\n String description = woeid.getWoeid();\n intent.putExtra(EXTRA_MESSAGE, description);\n // Log.d(\"Long\", description);\n startActivity(intent);\n }\n });\n return null;\n }", "private boolean readWebpage()\n {\n String lines = SimpleRequest.readContent(requestUrl);\n if (lines == null) return false;\n\n //\n // updateStreamStatistics ('rtl','sd', 'zeus');\n // updateStreamStatistics ('dmax','sd', 'elmo');\n //\n\n String pm = \"updateStreamStatistics[^']*'\";\n\n String sender = Simple.getMatch(pm + \"([^']*)'\", lines);\n String sdtype = Simple.getMatch(pm + \"[^']*','([^']*)'\", lines);\n String server = Simple.getMatch(pm + \"[^']*','[^']*', '([^']*)'\", lines);\n\n if ((sender != null) && (sdtype != null) && (server != null))\n {\n //\n // Very special server update to get correct streams.\n //\n\n Log.d(LOGTAG, \"===============\" + sender);\n Log.d(LOGTAG, \"===============\" + sdtype);\n Log.d(LOGTAG, \"===============\" + server);\n\n //\n // http://elmo.ucount.in/stats/update/custom/lstv/kabel1/sd&callback=?\n // Referer: http://www.live-stream.tv/online/fernsehen/deutsch/kabel1.html\n //\n\n if (! server.equals(\"zeus\"))\n {\n elmoreferrer = requestUrl;\n elmostring = \"http://\" + server + \".ucount.in\"\n + \"/stats/update/custom/lstv/\"\n + sender + \"/\" + sdtype\n + \"&_=424242&callback=?\";\n\n SimpleRequest.doHTTPGet(elmostring, elmoreferrer);\n }\n }\n\n //\n // type:'html5', config: { file:'http://lstv3.hls1.stream-server.org/live/orf1@sd/index.m3u8' }\n //\n\n String stream = Simple.getMatch(\"type:'html5'.*?file:'([^']*)'\", lines);\n Log.d(LOGTAG,\"=========================================>stream=\" + stream);\n\n if (stream != null) requestUrl = stream;\n\n return (stream != null);\n }", "private void StringRequest_POST() {\n\t\tString POST = \"http://api.juheapi.com/japi/toh?\";\n\t\trequest = new StringRequest(Method.POST, POST, new Listener<String>() {\n\n\t\t\t@Override\n\t\t\tpublic void onResponse(String arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tToast.makeText(MainActivity.this, arg0, Toast.LENGTH_LONG).show();\n\t\t\t}\n\t\t}, new ErrorListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onErrorResponse(VolleyError arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tToast.makeText(MainActivity.this, arg0.toString(), Toast.LENGTH_LONG).show();\n\t\t\t}\n\t\t}){@Override\n\t\tprotected Map<String, String> getParams() throws AuthFailureError {\n\t\t\tHashMap< String , String> map = new HashMap<String,String>();\n\t\t\tmap.put(\"key\", \"7bc8ff86168092de65576a6166bfc47b\");\n\t\t\tmap.put(\"v\", \"1.0\");\n\t\t\tmap.put(\"month\", \"11\");\n\t\t\tmap.put(\"day\", \"1\");\n\t\t\treturn map;\n\t\t}};\n\t\trequest.addMarker(\"StringRequest_GET\");\n\t\tMyApplication.getHttpRequestQueue().add(request);\n\t}", "private InputStream downloadUrl(String urlString) throws IOException {\n\t URL url = new URL(urlString);\n\t HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n\t conn.setReadTimeout(10000 /* milliseconds */);\n\t conn.setConnectTimeout(15000 /* milliseconds */);\n\t conn.setRequestMethod(\"GET\");\n\t conn.setDoInput(true);\n\t // Starts the query\n\t conn.connect();\n\t return conn.getInputStream();\n\t}", "private InputStream downloadUrl(String urlString) throws IOException {\n // BEGIN_INCLUDE(get_inputstream)\n URL url = new URL(urlString);\n HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n conn.setReadTimeout(100000 /* milliseconds */);\n conn.setConnectTimeout(150000 /* milliseconds */);\n// conn.setRequestMethod(\"GET\");\n conn.setDoInput(true);\n // Start the query\n conn.connect();\n InputStream stream = conn.getInputStream();\n bitmap = BitmapFactory.decodeStream(stream);\n return stream;\n\n\n // END_INCLUDE(get_inputstream)\n }", "@Override\n protected String doInBackground(String... params) {\n URL url;\n String result = null;\n\n try {\n url = new URL(params[0]);\n con = (HttpURLConnection) url.openConnection();\n\n // キャッシュを使用しない\n con.setUseCaches(false);\n\n // リダイレクトを許可しない\n con.setInstanceFollowRedirects(false);\n\n // データを読み取る\n con.setDoInput(true);\n\n // データを書き込む\n con.setDoOutput(true);\n\n // タイムアウト\n con.setReadTimeout(6000);\n con.setConnectTimeout(6000);\n\n // 接続\n con.connect(); //\n\n // データの書き込み\n if(params.length > 1) {\n OutputStream out = null;\n try {\n out = con.getOutputStream();\n out.write(params[1].getBytes(\"UTF-8\"));\n out.flush();\n } catch (IOException e) {\n // POST送信エラー\n e.printStackTrace();\n bError = true;\n return null;\n } finally {\n if (out != null) {\n out.close();\n }\n }\n }\n\n // ステータスコードの取得\n final int status = con.getResponseCode();\n if (status == HttpURLConnection.HTTP_OK) {\n // 正常\n\n // データの読み取り\n InputStream in = null;\n try {\n in = con.getInputStream();\n BufferedReader br = new BufferedReader(new InputStreamReader(in, \"UTF-8\"));\n StringBuilder sb = new StringBuilder();\n String buf;\n while ((buf = br.readLine()) != null) {\n sb.append(buf).append(\"\\n\"); // 改行コードを付与する形に変更\n Log.d(\"HTTP_POST\", buf);\n }\n result = new String(sb);\n\n } catch (IOException e) {\n e.printStackTrace();\n bError = true;\n } finally {\n if (in != null) {\n in.close();\n }\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n bError = true;\n } finally {\n if (con != null) {\n con.disconnect();\n }\n }\n\n return result;\n }", "private String getQuery(List<NameValuePair> params) throws UnsupportedEncodingException\n {\n StringBuilder result = new StringBuilder();\n boolean first = true;\n\n for (NameValuePair pair : params)\n {\n if (first)\n first = false;\n else\n result.append(\"&\");\n\n result.append(URLEncoder.encode(pair.getName(), \"UTF-8\"));\n result.append(\"=\");\n result.append(URLEncoder.encode(pair.getValue(), \"UTF-8\"));\n }\n\n return result.toString();\n }", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tprotected String doInBackground(List<NameValuePair>... params) {\n\t\tUtils.printLog(\"Params===\", \"\"+params[0]);\n\t\tSystem.gc(); \n\t\ttry{\n\t\tHttpClient httpClient = new DefaultHttpClient();\n\t\tHttpParams httpParams = httpClient.getParams();\n\t\tHttpConnectionParams.setConnectionTimeout(httpParams, 30000);\n\t\tHttpConnectionParams.setSoTimeout(httpParams, 30000);\n\t\tConnManagerParams.setTimeout(httpParams, 30000);\n\t\tHttpPost httpPost = new HttpPost(url);\n\t\t\n\t\t\n\t\tUrlEncodedFormEntity urlEncode = new UrlEncodedFormEntity(params[0]);\n\t\thttpPost.setEntity(urlEncode);\n\t\t\n\t\tHttpResponse httpResponse = httpClient.execute(httpPost);\n\t\tUtils.printLog(\"Response Code\", \"\"+httpResponse.getStatusLine().getStatusCode());\n\t\t\n\t\tHttpEntity htpEntity = httpResponse.getEntity();\n\t\txml = EntityUtils.toString(htpEntity);\n\t\tUtils.printLog(\"Response\", \"\"+xml);\n\t\tSystem.out.println(\"checking response....\"+xml);\n\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.gc();\n\t\t\tUtils.printLog(\"Excep profile===\", \"\"+e);\n\t\t}\n\t\t\n\t\treturn xml;\n\t\t\n\t\t\n\t}", "@Override\n\t\tprotected String doInBackground(String... params) {\n\t\t\n\t\t\t String urlParameters = null;\n\t try {\n\t urlParameters = \"status=\" + URLEncoder.encode(\"0\", \"UTF-8\");\n\t } catch (UnsupportedEncodingException e) {\n\t // TODO Auto-generated catch block\n\t e.printStackTrace();\n\t }\n\n\t response1 = Connectivity.excutePost(Constants.REGISTERLIST_URL,\n\t urlParameters);\n\t Log.e(\"You are at\", \"\" + response1);\n\t return response1;\n\t\t\t \n\t\t}", "public static String getResponseFromURL(String urlString, String method) {\n StringBuilder inline = new StringBuilder();\n try {\n URL url = new URL(urlString);\n HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n conn.setRequestMethod(method);\n conn.connect();\n int responseCode = conn.getResponseCode();\n\n if (responseCode != 200) {\n throw new RuntimeException(\"ResponseCode :\" + responseCode);\n } else {\n Scanner sc = new Scanner(url.openStream());\n while (sc.hasNext()) {\n inline.append(sc.nextLine());\n }\n sc.close();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n return inline.toString();\n }", "public String sendPostXML(String xml) throws IOException {\n http.setRequestMethod(\"POST\");\n http.setDoOutput(true);\n http.setDoInput(true);\n http.setUseCaches(false);\n\n byte[] out = xml.getBytes(StandardCharsets.UTF_8);\n int length = out.length;\n\n http.setFixedLengthStreamingMode(length);\n http.setRequestProperty(\"content-type\", \"text/xml; charset=UTF-8\");\n\n OutputStreamWriter writer = new OutputStreamWriter( http.getOutputStream());\n writer.write(xml);\n writer.flush();\n\n StringBuilder s = new StringBuilder();\n BufferedReader reader = new BufferedReader(new InputStreamReader(http.getInputStream()));\n for (String line; (line = reader.readLine()) != null;) {\n s.append(line);\n }\n\n writer.close();\n reader.close();\n http.disconnect();\n\n return s.toString();\n }", "@Override\n protected String doInBackground(String... strings) {\n StringBuilder content = new StringBuilder();\n try {\n URL url = new URL(strings[0]);\n InputStreamReader inputStream = new InputStreamReader(url.openConnection().getInputStream());\n BufferedReader bufferedReader = new BufferedReader(inputStream);\n String line = \"\" ;\n while ((line = bufferedReader.readLine()) != null) {\n content.append(line);\n }\n bufferedReader.close();\n } catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return content.toString();\n }", "public static void main(String args[])\r\n\t{\n\t\ttry {\r\n\t\t\tString s = \"{\\\"wfycdwmc\\\":\\\"河西单位0712\\\",\\\"sfbj\\\":\\\"0\\\"}\";\r\n\t\t sun.misc.BASE64Encoder necoder = new sun.misc.BASE64Encoder(); \r\n\t\t String ss = necoder.encode(s.getBytes());\r\n\t\t System.out.println(ss);\r\n\t\t sun.misc.BASE64Decoder decoder = new sun.misc.BASE64Decoder();\r\n\t\t byte[] bt = decoder.decodeBuffer(ss); \r\n\t\t ss = new String(bt, \"UTF-8\");\r\n\t\t System.out.println(ss);\r\n//\t\t\tClient client = new Client(new URL(url));\r\n////\t\t\tObject[] token = client.invoke(\"getToken\",new Object[] {tokenUser,tokenPwd});//获取token\r\n//\t\t\tObject[] zyjhbh = client.invoke(apiName,new Object[] {\"120000\"});\r\n//\t\t\tSystem.out.println(zyjhbh[0].toString());\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public static String postBySSLAndParamsInQuery(String url, Map<String, String> params, String contentType,\n SSLContext sslContext) {\n AsyncHttpClient http = new AsyncHttpClient(new AsyncHttpClientConfig.Builder()\n .setConnectTimeout(SO_TIMEOUT).setSSLContext(sslContext).build());\n AsyncHttpClient.BoundRequestBuilder builder = http.preparePost(url);\n if (params != null && !params.isEmpty()) {\n Set<String> keys = params.keySet();\n for (String key : keys) {\n builder.addQueryParam(key, params.get(key));\n }\n }\n builder.setHeader(\"Content-Type\", contentType);\n Future<Response> f = builder.execute();\n String body = null;\n try {\n body = f.get().getResponseBody(DEFAULT_CHARSET);\n } catch (Exception e) {\n logger.error(LogUtil.builder().method(\"Post Request(the result is String ,the params is a map in query body with custom contentType and a sslContext )\").msg(\"error,url={}\").build(), url, e);\n }\n http.close();\n return body;\n }", "public static void main(String[] args) {\n try\n {\n \tURL url = new URL(\"http://www.sina.com.cn\");\n \tURLConnection conn = url.openConnection();\n \tif(conn!=null)\n \t{\n \t\tSystem.out.println(\"正常连接到新浪网!\");\n \t}\n \telse\n \t{\n \t\tSystem.out.println(\"连接失败!\");\n \t}\n \tSystem.out.println(\"数据包的长度:\"+conn.getContentLength());\n \tSystem.out.println(\"数据包的类型:\"+conn.getContentType());\n \tSystem.out.println(\"数据包的字符编码:\"+conn.getContentEncoding());\n \tInputStream in = url.openStream();\n \tScanner scanner = new Scanner(in);\n \tscanner.useDelimiter(\"\\n\"); //设置换行回车为分隔符\n \twhile(scanner.hasNext())\n \t{\n \t\tSystem.out.println(scanner.next());\n \t}\n \tscanner.close();\n }\n catch(Exception ex)\n {\n \tex.printStackTrace();\n }\n\t}", "public static void main(String[] args) throws Exception {\n String data=\"=1&sta=dc4f223eb429&shop=1&token=123232jd&r=8134ad506c4e&id=12a2c334&type=check&data=t572007166r0e0c0h31624hb18fe34010150aps1800api5si10em2pl1024pll3072tag20 sp1\";\r\n// String data=\"=1&sta=dc4f223eb429&shop=1&token=123232jd&r=8134ad506c4e&id=12a2c334&type=configa&data=ch1cas5cat5sc5t30603970r0e0c0h47368cst36000iga1st1\";\r\n// System.out.println((int)'&');\r\n// System.out.println(data);\r\n// data = \"c3RhPTY4YzYzYWUwZGZlZiZzaG9wPTEmdG9rZW49MTIzMjMyamQmcj05NGQ5YjNhOWMyNmYmaWQ9MmRlY2ZkY2UmdHlwZT1wcm9iZWEmZGF0YT0lMDE5NGQ5YjNhOWMyNmYmJTAxJTAxMDAxN2M0Y2QwMWNmeCUwMTc4NjI1NmM2NzI1YkwlMDE1Yzk2OWQ3MWVmNjNRJTAxOTRkOWIzYTljMjZmJTIxJTAxN2NjNzA5N2Y0MWFmeCUwMSUwMWRjODVkZWQxNjE3ZjklMDE1NGRjMWQ3MmE0NDB4JTAxNzg2MjU2YzY3MjViRSUwMTVjOTY5ZDcxZWY2M0olMDE5NGQ5YjNhOWMyNmYlMUUlMDFlNGE3YTA5M2UzOTJ4JTAxNGMzNDg4OTQ5YjY2eCUwMTNjNDZkODMwZTAyMDYlMDElMDE2MGYxODk2ZjJmY2JDJTAxOTRkOWIzYTljMjZmKyUwMTkwYzM1ZjE3NWQ2MXglMDE0YzM0ODg5NDliNjZ4JTAxZTRhN2M1YzhjYzA4JTNBJTAxJTAxZjBiNDI5ZDI1MTFjWCUwMTVjOTY5ZDcxZWY2MyU1QyUwMWQ0NmE2YTE1NWJmMXglMDE5NGQ5YjNhOWMyNmYqJTAxPQ==\";\r\n// data = \"c3RhPTY4YzYzYWUwZGZlZiZzaG9wPTEmdG9rZW49MTIzMjMyamQmcj05NGQ5YjNhOWMyNmYmaWQ9NWY0NTQzZWMmdHlwZT1wcm9iZWEmZGF0YT0lMDE2OGM2M2FlMGRmZWYmJTAxMDhmNjljMDYzNDdmRSUwMTIwM2NhZThlMjZlY0clMDE9\";\r\n System.out.println(WIFIReportVO.buildWIFIReportVO(data));\r\n System.out.println(WIFIReportVO.buildWIFIReportVO(new String(Base64Utils.decodeFromString(data))));\r\n\r\n// HttpUtils.postJSON(\"http://127.0.0.1:8080/soundtooth/callout\" , \"{\\\"user_name\\\":\\\"用户名\\\",\\\"iSeatNo\\\":\\\"1001001\\\",\\\"callId\\\":\\\"210ab0fdfca1439ba268a6bf8266305c\\\",\\\"telA\\\":\\\"18133331269\\\",\\\"telB\\\":\\\"181****1200\\\",\\\"telX\\\":\\\"17100445588\\\",\\\"telG\\\":\\\"07556882659\\\",\\\"duration\\\":\\\"19\\\",\\\"userData\\\":\\\"ef7ede6f36c84f1d45333863c38ff14c\\\"}\");\r\n//// HttpUtils.postJSON(\"http://127.0.0.1:8080/soundtooth/callout\" , \"{\\\"user_name\\\":\\\"用户名\\\",\\\"iSeatNo\\\":\\\"1001001\\\",\\\"callId\\\":\\\"210ab0fdfca1439ba268a6bf8266305c\\\",\\\"telA\\\":\\\"18133331269\\\",\\\"telB\\\":\\\"181****1200\\\",\\\"telX\\\":\\\"17100445588\\\",\\\"telG\\\":\\\"07556882659\\\",\\\"duration\\\":\\\"19\\\",\\\"userData\\\":\\\"ef7ede6f36c84f1d45333863c38ff14c\\\"}\");\r\n// System.out.println(HttpUtils.postJSON(\"http://s.slstdt.com/collector/collect\" , \"\"));\r\n// System.out.println(HttpUtils.postJSON(\"http://s.slstdt.com/soundtooth/callout\" , \"\"));\r\n\r\n\r\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tString result = requestGet(\"http://neihanshequ.com/\" , \"UTF-8\" );\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tLogManager.info(\"\\n\" + result.replace(\"<BR/>\", \"\\n\"));\r\n\t\t\r\n\t\t/*\r\n\t\tString result = requestPost(\"http://127.0.0.1:8080/a/\" , \"UTF-8\" , new BasicNameValuePair(\"name\" , \"中文中文中文\") \r\n\t\t, new BasicNameValuePair(\"age\" , \"19\") );\r\n\t\tLogManager.info(result.replace(\"<BR/>\", \"\\n\"));*/\r\n\t}", "@Override\n\t\tprotected String doInBackground(String... params) {\n\t\t\tString urlParameters=null;\n\t\t\ttry {\n\t\t\t\turlParameters= \"busno=\"+URLEncoder.encode(sbsno,\"UTF-8\");\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO: handle exception\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tresplist = Connectivity.excutePost(Constants.BUSSTOPFETCH_URL,\n urlParameters);\n\t\t\treturn resplist;\n\t\t}", "public void ParseRSS(URL feedUrl) throws com.rometools.rome.io.FeedException, java.io.IOException {\n //TODO: EVERY THING HERE SHOULD BE IN A TRANSACTION\n List<String> HashFields = new ArrayList<>();\n SyndFeedInput input = new SyndFeedInput();\n SyndFeed feed = input.build(new XmlReader(feedUrl));\n RSSChannelElements ChannelElements = new RSSChannelElements();\n Date CurrentDate = new Date();\n SimpleDateFormat SDF = new java.text.SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss.SSS\");\n //GET ADDITIONAL PROPERTIES OF THE CHANNEL\n //GET CHANNEL AUTHOR\n String ch_author = feed.getAuthor();\n ChannelElements.Author = ch_author;\n //GET PUBLISHED DATE\n Date ch_PubDate = feed.getPublishedDate();\n ChannelElements.PublishedDate = ch_PubDate;\n //GET LANGUAGE\n String ch_Language = feed.getLanguage();\n ChannelElements.Language = ch_Language;\n //GET WEBMASTER\n String ch_WebMaster = feed.getWebMaster();\n ChannelElements.webMaster = ch_WebMaster;\n //GET MANAGING EDITOR\n String ch_ME = feed.getManagingEditor();\n ChannelElements.managingEditor = ch_ME;\n //GET GENERATOR\n String ch_generator = feed.getGenerator();\n ChannelElements.Generator = ch_generator;\n //GET DESCRIPTION\n String ch_description = feed.getDescription();\n ChannelElements.Description = ch_description;\n int CurrentChannelID = 0;\n //TODO: DO THIS IN A STORED PROCEDURE\n try\n {\n TimeValidations ValidateTime = new TimeValidations();\n if (ValidateTime.IsWithinValidWindow(CurrentDate, ch_PubDate, ReadInterval))\n {\n //INSERT TO DB THE CHANNEL DETAILS\n CurrentChannelID = InsertChannelDetails(ChannelElements);\n }\n }\n catch(java.sql.SQLException exp)\n {\n String message = exp.getMessage();\n System.out.println(message);\n }\n\n\n //GET ELEMENTS FROM THE \"ITEMS\"\n List entries = feed.getEntries();\n Iterator it = entries.iterator();\n while (it.hasNext()) {\n RSSFields RssFieldValues = new RSSFields();\n SyndEntry entry = (SyndEntry) it.next();\n //GET TITLE\n System.out.println(entry.getTitle());\n String Title = entry.getTitle();\n RssFieldValues.Title = Title;\n //HashFields.add(Title);\n //GET LINK\n System.out.println(entry.getLink());\n RssFieldValues.Link = entry.getLink();\n HashFields.add(RssFieldValues.Link);\n //GET DESCRIPTION\n SyndContent description = entry.getDescription();\n System.out.println(description.getValue());\n RssFieldValues.Description = description.getValue();\n //HashFields.add(description.getValue());\n //GET PUBLISHED DATE\n Date Pub_Date = entry.getPublishedDate();\n System.out.println(SDF.format(Pub_Date));\n RssFieldValues.PublishedDate = entry.getPublishedDate();\n //GET UPDATED DATE\n Date U_date = entry.getUpdatedDate();\n System.out.println(U_date);\n RssFieldValues.UpdatedDate = entry.getPublishedDate();\n //GET AUTHOR\n String Author = entry.getAuthor();\n RssFieldValues.Author = Author;\n System.out.println(Author);\n //GET COMMENTS;\n String Comments = entry.getComments();\n RssFieldValues.Comments = Comments;\n System.out.println();\n try {\n //org.joda.time.Period P = new org.joda.time.Period(Pub_Date, CurrentDate);\n //if(SDF.parse(Pub_Date.toString()) == SDF.parse(CurrentDate.toString()))\n //org.joda.time.Period p = new org.joda.time.Period(CurrentDate, Pub_Date);\n //ONLY INSERT IF THE FEED IS WITHIN THE SPECIFIED PERIOD\n TimeValidations ValidateTime = new TimeValidations();\n if (ValidateTime.IsWithinValidWindow(CurrentDate, U_date, ReadInterval))\n {\n //INSERT NEWS SPECIFIC VALUES TO DB\n HashGenerator Gen = new HashGenerator();\n RssFieldValues.ComputedHash = Gen.HashCalculator(HashFields);\n InsertToDB(RssFieldValues, CurrentChannelID);\n }\n } catch (java.sql.SQLException ex) {\n String message = ex.getMessage();\n System.out.println(message);\n }\n }\n // System.out.println(feed);\n }", "public static String constructQuery(int port, int uploaded, int downloaded, int left){\n \t String url_string = \"\";\n \t try{\n \t \n String escaped_hash = Helpers.toURLHex(INFO_HASH);\n String ip = \"128.6.5.130\";\n url_string = TORRENT_INFO.announce_url.toString()\n + \"?port=\" + port\n + \"&peer_id=\" + PEER_ID\n + \"&info_hash=\" + escaped_hash \n + \"&uploaded=\" + uploaded\n + \"&downloaded=\" + downloaded\n + \"&left=\" + left\n + \"&ip=\" + ip;\n \n } catch (Exception e){\n System.out.println(e);\n }\n \n return url_string;\n \t}", "public String requestContent(String urlStr) {\n String result = null;\n HttpURLConnection urlConnection;\n try {\n URL url = new URL(urlStr);\n urlConnection = (HttpURLConnection) url.openConnection();\n } catch (Exception e) {\n e.printStackTrace();\n return null;\n }\n try {\n InputStream in = new BufferedInputStream(urlConnection.getInputStream());\n result = convertStreamToString(in);\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n urlConnection.disconnect();\n }\n return result;\n }", "@Test\n public void getStudentVotes() throws IOException {\n URL url = new URL(BASE_URL + \"1/\" + \"1/\" + \"votes\");\n InputStream input = url.openStream();\n System.out.println(input);\n \n //how to read from a input stream reader to have a string \n String newLine = System.getProperty(\"\\n\\r\");\n BufferedReader reader = new BufferedReader(new InputStreamReader(input));\n StringBuilder result = new StringBuilder();\n boolean flag = false;\n for (String line; (line = reader.readLine()) != null; ) {\n result.append(flag? newLine: \"\").append(line);\n flag = true;\n }\n String votes = result.toString();\n \n System.out.println(votes);\n }", "@Override\n protected ArrayList<Object> doInBackground(String... params) {\n RequestBody postData = new FormEncodingBuilder()\n .add(\"type\", \"json\")\n .build();\n\n ArrayList<Object> feedDataList = CMFeedJsonUtil.feed(params[0], postData);\n Log.d(\"Tag\", feedDataList.toString());\n return feedDataList;\n }", "@Override\n\t\tprotected String doInBackground(String... params) {\n\t\t\t String urlParameters = null;\n\t try {\n\t urlParameters = \"status=\" + URLEncoder.encode(\"1\", \"UTF-8\");\n\t } catch (UnsupportedEncodingException e) {\n\t // TODO Auto-generated catch block\n\t e.printStackTrace();\n\t }\n\n\t response2 = Connectivity.excutePost(Constants.REGISTERLIST_URL,\n\t urlParameters);\n\t Log.e(\"You are at\", \"\" + response2);\n\t return response2;\n\n\t\t}", "private String leerRespuestaApi(InputStream stream) throws IOException {\n //NECESITAMOS UN LECTOR DEL FLUJO\n BufferedReader buffer = new BufferedReader(new InputStreamReader(stream));\n //TENEMOS QUE LEER EL FLUJO Y PONER UN SEPARADOR DE ENTER\n //ENTRE LAS LINEAS\n String linea = \"\";\n //UN STRINGBUFFER SIRVE PARA LEER CONTENIDO MUY GRANDE\n StringBuffer data = new StringBuffer();\n //EL SEPARADOR DE ENTER DE CADA LINEA\n String separador = \"\";\n //MIENTRAS QUE EXISTAN LINEAS EN EL XML, DENTRO BUCLE\n while ((linea = buffer.readLine()) != null) {\n //AÑADIMOS EL CONTENIDO DE DATOS A DATA\n data.append(separador + linea);\n separador = \"\\n\";\n }\n //RECUPERAMOS LOS DATOS COMO STRING\n String response = data.toString();\n return response;\n }", "public static String executePostBytes(String targetURL, byte[] urlParameters) {\n\t\t\t HttpURLConnection connection = null; \n\t\t\t try {\n\t\t\t //Create connection\n\t\t\t URL url = new URL(targetURL);\n\t\t\t connection = (HttpURLConnection)url.openConnection();\n\t\t\t connection.setRequestMethod(\"POST\");\n\t\t\t connection.setRequestProperty(\"Content-Type\", \"application/json\");\n\n\t\t\t connection.setRequestProperty(\"Content-Length\", \n\t\t\t Integer.toString(urlParameters.length));\n\t\t\t connection.setRequestProperty(\"Content-Language\", \"en-US\"); \n\n\t\t\t connection.setUseCaches(false);\n\t\t\t connection.setDoOutput(true);\n\n\t\t\t //Send request\n\t\t\t DataOutputStream wr = new DataOutputStream (\n\t\t\t connection.getOutputStream());\n\t\t\t wr.write(urlParameters);;\n\t\t\t wr.close();\n\n\t\t\t //Get Response \n\t\t\t InputStream is = connection.getInputStream();\n\t\t\t BufferedReader rd = new BufferedReader(new InputStreamReader(is));\n\t\t\t StringBuilder response = new StringBuilder(); // or StringBuffer if not Java 5+ \n\t\t\t String line;\n\t\t\t while((line = rd.readLine()) != null) {\n\t\t\t response.append(line);\n\t\t\t response.append('\\r');\n\t\t\t }\n\t\t\t rd.close();\n\t\t\t \n\t\t\t if (response.length() == 0 ){\n\t\t\t \t// if nothing is coming back, at least send the response code.\n\t\t\t \t// a correct commit only returns 200-ok\n\t\t\t \tresponse.append(connection.getResponseCode());\n\t\t\t }\n\t\t\t return response.toString();\n\t\t\t } catch (Exception e) {\n\t\t\t e.printStackTrace();\n\t\t\t return null;\n\t\t\t } finally {\n\t\t\t if(connection != null) {\n\t\t\t connection.disconnect(); \n\t\t\t }\n\t\t\t }\n\t\t\t}", "public void fetchResults() {\n String requestUrl = \"http://192.168.1.40:8090/trending\";\n StringRequest request = new StringRequest(\n Request.Method.POST,\n requestUrl,\n trendingGetData,\n errorListener){\n\n protected Map<String, String> getParams() throws com.android.volley.AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"memberID\", \"MMM111\");\n return params;\n };\n };\n RequestQueue queue = Volley.newRequestQueue(this);\n queue1 = Volley.newRequestQueue(this);\n queue2 = Volley.newRequestQueue(this);\n queue.add(request);\n }", "@Override protected String doInBackground(String... params) {\r\n String returnVal = \"\";\r\n switch ( params[0] ) {\r\n case \"getIcyMetaData\":\r\n try {\r\n java.util.HashMap<String, String> icyMetaData = commonUtil.getIcyMetaData(params[1]);\r\n if ( icyMetaData.get(\"icy-metaint\")==null ) {\r\n returnVal = \"ERROR: ICY metadata not supported.\";\r\n } else {\r\n String streamTitle = icyMetaData.get(\"StreamTitle\"); if (streamTitle!=null && streamTitle.length()>0) returnVal = streamTitle; \r\n String icyName = icyMetaData.get(\"icy-name\"); if (icyName!=null && icyName.length()>0) returnVal = \"[\" + icyName + \"] \" + returnVal;\r\n }\r\n } catch (Exception e) {\r\n returnVal = \"ERROR: \" + e.getMessage();\r\n }\r\n break;\r\n case \"getMediaUrl\":\r\n returnVal = commonUtil.getMediaUrl2(params[1]);\r\n break;\r\n case \"wget\":\r\n java.util.List lines = commonUtil.wgets(params[1]);\r\n for (int i=0; i<lines.size(); i++)\r\n returnVal+=lines.get(i).toString().trim();\r\n break;\r\n default:\r\n String url = params[0];\r\n java.net.HttpURLConnection urlConn;\r\n try {\r\n //Open a new URL connection \r\n urlConn = (java.net.HttpURLConnection) (new java.net.URL(url)).openConnection();\r\n urlConn.setRequestMethod(\"GET\");\r\n // sets request headers \r\n //urlConn.setRequestProperty(\"Content-Type\", \"application/json\");\r\n //urlConn.setRequestProperty(\"Accept\", \"application/json\");\r\n returnVal += \"[HTTP \" + String.valueOf(urlConn.getResponseCode()) + \"]\";\r\n java.io.InputStream in;\r\n try {\r\n in = urlConn.getInputStream();\r\n } catch (Exception e) {\r\n returnVal += \"\\n\" + \"ERROR: \" + e.getMessage() + \"; url=\" + urlConn.getURL();\r\n return returnVal;\r\n }\r\n try {\r\n java.io.BufferedReader r = new java.io.BufferedReader(new java.io.InputStreamReader(\r\n new java.io.BufferedInputStream(in), java.nio.charset.StandardCharsets.UTF_8\r\n ));\r\n String line=null; while ((line=r.readLine())!=null) returnVal += \"\\n\" + line;\r\n } catch (Exception e) {\r\n returnVal += \"\\n\" + \"ERROR: \" + e.getMessage() + \"; url=\" + urlConn.getURL();\r\n } finally {\r\n urlConn.disconnect();\r\n }\r\n } catch (java.io.IOException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n return returnVal;\r\n }", "@Override\n protected String doInBackground(String... params) {\n String s = \"\";\n if (params.length > 0) {\n s = params[0];\n }\n HttpClient httpClient = new DefaultHttpClient();\n HttpContext localContext = new BasicHttpContext();\n HttpPost httpPost;\n HttpGet httpGet;\n ArrayList<NameValuePair> postParameters;\n\n httpGet = new HttpGet(URI);\n httpPost = new HttpPost(URI);\n\n\n if (s.length() > 0) {\n // postParameters = new ArrayList<NameValuePair>();\n //postParameters.add(new BasicNameValuePair(\"param1\", s));\n try {\n httpPost.setEntity(new StringEntity(s));\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n }\n\n String text = null;\n try {\n HttpResponse response;\n if (s.length() > 0) {\n response = httpClient.execute(httpPost, localContext);\n } else {\n response = httpClient.execute(httpGet, localContext);\n }\n\n HttpEntity entity = response.getEntity();\n text = getASCIIContentFromEntity(entity);\n //Log.d(Scrumptious.class.getSimpleName(), \"Received data from server at address \" + URI);\n //Log.d(Scrumptious.class.getSimpleName(), \"Data received is:\\n\" + text);\n } catch (Exception e) {\n //Log.d(Scrumptious.class.getSimpleName(), \"Failed to retrieve data from the server.\");\n return e.getLocalizedMessage();\n }\n return text;\n }", "@Override\n protected String doInBackground(Object[] params) {\n\n String link;\n String data;\n BufferedReader bufferedReader;\n String result;\n\n try {\n data = \"?\";\n// data = \"?fullname=\" + URLEncoder.encode(fullName, \"UTF-8\");\n// data += \"&username=\" + URLEncoder.encode(userName, \"UTF-8\");\n// data += \"&password=\" + URLEncoder.encode(passWord, \"UTF-8\");\n// data += \"&phonenumber=\" + URLEncoder.encode(phoneNumber, \"UTF-8\");\n// data += \"&emailaddress=\" + URLEncoder.encode(emailAddress, \"UTF-8\");\n\n link = \"http://gooduct.com/V1/clips/show\" + data;\n URL url = new URL(link);\n HttpURLConnection con = (HttpURLConnection) url.openConnection();\n\n bufferedReader = new BufferedReader(new InputStreamReader(con.getInputStream()));\n result = bufferedReader.readLine();\n return result;\n } catch (Exception e) {\n return new String(\"Exception: \" + e.getMessage());\n }\n }", "@Override\n protected String doInBackground(String... string) {\n try {\n myurl = new URL(string[0]);\n httpURLConnection = (HttpURLConnection) myurl.openConnection();\n httpURLConnection.setRequestProperty(\"Accept\", \"application/json\");\n httpURLConnection.setRequestProperty(\"user-key\", \"e46faab9e2e5d0e8f5d57c4be68c269d\");\n httpURLConnection.connect();\n\n inputStream = httpURLConnection.getInputStream();\n inputStreamReader = new InputStreamReader(inputStream);\n bufferedReader = new BufferedReader(inputStreamReader);\n line = bufferedReader.readLine();\n result = new StringBuilder();\n while (line != null) {\n result.append(line);\n line = bufferedReader.readLine();\n }\n return result.toString();\n\n } catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n\n return null;\n }", "public String getChannelData()\n {\n System.setProperty(\"http.keepAlive\", \"false\");\n HttpParams httpParameters = new BasicHttpParams();\n\n int timeoutConnection = 60000 * 20;\n HttpConnectionParams.setConnectionTimeout(httpParameters, timeoutConnection);\n\n int timeoutSocket = 60000 * 20;\n HttpConnectionParams.setSoTimeout(httpParameters, timeoutSocket);\n\n HttpProtocolParams.setVersion(httpParameters, HttpVersion.HTTP_1_1);\n HttpConnectionParams.setSocketBufferSize(httpParameters, 8*1024);\n\n DefaultHttpClient httpclient = new DefaultHttpClient(httpParameters);\n String link = \"https://api.hkgalden.com/f/\";\n\n System.out.println(\"link :\" + link);\n\n HttpGet httppost = new HttpGet(link);\n\n httppost.addHeader(\"X-GALAPI-KEY\",\"d9b511eb952d7da22e7d575750766bb5807a8bd0\");\n\n httppost.setHeader(\"Cache-Control\", \"no-cache\");\n\n try {\n System.out.println(\"Response:\"+ \"start execute\");\n HttpResponse response = httpclient.execute(httppost);\n System.out.println(\"Response:\"+response.getStatusLine().getStatusCode());\n HttpEntity getResponseEntity = response.getEntity();\n InputStream httpResponseStream = getResponseEntity.getContent();\n String result = slurp(httpResponseStream , 8192);\n return result;\n\n } catch (ClientProtocolException e) {\n e.printStackTrace();\n return e.getMessage();\n } catch (ConnectTimeoutException e){\n e.printStackTrace();\n return e.getMessage();\n }catch (IOException e) {\n e.printStackTrace();\n return e.getMessage();\n }\n }", "protected String doInBackground(String... serverUrls) {\n\n try {\n //Open connection to streamming server with a specific stream URL\n conn = new URL(serverUrls[0]).openConnection();\n //Request for Icy-MetaData\n conn.addRequestProperty(\"Icy-MetaData\", \"1\");\n conn.connect();\n // Retrieve and print the metadata just got from streaming server\n //Log.i(LOG_Task, \"Connect success, printing metadata in return header from server...\");\n hList = conn.getHeaderFields();\n // Reset metadata to make sure it's not holding previous station's data\n resetAllInfo();\n // The headerFields is a Map<String, List<String>>\n for (Map.Entry<String, List<String>> entry : hList.entrySet()) {\n String key = entry.getKey();\n List<String> values = entry.getValue();\n // Get the interested general stream information\n if (key != null) { // could be null key\n switch (key) {\n case \"icy-br\":\n //Log.i(LOG_Task, \"BiteRate: \" + values.get(0));\n currentBitrate = values.get(0);\n currentStationStatus = currentBitrate + \" Kbps\";\n break;\n case \"icy-description\":\n //Log.i(LOG_Task, \"Description: \" + values.get(0));\n currentStationDescription = values.get(0);\n break;\n case \"icy-name\":\n //Log.i(LOG_Task, \"StationName: \" + values.get(0));\n currentStationName = values.get(0);\n break;\n case \"icy-genre\":\n //Log.i(LOG_Task, \"StationGenre: \" + values.get(0));\n currentStationGenre = values.get(0);\n break;\n case \"icy-url\":\n //Log.i(LOG_Task, \"URL: \" + values.get(0));\n currentSource = values.get(0);\n break;\n // read metadata in the middle of the stream\n case \"icy-metaint\":\n //Log.i(LOG_Task, \"MetaInt: \" + values.get(0));\n readMetaData(Integer.parseInt(hList.get(\"icy-metaint\").get(0) + \"\"));\n break;\n }\n }\n }\n } catch (java.net.UnknownHostException e4) {\n currentStationStatus = connError;\n //e4.printStackTrace();\n return connError;\n }\n catch (java.net.ConnectException e1) {\n //e1.printStackTrace();\n currentStationStatus = connError;\n return connError;\n } catch (IOException e2) {\n //e2.printStackTrace();\n currentTitle = metaError;\n return metaError;\n }\n catch (Exception e3) {\n //e3.printStackTrace();\n return fail;\n }\n return success;\n }", "public void printStream(InputStream is) {\r\n BufferedReader br = new BufferedReader(new InputStreamReader(is));\r\n String line;\r\n try {\r\n while ((line=br.readLine())!=null) {\r\n System.out.println(line);\r\n }\r\n } catch (IOException ex) {\r\n System.out.println(\"RegisterRequest.printStream: \" + ex);\r\n }\r\n }", "@Override\n protected Bitmap doInBackground(URL... params) {\n if (DEBUG) {\n Log.d(TAG, \"Poster url: \" + params[0]);\n }\n InputStream is = null;\n try {\n is = (InputStream) params[0].getContent();\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (is == null) return null;\n final BufferedInputStream buffer = new BufferedInputStream(is);\n\n return decodeSampledBitmapFromStream(buffer, params[0], 800, 800);\n }", "private String readStream(InputStream is) {\n try {\n ByteArrayOutputStream bo = new ByteArrayOutputStream();\n int i = is.read();\n while(i != -1) {\n bo.write(i);\n i = is.read();\n }\n return bo.toString();\n } catch (IOException e) {\n return \"\";\n }\n }", "public static String makeRequestForData(String url, String request_method, String urlParameters){\n\t\tStringBuffer response = null;\n\t\tString resp = \"\";\n\n\t\ttry{\n\t\t\tURL obj = null;\n\t\t\tHttpURLConnection con = null;\n\n\t\t\tif( request_method.equals( \"GET\" ) ){\n\t\t\t\tString encodedURL = url + \"?\" + urlParameters;\n\t\t\t\t//encodedURL = encodedURL.replaceAll(\"+\", \"%20\");\n\n\t\t\t\tobj = new URL( encodedURL );\n\t\t\t\tcon = (HttpURLConnection) obj.openConnection();\n\t\t\t\t//con.setRequestProperty(\"User-Agent\", USER_AGENT);\n\t\t\t\tcon.setRequestMethod( \"GET\" );\n\t\t\t\tcon.setDoOutput( true );\n\t\t\t\tcon.setConnectTimeout( 10000 );\n\t\t\t}\n\t\t\telse{\n\t\t\t\tString encodedURL = url;//URLEncoder.encode(url, \"UTF-8\");\n\t\t\t\t//urlParameters = URLEncoder.encode(urlParameters, \"UTF-8\");\n\t\t\t\t//urlParameters = urlParameters.replaceAll(\"+\", \"%20\");\n\n\t\t\t\tobj = new URL( encodedURL );\n\t\t\t\tcon = (HttpURLConnection) obj.openConnection();\n\t\t\t\tcon.setRequestMethod( \"POST\" );\n\t\t\t\tcon.setDoOutput( true );\n\t\t\t\tcon.setConnectTimeout( 10000 );\n\t\t\t\tDataOutputStream wr = new DataOutputStream( con.getOutputStream() );\n\t\t\t\twr.writeBytes( urlParameters );\n\t\t\t\twr.flush();\n\t\t\t\twr.close();\n\t\t\t}\n\n\t\t\tint responseCode = con.getResponseCode();\n\t\t\tif( responseCode == 200 ){\n\t\t\t\tBufferedReader in = new BufferedReader( new InputStreamReader( con.getInputStream() ) );\n\t\t\t\tString inputLine;\n\t\t\t\tresp = \"\";\n\t\t\t\tresponse = new StringBuffer();\n\t\t\t\tchar buff[] = new char[ 65535 ];\n\n\t\t\t\tFileOutputStream fos = new FileOutputStream( UtilFile.createFileIfNotExist( \"Launcher\", \"temp.txt\" ) );\n\n\t\t\t\twhile ( ( inputLine = in.readLine() ) != null ) {\n\t\t\t\t\tresponse.append( inputLine );\n\t\t\t\t}\n\t\t\t\tfos.close();\n\t\t\t\tin.close();\n\t\t\t}\n\t\t\telse{\n\t\t\t\tthrow new Exception( \"No Response from server.\" );\n\t\t\t}\n\t\t}\n\t\tcatch( Exception e ){\n\t\t\tLog.i( TAG, \"Exception : \"+e.toString() );\n\t\t\treturn null;\n\t\t}\n\t\treturn response.toString();\n\t}", "public String getRate(String topic , String page) {\n\t\t\n\t\tString resultString = \"Error\";\n\t\tSystem.setProperty(\"http.keepAlive\", \"false\");\n\t\tHttpParams httpParameters = new BasicHttpParams();\n\n\t\tint timeoutConnection = 60000 * 20;\n\t\tHttpConnectionParams.setConnectionTimeout(httpParameters, timeoutConnection);\n\n\t\tint timeoutSocket = 60000 * 20;\n\t\tHttpConnectionParams.setSoTimeout(httpParameters, timeoutSocket);\n\n\t\tHttpProtocolParams.setVersion(httpParameters, HttpVersion.HTTP_1_1);\n\t\tHttpConnectionParams.setSocketBufferSize(httpParameters, 8*1024);\n\n\n\t\tDefaultHttpClient httpclient = new DefaultHttpClient(httpParameters);\n\t\t//HttpGet httppost = new HttpGet(\"https://api.hkgalden.com/f/l?ident=bw\");\n\t\tString urlString = GaldenUtils.readPostUrl + topic + GaldenUtils.pageUrlParam + page;\n\n\t\tSystem.out.println(\"link : \" + urlString);\n\t\tHttpGet httppost = new HttpGet(urlString);\n\n\t\thttppost.addHeader(\"X-GALAPI-KEY\", GaldenUtils.apiKey);\n\n\t\ttry {\t\n\t\t\tSystem.out.println(\"Response:\"+ \"start execute\");\n\t\t\tHttpResponse response = httpclient.execute(httppost);\n\t\t\tSystem.out.println(\"Response:\"+response.getStatusLine().getStatusCode());\n\t\t\tHttpEntity getResponseEntity = response.getEntity();\n\t\t\tInputStream httpResponseStream = getResponseEntity.getContent();\n\t\t\tString result = slurp(httpResponseStream , 8192);\n\t\t\tJSONObject json = new JSONObject(result);\n\t\t\tJSONObject\ttopicPost = json.getJSONObject(\"topic\");\n\t\t\tresultString = \"正評: \"+ topicPost.getString(\"good\").toString() + \" ,\" + \"負評: \"+ topicPost.getString(\"bad\").toString();\n\t\t\t\n\n\t\t} catch (ClientProtocolException e) {\n\t\t\te.printStackTrace();\t\t\t\n\t\t\treturn e.getMessage();\n\t\t} catch (ConnectTimeoutException e){ \n\t\t\te.printStackTrace();\t\t\t\n\t\t\treturn e.getMessage();\n\t\t}catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn e.getMessage();\n\t\t} catch (JSONException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn resultString; \t\n\t}", "@Override\n public void run() {\n URL url;\n HttpURLConnection ur1Connection = null; //HttpsURLConnection aiso avaitab1e\n try {\n\n //String service = reqUrl; // call rhymebrain\n String service = \"https://rhymebrain.com/talk?\"; // call rhymebrain\n //String parm = \"getRhymes&word=\" + word;\n //String queryString = URLEncoder.encode(parm, \"UTF-8\");\n String queryString = \"getRhymes&word=\" + word + \"&maxResults=\" + String.valueOf(MAX_RESULTS);\n //try to process url and connect to it\n url = new URL( service + \"function=\" + queryString);\n Log.d(\"which URL: \", String.valueOf(url));\n ur1Connection = (HttpURLConnection)url.openConnection();\n ur1Connection.setRequestMethod(\"GET\");\n\n // Set connection timeout and read timeout value.\n ur1Connection.setConnectTimeout(70000);\n ur1Connection.setReadTimeout(70000);\n\n //create an input stream and stream reader from the connection\n InputStream inputStream = ur1Connection.getInputStream();\n InputStreamReader inputStreamReader = new InputStreamReader(inputStream);\n\n //get some data from the stream\n int data = inputStreamReader.read();\n //string for collecting all output\n output = \"\";\n //if the stream is not empty\n while(data != -1) {\n //turn what we read into a char and print it\n char current = (char) data;\n output += current;\n data = inputStreamReader.read();\n\n //Log.d(\"Network\", output);\n }\n Log.d(\"Network\", output);\n parseJSON(output);\n int i =0;\n }catch (Exception e) {\n Log.d( \"Network\", e.toString());\n }finally {\n if (ur1Connection != null) {\n ur1Connection.disconnect();\n ur1Connection = null;\n }\n }\n }", "@Override\n\t\tprotected String doInBackground(String... params) {\n\t\t\tHttpClient httpclient = new DefaultHttpClient();\n\t \t\n\t\t HttpPost httppost = new HttpPost(\"http://\"+WelcomeActivity.host+\":8080/OMSsell/SellProduct\");\n\n\t\t try {\n\t\t // Add your data\n\t\t List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(1);\n\t\t nameValuePairs.add(new BasicNameValuePair(\"ids\",params[0]));\n\t\t httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));\n\t\t HttpResponse response = httpclient.execute(httppost);\n\t\t jsonString=readJson(response);\n\t\t } catch (ClientProtocolException e) {\n\t\t \te.printStackTrace();\n\t\t } catch (IOException e) {\n\t\t \te.printStackTrace();\n\t\t }\n\t \n\t return null;\n\t \t}" ]
[ "0.56321317", "0.5584563", "0.55820847", "0.5520022", "0.5475498", "0.54449904", "0.5411296", "0.5375458", "0.5293793", "0.52894187", "0.52533287", "0.52515364", "0.5243214", "0.5236199", "0.5232499", "0.52184933", "0.52098113", "0.5195915", "0.51939034", "0.5189013", "0.5181419", "0.51684165", "0.516265", "0.5160602", "0.51600015", "0.5145209", "0.5141393", "0.5121561", "0.5118838", "0.5113788", "0.51038873", "0.5086403", "0.5081628", "0.5074633", "0.5074365", "0.50603455", "0.50574845", "0.5043628", "0.50409746", "0.5027199", "0.49989372", "0.49793753", "0.4975929", "0.49687305", "0.49585956", "0.49561697", "0.49424127", "0.49397957", "0.49293107", "0.49228707", "0.49212503", "0.49126577", "0.4910297", "0.4910285", "0.49098587", "0.49063346", "0.49042058", "0.48950198", "0.4894752", "0.48920715", "0.4890665", "0.48899496", "0.48861387", "0.4883745", "0.4883486", "0.4874351", "0.4867876", "0.48614517", "0.4858738", "0.48526087", "0.48503685", "0.48502147", "0.4847066", "0.4843543", "0.48349282", "0.48259884", "0.48228857", "0.4819208", "0.48122013", "0.4801333", "0.47919956", "0.47888926", "0.4781735", "0.47797984", "0.4772117", "0.47698778", "0.4769128", "0.4762908", "0.47595513", "0.47551727", "0.474794", "0.4744206", "0.47372094", "0.47352988", "0.47346002", "0.47293618", "0.47273523", "0.47267014", "0.47264168", "0.47161204", "0.46969685" ]
0.0
-1
Constructor default join type
public OwJoinedTable(OwTableReference tableReference1_p, OwTableReference tableReference2_p, OwJoinSpecification joinSpecification_p) { this(tableReference1_p, DEFAULT_JOIN_TYPE, tableReference2_p, joinSpecification_p); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Join createJoin();", "public Joins()\n {\n joins = new ArrayList<Join>();\n }", "abstract protected Object joinClause(Object o1, Object o2);", "JoinCondition createJoinCondition();", "public boolean isJoin()\r\n { return type == JOIN; }", "FromTableJoin createFromTableJoin();", "private String getJoinType() {\n if (joinQueryInputs.queryType == null) {\n return null;\n }\n switch (joinQueryInputs.queryType) {\n case Constants.JOIN_TYPE_INNER_JOIN:\n return Constants.JOIN_INNER_JOIN;\n case Constants.JOIN_TYPE_LEFT_JOIN:\n return Constants.JOIN_LEFT_JOIN;\n case Constants.JOIN_TYPE_RIGHT_JOIN:\n return Constants.JOIN_RIGHT_JOIN;\n case Constants.JOIN_TYPE_FULL_JOIN:\n return Constants.JOIN_FULL_JOIN;\n }\n return null;\n }", "public T caseFromJoin(FromJoin object)\n {\n return null;\n }", "@NotNull\n DfType join(@NotNull DfType other);", "@Override public String toString()\n{\n return \"JOIN\";\n}", "private SCTeamJoin(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }", "public JoinClass() {\n initComponents();\n }", "public Join(JoinPredicate p, DbIterator child1, DbIterator child2) {\n this._p = p;\n this._child1 = child1;\n this._child2 = child2;\n this._hj = new HashJoin();\n }", "public Object caseJoin(Join object) {\r\n\t\treturn null;\r\n\t}", "public static void main(String[] args) {\r\n\t\tJoiner joiner = Joiner.on(\",\").skipNulls();\r\n\r\n\t\tSystem.out.println(joiner.join(\"One\", \"Two\", null, \"Four\", \"Five\", null, \"Seven\"));\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// returns the string \"One,Two,Four,Five,Seven\".\r\n\r\n\t\t/**\r\n\t\t * Alternative to the use of skipNulls(), we can also use\r\n\t\t * useForNull(String) to specify a string instead of null.\r\n\t\t */\r\n\t\tJoiner joiner1 = Joiner.on(\",\").useForNull(\"Sample\");\r\n\t\tSystem.out.println(joiner1.join(\"One\", \"Two\", null, \"Four\", \"Five\", null, \"Seven\"));\r\n\t\t\t\t\t\t\t\t\t\t\t// returns the string \"One,Two,Sample,Four,Five,Sample,Seven\".\r\n\t\t\t\t\t\t\t\t\t\t\t// It replace null value with 'Sample'\r\n\r\n\t\t/**\r\n\t\t * Using Joiner, we have seen joining variable number of Objects. we can\r\n\t\t * also join all the Objects in an Iterable, also all the elements in an\r\n\t\t * array.\r\n\t\t * \r\n\t\t */\r\n\t\tSystem.out.println(Joiner.on(\",\").join(Arrays.asList(1, 5, 7)));\t// returns 1,5,7\r\n\t\t\r\n\t\t/**\r\n\t\t * NOTE:\r\n\t\t * \r\n\t\t * \t\t1. joiner instances are always Immutable. \r\n\t\t * \t\t2. The joiner configuration methods will always return a new Joiner, which you must use to get\r\n\t\t * \t\t\tthe desired semantics. This makes Joiner thread-safe, and usable as static final constant.\r\n\t\t * \r\n\t\t */\r\n\t\t\r\n\t\t/**\r\n\t\t * Below is the comparison of using Joiner's join and joining typical java api style:\r\n\t\t * \r\n\t\t */\r\n\t\tList<String> stringList = new ArrayList<String>();\r\n\t\tstringList.add(\"One\");\r\n\t\tstringList.add(\"Two\");\r\n\t\tstringList.add(\"Three\");\r\n\t\tstringList.add(\"Four\");\r\n\t\tstringList.add(\"Five\");\r\n\r\n\t\tSystem.out.println(\"String Joined typical style: \" + buildString(stringList, \",\"));\r\n\r\n\t\tSystem.out.println(\"String Joined using Joiner class: \" + Joiner.on(\",\").skipNulls().join(stringList));\r\n\t}", "public Join(Operator operator1, Operator operator2, TupleTransformation tupleTrans) {\n o1 = operator1;\n o2 = operator2;\n this.tupleTrans = tupleTrans;\n tuple1 = o1.next();\n }", "public void addJoin(String left, String right, boolean outer, int reltype) {\r\n DSJoinDescriptor d = new DSJoinDescriptor(left, right, outer, reltype);\r\n _joins.addElement(d);\r\n }", "public Train getJoin() {\n\t\treturn join;\n\t}", "public static int numJoinTypes() {\n return 3;\n }", "public final AstValidator.join_type_return join_type() throws RecognitionException {\n AstValidator.join_type_return retval = new AstValidator.join_type_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 QUOTEDSTRING328=null;\n\n CommonTree QUOTEDSTRING328_tree=null;\n\n try {\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:520:11: ( QUOTEDSTRING )\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:520:13: QUOTEDSTRING\n {\n root_0 = (CommonTree)adaptor.nil();\n\n\n _last = (CommonTree)input.LT(1);\n QUOTEDSTRING328=(CommonTree)match(input,QUOTEDSTRING,FOLLOW_QUOTEDSTRING_in_join_type2755); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n QUOTEDSTRING328_tree = (CommonTree)adaptor.dupNode(QUOTEDSTRING328);\n\n\n adaptor.addChild(root_0, QUOTEDSTRING328_tree);\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 }", "public boolean isJoin()\r\n {\n return false;\r\n }", "public final void mT__79() throws RecognitionException {\n try {\n int _type = T__79;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalIotLuaXtext.g:79:7: ( 'join' )\n // InternalIotLuaXtext.g:79:9: 'join'\n {\n match(\"join\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "<V1, R> KTable<K, R> join(KTable<K, V1> other, ValueJoiner<V, V1, R> joiner);", "public LinkBuilder() {\n }", "private String whatFormOfJoin(final String sqlTrash, final int indexOfJoin) {\n// 21 pred potrebujem max\n String preSQLTrash = sqlTrash.substring(\n indexOfJoin - 21 < 0 ? 0 : indexOfJoin - 21,\n indexOfJoin).toUpperCase();\n if (preSQLTrash.endsWith(\"_\")) {\n joinTypeBlocks.add(0);\n return \"STRAIGHT_JOIN\";\n } else if (preSQLTrash.contains(\"INNER\")) {\n joinTypeBlocks.add(0);\n return \"INNER JOIN\";\n } else if (preSQLTrash.contains(\"CROSS\")) {\n joinTypeBlocks.add(0);\n return \"CROSS JOIN\";\n } else if (preSQLTrash.contains(\"LEFT\")) {\n joinTypeBlocks.add(1);\n String returnString = \"LEFT\";\n if (preSQLTrash.contains(\"OUTER\")) {\n returnString = returnString + \" OUTER JOIN\";\n } else {\n returnString = returnString + \" JOIN\";\n }\n if (preSQLTrash.contains(\"NATURAL\")) {\n returnString = \"NATURAL \" + returnString;\n }\n return returnString;\n } else if (preSQLTrash.contains(\"RIGHT\")) {\n joinTypeBlocks.add(2);\n String returnString = \"RIGHT\";\n if (preSQLTrash.contains(\"OUTER\")) {\n returnString = returnString + \" OUTER JOIN\";\n } else {\n returnString = returnString + \" JOIN\";\n }\n if (preSQLTrash.contains(\"NATURAL\")) {\n returnString = \"NATURAL \" + returnString;\n }\n return returnString;\n }\n //ak nenajdem nic exte\n joinTypeBlocks.add(0);\n return \"JOIN\";\n }", "private void appendJoinStatement(JoinStage left,\n JoinStage right) {\n String joinType;\n\n if (left.isRequired() && right.isRequired()) {\n joinType = \"INNER\";\n } else if (left.isRequired() && !right.isRequired()) {\n joinType = \"LEFT OUTER\";\n } else if (!left.isRequired() && right.isRequired()) {\n joinType = \"RIGHT OUTER\";\n } else {\n joinType = \"FULL OUTER\";\n }\n\n // ... <join_type> JOIN <right_table> ON ...\n builder.append(joinType);\n builder.append(JOIN);\n appendFullTableNameAndAlias(right.getStageName());\n builder.append(ON);\n }", "public void testMember(){\n\r\n parser.sqltext = \"select f from t1\";\r\n assertTrue(parser.parse() == 0);\r\n assertTrue(parser.sqlstatements.get(0).joins.getJoin(0).getKind() == TBaseType.join_source_fake );\r\n assertTrue(parser.sqlstatements.get(0).joins.getJoin(0).getTable().toString().compareToIgnoreCase(\"t1\") == 0);\r\n\r\n parser.sqltext = \"select f from t as t1 join t2 on t1.f1 = t2.f1\";\r\n assertTrue(parser.parse() == 0);\r\n assertTrue(parser.sqlstatements.get(0).joins.getJoin(0).getKind() == TBaseType.join_source_table );\r\n assertTrue(parser.sqlstatements.get(0).joins.getJoin(0).getTable().toString().compareToIgnoreCase(\"t\") == 0);\r\n assertTrue(parser.sqlstatements.get(0).joins.getJoin(0).getTable().getAliasClause().toString().compareToIgnoreCase(\"t1\") == 0);\r\n\r\n\r\n parser.sqltext = \"select a_join.f1 from (a as a_alias left join a1 on a1.f1 = a_alias.f1 ) as a_join join b on a_join.f1 = b.f1;\";\r\n assertTrue(parser.parse() == 0);\r\n TJoin lcJoin = parser.sqlstatements.get(0).joins.getJoin(0);\r\n //System.out.println(lcJoin.getKind());\r\n assertTrue(lcJoin.getKind() == TBaseType.join_source_join );\r\n\r\n assertTrue(lcJoin.getJoin().toString().compareToIgnoreCase(\"(a as a_alias left join a1 on a1.f1 = a_alias.f1 )\") == 0);\r\n assertTrue(lcJoin.getJoin().getAliasClause().toString().compareToIgnoreCase(\"a_join\") == 0);\r\n assertTrue(lcJoin.getJoin().getJoinItems().getJoinItem(0).getJoinType() == EJoinType.left);\r\n\r\n assertTrue(lcJoin.getJoinItems().getJoinItem(0).getJoinType() == EJoinType.join);\r\n\r\n parser.sqltext = \"select a_join.f1 from (a as a_alias left join a1 on a1.f1 = a_alias.f1 ) as a_join\";\r\n assertTrue(parser.parse() == 0);\r\n TJoin lcJoin1 = parser.sqlstatements.get(0).joins.getJoin(0);\r\n assertTrue(lcJoin1.getKind() == TBaseType.join_source_join );\r\n assertTrue(lcJoin1.getJoin().toString().compareToIgnoreCase(\"(a as a_alias left join a1 on a1.f1 = a_alias.f1 )\") == 0);\r\n assertTrue(lcJoin1.getJoin().getAliasClause().toString().compareToIgnoreCase(\"a_join\") == 0);\r\n\r\n }", "private CSTeamJoin(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }", "public ChronicleJoiner(Fields schema, Comparable<?> field) {\n\t\t\tsuper(Fields.join(true, schema, schema));\n\t\t\tthis.schema = schema;\n\t\t\tthis.fieldPos = schema.getPos(field);\n\t\t}", "@Nullable DfType tryJoinExactly(@NotNull DfType other);", "public final EObject ruleJoinOperator() throws RecognitionException {\n EObject current = null;\n\n Token otherlv_0=null;\n Token otherlv_1=null;\n Token otherlv_3=null;\n Token otherlv_5=null;\n Token otherlv_7=null;\n EObject lv_parameters_2_0 = null;\n\n EObject lv_parameters_4_0 = null;\n\n EObject lv_parameters_6_0 = null;\n\n\n enterRule(); \n \n try {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:548:28: ( (otherlv_0= 'join' otherlv_1= '(' ( (lv_parameters_2_0= ruleStreamOperatorParameter ) ) otherlv_3= ',' ( (lv_parameters_4_0= ruleStreamOperatorParameter ) ) (otherlv_5= ',' ( (lv_parameters_6_0= ruleStreamOperatorParameter ) ) )* otherlv_7= ')' ) )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:549:1: (otherlv_0= 'join' otherlv_1= '(' ( (lv_parameters_2_0= ruleStreamOperatorParameter ) ) otherlv_3= ',' ( (lv_parameters_4_0= ruleStreamOperatorParameter ) ) (otherlv_5= ',' ( (lv_parameters_6_0= ruleStreamOperatorParameter ) ) )* otherlv_7= ')' )\n {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:549:1: (otherlv_0= 'join' otherlv_1= '(' ( (lv_parameters_2_0= ruleStreamOperatorParameter ) ) otherlv_3= ',' ( (lv_parameters_4_0= ruleStreamOperatorParameter ) ) (otherlv_5= ',' ( (lv_parameters_6_0= ruleStreamOperatorParameter ) ) )* otherlv_7= ')' )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:549:3: otherlv_0= 'join' otherlv_1= '(' ( (lv_parameters_2_0= ruleStreamOperatorParameter ) ) otherlv_3= ',' ( (lv_parameters_4_0= ruleStreamOperatorParameter ) ) (otherlv_5= ',' ( (lv_parameters_6_0= ruleStreamOperatorParameter ) ) )* otherlv_7= ')'\n {\n otherlv_0=(Token)match(input,20,FOLLOW_20_in_ruleJoinOperator1229); \n\n \tnewLeafNode(otherlv_0, grammarAccess.getJoinOperatorAccess().getJoinKeyword_0());\n \n otherlv_1=(Token)match(input,21,FOLLOW_21_in_ruleJoinOperator1241); \n\n \tnewLeafNode(otherlv_1, grammarAccess.getJoinOperatorAccess().getLeftParenthesisKeyword_1());\n \n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:557:1: ( (lv_parameters_2_0= ruleStreamOperatorParameter ) )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:558:1: (lv_parameters_2_0= ruleStreamOperatorParameter )\n {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:558:1: (lv_parameters_2_0= ruleStreamOperatorParameter )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:559:3: lv_parameters_2_0= ruleStreamOperatorParameter\n {\n \n \t newCompositeNode(grammarAccess.getJoinOperatorAccess().getParametersStreamOperatorParameterParserRuleCall_2_0()); \n \t \n pushFollow(FOLLOW_ruleStreamOperatorParameter_in_ruleJoinOperator1262);\n lv_parameters_2_0=ruleStreamOperatorParameter();\n\n state._fsp--;\n\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getJoinOperatorRule());\n \t }\n \t\tadd(\n \t\t\tcurrent, \n \t\t\t\"parameters\",\n \t\tlv_parameters_2_0, \n \t\t\"StreamOperatorParameter\");\n \t afterParserOrEnumRuleCall();\n \t \n\n }\n\n\n }\n\n otherlv_3=(Token)match(input,16,FOLLOW_16_in_ruleJoinOperator1274); \n\n \tnewLeafNode(otherlv_3, grammarAccess.getJoinOperatorAccess().getCommaKeyword_3());\n \n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:579:1: ( (lv_parameters_4_0= ruleStreamOperatorParameter ) )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:580:1: (lv_parameters_4_0= ruleStreamOperatorParameter )\n {\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:580:1: (lv_parameters_4_0= ruleStreamOperatorParameter )\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:581:3: lv_parameters_4_0= ruleStreamOperatorParameter\n {\n \n \t newCompositeNode(grammarAccess.getJoinOperatorAccess().getParametersStreamOperatorParameterParserRuleCall_4_0()); \n \t \n pushFollow(FOLLOW_ruleStreamOperatorParameter_in_ruleJoinOperator1295);\n lv_parameters_4_0=ruleStreamOperatorParameter();\n\n state._fsp--;\n\n\n \t if (current==null) {\n \t current = createModelElementForParent(grammarAccess.getJoinOperatorRule());\n \t }\n \t\tadd(\n \t\t\tcurrent, \n \t\t\t\"parameters\",\n \t\tlv_parameters_4_0, \n \t\t\"StreamOperatorParameter\");\n \t afterParserOrEnumRuleCall();\n \t \n\n }\n\n\n }\n\n // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:597:2: (otherlv_5= ',' ( (lv_parameters_6_0= ruleStreamOperatorParameter ) ) )*\n loop6:\n do {\n int alt6=2;\n int LA6_0 = input.LA(1);\n\n if ( (LA6_0==16) ) {\n alt6=1;\n }\n\n\n switch (alt6) {\n \tcase 1 :\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:597:4: otherlv_5= ',' ( (lv_parameters_6_0= ruleStreamOperatorParameter ) )\n \t {\n \t otherlv_5=(Token)match(input,16,FOLLOW_16_in_ruleJoinOperator1308); \n\n \t \tnewLeafNode(otherlv_5, grammarAccess.getJoinOperatorAccess().getCommaKeyword_5_0());\n \t \n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:601:1: ( (lv_parameters_6_0= ruleStreamOperatorParameter ) )\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:602:1: (lv_parameters_6_0= ruleStreamOperatorParameter )\n \t {\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:602:1: (lv_parameters_6_0= ruleStreamOperatorParameter )\n \t // ../de.hs_rm.cs.vs.dsm.flow/src-gen/de/hs_rm/cs/vs/dsm/parser/antlr/internal/InternalFlow.g:603:3: lv_parameters_6_0= ruleStreamOperatorParameter\n \t {\n \t \n \t \t newCompositeNode(grammarAccess.getJoinOperatorAccess().getParametersStreamOperatorParameterParserRuleCall_5_1_0()); \n \t \t \n \t pushFollow(FOLLOW_ruleStreamOperatorParameter_in_ruleJoinOperator1329);\n \t lv_parameters_6_0=ruleStreamOperatorParameter();\n\n \t state._fsp--;\n\n\n \t \t if (current==null) {\n \t \t current = createModelElementForParent(grammarAccess.getJoinOperatorRule());\n \t \t }\n \t \t\tadd(\n \t \t\t\tcurrent, \n \t \t\t\t\"parameters\",\n \t \t\tlv_parameters_6_0, \n \t \t\t\"StreamOperatorParameter\");\n \t \t afterParserOrEnumRuleCall();\n \t \t \n\n \t }\n\n\n \t }\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop6;\n }\n } while (true);\n\n otherlv_7=(Token)match(input,22,FOLLOW_22_in_ruleJoinOperator1343); \n\n \tnewLeafNode(otherlv_7, grammarAccess.getJoinOperatorAccess().getRightParenthesisKeyword_6());\n \n\n }\n\n\n }\n\n leaveRule(); \n }\n \n catch (RecognitionException re) { \n recover(input,re); \n appendSkippedTokens();\n } \n finally {\n }\n return current;\n }", "public void addJoinOn(boolean enabled, String join) {\r\n\t\tif (enabled) {\r\n\t\t\taddJoinOn(join);\r\n\t\t}\r\n\t}", "@Override\n @Test\n public void testSimpleJoin() throws Exception { }", "public interface Joinable<D, R> extends Function<D, R> {\n\n /**\n * Applies this function to the given argument.\n *\n * @param d The {@code nullable} function argument\n * @return The function result\n */\n @Override\n @Nullable\n R apply(@Nullable D d);\n\n /** Send a result of the first function to the next one.\n * @param <F> A final result type\n * @param next Next function\n * @return If a result of the first function is {@code null} than the final result is {@code null} too.\n */\n @Nullable\n default <F> Joinable<D, F> add(@NotNull final Joinable<R, F> next) {\n return (D d) -> {\n final R value = apply(d);\n return value != null ? next.apply(value) : null;\n };\n }\n\n /** Create a joinable function\n *\n * @param <D> Domain value\n * @param <R> Result value\n * @param fce An original function\n * @return The new object type of Function\n */\n @NotNull\n static <D, R> Joinable<D, R> of(@NotNull final Function<D, R> fce) {\n return (D d) -> d != null ? fce.apply(d) : null;\n }\n}", "protected DefaultLink() {\n }", "@Override\n\tpublic Object visit(ASTJoin node, Object data) {\n\t\tint indent = (Integer) data;\n\t\t\n\t\tprintIndent(indent);\n\t\tSystem.out.println(\"join (\");\n\t\tnode.jjtGetChild(0).jjtAccept(this, indent + 2);\n\t\tSystem.out.println(\",\");\n\t\tnode.jjtGetChild(1).jjtAccept(this, indent + 2);\n\t\tSystem.out.println(\",\");\n\t\tnode.jjtGetChild(2).jjtAccept(this, indent + 2);\n\t\tSystem.out.print(\", \");\n\t\tnode.jjtGetChild(3).jjtAccept(this, 0);\n\t\tSystem.out.println();\n\t\tprintIndent(indent);\n\t\tSystem.out.print(\")\");\n\t\treturn null;\n\t}", "private String getJoins() {\r\n\t\treturn joins;\r\n\t}", "public T caseJoinNode(JoinNode object) {\n\t\treturn null;\n\t}", "private void __sep__Constructors__() {}", "public void setDrawingJoin(JOIN join);", "public final void mJOIN() throws RecognitionException {\n try {\n int _type = JOIN;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:357:5: ( J O I N )\n // /Users/cbinnig/Workspace/DHBW_FirstDB_Loesung3/src/de/dhbw/db2/firstdb/sql/FirstSQL.g:357:7: J O I N\n {\n mJ(); \n mO(); \n mI(); \n mN(); \n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public StringUnionFunc() {\n\t super.addLinkableParameter(\"str1\"); \n\t\t super.addLinkableParameter(\"str2\"); \n }", "protected String getJoin( LogicalModel businessModel, LogicalRelationship relation,\n Map<LogicalTable, String> tableAliases, Map<String, Object> parameters, boolean genAsPreparedStatement,\n DatabaseMeta databaseMeta, String locale ) throws PentahoMetadataException {\n String join = \"\"; //$NON-NLS-1$\n if ( relation.isComplex() ) {\n try {\n // parse join as MQL\n SqlOpenFormula formula =\n new SqlOpenFormula( businessModel, databaseMeta, relation.getComplexJoin(), tableAliases, parameters,\n genAsPreparedStatement );\n formula.parseAndValidate();\n join = formula.generateSQL( locale );\n } catch ( PentahoMetadataException e ) {\n // backward compatibility, deprecate\n // FIXME: we need to get rid of this and just throw an exception\n logger.warn( Messages.getErrorString(\n \"SqlGenerator.ERROR_0017_FAILED_TO_PARSE_COMPLEX_JOIN\", relation.getComplexJoin() ), e ); //$NON-NLS-1$\n join = relation.getComplexJoin();\n }\n } else if ( relation.getFromTable() != null && relation.getToTable() != null && relation.getFromColumn() != null\n && relation.getToColumn() != null ) {\n // Left side\n String leftTableAlias = null;\n if ( tableAliases != null ) {\n leftTableAlias = tableAliases.get( relation.getFromColumn().getLogicalTable() );\n } else {\n leftTableAlias = relation.getFromColumn().getLogicalTable().getId();\n }\n\n join = databaseMeta.quoteField( leftTableAlias );\n join += \".\"; //$NON-NLS-1$\n join +=\n databaseMeta.quoteField( (String) relation.getFromColumn().getProperty( SqlPhysicalColumn.TARGET_COLUMN ) );\n\n // Equals\n join += \" = \"; //$NON-NLS-1$\n\n // Right side\n String rightTableAlias = null;\n if ( tableAliases != null ) {\n rightTableAlias = tableAliases.get( relation.getToColumn().getLogicalTable() );\n } else {\n rightTableAlias = relation.getToColumn().getLogicalTable().getId();\n }\n\n join += databaseMeta.quoteField( rightTableAlias );\n join += \".\"; //$NON-NLS-1$\n join += databaseMeta.quoteField( (String) relation.getToColumn().getProperty( SqlPhysicalColumn.TARGET_COLUMN ) );\n } else {\n throw new PentahoMetadataException( Messages.getErrorString(\n \"SqlGenerator.ERROR_0003_INVALID_RELATION\", relation.toString() ) ); //$NON-NLS-1$\n }\n\n return join;\n }", "public EnumerateJoinsRule(JoinEnum joinEnum) {\n this.joinEnum = joinEnum;\n }", "private Combined() {}", "<V1, R> KTable<K, R> leftJoin(KTable<K, V1> other, ValueJoiner<V, V1, R> joiner);", "private LeftJoin convertToLeftJoin(GraphPattern gp, ElementOptional optional) throws SemQAException {\n\t\tGraphPattern right = sparqlToSemQA(optional.getOptionalElement());\r\n\t\treturn new LeftJoin(gp, right);\r\n\t}", "O() { super(null); }", "public void testJoin() {\n\n\t\t\tSystem.out.println(\"\\nSELECT first,last,street,city,state,zip\" + \" FROM people, address\"\n\t\t\t\t\t+ \" WHERE people.addrId = address.addrId\");\n\n\t\t\t// Collection version chains to String[] version,\n\t\t\t// so this code tests both:\n\t\t\tList columns = new ArrayList();\n\t\t\tcolumns.add(\"first\");\n\t\t\tcolumns.add(\"last\");\n\t\t\tcolumns.add(\"street\");\n\t\t\tcolumns.add(\"city\");\n\t\t\tcolumns.add(\"state\");\n\t\t\tcolumns.add(\"zip\");\n\n\t\t\tList tables = new ArrayList();\n\t\t\ttables.add(address);\n\n\t\t\tTable result = // WHERE people.addrID = address.addrID\n\t\t\t\t\tpeople.select(new Selector.Adapter() {\n\t\t\t\t\t\tpublic boolean approve(Cursor[] tables) {\n\t\t\t\t\t\t\treturn tables[0].column(\"addrId\").equals(tables[1].column(\"addrId\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t}, columns, tables);\n\n\t\t\tprint(result);\n\t\t\tSystem.out.println(\"\");\n\n\t\t\t// Now test a three-way join\n\t\t\t//\n\t\t\tSystem.out.println(\"\\nSELECT first,last,street,city,state,zip,text\" + \" FROM people, address, third\"\n\t\t\t\t\t+ \" WHERE (people.addrId = address.addrId)\" + \" AND (people.addrId = third.addrId)\");\n\n\t\t\tTable third = TableFactory.create(\"third\", new String[] { \"addrId\", \"text\" });\n\t\t\tthird.insert(new Object[] { \"1\", \"addrId=1\" });\n\t\t\tthird.insert(new Object[] { \"2\", \"addrId=2\" });\n\n\t\t\tresult = people.select(new Selector.Adapter() {\n\t\t\t\tpublic boolean approve(Cursor[] tables) {\n\t\t\t\t\treturn (tables[0].column(\"addrId\").equals(tables[1].column(\"addrId\"))\n\t\t\t\t\t\t\t&& tables[0].column(\"addrId\").equals(tables[2].column(\"addrId\")));\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t\t\tnew String[] { \"last\", \"first\", \"state\", \"text\" }, new Table[] { address, third });\n\n\t\t\tSystem.out.println(result.toString() + \"\\n\");\n\t\t}", "public MultiKey() {}", "IDbQuery<R> setStraightJoin(boolean straightJoin);", "public ARecord() {\n super(A.A);\n }", "private static void DoJoin()\n\t{\n\n\t\tArrayList<Attribute> inAttsRight = new ArrayList<Attribute>();\n\t\tinAttsRight.add(new Attribute(\"Int\", \"o_orderkey\"));\n\t\tinAttsRight.add(new Attribute(\"Int\", \"o_custkey\"));\n\t\tinAttsRight.add(new Attribute(\"Str\", \"o_orderstatus\"));\n\t\tinAttsRight.add(new Attribute(\"Float\", \"o_totalprice\"));\n\t\tinAttsRight.add(new Attribute(\"Str\", \"o_orderdate\"));\n\t\tinAttsRight.add(new Attribute(\"Str\", \"o_orderpriority\"));\n\t\tinAttsRight.add(new Attribute(\"Str\", \"o_clerk\"));\n\t\tinAttsRight.add(new Attribute(\"Int\", \"o_shippriority\"));\n\t\tinAttsRight.add(new Attribute(\"Str\", \"o_comment\"));\n\n\t\tArrayList<Attribute> inAttsLeft = new ArrayList<Attribute>();\n\t\tinAttsLeft.add(new Attribute(\"Int\", \"c_custkey\"));\n\t\tinAttsLeft.add(new Attribute(\"Str\", \"c_name\"));\n\t\tinAttsLeft.add(new Attribute(\"Str\", \"c_address\"));\n\t\tinAttsLeft.add(new Attribute(\"Int\", \"c_nationkey\"));\n\t\tinAttsLeft.add(new Attribute(\"Str\", \"c_phone\"));\n\t\tinAttsLeft.add(new Attribute(\"Float\", \"c_acctbal\"));\n\t\tinAttsLeft.add(new Attribute(\"Str\", \"c_mktsegment\"));\n\t\tinAttsLeft.add(new Attribute(\"Str\", \"c_comment\"));\n\n\t\tArrayList<Attribute> outAtts = new ArrayList<Attribute>();\n\t\toutAtts.add(new Attribute(\"Str\", \"att1\"));\n\t\toutAtts.add(new Attribute(\"Int\", \"att2\"));\n\t\toutAtts.add(new Attribute(\"Int\", \"att3\"));\n\t\toutAtts.add(new Attribute(\"Str\", \"att4\"));\n\t\toutAtts.add(new Attribute(\"Int\", \"att5\"));\n\n\t\tArrayList<String> leftHash = new ArrayList<String>();\n\t\tleftHash.add(\"c_custkey\");\n\n\t\tArrayList<String> rightHash = new ArrayList<String>();\n\t\trightHash.add(\"o_custkey\");\n\n\t\tString selection = \"right.o_custkey == left.c_custkey && right.o_custkey > Int (1000)\";\n\n\t\tHashMap<String, String> exprs = new HashMap<String, String>();\n\t\texprs.put(\"att1\", \"right.o_comment + Str(\\\" \\\") + left.c_comment\");\n\t\texprs.put(\"att2\", \"right.o_custkey\");\n\t\texprs.put(\"att3\", \"left.c_custkey\");\n\t\texprs.put(\"att4\", \"left.c_name\");\n\t\texprs.put(\"att5\", \"right.o_orderkey\");\n\n\t\t// run the join\n\t\ttry\n\t\t{\n\t\t\tnew Join(inAttsLeft, inAttsRight, outAtts, leftHash, rightHash, selection, exprs, \"customer.tbl\", \"orders.tbl\",\n\t\t\t\t\t\"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\n\t}", "public void setup(Context context) {\n\t\t\tjoinType = context.getConfiguration().get(\"join.type\");\n\t\t}", "public LineJoinEnum getLineJoin(\n )\n {return lineJoin;}", "public RelationshipElement ()\n\t{\n\t\tthis(null, null);\n\t}", "default <U, G, V, H> EntityMapper<V, H> join(EntityMapper<U, G> secondMapper, List<Condition> onConditions, BiFunction<T, U, V> composeEntity, Function<H, Pair<F, G>> decomposeFilter, JoinType joinType) {\n\t\treturn new JoinEntityMapper(this, secondMapper, onConditions, composeEntity, decomposeFilter, joinType);\n\t}", "public GmsHeader(byte type, JoinRsp join_rsp) {\n this.type=type;\n this.join_rsp=join_rsp;\n }", "public final AstValidator.join_clause_return join_clause() throws RecognitionException {\n join_clause_stack.push(new join_clause_scope());\n AstValidator.join_clause_return retval = new AstValidator.join_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 JOIN324=null;\n AstValidator.join_sub_clause_return join_sub_clause325 =null;\n\n AstValidator.join_type_return join_type326 =null;\n\n AstValidator.partition_clause_return partition_clause327 =null;\n\n\n CommonTree JOIN324_tree=null;\n\n\n ((join_clause_scope)join_clause_stack.peek()).arity = 0;\n\n try {\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:517:2: ( ^( JOIN join_sub_clause ( join_type )? ( partition_clause )? ) )\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:517:4: ^( JOIN join_sub_clause ( join_type )? ( partition_clause )? )\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 JOIN324=(CommonTree)match(input,JOIN,FOLLOW_JOIN_in_join_clause2736); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n JOIN324_tree = (CommonTree)adaptor.dupNode(JOIN324);\n\n\n root_1 = (CommonTree)adaptor.becomeRoot(JOIN324_tree, root_1);\n }\n\n\n match(input, Token.DOWN, null); if (state.failed) return retval;\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_join_sub_clause_in_join_clause2738);\n join_sub_clause325=join_sub_clause();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_1, join_sub_clause325.getTree());\n\n\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:517:28: ( join_type )?\n int alt92=2;\n int LA92_0 = input.LA(1);\n\n if ( (LA92_0==QUOTEDSTRING) ) {\n alt92=1;\n }\n switch (alt92) {\n case 1 :\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:517:28: join_type\n {\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_join_type_in_join_clause2740);\n join_type326=join_type();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_1, join_type326.getTree());\n\n\n if ( state.backtracking==0 ) {\n }\n }\n break;\n\n }\n\n\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:517:39: ( partition_clause )?\n int alt93=2;\n int LA93_0 = input.LA(1);\n\n if ( (LA93_0==PARTITION) ) {\n alt93=1;\n }\n switch (alt93) {\n case 1 :\n // /home/hoang/DATA/WORKSPACE/trunk0408/src/org/apache/pig/parser/AstValidator.g:517:39: partition_clause\n {\n _last = (CommonTree)input.LT(1);\n pushFollow(FOLLOW_partition_clause_in_join_clause2743);\n partition_clause327=partition_clause();\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) \n adaptor.addChild(root_1, partition_clause327.getTree());\n\n\n if ( state.backtracking==0 ) {\n }\n }\n break;\n\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 join_clause_stack.pop();\n }\n return retval;\n }", "@Test\n\tpublic void join(){\n\t\t\n\t\tCriteriaBuilder criteriaBuilder = em.getCriteriaBuilder();\n\t\tCriteriaQuery<Course> criteriaQuery = criteriaBuilder.createQuery(Course.class);\n\t\t\n\t\t\n\t\t// Define roots\n\t\tRoot<Course> courseRoot = criteriaQuery.from(Course.class);\n\t\t\n\t\t// Define Predicate\n\t\tJoin<Object, Object> join = courseRoot.join(\"students\");\n\t\t\n\t\t// Add Predicate\n\t\n\t\t//5. Defined Typed Query\n\t\t\t\tTypedQuery<Course> query = em.createQuery(criteriaQuery.select(courseRoot));\n\t\t\t\t\n\t\t\t\tList<Course> resultList = query.getResultList();\n\t\t\t\t\n\t\t\t\tlogger.info(\"JOINED COURSES ==> {}\", resultList);\n\t\t\t\t\t\n\t}", "public Relation join(Relation r, Condition c, String name) throws RelationException;", "private SCTeamJoinResult(com.google.protobuf.GeneratedMessage.Builder<?> builder) {\n super(builder);\n this.unknownFields = builder.getUnknownFields();\n }", "public Link() {\n }", "@Override\n\tpublic String getJoinTable() {\n\t\treturn null;\n\t}", "@Override public List<Node> visitJoin(@NotNull XQueryParser.JoinContext ctx) {\n\t\tHashMap<String, List<Node>> hashJoin = new HashMap<String, List<Node>>();\n\t\tList<Node> result = new ArrayList<Node>();\n\t\tList<Node> left = new ArrayList<Node>(visit(ctx.query(0)));\n\t\tList<Node> right = new ArrayList<Node>(visit(ctx.query(1)));\n\t\tList<String> latt = transform(ctx.attrs(0));\n\t\tList<String> ratt = transform(ctx.attrs(1));\n\t\t\n\t\tif(latt.isEmpty()){\n\t\t\tfor(Node lnode : left){\n\t\t\t\tfor(Node rnode: right){\n\t\t\t\t\tElement container = doc.createElement(\"tuple\");\n\t\t\t\t\tList<Node> child = findChild(lnode);\n\t\t\t\t\tchild.addAll(findChild(rnode));\n\t\t\t\t\tfor(Node childNode: child){\n\t\t\t\t\t\tcontainer.appendChild(doc.importNode(childNode, true));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t\t\n\t\tList<Node> small = left.size() < right.size() ? left : right,\n\t\t\t\tlarge = left.size() < right.size() ? right : left;\n\t\tList<String> smatt = left.size() < right.size() ? latt : ratt,\n\t\t\t\tlgatt = left.size() < right.size() ? ratt : latt;\n\t\t\n\t\t// store into hash map\n\t\tfor(Node smnode : small){\n\t\t\tString key = convertChildren(smnode, smatt);\n\t\t\tif(hashJoin.containsKey(key)){\n\t\t\t\thashJoin.get(key).add(smnode);\n\t\t\t} else hashJoin.put(key, new ArrayList<Node>(Arrays.asList(smnode)));\n\t\t}\n\t\t\n\t\t// actual join operation\n\t\tfor(Node lgnode : large){\n\t\t\tString attributes = convertChildren(lgnode, lgatt);\n\t\t\tif(hashJoin.containsKey(attributes)){\n\t\t\t\tfor(Node smnode : hashJoin.get(attributes)){\n\t\t\t\t\tElement container = doc.createElement(\"tuple\");\n\t\t\t\t\tList<Node> child = findChild(smnode);\n\t\t\t\t\tchild.addAll(findChild(lgnode));\n\t\t\t\t\tfor(Node childnode: child){\n\t\t\t\t\t\tcontainer.appendChild(doc.importNode(childnode, true));\n\t\t\t\t\t}\n\t\t\t\t\tresult.add(container);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "@Override\r\n\tpublic void join() {\n\r\n\t}", "private PushProjectIntoMultiJoinRule()\n {\n super(\n new RelOptRuleOperand(\n ProjectRel.class,\n new RelOptRuleOperand(MultiJoinRel.class, ANY)));\n }", "public void addJoinIfNotPresent(String joinPart) {\r\n\t\tif (this.joins.toLowerCase().indexOf(joinPart.toLowerCase())==-1) {\r\n\t\t\taddJoinOn(joinPart);\r\n\t\t}\r\n\t}", "public void setJoined() {\n\t\tstate = State.JOINED;\n\t}", "protected void sequence_FULL_INNER_JOIN_LEFT_OUTER_RIGHT_joins(ISerializationContext context, joins semanticObject) {\n\t\tgenericSequencer.createSequence(context, semanticObject);\n\t}", "protected abstract Object calcJoinRow();", "public Builder() {\n this(Graphs.<N, E>createUndirected());\n }", "defaultConstructor(){}", "private Link() {\n }", "public String toString() {\n\t\treturn \"JoinTableSpec(\"+leftTable.toString()+\" INNER JOIN \"+rightTable.toString()\n\t\t\t\t+\" ON \"+leftCell.toString()+\" = \"+rightCell.toString()+\")\";\n\t}", "public Value join(Value v) {\n return join(v, false);\n }", "public Boolean getIsJoin () {\r\n\t\treturn isJoin;\r\n\t}", "private void constructJoins(CriteriaBuilderImpl cb, AbstractCriteriaQueryImpl<?> q, RootImpl<Object> r, Tree joins) {\n \t\tfor (int i = 0; i < joins.getChildCount(); i++) {\n \t\t\tfinal Tree join = joins.getChild(i);\n \n \t\t\tJoinType joinType = JoinType.INNER;\n \n \t\t\tfinal int joinSpecification = join.getChild(0).getType();\n \t\t\tint offset = 0;\n \n \t\t\tif (joinSpecification == JpqlParser.INNER) {\n \t\t\t\toffset = 1;\n \t\t\t\tjoinType = JoinType.INNER;\n \t\t\t}\n \t\t\telse if (joinSpecification == JpqlParser.LEFT) {\n \t\t\t\toffset = 1;\n \t\t\t\tjoinType = JoinType.LEFT;\n \t\t\t}\n \n \t\t\tif (join.getChildCount() == (offset + 3)) {\n \t\t\t\tFetchParent<?, ?> parent = this.getAliased(q, join.getChild(offset).getText());\n \n \t\t\t\tfinal Qualified qualified = new Qualified(join.getChild(offset + 1).getChild(0));\n \n \t\t\t\tfor (final String segment : qualified.getSegments()) {\n \t\t\t\t\tparent = parent.fetch(segment, joinType);\n \t\t\t\t}\n \t\t\t}\n \t\t\telse {\n \t\t\t\tAbstractFrom<?, ?> parent = this.getAliased(q, join.getChild(offset).getText());\n \n \t\t\t\tfinal Aliased aliased = new Aliased(join.getChild(offset + 1));\n \n \t\t\t\tint depth = 0;\n \t\t\t\tfor (final String segment : aliased.getQualified().getSegments()) {\n \t\t\t\t\tif ((depth > 0) && (parent instanceof PluralJoin)) {\n \t\t\t\t\t\tthrow new PersistenceException(\"Cannot qualify, only embeddable joins within the path allowed, \" + \"line \" + join.getLine() + \":\"\n \t\t\t\t\t\t\t+ join.getCharPositionInLine());\n \t\t\t\t\t}\n \n \t\t\t\t\tparent = parent.join(segment, joinType);\n \n \t\t\t\t\tdepth++;\n \t\t\t\t}\n \n \t\t\t\tthis.putAlias(q, join.getChild(1), aliased, parent);\n \t\t\t}\n \t\t}\n \t}", "@Override\n public boolean supportsRootTreatTreatJoin() {\n return true;\n }", "public FetchJoinInformation(String property) {\n\t\tthis(property, JoinType.LEFT);\n\t}", "void DefaultConstructor(){}", "@Override\n public ActualProperties visitIndexJoin(IndexJoinNode node, List<ActualProperties> inputProperties)\n {\n ActualProperties probeProperties = inputProperties.get(0);\n ActualProperties indexProperties = inputProperties.get(1);\n\n switch (node.getType()) {\n case INNER:\n return ActualProperties.builderFrom(probeProperties)\n .constants(ImmutableMap.<VariableReferenceExpression, ConstantExpression>builder()\n .putAll(probeProperties.getConstants())\n .putAll(indexProperties.getConstants())\n .build())\n .build();\n case SOURCE_OUTER:\n return ActualProperties.builderFrom(probeProperties)\n .constants(probeProperties.getConstants())\n .build();\n default:\n throw new UnsupportedOperationException(\"Unsupported join type: \" + node.getType());\n }\n }", "public static <K, E0, E1> JoinClause<K, E0, E1, E1> onKeys(\n DistributedFunction<E0, K> leftKeyFn,\n DistributedFunction<E1, K> rightKeyFn\n ) {\n return new JoinClause<>(leftKeyFn, rightKeyFn, DistributedFunction.identity());\n }", "public JoinTableSpec(TableSpec leftTable, SimpleTableSpec rightTable, \n\t\t\t\t\t\t CellIDExpression leftCell, CellIDExpression rightCell) {\n\t\tthis.leftTable = leftTable;\n\t\tthis.rightTable = rightTable;\n\t\tthis.leftCell = leftCell;\n\t\tthis.rightCell = rightCell;\n\n\t}", "public AssociationClass(UmlClass lc, Relationship r) {\n\t // Initialize the values\n id = lc.getId();\n logicalClass = lc;\n relationship = r;\n\t}", "public Joins add(Join item)\n {\n Assert.isNotNull(item, \"item argument is expected not be null\");\n \n joins.add(item);\n \n return this;\n }", "public static void exampleStringJoiner() {\n\t\tStringJoiner example1 = new StringJoiner(\",\"); // passing comma(,) as delimiter\r\n\r\n\t\t// Adding values to StringJoiner\r\n\t\texample1.add(\"Rohini Example1\");\r\n\t\texample1.add(\"Alex Example1\");\r\n\t\texample1.add(\"Peter Example1\");\r\n\r\n\t\tSystem.out.println(\"Example 1 - passing comma(,) as delimiter ... \\n\" + example1);\r\n\t\t\r\n\t\t// Example 2 - passing comma(,) and square-brackets (adding prefix and suffix) as delimiter\r\n\t\tStringJoiner example2 = new StringJoiner(\":\", \"[\", \"]\"); // passing comma(,) and square-brackets as delimiter\r\n\r\n\t\t// Adding values to StringJoiner\r\n\t\texample2.add(\"Rohini Example2\");\r\n\t\texample2.add(\"Raheem Example2\");\r\n\t\tSystem.out.println(\"\\nExample 2 - passing comma(:) and square-brackets (adding prefix and suffix) as delimiter ... \\n\" + example2);\r\n\r\n\t\t// Example 3 - Merge Two StringJoiner\r\n\t\tStringJoiner merge = example1.merge(example2);\r\n\t\tSystem.out.println(\"\\nExample 3 - Merge Two StringJoiner ... \\n\" + merge);\r\n\t}", "public Join(final String datasetSchemaName,\n\t\t\t\tfinal String datasetTableName) {\n\t\t\tsuper(datasetSchemaName, datasetTableName);\n\t\t}", "Table noCommonJoin(String name, Table t1, Table t2) {\n {\n String[] names = new String[t1.colSize() + t2.colSize()];\n String[] types = new String[t1.colSize() + t2.colSize()];\n\n System.arraycopy(t1.getColNames(), 0, names, 0, t1.colSize());\n System.arraycopy(t2.getColNames(), 0, names, t1.colSize(), t2.colSize());\n System.arraycopy(t1.getColTypes(), 0, types, 0, t1.colSize());\n System.arraycopy(t2.getColTypes(), 0, types, t1.colSize(), t2.colSize());\n\n Table t = new Table(name, names, types);\n\n for (int i = 0; i < t1.rowSize(); i += 1) {\n for (int j = 0; j < t2.rowSize(); j += 1) {\n t.insertLastRow(t1.combineRows(t2, i, j));\n }\n }\n return t;\n }\n }", "<V1, R> KTable<K, R> outerJoin(KTable<K, V1> other, ValueJoiner<V, V1, R> joiner);", "void joinBill(Bill toJoin);", "public final native void setLineJoin(LineJoin type) /*-{\n\t\tthis.setLineJoin([email protected]::toString()().toLowerCase());\n\t}-*/;", "public interface ISQLiteJoinTableCreator {\n\n}", "public Related() {\n }", "public Join dup (Join self)\n {\n if (self == null)\n return null;\n\n Join copy = new Join ();\n if (self.getIdentity () != null)\n copy.setAddress (self.getIdentity ());\n copy.group = self.group;\n copy.status = self.status;\n return copy;\n }", "public ChainOperator(){\n\n }", "public Relationship() {\r\n\t}", "@VisibleForTesting\n protected void appendJoinOnKeyClause(String leftAlias,\n JoinKey leftKey,\n String rightAlias,\n JoinKey rightKey,\n boolean joinOnNullKeys) {\n // ... ON [left.l1 = right.r1]\n appendEquals(leftAlias, leftKey.getFields().get(0), rightAlias, rightKey.getFields().get(0), joinOnNullKeys);\n\n for (int i = 1; i < leftKey.getFields().size(); i++) {\n // ... [AND left.rN = right.rN]\n builder.append(AND);\n appendEquals(leftAlias, leftKey.getFields().get(i), rightAlias, rightKey.getFields().get(i), joinOnNullKeys);\n }\n }", "private static String constructWhereClauseJoin(List<String> columns, String tableA, String tableB, Boolean joinOnNull) {\n StringJoiner conditions = new StringJoiner(\" AND \");\n String joinString = JOIN_ON_STRING_NO_NULL;\n\n if (joinOnNull) {\n joinString = JOIN_ON_STRING_INCLUDE_NULL;\n }\n\n for (String column : columns) {\n escapedBuilder.setLength(0);\n escapedBuilder.append(\"`\").append(column).append(\"`\");\n conditions.add(\n MessageFormat.format(\n joinString,\n tableA,\n tableB,\n escapedBuilder.toString()\n )\n );\n }\n\n return conditions.toString();\n }", "Merge() {\n //Unused Constructor.\n }" ]
[ "0.73581296", "0.6641393", "0.59737265", "0.58038455", "0.5748439", "0.5715224", "0.55923045", "0.55438167", "0.55385196", "0.54944915", "0.5469369", "0.5466776", "0.5429615", "0.5397894", "0.53788745", "0.5342651", "0.5317834", "0.52280736", "0.52275014", "0.5222268", "0.518591", "0.5179123", "0.51625216", "0.51334214", "0.5123673", "0.5119607", "0.5094825", "0.5049701", "0.50392693", "0.50354576", "0.5026625", "0.501671", "0.50154597", "0.50044256", "0.49991763", "0.49839547", "0.49713477", "0.49707115", "0.4959697", "0.49556434", "0.49312767", "0.49148956", "0.48863095", "0.48823485", "0.48614076", "0.48544276", "0.4826724", "0.4815172", "0.4808802", "0.48048607", "0.47905278", "0.47773185", "0.4773524", "0.4758176", "0.47543898", "0.47534522", "0.4746074", "0.47267768", "0.47251755", "0.4720944", "0.47164738", "0.47154033", "0.4713356", "0.47112072", "0.47077388", "0.47074625", "0.47034204", "0.46874076", "0.46873876", "0.46865088", "0.46849507", "0.46844083", "0.46795434", "0.46741098", "0.46732917", "0.4670477", "0.46652812", "0.46633148", "0.4654747", "0.4640596", "0.46379977", "0.46379194", "0.46345857", "0.4632663", "0.46324512", "0.46312147", "0.46292034", "0.4629083", "0.46287653", "0.46283835", "0.46219206", "0.46166646", "0.46121594", "0.46021217", "0.4601016", "0.45977688", "0.4592647", "0.45841336", "0.4579363", "0.45765415" ]
0.5090748
27
replace name, access and super type
@Override public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) { super.visit(version, Constants.ACC_PUBLIC, className, (String)null, this.superType.getInternalName(), interfaces); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void visit(int version, int access, String name, String signature,\n String superName, String[] interfaces) {\n //if (cv != null) {\n //cv.visit(version, access, name, signature, superName, interfaces);\n className = name;\n super.visit(version, access, name, signature, superName, interfaces);\n // in order to get the class name as the owner\n //}\n }", "@Override\n public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) {\n if (!Type.isParameterizedType(name)) {\n frontClassName = name;\n super.visit(COMPILER_VERSION, access, name, signature, superName, interfaces);\n return;\n }\n // The class is anyfied. Cleaning the class frontClassName into the raw frontClassName.\n frontClassName = name;\n String rawName = Type.rawName(name);\n // The inheritance is not handled for anyfied class yet.\n if (superName != null && !superName.equals(\"java/lang/Object\")) {\n throw new IllegalStateException(\"Not inheritance allowed.\");\n }\n super.visit(COMPILER_VERSION, access, rawName, signature, superName, interfaces);\n // Creating the back class inside the any package, by concatenating \"_BackFactory\".\n // Now creating a back factory class, placed inside the package java/any\".\n createBackClassVisitor(COMPILER_VERSION, rawName);\n // Creating an Object field inside the class. It will be used to store the back class at runtime.\n super.visitField(Opcodes.ACC_PUBLIC + Opcodes.ACC_FINAL, BACK_FIELD, \"Ljava/lang/Object;\", null, null);\n createFrontSpecializationConstructor(rawName);\n }", "protected abstract void registerSuperTypes();", "public interface ReplacerType {\n\n String getPrefix();\n\n String getName();\n}", "@Override\n public Void visitTypeVariable(TypeVariable t, Void aVoid) {\n reflectClass.setName(t.asElement().getSimpleName().toString());\n return super.visitTypeVariable(t, aVoid);\n }", "InstrumentedType.WithFlexibleName subclass(String name, int modifiers, TypeDescription.Generic superClass);", "private String replaceNamesWithType(String filter, String name, String type) {\r\n int pos = filter.indexOf(ALIAS_PREFIX + name);\r\n int lastPos = 0;\r\n StringBuffer sb = new StringBuffer();\r\n\r\n while (pos > -1) {\r\n sb.append(filter.substring(lastPos, pos));\r\n sb.append(\"/\" + type);\r\n lastPos = pos + (ALIAS_PREFIX + name).length();\r\n pos = filter.indexOf(ALIAS_PREFIX + name, lastPos);\r\n }\r\n\r\n sb.append(filter.substring(lastPos));\r\n\r\n return sb.toString();\r\n }", "public void setReferenceTypeName(String newname) throws ValidityException {\n if (this.type != FieldType.OBJECT) {\n throw new ValidityException(\"can't fix up a non-reference field!\");\n }\n String nname = \"L\" + newname.replace('.', '/') + \";\";\n this.classname.value = nname;\n }", "org.apache.geronimo.corba.xbeans.csiv2.tss.TSSGeneralNameType addNewGeneralName();", "public void scanCtNamedElement(CtNamedElement e) {\n ((CtNamedElement) (other)).setSimpleName(e.getSimpleName());\n super.scanCtNamedElement(e);\n }", "public void scanCtReference(CtReference reference) {\n ((CtReference) (other)).setSimpleName(reference.getSimpleName());\n super.scanCtReference(reference);\n }", "public void setSuper(String sSuper)\n {\n ensureLoaded();\n m_clzSuper = (sSuper == null ? (ClassConstant) null : new ClassConstant(sSuper));\n setModified(true);\n }", "private void swapNameType(Properties props, String newType, String newName) {\n String oldType = props.getProperty(ObjectNames.kMonitoringClassName);\n String oldName = props.getProperty(ObjectNames.kNameKeyName);\n props.put(ObjectNames.kMonitoringClassName, newType);\n props.put(ObjectNames.kNameKeyName, newName);\n props.put(oldType, oldName);\n }", "@Override\n\tpublic String updateTypeName(int typeid, String typename) {\n\t\treturn ftb.updateTypeName(typeid, typename);\n\t}", "@Override\n\tpublic void visit(int version, int access, String name, String signature, String superName, String[] interfaces) {\n\t\tthis.resultReady = false;\n\t\tparsingClass = new Clazz(name, superName, interfaces);\n\t}", "public void setSubtype(typekey.LocationNamedInsured value);", "private void fixType(NameInfo name1Info, NameInfo name2Info) {\n\t\tString type1 = name1Info.getType();\n\t\tString type2 = name2Info.getType();\n//\t\tString name1 = name1Info.getName();\n//\t\tString name2 = name2Info.getName();\n\t\t\n\t\tif (!name1Info.isEnforced() && !name2Info.isEnforced()) {\n\t\t\tfixLoc(name1Info);\n\t\t\tfixLoc(name2Info);\n\t\t\tfixOrg(name1Info);\n\t\t\tfixOrg(name2Info);\n\t\t\tfixPeople(name1Info);\n\t\t\tfixPeople(name2Info);\n\t\t\tString longName = \"\";\n\t\t\tString shortName = \"\";\n\t\t\tif ((name1Info.getName()).length() >= (name2Info.getName()).length()) {\n\t\t\t\tlongName = name1Info.getName();\n\t\t\t\tshortName = name2Info.getName();\n\t\t\t} else {\n\t\t\t\tlongName = name2Info.getName();\n\t\t\t\tshortName = name1Info.getName();\n\t\t\t}\n\t\t\tif (acroMan.isAcronymFirstLetters(shortName, longName)) {\n\t\t\t\tname1Info.setType(\"ORG\");\n\t\t\t\tname2Info.setType(\"ORG\");\n\t\t\t}\n\t\t}\n\t\t\n\t\ttype1 = name1Info.getType();\n\t\ttype2 = name2Info.getType();\n\t\t\n\t\tif (!type1.equals(NameInfo.GENERIC_TYPE) && !type2.equals(NameInfo.GENERIC_TYPE) && !type1.equals(type2)){\n\t\t\tscoreShingle = 0.0f;\n\t\t\tscore = 0.0f;\n\t\t\treason = \"Types \" + type1 + \" and \" + type2 + \" cannot be compared\";\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif (type1.equals(NameInfo.GENERIC_TYPE) && !type2.equals(NameInfo.GENERIC_TYPE)) {\n\t\t\ttype1 = type2;\n\t\t\tname1Info.setType(type1);\n\t\t} else if (type2.equals(NameInfo.GENERIC_TYPE) && !type1.equals(NameInfo.GENERIC_TYPE)) {\n\t\t\ttype2 = type1;\n\t\t\tname2Info.setType(type2);\n\t\t}\n\t}", "private void fixOrg(NameInfo nameInfo){\n\t\tString type = nameInfo.getType();\n\t\tif (type.equals(NameInfo.GENERIC_TYPE)) {\n\t\t\tString name = nameInfo.getName();\n\t\t\tif (orgMan.isValidOrg(name))\n\t\t\t\tnameInfo.setType(\"ORG\");\n\t\t}\n\t}", "public abstract String getTypeName();", "@Override\n public String getType() {\n return super.getType().toLowerCase();\n }", "@Override\n\tpublic void name() {\n\t\t\n\t}", "@Override\n\tpublic void name() {\n\t\t\n\t}", "@Override\n\tpublic void type() {\n\t\t\n\t}", "private String replaceFullNameWithConstructor(String typeName) {\r\n\t\tint pos = typeName.lastIndexOf('.');\r\n\t\treturn JavascriptKeywords.CONSTRUCTOR + typeName.substring(pos);\r\n\t}", "private AccessType(String rtCode) {\n\t this.rtCode = rtCode;\n\t}", "private String cleanLine(String line) {\n line = line.replace(\"class\", \"class\");\n line = line.replace(\"abstract class\", \"abstract class\");\n line = line.replace(\"enum\", \"enum\");\n return line;\n }", "@Override\n public String getType() {\n return this.name; \n }", "protected abstract void setMyName(String name);", "@Override\n public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) {\n cv.visit(Opcodes.V1_2, access, name, signature, superName, interfaces);\n }", "public $type $name () {\n }", "private void fixLoc(NameInfo nameInfo){\n\t\tString type = nameInfo.getType();\n\t\tif (type.equals(NameInfo.GENERIC_TYPE)) {\n\t\t\tString name = nameInfo.getName();\n\t\t\tif (locMan.isValidLocation(name))\n\t\t\t\tnameInfo.setType(\"LOC\");\n\t\t}\n\t}", "@Override\n protected String getSuperType() {\n return Federator.class.getSimpleName();\n }", "char[] getSuperclassName();", "@Override\n public String getType()\n {\n return \"OO\";\n }", "public final void setName(final GenericName name) {\n this.value = name.toString();\n final NameSpace scope = name.scope();\n if (scope != null && !scope.isGlobal()) {\n codeSpace = scope.name().toString();\n }\n }", "@Override\n public void setName(String name) {\n\n }", "@Override\n\t/**\n\t * sets the abstract or final or neither modifiers for the specific class\n\t * \n\t * @param s \n\t */\n\tpublic void setHierarchy(String s) {\n\t\thierarchy = s;\n\n\t}", "public BaseFeat(String inName)\n {\n super(inName, TYPE);\n }", "void addTypes(EntryRep bits) {\n\tString classFor = bits.classFor();\n\tString[] superclasses = bits.superclasses();\n\n\t//The given EntryRep will add its className to the\n\t//subtype list of all its supertypes.\n\n\tString prevClass = classFor;\n\tfor (int i = 0; i < superclasses.length; i++) {\n\t if (!addKnown(superclasses[i], prevClass)) {\n\t\treturn;\n\t }\n\t prevClass = superclasses[i];\n\t}\n\n\t// If we are here prevClass must have java.Object as its\n\t// direct superclass (we don't store \"java.Object\" in\n\t// EntryRep.superclasses since that would be redundant) and\n\t// prevClass is not already in the the tree. Place it in the\n\t// \"net.jini.core.entry.Entry\" bucket so it does not get lost\n\t// if it does not have any sub-classes.\n\t//\n\t// Fix suggested by Lutz Birkhahn <[email protected]>\n\taddKnown(ROOT, prevClass);\n }", "public void setName(String name)\n/* */ {\n/* 368 */ this.name = name;\n/* 369 */ this.fullName = name;\n/* 370 */ this.namespace = null;\n/* */ }", "@Override\n public void setName(String name) {\n \n }", "EPREFIX_TYPE getSuperType();", "private JavaType(String name) {\n this.name = name;\n }", "public interface Type extends DeclarationContainer, DeclarationWithType {\n\n public default boolean newSubtypeOf(Type other) throws LookupException {\n return sameAs(other);\n }\n\n @Override\n default SelectionResult<Declaration> updatedTo(Declaration declaration) {\n return DeclarationWithType.super.updatedTo(declaration);\n }\n\n @Override\n default List<? extends DeclarationContainerRelation> relations() throws LookupException {\n \treturn inheritanceRelations();\n }\n\n public default void accumulateSuperTypeJudge(SuperTypeJudge judge) throws LookupException {\n judge.add(this);\n List<Type> temp = getProperDirectSuperTypes();\n for(Type type:temp) {\n Type existing = judge.get(type);\n if(existing == null) {\n type.accumulateSuperTypeJudge(judge);\n }\n }\n }\n\n\n /**\n * Find the super type with the same base type as the given type.\n * \n * @param type The type with the same base type as the requested super type.\n * @return A super type of this type that has the same base type as the given\n * type. If there is no such super type, null is returned.\n * @throws LookupException\n */\n public default Type getSuperTypeWithSameBaseTypeAs(Type type) throws LookupException {\n return superTypeJudge().get(type);\n }\n\n public SuperTypeJudge superTypeJudge() throws LookupException;\n\n public void accumulateAllSuperTypes(Set<Type> acc) throws LookupException;\n\n public void newAccumulateAllSuperTypes(Set<Type> acc) throws LookupException;\n\n public void newAccumulateSelfAndAllSuperTypes(Set<Type> acc) throws LookupException;\n\n\n public Set<Type> getSelfAndAllSuperTypesView() throws LookupException;\n\n public abstract List<InheritanceRelation> explicitNonMemberInheritanceRelations();\n\n public <I extends InheritanceRelation> List<I> explicitNonMemberInheritanceRelations(Class<I> kind);\n\n public List<InheritanceRelation> implicitNonMemberInheritanceRelations();\n\n public default void reactOnDescendantAdded(Element element) {}\n\n public default void reactOnDescendantRemoved(Element element) {}\n\n public default void reactOnDescendantReplaced(Element oldElement, Element newElement) {}\n\n /**\n * Return the fully qualified name.\n * @throws LookupException \n */\n /*@\n\t @ public behavior\n\t @\n\t @ getPackage().getFullyQualifiedName().equals(\"\") ==> \\result == getName();\n\t @ ! getPackage().getFullyQualifiedName().equals(\"\") == > \\result.equals(getPackage().getFullyQualifiedName() + getName());\n\t @*/\n public String getFullyQualifiedName();\n\n /*******************\n * LEXICAL CONTEXT \n *******************/\n\n @Override\n public LocalLookupContext<?> targetContext() throws LookupException;\n\n @Override\n public LookupContext localContext() throws LookupException;\n\n /**\n * If the given element is an inheritance relation, the lookup must proceed to the parent. For other elements,\n * the context is a lexical context connected to the target context to perform a local search.\n * @throws LookupException \n */\n @Override\n public LookupContext lookupContext(Element element) throws LookupException;\n\n public List<ParameterBlock<?>> parameterBlocks();\n\n public <P extends Parameter> ParameterBlock<P> parameterBlock(Class<P> kind);\n\n public void addParameterBlock(ParameterBlock<?> block);\n\n public void removeParameterBlock(ParameterBlock<?> block);\n\n public <P extends Parameter> List<P> parameters(Class<P> kind);\n\n /**\n * Indices start at 1.\n */\n public <P extends Parameter> P parameter(Class<P> kind, int index);\n\n public <P extends Parameter> int nbTypeParameters(Class<P> kind);\n\n public <P extends Parameter> void addParameter(Class<P> kind,P parameter);\n\n public <P extends Parameter> void addAllParameters(Class<P> kind,Collection<P> parameter);\n\n public <P extends Parameter> void replaceParameter(Class<P> kind, P oldParameter, P newParameter);\n\n public <P extends Parameter> void replaceAllParameters(Class<P> kind, List<P> newParameters);\n\n /************************\n * BEING A TYPE ELEMENT *\n ************************/\n\n public List<Declaration> getIntroducedMembers();\n\n /**********\n * ACCESS *\n **********/\n\n /**\n * Add the given element to this type.\n * \n * @throws ChameleonProgrammerException\n * The given element could not be added. E.g when you try to add\n * an element to a computed type.\n */\n /*@\n\t @ public behavior\n\t @\n\t @ pre element != null;\n\t @\n\t @ post directlyDeclaredElements().contains(element);\n\t @*/\n public void add(Declarator element) throws ChameleonProgrammerException;\n\n /**\n * Remove the given element to this type.\n * \n * @throws ChameleonProgrammerException\n * The given element could not be added. E.g when you try to add\n * an element to a computed type.\n */\n /*@\n\t @ public behavior\n\t @\n\t @ pre element != null;\n\t @\n\t @ post ! directlyDeclaredElements().contains(element);\n\t @*/\n public void remove(Declarator element) throws ChameleonProgrammerException;\n\n /**\n * Add all type elements in the given collection to this type.\n * @param elements\n * @throws ChameleonProgrammerException\n */\n /*@\n\t @ public behavior\n\t @\n\t @ pre elements != null;\n\t @ pre !elements.contains(null);\n\t @\n\t @ post directlyDeclaredElements().containsAll(elements);\n\t @*/\n public default void addAll(Collection<? extends Declarator> elements) {\n \telements.forEach(e -> add(e));\n }\n\n /**************\n * SUPERTYPES *\n **************/\n\n /**\n * Return the proper direct super types of this type. A proper super type is a super type\n * that is not equal to this type. A direct super type is a super type that is specified\n * by an inheritance relation of this type, or this type.\n * \n * @return A list containing the direct super types of this type.\n * @throws LookupException The type of an inheritance relation could not be resolved.\n */\n public default List<Type> getProperDirectSuperTypes() throws LookupException {\n\t\tList<Type> result = Lists.create();\n\t\tfor(InheritanceRelation element:inheritanceRelations()) {\n\t\t\tType type = element.superType();\n\t\t\tif (type!=null) {\n\t\t\t\tresult.add(type);\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}\n\n public Set<Type> getAllSuperTypes() throws LookupException;\n\n public default boolean contains(Type other, TypeFixer trace) throws LookupException {\n return sameAs(other, trace);\n }\n \n public default boolean subtypeOf(Type other) throws LookupException {\n return subtypeOf(other, new TypeFixer());\n }\n\n public default boolean subtypeOf(Type other, TypeFixer trace) throws LookupException {\n TypeFixer clone = trace.clone();\n boolean result = sameAs(other,clone);\n if(! result) {\n clone = trace.clone();\n result = uniSubtypeOf(other,clone);\n if(! result) {\n result = other.uniSupertypeOf(this, trace);\n }\n }\n return result;\n }\n\n public default boolean uniSupertypeOf(Type type, TypeFixer trace) throws LookupException {\n return false;\n }\n\n public default boolean uniSubtypeOf(Type other, TypeFixer trace) throws LookupException {\n Type sameBase = getSuperTypeWithSameBaseTypeAs(other);\n return sameBase != null && sameBase.compatibleParameters(other, trace);\n }\n\n /**\n * Check if this type is assignable to another type.\n * \n * @param other\n * @return\n * @throws LookupException\n */\n /*@\n\t @ public behavior\n\t @\n\t @ post \\result == equals(other) || subTypeOf(other);\n\t @*/\n public boolean assignableTo(Type other) throws LookupException;\n\n /**\n * Return the inheritance relations of this type.\n * \n * @throws LookupException \n */\n /*@\n\t @ public behavior\n\t @\n\t @ post \\result != null;\n\t @*/\n public default List<InheritanceRelation> inheritanceRelations() throws LookupException {\n return nonMemberInheritanceRelations();\n }\n\n public List<InheritanceRelation> nonMemberInheritanceRelations();\n\n public <I extends InheritanceRelation> List<I> nonMemberInheritanceRelations(Class<I> kind);\n\n /**\n * Add the give given inheritance relation to this type.\n * @param relation The relation to add. Cannot be null.\n * @throws ChameleonProgrammerException\n * It is not possible to add the given type. E.g. you cannot\n * add an inheritance relation to a computed type.\n */\n /*@\n\t @ public behavior\n\t @\n\t @ pre relation != null;\n\t @ post inheritanceRelations().contains(relation);\n\t @*/\n public void addInheritanceRelation(InheritanceRelation relation);\n\n public void addAllInheritanceRelations(Collection<InheritanceRelation> relations);\n /**\n * Remove the give given inheritance relation from this type.\n * @param relation\n * @throws ChameleonProgrammerException\n * It is not possible to remove the given type. E.g. you cannot\n * remove an inheritance relation to a computed type.\n */\n /*@\n\t @ public behavior\n\t @\n\t @ pre relation != null;\n\t @ post ! inheritanceRelations().contains(relation);\n\t @*/\n public void removeNonMemberInheritanceRelation(InheritanceRelation relation) throws ChameleonProgrammerException;\n\n public void removeAllNonMemberInheritanceRelations();\n\n /**\n * Return the members of the given kind directly declared by this type.\n * @return\n * @throws LookupException \n * @throws \n */\n public <T extends Declaration> List<T> localMembers(final Class<T> kind) throws LookupException;\n\n /**\n * Return the members that are implicitly part of this type, such as default constructors and destructors.\n * @return\n */\n public List<Declaration> implicitMembers();\n\n public <M extends Declaration> List<M> implicitMembers(Class<M> kind);\n\n /**\n * Return the members directly declared by this type. The order of the elements in the list is the order in which they\n * are written in the type.\n * @return\n * @throws LookupException \n */\n public List<Declaration> localMembers() throws LookupException;\n\n public <T extends Declaration> List<T> directlyDeclaredMembers(Class<T> kind);\n\n public <T extends Declaration> List<T> directlyDeclaredMembers(Class<T> kind, ChameleonProperty property);\n\n public List<Declaration> directlyDeclaredMembers();\n\n public <D extends Declaration> List<SelectionResult<D>> members(DeclarationSelector<D> selector) throws LookupException;\n\n public <D extends Declaration> List<? extends SelectionResult<D>> localMembers(DeclarationSelector<D> selector) throws LookupException;\n\n public List<Declaration> members() throws LookupException;\n\n /**\n * Return the members of this class.\n * @param <M>\n * @param kind\n * @return\n * @throws LookupException\n */\n public <M extends Declaration> List<M> members(final Class<M> kind) throws LookupException;\n\n /**\n * DO NOT CONFUSE THIS METHOD WITH localMembers(). This method does not\n * transform type elements into members.\n * \n * FIXME: rename to localDeclarators()\n * \n * @return\n */\n public List<? extends Declarator> directlyDeclaredElements();\n\n public <T extends Declarator> List<T> directlyDeclaredElements(Class<T> kind);\n\n @Override\n public List<? extends Declaration> declarations() throws LookupException;\n\n public Type alias(String name);\n\n public Type intersection(Type type) throws LookupException;\n\n public Type intersectionDoubleDispatch(Type type) throws LookupException;\n\n public Type intersectionDoubleDispatch(IntersectionType type) throws LookupException;\n\n public void replace(Declarator oldElement, Declarator newElement);\n\n public Type baseType();\n\n public default boolean compatibleParameters(Type other, TypeFixer trace) throws LookupException {\n int size = nbTypeParameters(TypeParameter.class);\n boolean result = true;\n for(int i=0; i< size && result;i++) {\n TypeParameter otherParameter = other.parameter(TypeParameter.class, i);\n TypeParameter myParameter = parameter(TypeParameter.class,i);\n result = otherParameter.contains(myParameter, trace.clone());\n }\n return result;\n }\n\n\n public Type union(Type lowerBound) throws LookupException;\n\n public Type unionDoubleDispatch(Type type) throws LookupException;\n\n public Type unionDoubleDispatch(UnionType type) throws LookupException;\n\n public default boolean sameAs(Type other, TypeFixer trace) throws LookupException {\n if(other == this || trace.contains(other, this)) {\n return true;\n }\n TypeFixer newTrace = trace.clone();\n newTrace.add(other, this);\n boolean result = uniSameAs(other,newTrace);\n if(! result) {\n newTrace = trace.clone();\n newTrace.add(other, this);\n result = other.uniSameAs(this,newTrace);\n }\n return result;\n }\n\n /**\n * Check if this type is equal to the given type, taking\n * recursive types into account. If a loop is encountered,\n * that branch of the check will return true: it did not\n * encounter a problem.\n * \n * @param other The type of which we want to check if it is the same as this type.\n * @param fixer The object that will ensure that we can do a fixed point computation.\n * @return\n * @throws LookupException\n */\n public boolean uniSameAs(Type other, TypeFixer fixer) throws LookupException;\n\n /**\n * <p>Return the lower bound of this type.</p>\n * \n * <p> By <b>default</b>, the current object is returned.\n * \n * @return A type representing the lower bound of this type, when consider as an interval.\n * @throws LookupException\n */\n /*@\n @ post \\result != null;\n @ post \\result.subtypeOf(this);\n @*/\n public default Type lowerBound() throws LookupException {\n return this;\n }\n\n /**\n * <p>Return the upper bound of this type.</p>\n * \n * <p> By <b>default</b>, the current object is returned.\n * \n * @return A type representing the upper bound of this type, when consider as an interval.\n * @throws LookupException\n */\n /*@\n @ post \\result != null;\n @ post subtypeOf(\\result);\n @*/\n public default Type upperBound() throws LookupException {\n return this;\n }\n\n /**\n * A name that is strictly for debugging purposes.\n * \n * @return The result is not null.\n */\n public String infoName();\n\n /**\n * Verify whether the this type is a subtype of the given other type. \n * If that is the case, then a valid verification result is returned.\n * Otherwise, a problem is reported. The message of the problem is \n * constructed using the descriptions of the meaning of\n * each type as determined by the arguments.\n * \n * @param type The type for which the subtype relation is verified.\n * @param meaningThisType A textual description of the meaning of this type.\n * @param meaningOtherType A textual description of the meaning of the other type.\n * @param cause The element in which the verification is done.\n * @return\n */\n public Verification verifySubtypeOf(Type type, String meaningThisType, String meaningOtherType, Element cause);\n\n\n /**\n * @return\n */\n public default boolean isWildCard() {\n return false;\n }\n\n}", "public void rename()\n\t{\n\t\t// get the object within the node\n\t\tObject string = this.getUserObject();\n\n\t\t// should always be a string, given the constructor\n\t\tif (string instanceof String)\n\t\t{\n\t\t\tstring = JOptionPane.showInputDialog(\"Enter a New Name\");\n\n\t\t\tif (string != null && string instanceof String)\n\t\t\t{\n\t\t\t\tthis.setUserObject(string);\n\t\t\t\tthis.name = (String) string;\n\t\t\t}\n\t\t}\n\t}", "protected JBuilderRenameClassRefactoring()\n\t{\n\t\tsuper();\n\t}", "public String mangle(String sName);", "@Override\n\tpublic void setName(String name) {\n\t\t\n\t}", "private void suggestsChangingTheFieldOrVariableType(final AnotherClass target) {\n target.transform(stringValue);\n }", "public void method1() {\n\t\t\n\t\tname = \"Fredie\"; // this variable is inherited in class B\n\t\tthis.name = \"Lola\"; // this called the name from the classB, so 1st it was changed to Friedie and than was changed to Lola\n\t\tsuper.name = \"Alexa\"; // will actually call the variable from the class A, and in this case its value has been changed\n\t\t\n\t}", "public void setAccessibleName(String name) {\n // Not supported\n }", "public String methodBase() {\n\t\tString tmp = name;\n\t\ttmp = tmp.replaceFirst(\"^get\", \"\");\n\t\ttmp = tmp.replaceFirst(\"^is\", \"\");\n\t\treturn tmp.substring(0,1).toLowerCase()+tmp.substring(1);\n\t}", "@Override\n protected String className(ClassType t, boolean longform, Locale locale) {\n Symbol sym = t.tsym;\n if (sym.name.length() == 0 && (sym.flags() & COMPOUND) != 0) {\n return OBJECT;\n } else if (sym.name.length() == 0) {\n // Anonymous\n String s;\n ClassType norm = (ClassType) t.tsym.type;\n if (norm == null) {\n s = OBJECT;\n } else if (norm.interfaces_field != null && norm.interfaces_field.nonEmpty()) {\n s = visit(norm.interfaces_field.head, locale);\n } else {\n s = visit(norm.supertype_field, locale);\n }\n return s;\n } else if (longform) {\n String pkg = \"\";\n for (Symbol psym = sym; psym != null; psym = psym.owner) {\n if (psym.kind == PCK) {\n pkg = psym.getQualifiedName().toString();\n break;\n }\n }\n return fullClassNameAndPackageToClass.apply(\n sym.getQualifiedName().toString(),\n pkg\n );\n } else {\n return sym.name.toString();\n }\n }", "@Override\r\n public void setName(String name) {\n }", "public AllButTwoOfAKind( java.lang.String name) \r\n\t{\r\n\t\tsuper(name);\t\r\n\t}", "public void setNametype(Integer nametype) {\r\n this.nametype = nametype;\r\n }", "@Override\n\tpublic void name1() {\n\t\t\n\t}", "@Override\n\tpublic void setTypeName(java.lang.String typeName) {\n\t\t_permissionType.setTypeName(typeName);\n\t}", "public MTNamed(TypeGraph g, String name) {\n super(g);\n myName = name;\n }", "public void renameFactType(FactType ft, String name) throws DuplicateException, ChangeNotAllowedException {\r\n String nameWithCapital = Naming.restyleWithCapital(name);\r\n if (!Naming.isTypeName(nameWithCapital)) {\r\n throw new RuntimeException(\"name doesn't satisfy rules of a type name\");\r\n }\r\n if (ft instanceof ElementsFactType) {\r\n throw new ChangeNotAllowedException(\"name of element fact type should be changed via his collection\");\r\n }\r\n checkIfNameIsUsed(nameWithCapital);\r\n if (nameWithCapital.startsWith(\"_\")) {\r\n throw new ChangeNotAllowedException(\"name of fact type may not be changed \"\r\n + \"to a name starting with an underscore\");\r\n }\r\n\r\n if (ft.isGenerated()) {\r\n FactType related;\r\n if (artificialSingletons.contains(ft)) {\r\n artificialSingletons.remove(ft);\r\n int index = ft.getName().length() - \"Registry\".length();\r\n related = getFactType(ft.getName().substring(0, index) + \"Registration\");\r\n artificialSingletonFactTypes.remove(related);\r\n } else {\r\n artificialSingletonFactTypes.remove(ft);\r\n int index = ft.getName().length() - \"Registration\".length();\r\n related = getFactType(ft.getName().substring(0, index) + \"Registry\");\r\n artificialSingletons.remove(related);\r\n\r\n }\r\n typeRepository.renameFactType(name, ft);\r\n typeRepository.renameFactType(related.getName().substring(1), related);\r\n } else {\r\n typeRepository.renameFactType(nameWithCapital, ft);\r\n }\r\n\r\n fireListChanged();\r\n }", "UserInfo setName(String name);", "private String getAltRegType() { // TODO - fix Register reference hardcoded in reg defines parm default?\n\t\tString firstChar = regProperties.getId().substring(0, 1);\n\t\t// change case of first character in name to create type\n\t\tString regTypeParam;\n\t\tif (firstChar.equals(firstChar.toUpperCase()))\n\t\t regTypeParam = regProperties.getId().replaceFirst(firstChar, firstChar.toLowerCase()); // change to lc\n\t\telse\n\t\t regTypeParam = regProperties.getId().replaceFirst(firstChar, firstChar.toUpperCase()); // change to uc \n\t\tString regBaseType = regProperties.isReplicated()? \"RegisterArray\" : \"Register\";\n\t\treturn regBaseType + \" #(\" + getAltBlockType() + \"::\" + regTypeParam + \")\"; // TODO - make parameterizable, getAddressMapName() + \"_\" + regProperties.getBaseName() + \"_t\" \n\t}", "public void toggleSuperAS() {\n this.isSuperAS = true;\n }", "public abstract void setType();", "@Override\n public String getName() {\n return type.getName();\n }", "@Override\r\n\tpublic void updateName(int eno, String newName) {\n\r\n\t}", "@Override\n\tpublic void setName(String arg0) {\n\n\t}", "public abstract String getObjectType();", "public void setType(String name){\n\t\ttype = name;\n\t}", "ProductType(String name)\n {\n this.name = name;\n }", "private void setThis(RegularMethodInvocation mi, Element replacee, Stack<Variable> variables) throws LookupException {\n NormalMethod method = mi.getElement();\n Type type = method.nearestAncestor(Type.class);\n replacee.replaceWith(eFactory().createNeioNameExpression(getPrefix(type, variables)));\n }", "private void replaceProperties(Node owner, TypeProvider p1, Node p2) {\r\n\t\tml.check(owner);\r\n\t\tfor (TypeUser n : owner.getDescendants_TypeUsers())\r\n\t\t\t// Only do one so the owner remains valid\r\n\t\t\tif (n.setAssignedType(p1) != null)\r\n\t\t\t\tbreak;\r\n\r\n\t\tml.check(owner);\r\n\r\n\t\t((Node) p1).replaceTypesWith((TypeProvider) p2, owner.getLibrary());\r\n\r\n\t\t// Then - check object\r\n\t\tml.check(owner);\r\n\t}", "public TestRenameFieldRefactoring(String name) {\r\n super(name);\r\n }", "@Override abstract public String type();", "public<T> void refreshNut(String name,T type) throws NutsRegisterException;", "protected TypeNode insertForwardedReferenceNode (TypeNode parent, String typeName) \n {\n TypeNode node = null;\n \n\t\tif ( typeName == null || typeName.trim().length() == 0 ) return null;\n\n // Same type may be forwarded ref MULTIPLE TIMES\n node = (TypeNode) _nodesHashtable.get(typeName);\n if (node != null) {\n // BUG !!! This FORWARD reference is already in tree since the caller\n // of this method ALREADY checked that this forward ref IS NOT in tree.\n \n TypeDescription meta = (TypeDescription) ((TypeNode)_nodesHashtable.get(typeName)).getObject();\n if ( meta != null ) {\n // Already defined\n node.setLabel(TypeSystemUtils2.getMyShortName(typeName)); // Use short name\n node.setObject(meta);\n _nodesHashtable.put (((TypeDescription)node.getObject()).getName(), node);\n Trace.err(\"??? BUG -- Already defined for \" + typeName);\n }\n } else {\n // NEW forwarded ref\n node = new TypeNode(parent, UimaToolsUtil.getMyShortName(typeName));\n node.setObjectType(IItemTypeConstants.ITEM_TYPE_TYPE); \n // Not yet defined (Forward reference)\n // Cannot use short name if no TypeDescription object (see TreeBaseNode.compare)\n // Trace.trace(\"Forward reference to \" + typeName);\n // _nodesHashtable.put (node.getLabel(), node);\n _nodesHashtable.put (typeName, node);\n \n // Add to undefined type hashtable\n // _undefinedTypesHashtable.put (node.getLabel(), node);\n _undefinedTypesHashtable.put (typeName, node);\n }\n \t\t\n\t\t// Insert \"node\" as child of \"parent\"\n\t\tTypeNode tempNode;\n\t\tif (parent == null) {\n\t\t if (_rootSuper == null) {\n\t\t _rootSuper = node;\n\t\t } else {\n\t\t\t\tif ( (tempNode = _rootSuper.insertChild(node)) != null ) {\n\t\t\t\t\tif (tempNode != node) {\t\t\t\t \n\t\t\t\t\t\t// Duplicate Label\n // Use full name as label\n\t\t\t\t\t\tTrace.trace(\" 1 Duplicate (short name) Label:\" + node.getLabel());\n//\t\t\t\t\t\tnode.setShowFullName(true);\n\t\t\t\t\t\tif (node.getObject() != null) {\n // Use full name as label\n\t\t\t\t\t\t\tnode.setLabel(((TypeDescription)node.getObject()).getName());\n\t\t\t\t\t\t}\t\t\t\t\n\t\t\t\t\t\t_rootSuper.insertChild(node);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t }\n\t\t} else {\n\t\t\t// parent.insertChild (node);\n\t\t\tif ( (tempNode = parent.insertChild(node)) != null && tempNode != node) {\n\t\t\t\t// Duplicate Label. Use full name as label.\n Trace.trace(\" 2 Duplicate (short name) Label:\" + node.getLabel());\n//\t\t\t\tnode.setShowFullName(true);\n\t\t\t\tif (node.getObject() != null) {\n // Use full name as label\n\t\t\t\t\tnode.setLabel(((TypeDescription)node.getObject()).getName());\n\t\t\t\t}\t\t\t\t\n\t\t\t\tparent.insertChild(node);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn node;\n\t}", "protected abstract void _extends( ClassOutlineImpl derived, ClassOutlineImpl base );", "protected abstract String name ();", "public void setClazzName(String clazz);", "@Override\n\tpublic void rename(String newName) {\n\t\tint lastDot = newName.lastIndexOf('.');\n\t\tif (lastDot == -1) {\n\t\t\tclsInfo.changeShortName(newName);\n\t\t\treturn;\n\t\t}\n\t\tif (isInner()) {\n\t\t\taddWarn(\"Can't change package for inner class: \" + this + \" to \" + newName);\n\t\t\treturn;\n\t\t}\n\t\t// change class package\n\t\tString newPkg = newName.substring(0, lastDot);\n\t\tString newShortName = newName.substring(lastDot + 1);\n\t\tif (changeClassNodePackage(newPkg)) {\n\t\t\tclsInfo.changePkgAndName(newPkg, newShortName);\n\t\t} else {\n\t\t\tclsInfo.changeShortName(newShortName);\n\t\t}\n\t}", "protected abstract void setName(String string);", "public void setName (String newName)\n {\n this.name = newName; \n }", "public void setName(java.lang.String aName);", "public ClassTranslator getSuperclass();", "protected abstract String getName();", "@Override\n public void resolveObjectIdentifier() {\n // if there is only one superclass, we could get the type\n if (!isObjectIDResolved()) {\n String classID = resolveTypeBinding(((SuperMethodInvocation) getASTNode()).getQualifier());\n if ((classID != null) && !classID.equals(\"\")) {\n setResolvedID(classID);\n }\n }\n }", "public String ofType() {\n\t\t return name;\n\t}", "public void setTypeName(java.lang.String value);", "@Override\n public String getName(){\n return Name; \n }", "public interface SRSTet extends Tetromino {\r\n @Override\r\n default String getName() {\r\n return \"SRS \" + getType();\r\n }\r\n}", "protected abstract String getType();", "@Override\n public abstract String getName();", "@Override\n public String getName() {\n return super.getName();\n }", "InstrumentedType.WithFlexibleName represent(TypeDescription typeDescription);", "public void editDataInType(String alias, ArrayList<String> nameForManipulator, ArrayList<Integer> nameIndicator, ArrayList<Integer> classST,\n ArrayList<Integer> superST, ArrayList<String> classString, ArrayList<String> superSting, boolean exist, int id) {\n Type type = dataModel.getType(id);\n dataModel.addDataToType(type, alias, nameForManipulator, nameIndicator, classST, superST, classString, superSting, exist);\n }", "@DSComment(\"Package priviledge\")\n @DSBan(DSCat.DEFAULT_MODIFIER)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:56:28.372 -0500\", hash_original_method = \"E4C63287FA81E5CD749A3DF00B7871AE\", hash_generated_method = \"A395ADC766F313790DA998F5853068A3\")\n \n void nameChanged(String newName){\n \t//Formerly a native method\n \taddTaint(newName.getTaint());\n }", "public static InstrumentedType of(String name, TypeDescription.Generic superClass, int modifiers) {\n return Factory.Default.MODIFIABLE.subclass(name, modifiers, superClass);\n }", "public abstract void setName(String name);", "public abstract void setName(String name);", "private void resolveSuperTypes(AnnotatedType annotatedType, ModelConverterContext context) {\n\n Type type = annotatedType.getType();\n JavaType javaType = objectMapper().getTypeFactory().constructType(type);\n\n // Find the 'furthest' supertype which contributes to the exposed API\n JavaType javaSuperType = javaType.getSuperClass();\n\n SerializationConfig serializationConfig = _mapper.getSerializationConfig();\n AnnotationIntrospector introspector = serializationConfig.getAnnotationIntrospector();\n\n if (javaSuperType != null && !javaSuperType.hasGenericTypes()\n && introspector.findSubtypes(serializationConfig.introspect(javaSuperType).getClassInfo()) != null\n && !definedTypes.containsValue(javaSuperType)) {\n context.resolve(new AnnotatedType().type(javaSuperType).ctxAnnotations(javaSuperType.getRawClass().getAnnotations()));\n }\n }" ]
[ "0.6287457", "0.6189851", "0.61547697", "0.5872287", "0.5805963", "0.5705461", "0.56949764", "0.56166375", "0.5607676", "0.5554277", "0.55068207", "0.5449052", "0.5424247", "0.5417242", "0.5414977", "0.5388299", "0.538427", "0.5364111", "0.5358757", "0.534997", "0.5332266", "0.5332266", "0.53286636", "0.5317624", "0.53173834", "0.53017503", "0.5290869", "0.52845895", "0.5266544", "0.52443844", "0.52407956", "0.52299243", "0.52288276", "0.52264684", "0.5215799", "0.5213363", "0.5190747", "0.51894915", "0.5185858", "0.51815605", "0.5179686", "0.51784885", "0.5165675", "0.5164313", "0.51552224", "0.51489276", "0.5126476", "0.51145494", "0.5106657", "0.51020217", "0.50919056", "0.508815", "0.5087216", "0.50848347", "0.50836986", "0.5083132", "0.50709605", "0.5063087", "0.5051529", "0.5050215", "0.5041014", "0.5038476", "0.50332546", "0.50276315", "0.5027484", "0.5024373", "0.50228995", "0.5020659", "0.5013418", "0.50066185", "0.5002724", "0.5000153", "0.50000125", "0.49973255", "0.49927855", "0.4991722", "0.49893454", "0.49865213", "0.4986097", "0.4985845", "0.49847576", "0.49843448", "0.49809086", "0.49776208", "0.497595", "0.49734372", "0.4964446", "0.49617404", "0.4961636", "0.49452037", "0.49397668", "0.49384168", "0.49368536", "0.4933758", "0.49335846", "0.4933372", "0.49306348", "0.49297032", "0.49297032", "0.4929242" ]
0.62261635
1
consider adding size(); constructor
public MyStack(){ a = new String[10]; top = -1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int size( )\n {\n // Implemented by student.\n }", "@Override\n public int size() { return size; }", "public int size ()\r\n {\r\n }", "public int size() { return this.size; }", "public int size() { return size; }", "public int size() { return size; }", "public int getSize(){return this.size;}", "public int size() { return _size;}", "public abstract int size();", "public abstract int size();", "public abstract int size();", "public abstract int size();", "public abstract int size();", "public abstract int size();", "@Override\n public int size(){\n return size;\n }", "@Override\n int size();", "@Override\r\n \tpublic int size() {\r\n \t\t// TODO\r\n \t\treturn size;\r\n \t}", "@Override\n public int size() {\n return size;\n }", "@Override\n public int size() {\n return size;\n }", "public int size(){\r\n return size;\r\n \r\n }", "public int size() { return 0; }", "public int size(){\n return this.size;\n }", "@Override\n public int size() {\n return _size;\n }", "abstract int size();", "abstract int size();", "public int size(){\n return size;\n }", "@Override\r\n public int size() {\r\n return size;\r\n }", "@Override\r\n public int size() {\r\n return size;\r\n }", "@Override\r\n public int size() {\r\n return size;\r\n }", "public @Override int size() {\n \treturn this.size;\n }", "public int size() { \r\n return size; \r\n }", "public int size() /*@Readonly*/ {\r\n return 0;\r\n }", "@Override\n public int size() {\n return size;\n }", "@Override\n public int size() {\n return size;\n }", "@Override\n public int size() {\n return size;\n }", "@Override\n public int size() {\n return size;\n }", "@Override\n public int size() {\n return size;\n }", "@Override\n public int size() {\n return size;\n }", "@Override\n public int size() {\n return size;\n }", "@Override\n public int size() {\n return size;\n }", "@Override\n public int size() {\n return size;\n }", "@Override\n public int size() {\n return size;\n }", "@Override\n public int size() {\n return size;\n }", "@Override\n public int size() {\n return size;\n }", "@Override\n public int size() {\n return size;\n }", "@Override\n public int size() {\n return size;\n }", "@Override\n public int size() {\n return size;\n }", "public int size() {\n \t return size;\n }", "public int size() { return count; }", "public int size(){return n;}", "public int size(){\n return size;\n }", "public int size(){\n return size;\n }", "public int size(){\n return size;\n }", "public int size(){\n return size;\n }", "public int size(){\n return size;\n }", "public int size(){\n return size;\n }", "@Override\n public int size() {\n return size;\n }", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();", "public int size();" ]
[ "0.76585495", "0.7646229", "0.7605871", "0.75840247", "0.75794756", "0.75794756", "0.74643004", "0.7461015", "0.74567896", "0.74567896", "0.74567896", "0.74567896", "0.74567896", "0.74567896", "0.744774", "0.7416825", "0.73956126", "0.73654073", "0.73654073", "0.7351049", "0.7338776", "0.73154694", "0.7301242", "0.72865146", "0.72865146", "0.7280559", "0.7261319", "0.7261319", "0.7261319", "0.7260759", "0.7247484", "0.72429806", "0.72332215", "0.72332215", "0.72332215", "0.72332215", "0.72332215", "0.72332215", "0.72332215", "0.72332215", "0.72332215", "0.72332215", "0.72332215", "0.72332215", "0.72332215", "0.72332215", "0.72332215", "0.722917", "0.7217878", "0.72171724", "0.72142386", "0.72142386", "0.72142386", "0.72142386", "0.72142386", "0.72142386", "0.72048885", "0.71986187", "0.71986187", "0.71986187", "0.71986187", "0.71986187", "0.71986187", "0.71986187", "0.71986187", "0.71986187", "0.71986187", "0.71986187", "0.71986187", "0.71986187", "0.71986187", "0.71986187", "0.71986187", "0.71986187", "0.71986187", "0.71986187", "0.71986187", "0.71986187", "0.71986187", "0.71986187", "0.71986187", "0.71986187", "0.71986187", "0.71986187", "0.71986187", "0.71986187", "0.71986187", "0.71986187", "0.71986187", "0.71986187", "0.71986187", "0.71986187", "0.71986187", "0.71986187", "0.71986187", "0.71986187", "0.71986187", "0.71986187", "0.71986187", "0.71986187", "0.71986187" ]
0.0
-1
Alle Apartment har en apartment type, og tre rom i seg.
public Apartment(char apartmentType, Room room1, Room room2, Room room3) { this.apartmentType = apartmentType; this.room1 = room1; this.room2 = room2; this.room3 = room3; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\n\t\t\n\t\tApartment apartment1=new Apartment(1,true,2,10,4,\"high entrance\",\"Izmir-Bornova-Kazimdirik Mh.\");\n\t\t\n\t\tApartment apartment2=new Apartment();\n\t\tapartment2.id=2;\n\t\tapartment2.isFurnished=false;\n\t\tapartment2.buildingAge=4;\n\t\tapartment2.numberOfBalcony=1;\n\t\tapartment2.numberOfFloors=3;\n\t\tapartment2.floorLocation=\"fourth\";\n\t\tapartment2.Address=\"Istanbul-Sisli\";\n\t\t\n\t\tApartment apartment3=new Apartment(3,true,1,5,3,\"high entrance\",\"Ankara\");\n\t\t\n\t\tApartment[] apartments= {apartment1,apartment2,apartment3};\n\t\t\n\t\t\n\t\t for (Apartment apartment : apartments) {\n\t\t\tSystem.out.println(apartment.Address);\n\t\t }\n\t\t //\n\t\t EstateAgent agent1=new EstateAgent(1,\"Emlak1\",\"0534 111 11 11\");\n\t\t EstateAgent agent2=new EstateAgent(2,\"Emlak2\",\"0534 222 22 33\");\n\t\t EstateAgent agent3=new EstateAgent(3,\"Emlak3\",\"0534 333 33 33\");\n\t\t \n\t\t EstateAgent[] agents= {agent1,agent2,agent3};\n\t\t for (EstateAgent agent : agents) {\n\t\t\tSystem.out.println(agent.name);\n\t\t }\n\t\t \n\t\t ApartmentManager apartmentManager=new ApartmentManager();\n\t\t \n\t\t apartmentManager.detail(apartment1);\n\t\t apartmentManager.detail(apartment2);\n\t\t apartmentManager.detail(apartment3);\n\t\t \n\t\t apartmentManager.streetView(apartment1);\n\t\t apartmentManager.streetView(apartment2);\n\t\t apartmentManager.streetView(apartment3);\n\t}", "private void addApartmentNames() {\n apartmentNamesAdapter.clear();\n for (ApartmentNamesInUnivs university : apartmentNamesInUnivs) {\n\n if (university.getUniversityName().equals(universityNamesSpinner.getSelectedItem().toString())) {\n\n for (ApartmentNamesWithType aptName : university.getApartmentNames()) {\n\n if (aptName.getApartmentType().equals(UrlGenerator.getApartmentTypeCodeMap().get(apartmentTypeSpinner.getSelectedItem().toString())))\n\n apartmentNamesAdapter.add(aptName.getApartmentName());\n }\n }\n }\n }", "public void addApartment(int bid) throws IOException {\n Apartment apartment = new Apartment(apartmentsCollection.size() + 1, Integer.parseInt(numOfRooms.getText()), bid, cabinetMarker,\n Double.parseDouble(size.getText()),\n Double.parseDouble(price.getText()));\n try {\n// dataAccess.addApartment(apartment, personsCollection.size() - 1);\n dataAccess.addApartment(apartment, cabinetMarker);\n Main a = new Main();\n //a.changeScene(\"Registration\");\n //a.changeScene(\"OwnerCabinet\");\n reload();\n\n System.out.println(cabinetMarker + \" : Vsyo eshe tam!\");\n\n\n } catch (SQLException e1) {\n e1.printStackTrace();\n }\n apartmentsCollection.add(apartment);\n numOfAp.clear();\n size.clear();\n numOfRooms.clear();\n price.clear();\n }", "@Override\n public String toString() {\n return \"Apartment(To rent){\" + \"id = \" + id + \n \"description=\" + description + \"price=\" + price + \"rooms=\" + rooms + \"mail= \" + mail + \", name = \" + name + \", phoneNr = \" + phoneNr \n + \"'}'\";\n }", "@Override\n public Single<ServerResponse> addApartment(Apartment apartment) {\n return null;\n\n }", "public static String getAdvertisementType() {\n return \"jxta:PA\";\n }", "@Test\n public void testRentApartmentToTenantSuccess() {\n Mockito.when(iRentalAgreementService.isRentalAgreementInForce(Mockito.any())).thenReturn(Boolean.TRUE);\n\n // Simulate an apartment that is not already rented.\n Apartment apartment = Apartment.builder()\n .apartmentNumber(\"2E\")\n .isRented(false)\n .floor(new Floor())\n .build();\n\n RentalTransaction rentalTransaction = propertyRentalService.rentApartmentToTenant(new RentalAgreement(), new UserRecord(), apartment);\n Assert.assertTrue(rentalTransaction.isTransactionSuccessful());\n }", "public abstract AdvertisingPageType mo11614e();", "public Map getApartmentDetails(String id) {\n\t\treturn apartmentService.getApartmentDetails(Integer.parseInt(id));\n\t}", "public String getAtype() {\n return atype;\n }", "@Test\n public void testRentApartmentToTenantWhenApartmentAlreadyRented() {\n Mockito.when(iRentalAgreementService.isRentalAgreementInForce(Mockito.any())).thenReturn(Boolean.TRUE);\n\n // Simulate an apartment that is already rented.\n Apartment apartment = Apartment.builder()\n .apartmentNumber(\"2E\")\n .isRented(true)\n .floor(new Floor())\n .build();\n\n RentalTransaction rentalTransaction = propertyRentalService.rentApartmentToTenant(new RentalAgreement(), new UserRecord(), apartment);\n Assert.assertFalse(rentalTransaction.isTransactionSuccessful());\n }", "TypeAssociation getEstRapporteeParRapport();", "public void setNombreArea(String p) { this.nombreArea = p; }", "public abstract String getSelectedAddressType();", "public static void main(String[] args) {\n Apartment manhattanStudioApt = new Apartment(1, 16, 5500);\n Apartment atlantaTwoBedroomApt = new Apartment(2, 38, 4200);\n Apartment bangorThreeBedroomApt = new Apartment(3, 78, 2500);\n\n System.out.println(manhattanStudioApt.largerThan(atlantaTwoBedroomApt));\n System.out.println(bangorThreeBedroomApt.largerThan(atlantaTwoBedroomApt));\n\n System.out.println(manhattanStudioApt.priceDifference(atlantaTwoBedroomApt)); \n System.out.println(bangorThreeBedroomApt.priceDifference(atlantaTwoBedroomApt)); \n\n System.out.println(manhattanStudioApt.moreExpensiveThan(atlantaTwoBedroomApt)); \n System.out.println(bangorThreeBedroomApt.moreExpensiveThan(atlantaTwoBedroomApt)); \n }", "public void setNombreCodigoArea(String p) { this.nombreCodigoArea = p; }", "public void carregarAno() {\n\t\tif (usuario.getOrganizacaoMilitar().toString().equals(\"AMAN\")){\n\t\t\tano.addAll(Arrays.asList(Ano.values()));\n\t\t}\n\t\telse if (usuario.getOrganizacaoMilitar().toString().equals(\"ECEME\")){\n\t\t\tano.addAll(Arrays.asList(Ano.values()));\n\t\t\tano.remove(Ano.TERCEIRO);\n\t\t\tano.remove(Ano.QUARTO);\n\t\t}\n\t\telse{\n\t\t\tcarregarRegistroDoPrimeiroAno();\n\t\t}\n\t}", "@Optional\n Association<GebaeudeArtStaBuComposite> gebaeudeArtStaBu();", "private ApartmentDetailsBean getApartmentInfo(String query, int id) {\n\t\tResultSet rs=null;\n\t\tApartmentDetailsBean apt = new ApartmentDetailsBean();\n\t\ttry {\n\t\t\t\n\t\t\t//pstmt = con.prepareStatement(query);\n\t\t\tPreparedStatement pstmt = dataSource.getConnection().prepareStatement(query);\n\t\t\tpstmt.setInt(1, id);\n\t\t\trs = pstmt.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\t\n\t\t\t\tapt.setApartmentId(rs.getInt(\"apartmentId\"));\n\t\t\t\tapt.setDepositAmt(rs.getInt(\"depositAmt\"));\n\t\t\t\tapt.setRent(rs.getInt(\"rent\"));\n\t\t\t\tapt.setAvailablityFrom(rs.getDate(\"availablityFrom\"));\n\t\t\t\tapt.setUtilities(rs.getString(\"utilities\"));\n\t\t\t\tapt.setArea(rs.getString(\"area\"));\n\t\t\t\tapt.setStreet(rs.getString(\"street\"));\n\t\t\t\tapt.setDoorNo(rs.getString(\"doorNo\"));\n\t\t\t\tapt.setCity(rs.getString(\"city\"));\n\t\t\t\tapt.setno_of_rooms(rs.getInt(\"no_of_rooms\"));\n\t\t\t\tapt.setno_of_bathroom(rs.getInt(\"no_of_bathroom\"));\n\t\t\t\tapt.setFlooring(rs.getString(\"flooring\"));\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\n\t\t} catch (SQLException e) {\n\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t}\n\t\treturn apt;\n\t}", "public abstract C14407a mo11605a(AdvertisingPageType advertisingPageType);", "@Override\r\n\tpublic void BulidPartA() {\n\t product.add(\"part A\");\r\n\r\n\t}", "public String getHouseType () {\n\t\treturn \"Barn\";\n\t}", "public String showRoomType()\r\n {\r\n return typeOfRoom + \"\\nAntall sengeplasser: \" + nrOfBedspaces + \"\\nSenger: \" + typeOfBeds;\r\n }", "@Override\r\n\tpublic String llamadaEmergencia(TipoEmergencia te, String provincia) {\n\t\tif(provinciaString.equals(provincia)&&\r\n\t\t\t\t(te.equals(TipoEmergencia.TRAFICO)||te.equals(TipoEmergencia.CASERO)||te.equals(TipoEmergencia.INCENDIO))) {\r\n\t\t\tSystem.out.print(\"##Unidad \"+this.id+\" de Ambulancia en la provincia de \"+this.provinciaString+\" en camino!\");\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "@Override\n\tpublic Map getApartmentDetails(int id) {\n\t\tMap apartmentDetails = new HashMap();\n\t\tString query = \"Select * from Apartments where apartmentId=?\";\n\t\tapartmentDetails.put(\"ApartmentDetails\", getApartmentInfo(query, id));\n\t\tquery = \"Select * from Tenant where apartmentId=?\";\n\t\tapartmentDetails.put(\"TenantDetails\", getTenantDetails(query, id));\n\t\tquery = \"Select * from ApartmentOwner where ownerId IN(select ownerId from Apartments where apartmentId=? )\";\n\t\tapartmentDetails.put(\"OwnerDetails\", getOwnerDetails(query, id));\n\t\tquery = \"Select rating,comments from Feedback where apartmentId=?\";\n\t\tapartmentDetails.put(\"ReviewAndRatings\", getReviewComments(query, id));\n\t\t/*query = \"select photo from aptImages where apartmentId=?\";\n\t\tapartmentDetails.put(\"images\", getImages(query, id));*/\n\t\t\n\t\treturn apartmentDetails;\n\t}", "TypeAssociation getAssocieCommeSujetInstanceObjet();", "TypeAssociation getAssocieCommeSujetEvenementNRBC();", "@Override\n\tpublic List<ApartmentDetailsBean> getApartmentList(String location) {\n\t\tList<ApartmentDetailsBean> apartment = new ArrayList<ApartmentDetailsBean>();\n\t\tString query = \"Select * from Apartments where area=?\";\n\t\t//Connection con = DatabaseConnection.connect();\n\t\t\n\t\tResultSet rs=null;\n//\t\tPreparedStatement pstmt=null;\n\t\tSystem.out.println(\"Inside AparmentDaoImpl\");\n\t\ttry {\n\t\t\n\t\t\t//pstmt = con.prepareStatement(query);\n\t\t\tPreparedStatement pstmt = dataSource.getConnection().prepareStatement(query);\n\t\t\tpstmt.setString(1, location);\n\t\t\trs = pstmt.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tApartmentDetailsBean apt = new ApartmentDetailsBean();\n\t\t\t\tapt.setApartmentId(rs.getInt(\"apartmentId\"));\n\t\t\t\tapt.setDepositAmt(rs.getInt(\"depositAmt\"));\n\t\t\t\tapt.setRent(rs.getInt(\"rent\"));\n\t\t\t\tapt.setAvailablityFrom(rs.getDate(\"availablityFrom\"));\n\t\t\t\tapt.setUtilities(rs.getString(\"utilities\"));\n\t\t\t\tapt.setArea(rs.getString(\"area\"));\n\t\t\t\tapt.setStreet(rs.getString(\"street\"));\n\t\t\t\tapt.setDoorNo(rs.getString(\"doorNo\"));\n\t\t\t\tapt.setCity(rs.getString(\"city\"));\n\t\t\t\tapt.setno_of_rooms(rs.getInt(\"no_of_rooms\"));\n\t\t\t\tapt.setno_of_bathroom(rs.getInt(\"no_of_bathroom\"));\n\t\t\t\tapt.setFlooring(rs.getString(\"flooring\"));\n\t\t\t\tapt.setType_bathroom(rs.getString(\"type_bathroom\"));\n\t\t\t\tapartment.add(apt);\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t}\n\n\t\treturn apartment;\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn \"Apart N°\"+Nombre;\n\t}", "private boolean isAlcoholic(ContentNodeModel m) {\n\t\tfinal ContentNodeModel dept = ContentNodeModelUtil.findDepartment(m);\n\t\tif (dept != null) {\n\t\t\tfinal ContentKey aKey = dept.getContentKey();\n\n\t\t\tif (aKey != null && WineUtil.getWineAssociateId().toLowerCase().equalsIgnoreCase(aKey.getId())) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "public Aso() {\n\t\tName = \"Aso\";\n\t\ttartossag = 3;\n\t}", "@Override\n\tpublic String getAoType() {\n\t\treturn null;\n\t}", "@Override\n\tpublic List<ApartmentListing> getApartments() {\n\t\treturn apartmentListingRepository.findAll();\n\t}", "TypeAssociation getAssocieCommeObjetAdresse();", "@Override\n public void buildArma() {\n this.personaje.setArma(new Arma(\"Lanza\", 'A', 9));\n }", "public void equipHero() {\n\t\ttipo = 'A';\n\t}", "private boolean isApnTypeActive(String type) {\n return mActiveApn != null && mActiveApn.canHandleType(type);\n }", "public void setAtype(String atype) {\n this.atype = atype == null ? null : atype.trim();\n }", "String getType() {\n\t\treturn \"Athlete\";\n\t}", "public abstract String getArea();", "public String getArrivalAirport();", "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}", "TypeAssociationEXT getAPourDonneurOrdreUnite();", "java.lang.String getDepartureAirportCode();", "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 Arena() \r\n {\r\n setVenueName(\"\");\r\n setCity(\"\");\r\n setState(\"\");\r\n setMaxCapacity(0);\r\n setYearOpened(0);\r\n team = new Tenant();\r\n }", "java.lang.String getArrivalAirport();", "TypeAssociation getConcerneZoneAutreElementControle();", "public void setTypeRoom(String accommodationType) {\n\t\tthis.accommodationType = accommodationType;\n\t}", "static boolean inAreaHuh ( PhoneNumber pn, int someArea ) {\n\t// return ... pn.areaCode ... pn.prefix ... pn.line ... someArea ;\n\treturn pn.areaCode == someArea ;\n }", "public Airplane (){\n \n }", "public void whatTypeOfPastaClicked(View view) {\n\n Intent child = new Intent(this, SelectPastaType.class);\n child.putExtra(\"selectedType\", selectedType);\n\n startActivityForResult(child, REQ_CODE_PASTA_TYPE);\n\n }", "public void setTipoPartida( String tipoPartida ) {\n this.tipoPartida = tipoPartida;\n }", "public void asetaTeksti(){\n }", "java.lang.String getArrivalAirportCode();", "public void setCodigoArea(int p) { this.codigoArea = p; }", "public void setCodigoArea(int p) { this.codigoArea = p; }", "public void setAcideAmine(String codon) {\n switch (codon) {\n \n case \"GCU\" :\n case \"GCC\" :\n case \"GCA\" :\n case \"GCG\" : \n this.acideAmine = \"Alanine\";\n break;\n case \"CGU\" :\n case \"CGC\" :\n case \"CGA\" :\n case \"CGG\" :\n case \"AGA\" :\n case \"AGG\" :\n this.acideAmine = \"Arginine\";\n break;\n case \"AAU\" :\n case \"AAC\" :\n this.acideAmine = \"Asparagine\";\n break;\n case \"GAU\" :\n case \"GAC\" :\n this.acideAmine = \"Aspartate\";\n break;\n case \"UGU\" :\n case \"UGC\" :\n this.acideAmine = \"Cysteine\";\n break;\n case \"GAA\" :\n case \"GAG\" :\n this.acideAmine = \"Glutamate\";\n break;\n case \"CAA\" :\n case \"CAG\" :\n this.acideAmine = \"Glutamine\";\n break;\n case \"GGU\" :\n case \"GGC\" :\n case \"GGA\" :\n case \"GGG\" :\n this.acideAmine = \"Glycine\";\n break;\n case \"CAU\" :\n case \"CAC\" :\n this.acideAmine = \"Histidine\";\n break;\n case \"AUU\" :\n case \"AUC\" :\n case \"AUA\" :\n this.acideAmine = \"Isoleucine\";\n break;\n case \"UUA\" :\n case \"UUG\" :\n case \"CUU\" :\n case \"CUC\" :\n case \"CUA\" :\n case \"CUG\" :\n this.acideAmine = \"Leucine\";\n break;\n case \"AAA\" :\n case \"AAG\" :\n this.acideAmine = \"Lysine\";\n break;\n case \"AUG\" :\n this.acideAmine = \"Methionine\";\n break;\n case \"UUU\" :\n case \"UUC\" :\n this.acideAmine = \"Phenylalanine\";\n break;\n case \"CCU\" :\n case \"CCC\" :\n case \"CCA\" :\n case \"CCG\" :\n this.acideAmine = \"Proline\";\n break;\n case \"UAG\" :\n this.acideAmine = \"Pyrrolysine\";\n break;\n case \"UGA\" :\n this.acideAmine = \"Selenocysteine\";\n break;\n case \"UCU\" :\n case \"UCC\" :\n case \"UCA\" :\n case \"UCG\" :\n case \"AGU\" :\n case \"AGC\" :\n this.acideAmine = \"Serine\";\n break;\n case \"ACU\" :\n case \"ACC\" :\n case \"ACA\" :\n case \"ACG\" :\n this.acideAmine = \"Threonine\";\n break;\n case \"UGG\" :\n this.acideAmine = \"Tryptophane\";\n break;\n case \"UAU\" :\n case \"UAC\" :\n this.acideAmine = \"Tyrosine\";\n break;\n case \"GUU\" :\n case \"GUC\" :\n case \"GUA\" :\n case \"GUG\" :\n this.acideAmine = \"Valine\";\n break;\n case \"UAA\" :\n this.acideAmine = \"Marqueur\";\n break;\n }\n }", "gov.nih.nlm.ncbi.www.CodeBreakDocument.CodeBreak.Aa getAa();", "private void grnadr(String a) {\n\t\t\n\t\tSystem.out.println(\"Greens Technology address is:\"+\"\\n\"+a);\n\n\n}", "@Override\n public String getRoomType()\n {\n return room.getRoomType() + \" + \" + service;\n }", "public String getType() {\n\t\tif (isValid())\n\t\t\treturn \"FullHouse\";\n\t\treturn \"\";\n\t}", "void setAssociatedPart(int asProID) {\n this.asProID = asProID;\n }", "TypeAssociationEXT getEstPourTypeMateriel();", "public boolean abonarApartado(Apartado apartado, float cantidadAbonada) {\r\n try {\r\n IntAdmApartados adm = new FacAdmApartados();\r\n\r\n adm.abonarApartado(apartado, cantidadAbonada);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n\r\n return false;\r\n }", "private boolean isInwardType() {\n\t\tboolean isInward = false;\n\n\t\t//Booking Type\n\t\tif (cbBookingType.getText().equals(INWARD_TYPE))\n\t\t\tisInward = true;\n\n\t\treturn isInward;\n\t}", "abstract public Assoc getAssoc();", "public boolean podeAtuar() {\n\t\treturn this.ambiente.podeAtuar();\n\t}", "public String getAreaCode() \n\t{\n\t\treturn getNumber().substring(1,4);\n\t}", "List<ApartmentAttribute> listAttributes(@NotNull Stub<BtiApartment> stub, Page<ApartmentAttribute> pager);", "public String getDepartureAirport();", "public static void main(String[] args) {\n Room room1 = new Room(14, 6, 2, false);\n Room room2 = new Room(8, 6, 2, false);\n Room room3 = new Room(18, 6, 2, false);\n\n ArrayList<Room> rooms = new ArrayList<>();\n rooms.add(room1);\n rooms.add(room2);\n rooms.add(room3);\n\n\n House house = new House(8, 2, 140.00, rooms);\n\n\n\n\n System.out.println(\"Aantal stoelen \" + house.aantalStoelenInHetHuis());\n\n }", "public String getTipoPartida() {\n return tipoPartida;\n }", "@Override\n\tpublic void tipoMovimento() {\n\t\tSystem.out.println(super.getNome() + \" anda com 4 patas.\");\n\t}", "java.lang.String getDepartureAirport();", "String getArcrole();", "public String getProgAreaCd() {\n\t\treturn null;\n\t}", "public void setExaminationType(ExaminationType_type1 param){\n \n this.localExaminationType=param;\n \n\n }", "public String getAlto() {\r\n return alto;\r\n }", "public ExaminationType_type1 getExaminationType(){\n return localExaminationType;\n }", "public AcideAmine(String partieArn) {\n super(partieArn);\n setAcideAmine(partieArn);\n }", "public String getStreetType() {\r\n return streetType;\r\n }", "@Override\n public boolean equals(Object autre) {\n AcideAmine inter = (AcideAmine) autre;\n return ( acideAmine.equals(inter.acideAmine));\n \n }", "public boolean cancelarApartado(Apartado apartado) {\r\n try {\r\n IntAdmApartados adm = new FacAdmApartados();\r\n adm.cancelarApartado(apartado);\r\n\r\n return true;\r\n } catch (Exception e) {\r\n JOptionPane.showMessageDialog(null, \"Ocurrio un error.\" + e.getMessage());\r\n e.printStackTrace();\r\n }\r\n\r\n return false;\r\n }", "public static void traduitSiteAnglais() {\n\t\t\n\t}", "public Address(Long id, String country, String city, String postcode, String street, String housenumber,\r\n\t\t\tint apartment) {\r\n\t\tsuper();\r\n\t\tthis.id = id;\r\n\t\tthis.country = country;\r\n\t\tthis.city = city;\r\n\t\tthis.postcode = postcode;\r\n\t\tthis.street = street;\r\n\t\tthis.housenumber = housenumber;\r\n\t\tthis.apartment = apartment;\r\n\t}", "public String getAmenity() {\r\n return amenity;\r\n }", "@Test\n public void testPostApartmentDetails() {\n System.out.println(\"postApartmentDetails\");\n Date today = java.sql.Date.valueOf(\"2017-09-25\");\n Date enddate = java.sql.Date.valueOf(\"2017-10-25\");\n \n Apartment apartment = new Apartment(null, \"hello13\", 2, \"Apartment Buyer\", 6, \"test Apartment Name\",\n \"check location\", 10000, today, enddate, \"Weekly\", \"Checking Apartment Description\", \"Yearly\", \"Private\");\n ApartmentBLL instance = new ApartmentBLL();\n instance.postApartmentDetails(apartment);\n }", "@Override\r\n\tpublic void getarea(int a) {\n\t\t\r\n\t}", "public int getAno() {\n\t\t\treturn ano;\n\t\t}", "public void TripType()\n\t{\n\t\tdriver.findElementById(OR.getProperty(\"TripType\")).click();\n\t}", "protected String getTitoloPaginaMadre() {\n return VUOTA;\n }", "public String getaar() {\n\t return aar;\n\t }", "public void sousClasseAnnoce()\n {\n try {\n Class c = Class.forName(\"lpae.entites.Annonce\");\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(GestionnaireSecurite.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }", "public Arbol(){\n\t this.esVacio=true;\n\t this.hIzq = null;\n\t this.hDer = null;\n\t}", "public String getARo() {\r\n return aRo;\r\n }", "public void test2() {\n\t\t\n\t\tArrayList<Hotel> h = Test();\n\t\t\n\t\tDirector dir = new Director();\n\t\tDate dateIn = new Date(29,1,10);\n\t\tDate dateOut = new Date(30,1,10);\n\t\t\n\t\tArrayList<TypeOfRoom> t = h.get(0).getRoomTypes();\n\t\t\n\t\tdir.bookRoom(h.get(0), t.get(0), dateIn, dateOut);\n\t}", "gov.nih.nlm.ncbi.www.CodeBreakDocument.CodeBreak.Aa addNewAa();", "public void setArea(String area) {\n this.area = area;\n }", "public String getAreaCode() {\n return areaCode;\n }" ]
[ "0.6408663", "0.5980147", "0.5845401", "0.57807136", "0.57678896", "0.5642803", "0.55204976", "0.5424594", "0.5375393", "0.5292039", "0.5287311", "0.5282524", "0.5235635", "0.52188617", "0.51784426", "0.5157947", "0.5157779", "0.51399773", "0.5139672", "0.5128106", "0.51240593", "0.51178724", "0.51117826", "0.50843906", "0.50608015", "0.5049058", "0.5047601", "0.49913347", "0.49863926", "0.4948842", "0.4941677", "0.49325696", "0.49195504", "0.49136382", "0.4895598", "0.4891179", "0.48858288", "0.48764068", "0.48747495", "0.48433617", "0.4828693", "0.48218003", "0.48207024", "0.4800237", "0.47966433", "0.47919467", "0.4789033", "0.47821248", "0.47802338", "0.47762558", "0.47549656", "0.4750018", "0.47490326", "0.47470888", "0.47323197", "0.4731415", "0.4731415", "0.47292775", "0.47229427", "0.47206768", "0.47193137", "0.47191975", "0.47086743", "0.47084844", "0.47082883", "0.47053015", "0.4700825", "0.4679386", "0.46688923", "0.46636683", "0.46635583", "0.46612412", "0.46597221", "0.46578458", "0.46496284", "0.46359953", "0.46312287", "0.4628508", "0.46283522", "0.4625805", "0.46245068", "0.46242565", "0.46220726", "0.46204093", "0.46183282", "0.46142575", "0.46133727", "0.46122092", "0.46106693", "0.46086705", "0.46062532", "0.45986703", "0.45985743", "0.45951775", "0.45923027", "0.45918623", "0.4589526", "0.4587819", "0.45867518", "0.4586129" ]
0.6780593
0
BigDecimal myZero = BigDecimal.ZERO; myZero = myZero.setScale(10); if (myZero.equals(right) || BigDecimal.ZERO.equals(right) ) / Comparison It is important to never use the .equals() method to compare BigDecimals. That is because this equals function will compare the scale. If the scale is different, .equals() will return false, even if they are the same number mathematically. signum? on big decimal
@Override public BigDecimal operate(BigDecimal left, BigDecimal right) { if (right.signum() == 0) { throw new DivideByZeroException(); } BigDecimal result = left.divide(right,10, BigDecimal.ROUND_HALF_DOWN); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static BigDecimal roundDecimalValue(BigDecimal dec, int precision, boolean isHalfToEven)\n {\n if(isHalfToEven){\n return dec.setScale(precision, RoundingMode.HALF_EVEN);\n }\n else {\n int sgn = dec.signum();\n if (sgn < 0)\n return dec.setScale(precision, RoundingMode.HALF_DOWN);\n else\n return dec.setScale(precision, RoundingMode.HALF_UP);\n }\n }", "@Test\n public void testCompareTo() {\n \n BigDecimal magnitude1 = new BigDecimal(\"1.11\");\n BigDecimal magnitude2 = new BigDecimal(\"2.22\");\n BigDecimal magnitude3 = new BigDecimal(\"3.33\");\n \n Currency usd = Currency.getInstance(\"USD\");\n Currency cad = Currency.getInstance(\"CAD\");\n \n Money moneyUsd = new Money(magnitude1, usd, RoundingMode.CEILING);\n Money moneyUsd2 = new Money(magnitude2, usd, RoundingMode.FLOOR);\n Money moneyCad = new Money(magnitude3, cad);\n Money moneyCad2 = new Money(magnitude3, cad);\n\n try {\n moneyUsd.compareTo(moneyCad);\n fail(\"Comparisons between Money objects with different currencies should fail\");\n } catch(CurrencyMismatchRuntimeException cmm) {\n }\n \n assertTrue(\"Less than\", moneyUsd.compareTo(moneyUsd2) < 0);\n assertTrue(\"Greater than\", moneyUsd2.compareTo(moneyUsd) > 0);\n assertTrue(\"Equal\", 0 == moneyCad.compareTo(moneyCad2));\n\n assertTrue(\"Less than 2\", moneyUsd.lessThan(moneyUsd2));\n assertTrue(\"Greater than 2\", moneyUsd2.greaterThan(moneyUsd));\n assertTrue(\"Equal 2\", moneyCad.equals(moneyCad2));\n\n \n }", "public static boolean isZero(BigDecimal value) {\n if (value == null) {\n return true;\n }\n debug(\"value:\" + value);\n debug(\"result of compareTo:\" + BigDecimal.ZERO.compareTo(value));\n if (BigDecimal.ZERO.compareTo(value) == 0) {\n return true;\n }\n return false;\n }", "@Test\n public void testZeroPrice() {\n double expectedValue = new BigDecimal(0.0, new MathContext(5)).doubleValue();\n double actualValue = MarkupCalculator.determinePrice(new BigDecimal(0.0),\n BigInteger.valueOf(5),\n ProductType.FOOD)\n .round(new MathContext(5)).doubleValue();\n \n Assert.assertEquals(\"failure - zero price test produced the wrong result\",\n expectedValue, \n actualValue, 0.001);\n }", "public void assertBigDecimalEqual(BigDecimal bd1, BigDecimal bd2){\n if(bd1.compareTo(bd2) != 0) {\n throw new AssertionError(\"Expected \" + bd1 + \" but was \" + bd2);\n }\n }", "@Test\n public void roundOffDecimalPoints() throws IOException {\n BigDecimal actual = Utils.roundOffDecimalPoints(new BigDecimal(1), 2, 2);\n Assert.assertEquals(\"100.00\", actual.toString());\n }", "public static boolean a_eq_b(BigDecimal a, BigDecimal b) {\n\t\tif (a == null || b == null) {\n\t\t\tthrow new RuntimeException(\"a_eq_b参数错误,a:[\" + a + \"],b:[\" + b + \"]\");\n\t\t}\n\t\tint result = a.compareTo(b);\n\t\tboolean c = result == 0;\n\t\tif (LOG.isDebugEnabled()) {\n\t\t\tLOG.debug(\"[\" + a + \" == \" + b + \" is \" + c + \"]\");\n\t\t}\n\t\treturn c;\n\t}", "@Test\n public void assertCloseTo() {\n assertThat(BigDecimal.valueOf(325, 2), closeTo(BigDecimal.valueOf(300, 2), BigDecimal.valueOf(100, 2)));\n }", "private static boolean bigDecimalCanConvertToString(BigDecimal bigDecimal) {\n if (bigDecimal == null) {\n return false;\n }\n boolean result = false;\n BigDecimal bigDecimalAbs = bigDecimal.abs();\n if ((bigDecimalAbs.compareTo(new BigDecimal(DECIMAL_MIN_VALUE_CHANGE_TO_EXPR)) <= 0) || (bigDecimalAbs.compareTo(new BigDecimal(INTEGER_MIN_VALUE_CHANGE_TO_EXPR)) >= 0)) {\n result = true;\n }\n if (bigDecimalAbs.compareTo(new BigDecimal(0)) == 0) {\n result = false;\n }\n return result;\n }", "@Test\n public void testBigDecimalConstructorDefaultRounding() {\n new Money(new BigDecimal(\"1.231\"), Currency.getInstance(\"USD\"));\n }", "public static void checkValue(BigDecimal candidate) throws ArithmeticException {\n if (candidate.compareTo(MIN_VALUE) < 0) {\n throw new ArithmeticException();\n }\n if (candidate.compareTo(MAX_VALUE) > 0) {\n throw new ArithmeticException();\n }\n }", "public static BigDecimal nullEmptyToValue(BigDecimal b,BigDecimal theValue)\n {\n if(isEmptyDecimal(b))\n {\n\t return theValue;\n }\n else\n {\n\t return b;\n }\n }", "public static BigDecimal nullToZero(BigDecimal b)\n {\n if(isEmptyDecimal(b))\n {\n return BigDecimal.ZERO;\n }\n else\n {\n return b;\n }\n }", "@Test\n public void equals_DifferentPriceCents_Test() {\n Assert.assertFalse(bq1.equals(bq5));\n }", "@Test\n\tpublic void testDivision() {\n\t\tdouble tmpRndVal = 0.0;\n\t\tdouble tmpRndVal2 = 0.0;\n\t\tdouble tmpResult = 0.0;\n\t\t\n\t\t//testing with negative numbers\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\ttmpRndVal = doubleRandomNegativeNumbers();\n\t\t\ttmpRndVal2 = doubleRandomNegativeNumbers();\n\t\t\ttmpResult = tmpRndVal / tmpRndVal2;\n\t\t\t//assertEquals(bc.division(tmpRndVal, tmpRndVal2), tmpResult);\n\t\t\tassertTrue((tmpResult == bc.division(tmpRndVal, tmpRndVal2)));\n\t\t}\n\t\t\n\t\t//testing with positive numbers\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\ttmpRndVal = doubleRandomPositiveNumbers();\n\t\t\ttmpRndVal2 = doubleRandomPositiveNumbers();\n\t\t\ttmpResult = tmpRndVal / tmpRndVal2;\n\t\t\t//assertEquals(bc.division(tmpRndVal, tmpRndVal2), tmpResult);\n\t\t\tassertTrue((tmpResult == bc.division(tmpRndVal, tmpRndVal2)));\n\t\t}\n\t\t\n\t\t//testing with zero\n\t\tdouble zero = 0.0;\n\t\tdouble stdReturn = -0.123456789;\n\t\tint tmpVal = 7;\n\t\tfor (int i = 0; i < 5; i++) {\n\t\t\tassertTrue( ((bc.division(tmpVal, zero) == zero) \n\t\t\t\t\t|| (bc.division(tmpVal, zero) == stdReturn) \n\t\t\t\t\t|| (bc.division(zero, zero) == zero)\n\t\t\t\t\t|| (bc.division(zero, tmpVal) == zero) ));\n\t\t}\n\t\t\n\t}", "public static boolean isEqual(Double double1, Double double2)throws Exception {\n\treturn (null == double1 && null == double2) || (null != double1 && null != double2\n\t\t&& BigDecimal.valueOf(roundAmount(double1)).compareTo(BigDecimal.valueOf(roundAmount(double2))) == 0);\n }", "@Test\n public void testBigDecimalConstructorNarrowingAmount() {\n \n // USD allows for two decimal places. If there are more, use ceiling\n Money money = new Money(new BigDecimal(\"1.231\"), Currency.getInstance(\"USD\"), RoundingMode.CEILING);\n BigDecimal expected = new BigDecimal(\"1.24\");\n BigDecimal actual = money.getAmount();\n assertEquals(\"Fractions beyond that supported by the currency will be removed according to the rounding mode\", expected, actual);\n \n // JPY allows for 0 decimal places. If there are more, use ceiling\n money = new Money(new BigDecimal(\"123.4\"), Currency.getInstance(\"JPY\"), RoundingMode.CEILING);\n expected = new BigDecimal(\"124\");\n actual = money.getAmount();\n assertEquals(\"Fractions beyond that supported by the currency will be removed according to the rounding mode\", expected, actual);\n \n }", "public static void main(String[] args) {\r\n\tBigDecimal bd1 = new BigDecimal(0.2);\r\n\t\tBigDecimal bd2 = new BigDecimal(0.4);\r\n\t\tBigDecimal add = bd1.add(bd2);\r\n\t\tSystem.out.println(add.setScale(2, BigDecimal.ROUND_DOWN));\r\n\t}", "protected BigDecimal scaleAndRound(BigDecimal value, int scale, RoundingMode mode) {\n\t\treturn (value == null) ? null : value.setScale(scale, mode);\n\t}", "public static BigDecimal emptyDecimalToZero(BigDecimal myNumber)\n {\n if(myNumber == null || ConstantsCommon.EMPTY_BIGDECIMAL_VALUE.equals(myNumber))\n {\n \t return BigDecimal.ZERO;\n }\n else\n {\n \t return myNumber;\n }\n }", "private boolean isDecimalEqualToZero(String doubleValue) {\n\t\tif (doubleValue.contains(\"%\")) {\n\t\t\treturn false;\n\t\t}\n\t\tString[] n = doubleValue.split(\"\\\\.\");\n\t\tif(n.length > 1) {\n\t\t\t// get the value to right of decimal point\n\t\t\tint d = Integer.parseInt(n[1]);\n\t\t\treturn d == 0;\n\t\t}\n\t\telse {\n\t\t\treturn true;\n\t\t}\n\t\t\n\t}", "public LargerRandomNumberBigDecimal() {\n mValue = new BigDecimal(0);\n }", "public static boolean isEmptyDecimal(BigDecimal myNumber)\n {\n return (myNumber == null || ConstantsCommon.EMPTY_BIGDECIMAL_VALUE.equals(myNumber));\n }", "public void setPricePerSquareFoot(double newPricePerSquareFoot){\nif(newPricePerSquareFoot > 0){\npricePerSquareFoot = newPricePerSquareFoot;\n}\n}", "private boolean isWithInScale(Rule r) {\n return ((r.getMinScaleDenominator() - TOLERANCE) <= scaleDenominator)\n && ((r.getMaxScaleDenominator() + TOLERANCE) > scaleDenominator);\n }", "public static BigDecimal calcularPercentualBigDecimal(BigDecimal bigValor1, BigDecimal bigValor2) {\r\n\r\n\t\tBigDecimal resultado = new BigDecimal(\"0.0\");\r\n\r\n\t\tif (bigValor2.compareTo(new BigDecimal(\"0.0\")) != 0) {\r\n\r\n\t\t\tBigDecimal numeroCem = new BigDecimal(\"100\");\r\n\r\n\t\t\tBigDecimal primeiroNumero = bigValor1.multiply(numeroCem);\r\n\r\n\t\t\tresultado = primeiroNumero.divide(bigValor2, 2, BigDecimal.ROUND_HALF_UP);\r\n\t\t}\r\n\t\treturn resultado;\r\n\t}", "@Test(expected=IllegalArgumentException.class)\n public void testBigDecimalConstructorNullRoundingMode() {\n new Money(new BigDecimal(\"1.23\"), Currency.getInstance(\"USD\"), null);\n fail(\"RoundingMode may not be null\");\n }", "public static void main(String[] args) {\n Float f1 = 74.02f;\r\n System.out.println(\"float f1=\" + f1);\r\n Float f2 = f1 * 100;\r\n System.out.println(\"float f1 * 100 =\" + f2 + \", longvalue=\" + f2.longValue());\r\n System.out.println(\"float f1 * 100 =\" + f2 + \", rounded=\" + Math.round(f2));\r\n BigDecimal b1 = new BigDecimal(f1);\r\n System.out.println(\"BigDecimal b1=\" + b1);\r\n System.out.println(\"scale =\" + b1.scale());\r\n BigDecimal b2 = b1.setScale(2,BigDecimal.ROUND_HALF_UP);\r\n System.out.println(\"BigDecimal b2=\" + b2);\r\n System.out.println(\"scale =\" + b2.scale());\r\n System.out.println(\"b2.multiply(new BigDecimal(100) =\" + b2.multiply(new BigDecimal(100)));\r\n long l = b2.multiply(new BigDecimal(100)).longValue();\r\n System.out.println(\"long l =\" + l);\r\n System.out.println(\"b2.scaleByPowerOfTen(2) =\" + b2.scaleByPowerOfTen(2));\r\n System.out.println(\" using convertToPence(b1)=\" + convertToPence(b1));\r\n\r\n for (long l1 = 0; l1 <= 10000; l1++) {\r\n float f3 = l1;\r\n f3 = f3 / 100;\r\n float f4 = f3 * 100;\r\n if (f4 != l1) {\r\n //System.out.println(\"rounding error l1=\" + l1 + \", f3=\" + f3 + \", f4=\" + f4);\r\n BigDecimal b3 = convertFromPence(l1);\r\n long l2 = convertToPence(b3);\r\n if (l1 != l2) {\r\n System.out.println(\"rounding error l1=\" + l1 + \", l2=\" + l2);\r\n\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n\r\n\r\n }", "@Override\n public boolean isValid(BigDecimal value, ConstraintValidatorContext context) {\n if (value == null) {\n return true;\n }\n\n // check if it greater than or equal $1\n if (value.compareTo(BigDecimal.valueOf(1.00)) < 0) {\n return false;\n }\n\n // if pass all of them,\n return true;\n }", "public BigDecimal doOperation(BigDecimal otherValue);", "public static void bigDecimal() {\n\n\t\tSystem.out.println(\"BigDecimalExample.bigDecimal()\");\n\t\tBigDecimal n1 = new BigDecimal(123.456);\n\t\tBigDecimal n2 = new BigDecimal(789.012);\n\t\tBigDecimal n3 = new BigDecimal(-2.0);\n\n\t\tSystem.out.println(\"n1: \" + n1);\n\t\tSystem.out.println(\"n2: \" + n2);\n\t\tSystem.out.println(\"n3: \" + n3);\n\t\t// System.out.println(\"n2.toEngineeringString(): \" + n2.toEngineeringString());\n\t\t// System.out.println(\"n2.toPlainString(): \" + n2.toPlainString());\n\t\tSystem.out.println();\n\n\t\tSystem.out.println(\"n1.add(n2): \" + n1.add(n2));\n\t\tSystem.out.println(\"n1: \" + n1); // n1.add(n2) returns a new BigDecimal, it does not modify n1 itself\n\t\tSystem.out.println(\"n1.subtract(n2): \" + n1.subtract(n2));\n\t\tSystem.out.println(\"n2.divide(n1): \" + n1.divide(n3));\n\t\tSystem.out.println(\"n2.multiply(n1): \" + n1.multiply(n1));\n\t\tSystem.out.println(\"n3.pow(4): \" + n3.pow(4));\n\t\tSystem.out.println(\"n2.remainder(n1): \" + n2.remainder(n1));\n\t\tSystem.out.println();\n\n\t\tSystem.out.println(\"n3.abs(): \" + n3.abs());\n\t\tSystem.out.println(\"n2.negate(): \" + n2.negate());\n\t\tSystem.out.println(\"n3.negate(): \" + n3.negate());\n\t\tSystem.out.println(\"n2.plus(): \" + n2.plus());\n\t\tSystem.out.println(\"n3.plus(): \" + n3.plus());\n\t\tSystem.out.println();\n\n\t\t// Since there are no relational operators available, you need to use compareTo\n\t\tSystem.out.println(\"n1.compareTo(n1): \" + n1.compareTo(n1)); // equal\n\t\tSystem.out.println(\"n1.compareTo(n2): \" + n1.compareTo(n2)); // less than\n\t\tSystem.out.println(\"n1.compareTo(n3): \" + n1.compareTo(n3)); // greater than\n\t\tSystem.out.println();\n\n\t\tSystem.out.println(\"n2: \" + n2);\n\t\tSystem.out.println(\"n2.scale(): \" + n2.scale()); // scale = number of digits after the decimal point\n\t\tSystem.out.println(\"n2.precision(): \" + n2.precision()); // precision = number of digits in unscaled value\n\t\tSystem.out.println(\"n2.movePointRight(3): \" + n2.movePointRight(3));\n\t\tSystem.out.println(\"n2.movePointLeft(3) : \" + n2.movePointLeft(3));\n\t\tSystem.out.println(\"n2.movePointRight(3): \" + n2.movePointRight(3));\n\t\tSystem.out.println(\"n2.scaleByPowerOfTen(3): \" + n2.scaleByPowerOfTen(3));\n\t\tSystem.out.println(\"n2.scaleByPowerOfTen(-3): \" + n2.scaleByPowerOfTen(-3));\n\n\t\tSystem.out.println();\n\n\t\tSystem.out.println(\"n2.min(n1): \" + n2.min(n1));\n\t\tSystem.out.println(\"n2.max(n1): \" + n2.max(n1));\n\n\t}", "@Test\n public void compareTo_right() throws Exception {\n\n Full b5p7 = new Full(cardsB7p5);\n Full b8p5 = new Full(cardsB8P5);\n Full b8p5mixed = new Full(cardsB8P5mixed);\n Paire pair = new Paire(cardsPair);\n QuinteFlush quinteFlush = new QuinteFlush(cardsQuinteFlush);\n\n //b5p7 < b8p5\n assertEquals(-1, b5p7.compareTo(b8p5));\n //b8p5 = b8p5\n assertEquals(0, b8p5mixed.compareTo(b8p5));\n //b8p5 > b5p7\n assertEquals(1, b8p5.compareTo(b5p7));\n // full > paire\n assertEquals(1, b5p7.compareTo(pair));\n //full< QuiteFlush\n assertEquals(-1, b5p7.compareTo(quinteFlush));\n\n }", "public static void isValid(BigDecimal dec) throws IllegalArgumentException {\n\t//null validation\n\tif(dec == null) throw new IllegalArgumentException();\n }", "public static int bccomp (String _left_operand , String _right_operand, int _scale) {\n//\t\treturn _left_operand.compareTo(_right_operand);\n\t\treturn ZendUtils.natsort(_left_operand, _right_operand);\n\t}", "private boolean isGreater(BigInt rhs) {\n if (isPositive && !rhs.isPositive) {\n // rhs is negative and this is positive\n return true;\n } else if (!isPositive && rhs.isPositive) {\n // rhs is positive and this is negative\n return false;\n }\n // The numbers have the same sign\n\n if (number.size() > rhs.number.size()) {\n // This is longer than the other, so this is bigger if it positive\n return isPositive;\n } else if (number.size() < rhs.number.size()) {\n // This is shorter than the other, so the other is bigger if this positive\n return !isPositive;\n }\n\n for (int i = number.size() - 1; i >= 0; --i) {\n if (number.get(i) > rhs.number.get(i)) {\n return isPositive;\n } else if (number.get(i) < rhs.number.get(i)) {\n return !isPositive;\n }\n }\n\n return false;\n }", "@Override\r\n\t public int compare(String o1, String o2) { //compare the two Strings\r\n\t\tif (o1 == null || o2 == null) { //if one of them is 0\r\n\t\t return 0;\r\n\t\t}\r\n\t\tBigDecimal o1bd = new BigDecimal(o1); //creating a BigDecimal variable, value equals String o1\r\n\t\tBigDecimal o2bd = new BigDecimal(o2);\r\n\t\treturn o2bd.compareTo(o1bd); \r\n\t }", "public static void anotherMethod()\n {\n Integer g = 55;\n Integer l = Integer.valueOf(\"1000\");\n if (g.compareTo(l) > 0){\n int e = g/2;\n System.out.println(g + \" is a Big Value\");\n System.out.println(e + \" is half a Big Value\");\n }else{\n int e = g/2;\n System.out.println(e + \" is definitely small\");\n System.out.println( g + \" is not a big value\");\n }\n }", "public static boolean almost_equals(double a, double b) {\n return almost_equals(a, b, PRECISION_DEFAULT);\n }", "public boolean greaterOrEqualThan(NumberP other)\n {\n \treturn OperationsCompareTo.CompareDouble(this, other) >= 0;\n }", "public Boolean verifyTheValueSubtotalIsInZero() {\n\t\tSystem.out.println(\"Starting to verify if Subtotal is equal to 0.00.\");\n\t\treturn verifyIfSomeStringContainsZeroDotZeroZeroValueInside(getTextByLocator(body_value_subtotal));\n\t}", "public static boolean a_gt_b(BigDecimal a, BigDecimal b) {\n\t\tif (a == null || b == null) {\n\t\t\tthrow new RuntimeException(\"a_gt_b参数错误,a:[\" + a + \"],b:[\" + b + \"]\");\n\t\t}\n\t\tint result = a.compareTo(b);\n\t\tboolean c = result == 1;\n\t\tif (LOG.isDebugEnabled()) {\n\t\t\tLOG.debug(\"[\" + a + \" > \" + b + \" is \" + c + \"]\");\n\t\t}\n\t\treturn c;\n\t}", "public void setPriceActual (BigDecimal PriceActual);", "public boolean equals(Object obj){\n if(obj == null) return false;\n Fraction a = new Fraction(0, 0);\n a = this.subtract((Fraction)obj);\n if(a.numerator == 0) return true;\n else return false;\n }", "public boolean almostEqual(double a, double b);", "public static BigDecimal emptyDecimalToNull(BigDecimal myNumber)\n {\n if(ConstantsCommon.EMPTY_BIGDECIMAL_VALUE.equals(myNumber))\n {\n \t return null;\n }\n else\n {\n \t return myNumber;\n }\n }", "public static BigDecimal roundToBigDecimal(BigDecimal unrounded, int precision) {\n \tBigDecimal bd = nullToZero(unrounded);\n\treturn bd.setScale(precision, BigDecimal.ROUND_HALF_UP);\n}", "public static void main(String[] args) {\n\t\r\n\tdouble b=100.1-50;\r\n\tSystem.err.println(b);\r\n\t\r\n\tSystem.err.println(\"----------------------------------\");\r\n\t BigDecimal b1 = new BigDecimal(100.1); \r\n BigDecimal b2 = new BigDecimal(50); \r\n System.err.println(b1.subtract(b2).doubleValue()); \r\n \r\n BigDecimal b3 = new BigDecimal(Double.toString(100.1)); \r\n BigDecimal b4 = new BigDecimal(Double.toString(50));\r\n System.err.println(b1.subtract(b2).doubleValue()); \r\n}", "@Test\n public void test_IsOxideCorr() {\n System.out.println(\"Testing MeasuredRatioModel's isOxideCorr()\");\n MeasuredRatioModel instance = new MeasuredRatioModel();\n boolean expResult = false;\n boolean result = instance.isOxideCorr();\n assertEquals(expResult, result);\n instance = new MeasuredRatioModel(\"Specific\",new BigDecimal(\"213\"),\"ABS\",new BigDecimal(\"0.4324\"),true,true);\n result = instance.isOxideCorr();\n expResult=true;\n assertEquals(expResult, result);\n }", "protected BigDecimal returnRoundedValue(BigDecimal numberToConvert) {\r\n\t\treturn numberToConvert.setScale(2, RoundingMode.HALF_UP);\r\n\t}", "public boolean greaterEqualP(Stella_Object y) {\n { Ratio x = this;\n\n { Ratio yRatio = ((Ratio)(x.coerceTo(y)));\n\n return ((x.numerator * yRatio.denominator) >= (yRatio.numerator * x.denominator));\n }\n }\n }", "protected void runTest() throws OgnlException\n {\n Object result;\n\n result = OgnlOps.convertValue(value, toClass);\n if (!isEqual(result, expectedValue)) {\n if (scale >= 0) {\n double scalingFactor = Math.pow(10, scale),\n v1 = ((Number) value).doubleValue() * scalingFactor,\n v2 = ((Number) expectedValue).doubleValue() * scalingFactor;\n\n assertTrue((int) v1 == (int) v2);\n } else {\n fail();\n }\n }\n }", "static boolean bigint_eq(bigint a, bigint b)\n {\n if (a.bigint_sign != b.bigint_sign)\n return false;\n else if (a.bigint_len != b.bigint_len)\n return false;\n else\n {\n for (int i = 0; i < a.bigint_len; i++)\n if (a.bigint_chiffres[i] != b.bigint_chiffres[i])\n return false;\n return true;\n }\n }", "public boolean compareVolume(Volume v1, Volume v2){\n return Double.compare(v1.value*v1.unit.baseUnitConversion, v2.value*v2.unit.baseUnitConversion) == 0;\n }", "@Test\n public void assertTaxBracketBoundariesWithoutPrecision() {\n BigDecimal minimumSalary = BigDecimal.ZERO;\n BigDecimal maximumSalary = new BigDecimal(10000);\n TaxBracket zeroTo10k = createTaxBracket(minimumSalary, maximumSalary);\n validateSalaryFitsWithinBracket(zeroTo10k, minimumSalary);\n validateSalaryFitsWithinBracket(zeroTo10k, maximumSalary);\n validateSalaryFitsWithinBracket(zeroTo10k, minimumSalary.add(BigDecimal.ONE));\n validateSalaryFitsWithinBracket(zeroTo10k, maximumSalary.subtract(BigDecimal.ONE));\n\n // Make sure when the bounds are breached, that the tax bracket does not apply anymore\n validateSalaryDoesNotFitWithinBracket(zeroTo10k, minimumSalary.subtract(BigDecimal.ONE));\n validateSalaryDoesNotFitWithinBracket(zeroTo10k, maximumSalary.add(BigDecimal.ONE));\n }", "protected static boolean hasPositiveValue(BigDecimal value) {\n return value != null && BigDecimal.ZERO.compareTo(value) < 0;\n }", "public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException {\n\n try {\n if (isDebugEnabled()) {\n debugCode(\"getBigDecimal(\" + columnIndex + \", \" + scale + \");\");\n }\n if (scale < 0) { throw Message.getInvalidValueException(\"\" + scale, \"scale\"); }\n BigDecimal bd = get(columnIndex).getBigDecimal();\n return bd == null ? null : MathUtils.setScale(bd, scale);\n }\n catch (Exception e) {\n throw logAndConvert(e);\n }\n }", "private boolean dividingByZero(String operator){\n if (numStack.peek() == 0 && operator.equals(\"/\")){\n return true;\n }\n return false;\n }", "@Test\n public void testIsSameCurrency() {\n \n Money moneyUsd = new Money(new BigDecimal(\"1.23\"), Currency.getInstance(\"USD\"));\n Money moneyUsd2 = new Money(new BigDecimal(\"1.23\"), Currency.getInstance(\"USD\"));\n Money moneyCad = new Money(new BigDecimal(\"1.23\"), Currency.getInstance(\"CAD\"));\n\n assertTrue(\"Currencies same\", moneyUsd.isSameCurrency(moneyUsd2));\n assertTrue(\"Currencies same symmetric\", moneyUsd2.isSameCurrency(moneyUsd));\n assertFalse(\"Currencies different\", moneyUsd.isSameCurrency(moneyCad));\n \n }", "@Override\n public boolean equals(Object other) {\n if (!(other instanceof BigNumber)) return false;\n BigNumber that = (BigNumber) other;\n if (this.isNaN()) return that.isNaN();\n if (that.isNaN()) return this.isNaN();\n if (this.isZero()) return that.isZero();\n if (that.isZero()) return this.isZero();\n if (this.sign != that.sign) return false;\n if (this.isInfinite()) return that.isInfinite();\n if (that.isInfinite()) return this.isInfinite();\n \n // adjust exponent before comparing mantissa\n int emin = Math.min(this.exponent, that.exponent);\n int dThis = this.exponent - emin;\n int dThat = that.exponent - emin;\n \n for (int i=0; i<Math.max(this.mantissa.length+dThis, that.mantissa.length+dThat); i++) {\n if (this.getMantissaBit(i-dThis) != that.getMantissaBit(i-dThat)) return false;\n }\n return true;\n }", "public BigDecimal divide(Money moneyA, Money moneyB) throws NoSuchExchangeRateException {\n BigDecimal amount = convert(moneyB, moneyA.currency).amount;\n // BigDecimal representation will fail in case of a repetend as not representatble since not terminating: e.g. 1/3 = 0.3333333... as no\n // TODO: Discuss the needed exactness (amount of scale); \n // lower scale will impair the exactness; until then set to 40\n return moneyA.amount.divide(amount, 40, RoundingMode.HALF_UP);\n }", "public static boolean a_gteq_b(BigDecimal a, BigDecimal b) {\n\t\tif (a == null || b == null) {\n\t\t\tthrow new RuntimeException(\"a_gteq_b参数错误,a:[\" + a + \"],b:[\" + b + \"]\");\n\t\t}\n\t\tint result = a.compareTo(b);\n\t\tboolean c = result == 1 || result == 0;\n\t\tif (LOG.isDebugEnabled()) {\n\t\t\tLOG.debug(\"[\" + a + \" >= \" + b + \" is \" + c + \"]\");\n\t\t}\n\t\treturn c;\n\t}", "@Test\n public void runQueriesWithDecimalValueCollision() throws Throwable\n {\n final int significandSizeInDecimalDigits = 512;\n // String.repeat(int) exists in JDK 11 and later, but this line was introduced on JDK 8\n String wideDecimalString = \"1.\" + StringUtils.repeat('0', significandSizeInDecimalDigits - 2) + '1';\n BigDecimal wideDecimal = new BigDecimal(wideDecimalString);\n // Sanity checks that this value was actually constructed as intended\n Preconditions.checkState(wideDecimal.precision() == significandSizeInDecimalDigits,\n \"expected precision %s, but got %s; string representation is \\\"%s\\\"\",\n significandSizeInDecimalDigits, wideDecimal.precision(), wideDecimalString);\n Preconditions.checkState(wideDecimalString.equals(wideDecimal.toPlainString()),\n \"expected: %s; actual: %s\", wideDecimalString, wideDecimal.toPlainString());\n\n execute(\"INSERT INTO %s (pk, ck, dec) VALUES (0, 1, 1.0)\");\n execute(\"INSERT INTO %s (pk, ck, dec) VALUES (2, 0, \" + wideDecimalString + ')');\n\n // EQ queries\n assertRows(execute(\"SELECT * FROM %s WHERE dec = 1.0\"),\n row(0, 1, BigDecimal.valueOf(1.0D)));\n\n assertRows(execute(\"SELECT * FROM %s WHERE dec = \" + wideDecimalString),\n row(2, 0, wideDecimal));\n\n // LT/LTE queries\n assertRows(execute(\"SELECT * FROM %s WHERE dec < \" + wideDecimalString),\n row(0, 1, BigDecimal.valueOf(1.0D)));\n\n assertRowsIgnoringOrder(execute(\"SELECT * FROM %s WHERE dec <= \" + wideDecimalString),\n row(0, 1, BigDecimal.valueOf(1.0D)),\n row(2, 0, wideDecimal));\n\n assertEmpty(execute(\"SELECT * FROM %s WHERE dec < 1.0\"));\n\n assertRows(execute(\"SELECT * FROM %s WHERE dec <= 1.0\"),\n row(0, 1, BigDecimal.valueOf(1.0D)));\n\n // GT/GTE queries\n assertRows(execute(\"SELECT * FROM %s WHERE dec > 1.0\"),\n row(2, 0, wideDecimal));\n\n assertRowsIgnoringOrder(execute(\"SELECT * FROM %s WHERE dec >= \" + wideDecimalString),\n row(2, 0, wideDecimal));\n\n assertEmpty(execute(\"SELECT * FROM %s WHERE dec > \" + wideDecimalString));\n\n assertRowsIgnoringOrder(execute(\"SELECT * FROM %s WHERE dec >= 1.0\"),\n row(0, 1, BigDecimal.valueOf(1.0D)),\n row(2, 0, wideDecimal));\n }", "@Test\n public void testBigDecimalConstructorDefaultCurrency() {\n new Money(new BigDecimal(\"1.231\"));\n }", "@Test\n public void assertTaxBracketBoundariesWithPrecisions() {\n String minimumSalaryString = \"60000.555555555555555555555555555555555555555555555555555555555555\";\n String maximumSalaryString = \"130000.555555555555555555555555555555555555555555555555555555555555\";\n\n BigDecimal minimumSalary = new BigDecimal(minimumSalaryString).setScale(DEFAULT_DECIMAL_SCALE, DEFAULT_ROUNDING);\n BigDecimal maximumSalary = new BigDecimal(maximumSalaryString).setScale(DEFAULT_DECIMAL_SCALE, DEFAULT_ROUNDING);\n TaxBracket sixtyTo130k = createTaxBracket(minimumSalary, maximumSalary);\n validateSalaryFitsWithinBracket(sixtyTo130k, minimumSalary);\n validateSalaryFitsWithinBracket(sixtyTo130k, maximumSalary);\n // Since we expect the rounding to make the last digit of the decimal a \"6\", we can change scales directly\n // Increase the minimum salary scale\n validateSalaryFitsWithinBracket(sixtyTo130k, new BigDecimal(StringUtils.removeEnd(minimumSalary.toString(), \"6\") + \"61\"));\n // Same for the max salary\n validateSalaryFitsWithinBracket(sixtyTo130k, new BigDecimal(StringUtils.removeEnd(maximumSalary.toString(), \"6\" + \"59\")));\n // Now do the reverse, reduce the scale so that it falls outside the range\n validateSalaryDoesNotFitWithinBracket(sixtyTo130k, new BigDecimal(StringUtils.removeEnd(minimumSalary.toString(), \"6\") + \"59\"));\n validateSalaryDoesNotFitWithinBracket(sixtyTo130k, new BigDecimal(StringUtils.removeEnd(maximumSalary.toString(), \"6\") + \"61\"));\n }", "public void setDecimalScale(int scale) {\n this.mScale = scale;\n }", "@Test\n public void testAbsEqual() { \n assertTrue(!Double.isNaN(sLog.fromReal(Double.POSITIVE_INFINITY)));\n assertTrue(Double.isNaN(sLog.fromReal(Double.NEGATIVE_INFINITY)));\n {\n double v1 = sLog.fromReal(3);\n double v2 = sLog.fromReal(-3);\n double sum = sLog.plus(v1, v2);\n System.out.printf(\"%0#16x\\n\", Double.doubleToRawLongBits(sum));\n assertEquals(0l | Double.doubleToRawLongBits(Double.NEGATIVE_INFINITY), Double.doubleToRawLongBits(sum));\n assertFalse(Double.isNaN(sum));\n assertFalse(Double.isNaN(sLog.toReal(sum)));\n }\n {\n double v1 = sLog.fromReal(-3);\n double v2 = sLog.fromReal(3);\n double sum = sLog.plus(v1, v2);\n System.out.printf(\"%0#16x\\n\", Double.doubleToRawLongBits(sum));\n assertEquals(1l | Double.doubleToRawLongBits(Double.NEGATIVE_INFINITY), Double.doubleToRawLongBits(sum));\n assertTrue(Double.isNaN(sum));\n assertFalse(Double.isNaN(sLog.toReal(sum)));\n }\n }", "public int compareTo(BigDecimal amount) {\n return this.amount.compareTo(amount);\n }", "@Test\n public void scale() {\n assertEquals(\"Wrong vector scale\", new Vector(1,1,1).scale(2), new Vector(2,2,2));\n }", "public static void main(String[] args) {\n\n BigDecimal test = BigDecimal.valueOf(12051);\n BigDecimal result = test.divide(BigDecimal.valueOf(100),2, BigDecimal.ROUND_UP);\n BigDecimal result1 = test.divide(BigDecimal.valueOf(100),2, BigDecimal.ROUND_CEILING);\n System.out.println(result);\n System.out.println(result1);\n }", "@Override\n public boolean distributesDown() {\n return betterOrEqual(P);\n }", "@Test\n public void test08() throws Throwable {\n Complex complex0 = new Complex(0.0, 3207.815923265416);\n double double0 = complex0.getImaginary();\n try { \n complex0.divide((Complex) null);\n } catch(IllegalArgumentException e) {\n //\n // null is not allowed\n //\n assertThrownBy(\"org.apache.commons.math.util.MathUtils\", e);\n }\n }", "public static void main(String[] args) {\n\t\tdouble a = 2.0;\n\t\tdouble b = 1.1;\n\t\tSystem.out.println(a + b);\n\t\tSystem.out.println(a - b);\n\t\t\n\t\tSystem.out.println();\n\t\tBigDecimal d1 = new BigDecimal(\"2.0\");\n\t\tBigDecimal d2 = new BigDecimal(\"1.1\");\n\t\t\n\t\tSystem.out.println(d1.subtract(d2));\n\t\t\n\t\tSystem.out.println();\n\t\tBigDecimal no1 = new BigDecimal(\"1231231219\");\n\t\tBigDecimal no2 = new BigDecimal(\"1231231210\");\n\t\tSystem.out.println(no1.add(no2));\n\t\tSystem.out.println(no1.subtract(no2));\n\t\tSystem.out.println(no1.multiply(no2));\n\t\tSystem.out.println(no1.divide(no2, 2, BigDecimal.ROUND_UP));\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "@Override\n public int compare(Size lhs, Size rhs) {\n return Long.signum((long) lhs.getWidth() * lhs.getHeight() - (long) rhs.getWidth() *\n rhs.getHeight());\n }", "@Override\n public int compare(Size lhs, Size rhs) {\n return Long.signum((long) lhs.getWidth() * lhs.getHeight()\n - (long) rhs.getWidth() * rhs.getHeight());\n }", "@Override\n public int compare(Size lhs, Size rhs) {\n return Long.signum((long) lhs.getWidth() * lhs.getHeight()\n - (long) rhs.getWidth() * rhs.getHeight());\n }", "public boolean lessOrEqualThan(NumberP other)\n {\n \treturn OperationsCompareTo.CompareDouble(this, other) <= 0;\n }", "@Test\n public void testSubtract() {\n \n BigDecimal magnitude1 = new BigDecimal(\"1.11\");\n BigDecimal magnitude2 = new BigDecimal(\"2.22\");\n BigDecimal magnitude3 = new BigDecimal(\"3.33\");\n \n Currency usd = Currency.getInstance(\"USD\");\n Currency cad = Currency.getInstance(\"CAD\");\n \n Money moneyUsd = new Money(magnitude1, usd, RoundingMode.CEILING);\n Money moneyUsd2 = new Money(magnitude2, usd, RoundingMode.FLOOR);\n Money moneyCad = new Money(magnitude3, cad);\n\n Money sum = moneyUsd.subtract(moneyUsd2);\n assertTrue(\"Subtraction result has same currency\", sum.getCurrency().equals(moneyUsd.getCurrency()));\n assertTrue(\"Subtraction result has base rounding mode\", sum.getRoundingMode().equals(moneyUsd.getRoundingMode()));\n assertTrue(\"Subtraction difference is as expected\", sum.getAmount().equals( magnitude1.subtract(magnitude2)));\n \n // Different currencies should throw an exception\n try {\n sum = moneyUsd.subtract(moneyCad);\n fail(\"Subtraction: different currencies should throw an exception\");\n } catch(CurrencyMismatchRuntimeException cmm) {\n }\n \n }", "@Override\n public int compare(Size lhs, Size rhs) {\n return Long.signum((long) lhs.getWidth() * lhs.getHeight() -\n (long) rhs.getWidth() * rhs.getHeight());\n }", "public BigDecimal getBigDecimal(int columnIndex, int scale) throws SQLException\n {\n return m_rs.getBigDecimal(columnIndex);\n }", "@Override\r\n public int compare(Size lhs, Size rhs) {\n return Long.signum((long) lhs.getWidth() * lhs.getHeight() -\r\n (long) rhs.getWidth() * rhs.getHeight());\r\n }", "static protected boolean Round3(double s0, double s1, double s2) {\n // To check \"s1 is half-ulp\", s1!=0 and all the mantissa bits=0 only work\n // for normalized numbers. But if s1 is de-normalized, then according to\n // the two places where Round3 gets called, \\hat s_2 must be zero, which\n // means s0 is correctly rounded.\n long is1 = Double.doubleToRawLongBits(s1);\n return (s1 != .0 && (HIGH_MANTISSA_MASK & is1) == 0 && (LOW_MANTISSA_MASK & is1) == 0 && s1 * s2 > 0);\n }", "@NotNull\n BigDecimal calculate(@NotNull BigDecimal first, @NotNull BigDecimal second);", "@Test\n public void testDivide() {\n\n Currency usd = Currency.getInstance(\"USD\");\n\n Money money = new Money(new BigDecimal(\"50.00\"), usd, RoundingMode.CEILING);\n Money quotient = money.divide(new BigDecimal(\"6\"));\n Money expected = new Money(new BigDecimal(\"8.34\"), usd, RoundingMode.CEILING);\n \n assertEquals(\"Division CEILING\", expected, quotient);\n \n money = new Money(new BigDecimal(\"50.00\"), usd, RoundingMode.FLOOR);\n quotient = money.divide(new BigDecimal(\"6\"));\n expected = new Money(new BigDecimal(\"8.33\"), usd, RoundingMode.FLOOR);\n \n assertTrue(\"Division FLOOR\", quotient.equals(expected));\n \n }", "@Override\n public int compare(Size lhs, Size rhs) {\n return Long.signum((long) lhs.getWidth() * lhs.getHeight() -\n (long) rhs.getWidth() * rhs.getHeight());\n }", "@Override\n public int compare(Size lhs, Size rhs) {\n return Long.signum((long) lhs.getWidth() * lhs.getHeight() -\n (long) rhs.getWidth() * rhs.getHeight());\n }", "@Override\n public int compare(Size lhs, Size rhs) {\n return Long.signum((long) lhs.getWidth() * lhs.getHeight() -\n (long) rhs.getWidth() * rhs.getHeight());\n }", "@Override\n public int compare(Size lhs, Size rhs) {\n return Long.signum((long) lhs.getWidth() * lhs.getHeight() -\n (long) rhs.getWidth() * rhs.getHeight());\n }", "@Override\n public int compare(Size lhs, Size rhs) {\n return Long.signum((long) lhs.getWidth() * lhs.getHeight() -\n (long) rhs.getWidth() * rhs.getHeight());\n }", "@Test\n public void test00() throws Throwable {\n Complex complex0 = new Complex((-1392.0), (-1392.0));\n Complex complex1 = complex0.sinh();\n Complex complex2 = complex0.exp();\n Complex complex3 = complex0.conjugate();\n Complex complex4 = complex0.tan();\n Complex complex5 = complex1.divide(complex3);\n boolean boolean0 = complex5.equals(complex4);\n }", "@Test\n public void testMakeChange() {\n\n //setting a variable for the amount of change the user should get back\n BigDecimal changeDue = new BigDecimal(\"3.19\");\n\n //creating map to store the results of the makeChange() method\n Map<Coin, BigDecimal> changeReturned = new HashMap<>();\n\n changeReturned = dao.makeChange(changeDue);\n\n //creating a variable to store the amount returned from the makeChange()\n // as a BigDecimal\n BigDecimal changeReturnedAsBigDecimal = BigDecimal.ZERO;\n\n BigDecimal quarter = new BigDecimal(\"0.25\");\n BigDecimal dime = new BigDecimal(\"0.10\");\n BigDecimal nickel = new BigDecimal(\"0.05\");\n BigDecimal penny = new BigDecimal(\"0.01\");\n\n BigDecimal numberOfQuarters;\n BigDecimal numberOfDimes;\n BigDecimal numberOfNickels;\n BigDecimal numberOfPennies;\n\n BigDecimal valueOfQuartersDispensed;\n BigDecimal valueOfDimesDispensed;\n BigDecimal valueOfNickelsDispensed;\n BigDecimal valueOfPenniesDispensed; \n\n //calculating the number of quarters that should be returned\n numberOfQuarters = changeDue.divide(quarter);\n //calculating the value of the quarters returned\n valueOfQuartersDispensed = numberOfQuarters.setScale(0, RoundingMode.DOWN).multiply(quarter);\n //calculating how much change is left to be dispensed after quarters\n BigDecimal changeAfterQuarters = changeDue.subtract(valueOfQuartersDispensed);\n \n //adding the value of the quarters returned\n changeReturnedAsBigDecimal = changeReturnedAsBigDecimal.add(valueOfQuartersDispensed);\n\n //dimes\n numberOfDimes = changeAfterQuarters.divide(dime);\n valueOfDimesDispensed = numberOfDimes.setScale(0, RoundingMode.DOWN).multiply(dime);\n\n BigDecimal changeAfterDimes = changeAfterQuarters.subtract(valueOfDimesDispensed);\n \n changeReturnedAsBigDecimal = changeReturnedAsBigDecimal.add(valueOfDimesDispensed);\n \n //nickels\n numberOfNickels = changeAfterDimes.divide(nickel);\n valueOfNickelsDispensed = numberOfNickels.setScale(0, RoundingMode.DOWN).multiply(nickel);\n\n BigDecimal changeAfterNickels = changeAfterDimes.subtract(valueOfNickelsDispensed);\n \n changeReturnedAsBigDecimal = changeReturnedAsBigDecimal.add(valueOfNickelsDispensed);\n \n //pennies\n numberOfPennies = changeAfterNickels.divide(penny);\n valueOfPenniesDispensed = numberOfPennies.setScale(0, RoundingMode.DOWN).multiply(penny);\n \n changeReturnedAsBigDecimal = changeReturnedAsBigDecimal.add(valueOfPenniesDispensed);\n\n //testing if the amount of change returnes equals the amount of change that is due\n assertEquals(changeDue, changeReturnedAsBigDecimal);\n }", "public int compareTo(double amount) {\n return compareTo(new BigDecimal(amount));\n }", "@Test(expected=IllegalArgumentException.class)\n public void testBigDecimalConstructorNullCurrency() {\n new Money(new BigDecimal(\"1.23\"), null, RoundingMode.CEILING);\n fail(\"Currency may not be null\");\n }", "public static BigDecimal chu(BigDecimal a, BigDecimal b) {\n\t\tif (a == null || b == null || BigDecimal.ZERO.equals(b)) {\n\t\t\tthrow new RuntimeException(\"除法参数错误,a:[\" + a + \"],b:[\" + b + \"]\");\n\t\t}\n\t\tboolean near = false;\n\t\tBigDecimal divide;\n\t\ttry {\n\t\t\tdivide = a.divide(b);\n\t\t} catch (ArithmeticException e) {\n\t\t\tdivide = a.divide(b, SCALE, RoundingMode.HALF_EVEN);\n\t\t\tnear = true;\n\t\t}\n\t\tBigDecimal result = divide.setScale(SCALE, RoundingMode.HALF_EVEN);\n\t\tif (LOG.isDebugEnabled()) {\n\t\t\tString str;\n\t\t\tint scale = divide.scale();\n\t\t\tif (scale > SCALE) {\n\t\t\t\tstr = \"[\" + a + \" / \" + b + \" = \" + divide + \" ≈ \" + result + \"]\";\n\t\t\t} else if(scale == SCALE && near) {\n\t\t\t\tstr = \"[\" + a + \" / \" + b + \" ≈ \" + divide + \"]\";\n\t\t\t} else if(scale == SCALE && !near) {\n\t\t\t\tstr = \"[\" + a + \" / \" + b + \" = \" + divide + \"]\";\n\t\t\t} else {\n\t\t\t\tstr = \"[\" + a + \" / \" + b + \" = \" + divide + \" = \" + result + \"]\";\n\t\t\t}\n\t\t\tLOG.debug(str);\n\t\t}\n\t\treturn result;\n\t}", "public static void main(String[] args) {\n BigDecimal bigDecimal = new BigDecimal(2);\n BigDecimal divisor = bigDecimal.pow(256);\n BigDecimal dividend = divisor.add(new BigDecimal(-1));\n BigDecimal multiplier = new BigDecimal(2).pow(128);\n// BigDecimal result = dividend.divide(divisor).pow(multiplier);\n// System.out.println(result);\n }", "public static boolean almost_equals(double a, double b, long maxUlps) {\n if (a == b) { // if two numbers are equal, then the are almost_equal\n return true;\n }\n\n // special case of comparing to zero.\n if (a == 0.0 || b == 0.0) {\n double comp = 1.0e-13; // should correspond to PRECISION_DEFAULT;\n if (maxUlps == PRECISION5) comp = 1.0e-5;\n if (maxUlps == PRECISION7) comp = 1.0e-7;\n if (maxUlps == PRECISION9) comp = 1.0e-9;\n if (maxUlps == PRECISION13) comp = 1.0e-13;\n if (Math.abs(a) < comp && Math.abs(b) < comp) {\n return true;\n }\n }\n\n //if (Double.isNaN(a) || Double.isNaN(b)) { // this operation is slooooooow\n // return false;\n // }\n if (!(a < b || b < a)) { // idiom to filter out NaN's\n return false;\n }\n if (Double.isInfinite(a) || Double.isInfinite(b)) {\n return false;\n }\n\n\n long aInt = Double.doubleToLongBits(a);\n\n // Make aInt lexicographically ordered as a twos-complement long\n if (aInt < 0)\n aInt = 0x8000000000000000l - aInt;\n\n // Make bInt lexicographically ordered as a twos-complement long\n long bInt = Double.doubleToLongBits(b);\n\n if (bInt < 0)\n bInt = 0x8000000000000000l - bInt;\n\n long intDiff = Math.abs(aInt - bInt); // This is valid because IEEE-754\n // doubles are required to be\n // lexically ordered\n\n if (intDiff <= maxUlps) {\n return true;\n }\n\n return false;\n }", "@Test\r\n\tpublic void test() {\n\t\tdouble actual = conv.dollarToRupees(25);\r\n\t\tassertEquals(2500.0,actual,0);\r\n\t\t//assertEquals(expected,actual,precision[delta])\r\n\t\t\r\n\t}", "@Test\n public void testOriginalAmountOwed() {\n //Just ensure that the first two digits are the same\n assertEquals(expectedResults.getOriginalAmountOwed(), results.getOriginalAmountOwed(), 0.15);\n }", "private static BigInteger divideAndRound(BigInteger a, BigInteger b) {\r\n BigInteger result = a.divide(b);\r\n //Case 1: Integer part of the quotient is positive, a%b*2>=b, then the float part of the quotient>=.5, therefore add 1 to quotient\r\n if(result.signum()>0 && a.mod(b).multiply(new BigInteger(\"2\")).compareTo(b)>=0)\r\n result = result.add(BigInteger.ONE);\r\n //Case 2: Integer part of the quotient is negative, a%b*2<=b but a%b<>0 , \r\n //then the float part of the quotient<=-0.5, therefore subtract 1 from quotient\r\n else if(result.signum()<0 && a.mod(b).multiply(new BigInteger(\"2\")).compareTo(b)<=0 && !a.mod(b).equals(BigInteger.ZERO))\r\n result = result.subtract(BigInteger.ONE);\r\n //Case 3: Integer part of the quotient is zero then two cases arise: a>0 or a<0\r\n else if(result.signum()==0)\r\n { \r\n //Case 1.1: a>0.5 then result=1\r\n if(a.compareTo(BigInteger.ZERO)>0 && a.mod(b).multiply(new BigInteger(\"2\")).compareTo(b)>=0)\r\n result = BigInteger.ONE;\r\n //Case 1.1: a<-0.5 then result=-1\r\n else if(a.compareTo(BigInteger.ZERO)<0 && a.mod(b).multiply(new BigInteger(\"2\")).compareTo(b)<=0)\r\n result = BigInteger.ZERO.subtract(BigInteger.ONE); //-1 :)\r\n }\r\n return result;\r\n }", "@Override\n\t\tpublic int compareTo(Rational2 o)\n\t\t{\n\t\t\tif (this.subtract((Rational2)o).getNumerator().compareTo(BigInteger.ZERO) > 0)\n\t\t\t\treturn 1;\n\t\t\t// If the statement results in a value less than 0, return -1\n\t\t\telse if (this.subtract((Rational2)o).getNumerator().compareTo(BigInteger.ZERO) < 0)\n\t\t\t\treturn -1;\n\t\t\telse\n\t\t\t\treturn 0; // If none of these happen return 0\n\t\t}", "@Test\n public void test_IsFracCorr() {\n System.out.println(\"Testing MeasuredRatioModel's isFracCorr()\");\n MeasuredRatioModel instance = new MeasuredRatioModel();\n boolean expResult = false;\n boolean result = instance.isFracCorr();\n assertEquals(expResult, result);\n instance = new MeasuredRatioModel(\"Specific\",new BigDecimal(\"213\"),\"ABS\",new BigDecimal(\"0.4324\"),true,true);\n result = instance.isFracCorr();\n expResult=true;\n assertEquals(expResult, result);\n }" ]
[ "0.57760066", "0.574486", "0.5729946", "0.56784505", "0.5672218", "0.5662461", "0.5538125", "0.5497672", "0.5482851", "0.54783356", "0.5423759", "0.5418543", "0.541711", "0.5416248", "0.53237295", "0.5300009", "0.5293067", "0.5268016", "0.5261454", "0.5239714", "0.5236495", "0.52173865", "0.52066463", "0.52022487", "0.518391", "0.5168664", "0.5144692", "0.51401275", "0.5132453", "0.5120735", "0.51147115", "0.5097692", "0.5069415", "0.5066918", "0.5062895", "0.5049739", "0.50395715", "0.50362194", "0.5023993", "0.50176483", "0.501677", "0.5007717", "0.49998173", "0.49895558", "0.49790844", "0.49778256", "0.497386", "0.49678195", "0.4966487", "0.4959264", "0.49566913", "0.49554804", "0.49536878", "0.49347657", "0.49108833", "0.49073663", "0.49040025", "0.48982865", "0.4897614", "0.48931935", "0.4883172", "0.48798242", "0.48781064", "0.48700547", "0.48543045", "0.48486924", "0.4848001", "0.48437122", "0.48434642", "0.48404938", "0.482693", "0.48199797", "0.48196563", "0.48185036", "0.48185036", "0.481689", "0.48130813", "0.4812682", "0.48103455", "0.480308", "0.4786756", "0.47834656", "0.4778334", "0.4778113", "0.4778113", "0.4778113", "0.4778113", "0.4778113", "0.47710395", "0.4759876", "0.47586232", "0.47533545", "0.47510463", "0.47496498", "0.47474915", "0.47472417", "0.4746568", "0.4739091", "0.47390175", "0.47374424" ]
0.5944496
0
Handles request for yflow path swapping.
public void handleRequest(@NonNull String key, @NonNull CommandContext commandContext, @NonNull YFlowPathSwapRequest request) throws DuplicateKeyException { String yFlowId = request.getYFlowId(); log.debug("Handling y-flow path swap request with key {} and yFlowId {}", key, yFlowId); if (fsmRegister.hasRegisteredFsmWithKey(key)) { throw new DuplicateKeyException(key, "There's another active FSM with the same key"); } if (fsmRegister.hasRegisteredFsmWithFlowId(yFlowId)) { sendErrorResponseToNorthbound(ErrorType.ALREADY_EXISTS, "Could not swap y-flow paths", format("Y-flow %s is already in progress now", yFlowId), commandContext); return; } YFlowPathSwapFsm fsm = fsmFactory.newInstance(commandContext, yFlowId, eventListeners); fsmRegister.registerFsm(key, fsm); YFlowPathSwapContext context = YFlowPathSwapContext.builder().build(); fsm.start(context); fsmExecutor.fire(fsm, Event.NEXT, context); removeIfFinished(fsm, key); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void requestMapChange(String path);", "protected String processPath(HttpServletRequest request,\n HttpServletResponse response)\n throws IOException\n { //20030305AH - Store result of processPath() in request attribute so can use it later for\n //looking up stuff - such as in navigationRenderer...\n String path = super.processPath(request, response);\n request.setAttribute(PROCESSED_PATH, path);\n return path;\n }", "void dispatchRequest(String urlPath) throws Exception;", "public void pathChanged(){\r\n ctrlDomain.pathChanged();\r\n }", "void updatePathListings() {\n\t\tpathSelector.updatePathListings();\n\t}", "@Override\n public String handleRoute(String requestBody) {\n Gson gson = new Gson();\n Wrap sessionWrap = null;\n try {\n sessionWrap = gson.fromJson(requestBody, Wrap.class);\n } catch (JsonSyntaxException e) {\n logger.log(Level.WARNING, \"Failed to unwrap Json wrapper\", e);\n }\n Expression expression = sessionWrap.getExpression();\n // Extract protocol from expression\n String protocol = expression.getProtocol();\n // Forward to correct protocol application\n String protocolServicePath = \"NotSet\";\n if (protocolMap.containsKey(protocol)) {\n protocolServicePath = protocolMap.get(protocol);\n logger.log(Level.INFO, \"Sending packet to a protocol service..\");\n return transmissionHandler.handleTransmission(sessionWrap, protocolServicePath);\n } else {// Else inform service is down\n logger.log(Level.WARNING, \"Protocolservice: \" + protocol\n + \" not found, either it is down, or the service reference is wrong.\");\n }\n return protocolServicePath; // returns string NotSet\n }", "public void setPathway(PathwayHolder p)\r\n\t{\n\t}", "@Test\n public void invokePathHandlerOnExistingResource2() {\n ctx.param(ParamNames.PATH, \"foo/bar.txt\");\n pathHandler.handle(ctx);\n ByteArrayOutputStream baos = (ByteArrayOutputStream)resp.outputStream();\n String s = new String(baos.toByteArray());\n ceq(\"foo/bar.txt\", s);\n }", "public void visitPath(Path path) {\n\t\t\n\t}", "private void setRequestPath(final HttpServerExchange exchange, final String encodedPath, final String charset, final boolean allowEncodedSlash, StringBuilder decodeBuffer) {\n boolean requiresDecode = false;\n for (int i = 0; i < encodedPath.length(); ++i) {\n char c = encodedPath.charAt(i);\n if (c == '?') {\n String part;\n String encodedPart = encodedPath.substring(0, i);\n if (requiresDecode) {\n part = URLUtils.decode(encodedPart, charset, allowEncodedSlash, decodeBuffer);\n } else {\n part = encodedPart;\n }\n exchange.setRequestPath(part);\n exchange.setRelativePath(part);\n exchange.setRequestURI(encodedPart);\n final String qs = encodedPath.substring(i + 1);\n exchange.setQueryString(qs);\n URLUtils.parseQueryString(qs, exchange, encoding, decode);\n return;\n } else if(c == ';') {\n String part;\n String encodedPart = encodedPath.substring(0, i);\n if (requiresDecode) {\n part = URLUtils.decode(encodedPart, charset, allowEncodedSlash, decodeBuffer);\n } else {\n part = encodedPart;\n }\n exchange.setRequestPath(part);\n exchange.setRelativePath(part);\n exchange.setRequestURI(encodedPart);\n for(int j = i; j < encodedPath.length(); ++j) {\n if (encodedPath.charAt(j) == '?') {\n String pathParams = encodedPath.substring(i + 1, j);\n URLUtils.parsePathParms(pathParams, exchange, encoding, decode);\n String qs = encodedPath.substring(j + 1);\n exchange.setQueryString(qs);\n URLUtils.parseQueryString(qs, exchange, encoding, decode);\n return;\n }\n }\n URLUtils.parsePathParms(encodedPath.substring(i + 1), exchange, encoding, decode);\n return;\n } else if(c == '%' || c == '+') {\n requiresDecode = true;\n }\n }\n\n String part;\n if (requiresDecode) {\n part = URLUtils.decode(encodedPath, charset, allowEncodedSlash, decodeBuffer);\n } else {\n part = encodedPath;\n }\n exchange.setRequestPath(part);\n exchange.setRelativePath(part);\n exchange.setRequestURI(encodedPath);\n }", "public void\nsetPath(SoPath path)\n{\n // ref the input path\n if (path != null)\n path.ref();\n\n // nuke the old path\n if (pathOfInterest != null) {\n pathOfInterest.unref();\n pathOfInterest = null;\n }\n // and copy the new path\n if (path != null) {\n pathOfInterest = path.copy();\n pathOfInterest.ref();\n }\n\n // unref the input path\n if (path != null)\n path.unref();\n\n}", "private void triggerPathUpdate() {\n\t\tPathwayPathSelectionEvent pathEvent = new PathwayPathSelectionEvent();\n\n\t\tif (selectedPath != null) {\n\t\t\tif (pathSegments.size() > 0)\n\t\t\t\tpathSegments.set(pathSegments.size() - 1, new PathSegment(selectedPath));\n\t\t\telse\n\t\t\t\tpathSegments.add(new PathSegment(selectedPath));\n\t\t}\n\t\tpathEvent.setPath(pathSegments);\n\t\tpathEvent.setSender(this);\n\t\tpathEvent.setEventSpace(pathwayPathEventSpace);\n\t\teventPublisher.triggerEvent(pathEvent);\n\t}", "@Override\n public void handle(HttpExchange exchange) {\n \n try {\n String resource = exchange.getRequestURI().getPath();\n if (exchange.getRequestMethod().equals(\"HEAD\")){\n exchange.sendResponseHeaders(200, 0);\n return;\n }else if (resource.startsWith(\"/api/\")){\n api(resource, exchange);\n }else{\n if (redirect.containsKey(exchange.getRequestURI().getPath())) resource = redirect.get(exchange.getRequestURI().getPath());\n else resource = resource.substring(1);\n sendResource(resource, exchange);\n }\n System.out.println(exchange.getRequestMethod() + \":\" + exchange.getRequestURI().toString() + \", \" + resource);\n }catch(Exception e){\n System.out.println(exchange.getRequestMethod() + \":\" + exchange.getRequestURI().toString() + \", \" + e);\n e.printStackTrace();\n byte[] data = e.getMessage().getBytes(StandardCharsets.UTF_8);\n try {\n exchange.sendResponseHeaders(500, data.length);\n exchange.getResponseBody().write(data);\n exchange.getResponseBody().flush();\n }catch(Exception ignored){}\n }finally{\n exchange.close();\n }\n }", "public void\nswitchToNodeTraversal(SoNode node)\n{\n // Store current state.\n SoActionP.AppliedData storeddata = new SoActionP.AppliedData(this.pimpl.applieddata);\n AppliedCode storedcode = this.pimpl.appliedcode;\n PathCode storedpathcode = this.currentpathcode;\n SoTempPath storedpath = new SoTempPath(this.currentpath);\n\n this.pimpl.appliedcode = SoAction.AppliedCode.NODE;\n this.pimpl.applieddata.node = node;\n this.currentpathcode = SoAction.PathCode.NO_PATH;\n this.currentpath.truncate(0);\n\n this.traverse(node);\n\n // Restore previous state.\n this.currentpath.copyFrom(storedpath);\n this.currentpathcode = storedpathcode;\n this.pimpl.applieddata.copyFrom(storeddata);\n this.pimpl.appliedcode = storedcode;\n}", "@Override\r\n protected void handleEvent(int actionId)\r\n {\n cancelCurrentRequest();\r\n requestRouteChoices();\r\n }", "@Override\n\tpublic void pathFinderVisited(int x, int y) {\n\t}", "public void setInputPath2(String inputPath2) {\n\t\tthis.inputPath2 = inputPath2;\n\t}", "public void setPath(Path inputPath) {\n path = inputPath;\n node = path.getNodes().getFirst();\n }", "private void changeRequest(InstanceRequest request) {\r\n\t\t\r\n\t}", "public void updatePath (DataSource pool,String path) throws SQLException {\r\n this.setPath(path);\r\n Connection conn=null;\r\n\t\ttry{\r\n conn=pool.getConnection();\r\n String query = \r\n \"update gene_list_analyses \"+\r\n \"set path = ? \"+\r\n \"where analysis_id = ?\";\r\n\r\n log.debug(\"in updateStatus. analysis = \"+this.getDescription());\r\n PreparedStatement pstmt = conn.prepareStatement(query, \r\n ResultSet.TYPE_SCROLL_INSENSITIVE,\r\n ResultSet.CONCUR_UPDATABLE);\r\n pstmt.setString(1, this.getPath());\r\n pstmt.setInt(2, this.getAnalysis_id());\t\r\n pstmt.executeUpdate();\r\n conn.close();\r\n conn=null;\r\n }catch(SQLException e){\r\n throw e;\r\n }finally{\r\n if (conn != null) {\r\n try { conn.close(); } catch (SQLException e) { ; }\r\n conn = null;\r\n }\r\n }\r\n\t}", "@Routes( { @Route( method = Method.ANY, path = \":?path=(.*)\", binding = BindingType.raw ) } )\n public void handle( final HttpServerRequest request )\n {\n ResponseUtils.setStatus( ApplicationStatus.OK, request );\n\n request.pause();\n String path = request.params()\n .get( PathParam.path.key() );\n\n if ( path != null && ( path.length() < 1 || path.equals( \"/\" ) ) )\n {\n path = null;\n }\n\n VertXWebdavRequest req = null;\n final VertXWebdavResponse response = new VertXWebdavResponse( request.response() );\n\n try\n {\n String contextPath = masterRouter.getPrefix();\n if ( contextPath == null )\n {\n contextPath = \"\";\n }\n\n req = new VertXWebdavRequest( request, contextPath, \"/mavdav\", path, null );\n\n service.service( req, response );\n\n }\n catch ( WebdavException | IOException e )\n {\n logger.error( String.format( \"Failed to service mavdav request: %s\", e.getMessage() ), e );\n formatResponse( e, request );\n }\n finally\n {\n IOUtils.closeQuietly( req );\n IOUtils.closeQuietly( response );\n\n try\n {\n request.response()\n .end();\n }\n catch ( final IllegalStateException e )\n {\n }\n }\n }", "final public void updatePath(EventPacket<?> in) {\n if (!pathsEnabled) {\n return;\n }\n path.add(new PathPoint(location.x, location.y, in.getLastTimestamp(), numEvents - previousNumEvents));\n previousNumEvents = numEvents;\n if (path.size() > getPathLength()) {\n path.remove(path.get(0));\n }\n updateVelocity();\n }", "private synchronized void updatePathFollower() {\n TrajectoryStatus leftUpdate = pathFollower\n .getLeftVelocity(leftDrive.getPosition(), leftDrive.getSpeed(), -navX.getYaw());\n TrajectoryStatus rightUpdate = pathFollower\n .getRightVelocity(rightDrive.getPosition(), rightDrive.getSpeed(), -navX.getYaw());\n leftStatus = leftUpdate;\n rightStatus = rightUpdate;\n if (isEncodersConnected()) {\n setVelocitySetpoint(\n new DriveSignal(leftUpdate.getOutput(), rightUpdate.getOutput(), brakePath),\n leftUpdate.getArbFeed(), rightUpdate.getArbFeed());\n } else {\n leftDrive.set(ControlMode.PercentOutput,\n ((1.0 / MkMath.RPMToInchesPerSec(DRIVE.RIGHT_RPM_MAX)) * leftUpdate.getOutput()), false,\n leftUpdate.getArbFeed());\n rightDrive.set(ControlMode.PercentOutput,\n ((1.0 / MkMath.RPMToInchesPerSec(DRIVE.LEFT_RPM_MAX)) * rightUpdate.getOutput()), false,\n rightUpdate.getArbFeed());\n }\n }", "public void updatePath() {\n\t\tString oldPath = this.path;\n\t\tif (materializePath()) {\n\t\t\tPageAlias.create(this, oldPath);\n\t\t\tupdateChildPaths();\n\t\t}\n\t}", "private void callHandler(String method, HttpServletRequest request, HttpServletResponse response) throws IOException {\n JsonElement payload = getPayload(request, response);\n RequestContext context = new RequestContext(\n request, response, urlVariables, request.getParameterMap(), payload);\n PathNode apiStructure = getApiStructure(method);\n\n if (request.getPathInfo() == null) {\n logger.warn(\"Received \" + method + \" request with empty path.\");\n return;\n }\n\n PathNode.PathNodeResult result = apiStructure.getBindingForSubPath(request.getPathInfo());\n if (result != null) {\n urlVariables.putAll(result.getArgValues());\n result.getApiSpec().apiInterface.call(context);\n }\n }", "public boolean preHandle(HttpServletRequest request, HttpServletResponse response,\n\t\t\tObject arg2) throws Exception {\n\t\tString basePath = (String) request.getSession().getAttribute(\"basePath\");\n\t\tif (basePath==null||\"null\".equals(basePath)||\"\".equals(basePath)) {\n\t\t\tString path = request.getContextPath();\n\t\t\tbasePath = request.getScheme() + \"://\"\n\t\t\t\t\t+ request.getServerName() + \":\" + request.getServerPort()\n\t\t\t\t\t+ path + \"/\";\n\t\t\trequest.getSession().setAttribute(\"path\", basePath);\n\t\t\trequest.getSession().setAttribute(\"ver\", new Date().getTime());\n\t\t}\n\t\treturn true;\n\t}", "@Override\n\t\t\tpublic void handle(Request req, Response res) throws Exception {\n\t\t\t\tfinal String op = req.params(\":op\");\n\t\t\t\tfinal String username = req.queryParams(\"user\");\n\t\t\t\tfinal String path = req.queryParams(\"path\");\n\t\t\t\t\n\t\t\t\t//--- framework access ---//\n\t\t\t\tif (!Results.hasFrameworkAccess(op, path)) halt(404);\n\t\t\t\t//--- path exists? ---//\n\t\t\t\tif (!Directories.isExist(path)) halt(404);\n\t\t\t\t//--- section and path access ---//\n\t\t\t\tif (!AccessManager.hasAccess(username, path)) halt(401);\n\n\t\t\t}", "private void dispatchRequests(RoutingContext context) {\n int initialOffset = 5; // length of `/api/`\n // Run with circuit breaker in order to deal with failure\n circuitBreaker.execute(future -> {\n getAllEndpoints().setHandler(ar -> {\n if (ar.succeeded()) {\n List<Record> recordList = ar.result();\n // Get relative path and retrieve prefix to dispatch client\n String path = context.request().uri();\n if (path.length() <= initialOffset) {\n notFound(context);\n future.complete();\n return;\n }\n\n String prefix = (path.substring(initialOffset).split(\"/\"))[0];\n String newPath = path.substring(initialOffset + prefix.length());\n\n // Get one relevant HTTP client, may not exist\n Optional<Record> client = recordList.stream()\n .filter(record -> record.getMetadata().getString(\"api.name\") != null)\n .filter(record -> record.getMetadata().getString(\"api.name\").equals(prefix))\n .findAny(); // simple load balance\n\n if (client.isPresent()) {\n doDispatch(context, newPath, discovery.getReference(client.get()).get(), future);\n } else {\n notFound(context);\n future.complete();\n }\n } else {\n future.fail(ar.cause());\n }\n });\n }).setHandler(ar -> {\n if (ar.failed()) {\n badGateway(ar.cause(), context);\n }\n });\n }", "public void replacePath(Queue<GamePoint> newPath) {\n\t\tmyPath = newPath;\n\t}", "private void setPath(){\r\n // get the reversed path\r\n ArrayList<Grid> reversedPath = new ArrayList<>();\r\n int index = _endIndex;\r\n reversedPath.add(_map.get_grid(index));\r\n while(index != _startIndex){\r\n index = _map.get_grid(index).get_parent();\r\n reversedPath.add(_map.get_grid(index));\r\n }\r\n\r\n // get the final path in the correct order\r\n int length = reversedPath.size();\r\n for(int i=length-1;i>=0;i--){\r\n _path.add(reversedPath.get(i));\r\n }\r\n }", "public abstract String getRequestPathInfo();", "public void followPath(Path path) {\n\t\tdrive.resetDriveEncoders();\n\t\tswitch(path.getMode()) {\n\t\tcase BACKWARD_HIGH:\n\t\t\tleft = new EncoderFollower(Pathfinder.readFromCSV(path.getRightPath()));\n\t\t\tright = new EncoderFollower(Pathfinder.readFromCSV(path.getLeftPath()));\n\t\t\tleft.configurePIDVA(Constants.kMotionProfile_kP, Constants.kMotionProfile_kI, Constants.kMotionProfile_kD, Constants.kMotionProfileLeftBackHigh_kV / 12, Constants.kMotionProfileLeftBackHigh_kA / 12);\n\t\t\tright.configurePIDVA(Constants.kMotionProfile_kP, Constants.kMotionProfile_kI, Constants.kMotionProfile_kD, Constants.kMotionProfileRightBackHigh_kV / 12, Constants.kMotionProfileRightBackHigh_kA / 12);\n\t\t\tleftVIntercept = Constants.kMotionProfileLeftBackHigh_Intercept / 12;\n\t\t\trightVIntercept = Constants.kMotionProfileRightBackHigh_Intercept / 12;\n\t\t\tdirection = -1;\n\t\t\tbreak;\n\t\tcase BACKWARD_LOW:\n\t\t\tleft = new EncoderFollower(Pathfinder.readFromCSV(path.getRightPath()));\n\t\t\tright = new EncoderFollower(Pathfinder.readFromCSV(path.getLeftPath()));\n\t\t\tleft.configurePIDVA(Constants.kMotionProfile_kP, Constants.kMotionProfile_kI, Constants.kMotionProfile_kD, Constants.kMotionProfileLeftBackLow_kV / 12, Constants.kMotionProfileLeftBackLow_kA / 12);\n\t\t\tright.configurePIDVA(Constants.kMotionProfile_kP, Constants.kMotionProfile_kI, Constants.kMotionProfile_kD, Constants.kMotionProfileRightBackLow_kV / 12, Constants.kMotionProfileRightBackLow_kA / 12);\n\t\t\tleftVIntercept = Constants.kMotionProfileLeftBackLow_Intercept / 12;\n\t\t\trightVIntercept = Constants.kMotionProfileRightBackLow_Intercept / 12;\n\t\t\tdirection = -1;\n\t\t\tbreak;\n\t\tcase FORWARD_HIGH:\n\t\t\tleft = new EncoderFollower(Pathfinder.readFromCSV(path.getLeftPath()));\n\t\t\tright = new EncoderFollower(Pathfinder.readFromCSV(path.getRightPath()));\n\t\t\tleft.configurePIDVA(Constants.kMotionProfile_kP, Constants.kMotionProfile_kI, Constants.kMotionProfile_kD, Constants.kMotionProfileLeftForeHigh_kV / 12, Constants.kMotionProfileLeftForeHigh_kA / 12);\n\t\t\tright.configurePIDVA(Constants.kMotionProfile_kP, Constants.kMotionProfile_kI, Constants.kMotionProfile_kD, Constants.kMotionProfileRightForeHigh_kV / 12, Constants.kMotionProfileRightForeHigh_kA / 12);\n\t\t\tleftVIntercept = Constants.kMotionProfileLeftForeHigh_Intercept / 12;\n\t\t\trightVIntercept = Constants.kMotionProfileRightForeHigh_Intercept / 12;\n\t\t\tdirection = 1;\n\t\t\tbreak;\n\t\tcase FORWARD_LOW:\n\t\t\tleft = new EncoderFollower(Pathfinder.readFromCSV(path.getLeftPath()));\n\t\t\tright = new EncoderFollower(Pathfinder.readFromCSV(path.getRightPath()));\n\t\t\tleft.configurePIDVA(Constants.kMotionProfile_kP, Constants.kMotionProfile_kI, Constants.kMotionProfile_kD, Constants.kMotionProfileLeftForeLow_kV / 12, Constants.kMotionProfileLeftForeLow_kA / 12);\n\t\t\tright.configurePIDVA(Constants.kMotionProfile_kP, Constants.kMotionProfile_kI, Constants.kMotionProfile_kD, Constants.kMotionProfileRightForeLow_kV / 12, Constants.kMotionProfileRightForeLow_kA / 12);\n\t\t\tleftVIntercept = Constants.kMotionProfileLeftForeLow_Intercept / 12;\n\t\t\trightVIntercept = Constants.kMotionProfileRightForeLow_Intercept / 12;\n\t\t\tdirection = 1;\n\t\t\tbreak;\n\t\t}\n\t\tif(Constants.kNEOEncoders) {\n\t\t\tencoderCodesPerRev = Constants.kNEODriveEncoderCodesPerRev;\n\t\t}\n\t\telse {\n\t\t\tencoderCodesPerRev = Constants.kDriveEncoderCodesPerRev;\n\t\t}\n\t\tleft.configureEncoder((int)drive.getLeftRioPositionTicks(), encoderCodesPerRev, Constants.kWheelDiameter / 12);\n\t\tright.configureEncoder((int)drive.getRightRioPositionTicks(), encoderCodesPerRev, Constants.kWheelDiameter / 12);\n\t\tpathFinished = false;\n\t\t\n\t\tdrive.set(0, 0);\n\t\tdrive.setDriveMode(DriveMode.MOTION_PROFILE);\n\t\tnotifier.startPeriodic(0.01);\n\t}", "@Test\n public void testSortPath() {\n RestOperationMeta dynamicResLessStatic = UnitTestRestUtils.createRestOperationMeta(\"POST\", \"/a/{id}\");\n RestOperationMeta dynamicResMoreStatic = UnitTestRestUtils.createRestOperationMeta(\"POST\", \"/abc/{id}\");\n\n MicroservicePaths paths = new MicroservicePaths();\n paths.addResource(dynamicResLessStatic);\n paths.addResource(dynamicResMoreStatic);\n paths.sortPath();\n\n Assert.assertSame(dynamicResMoreStatic, paths.getDynamicPathOperationList().get(0));\n Assert.assertSame(dynamicResLessStatic, paths.getDynamicPathOperationList().get(1));\n }", "@Override\n\tprotected void updateWanderPath() {\n\t}", "public void changePath(String newPath){\n this.path=newPath;\n }", "@Override\n\tpublic Object handleHttp(String path, HttpServletRequest req, HttpServletResponse res, HttpSession session, JsonObject requestParts) {\n\t\tif (path.equals(\"callback\")) {\n\t\t\treturn handleCallback(requestParts);\n\t\t} else {\n\t\t\tthrow new TestFailureException(getId(), \"Got unexpected HTTP call to \" + path);\n\t\t}\n\n\t}", "@Override\n protected Response handleRequest(Request request) throws IOException {\n String path = request.getParameter(PATH);\n Resource res = request.getResource();\n String type = res.getValueMap().get(TYPE, String.class);\n Response answer;\n if(COMPONENTS.equals(type)) {\n answer = findComponents(request);\n } else if(TEMPLATES.equals(type)) {\n answer = findTemplates(request);\n } else if(OBJECTS.equals(type)) {\n answer = findObjects(request);\n } else {\n answer = new ErrorResponse().setHttpErrorCode(SC_BAD_REQUEST).setErrorMessage(UNKNOWN_TYPE + type);\n }\n return answer;\n }", "private void handleFileUpdateMessage(String request) {\r\n\t\tString[] commandFragments = Utils.splitCommandIntoFragments(request);\r\n\t\tLoggingUtils.logInfo(logger, \"request=%s;;commandFragments=%s;\", request, Arrays.toString(commandFragments));\r\n\t\tString[] filesFromCommandFrag = Utils.getKeyAndValuefromFragment(commandFragments[0]);\r\n\t\tString[] deleteFilesFromCommandFrag = Utils.getKeyAndValuefromFragment(commandFragments[1]);\r\n\t\tString[] machineFromCommandFrag = Utils.getKeyAndValuefromFragment(commandFragments[2]);\r\n\t\taddNodeFilesToMap(filesFromCommandFrag[1], Machine.parse(machineFromCommandFrag[1]));\r\n\t\tremoveNodeFilesFromMap(deleteFilesFromCommandFrag[1], Machine.parse(machineFromCommandFrag[1]));\r\n\t\t// need to change this to make it consistent with sequential\r\n\t\t// server\r\n\t}", "@Override\n public void handle(HttpExchange exchange) throws IOException {\n boolean wasSuccessful = false;\n try {\n // Only allow POST requests for this operation.\n // This operation requires a POST request, because the\n // client is \"posting\" information to the server for processing.\n if (exchange.getRequestMethod().toLowerCase().equals(\"get\")) {\n\n //String containing the url desired\n String URLrequested = exchange.getRequestURI().toString();\n\n //Checks to see if it is just the open URL as ex: localhost:8080, this is mapped to index.html, this is the case for nothing added.\n if (URLrequested.length() == 1){\n\n\n String location = \"web/index.html\";\n Path path = FileSystems.getDefault().getPath(location);\n\n exchange.sendResponseHeaders(HttpURLConnection.HTTP_OK, 0);\n\n Files.copy(path, exchange.getResponseBody());\n\n exchange.getResponseBody().close();\n\n } else if (URLrequested.equals(\"/\")) {\n\n //\n String location = \"web\" + URLrequested;\n\n //Obtain the file path, this is the same method used for the name and locations data draw\n Path filePath = FileSystems.getDefault().getPath(location);\n\n exchange.sendResponseHeaders(HttpURLConnection.HTTP_OK, 0);\n\n //Copies Files into the exchange's responsive body header\n Files.copy(filePath, exchange.getResponseBody());\n\n exchange.getResponseBody().close();\n\n }\n else if(URLrequested.equals(\"/css/main.css\")){\n String location = \"web/css/main.css\";\n //Obtain the file path, this is the same method used for the name and locations data draw\n Path filePath = FileSystems.getDefault().getPath(location);\n\n exchange.sendResponseHeaders(HttpURLConnection.HTTP_OK, 0);\n\n //Copies Files into the response body\n Files.copy(filePath, exchange.getResponseBody());\n\n exchange.getResponseBody().close();\n\n }\n else{\n String location = \"web/HTML/404.html\";\n\n //Obtain the file path, this is the same method used for the name and locations data draw\n Path filePath = FileSystems.getDefault().getPath(location);\n\n //Response header needs to come first.\n exchange.sendResponseHeaders(HttpURLConnection.HTTP_NOT_FOUND, 0);\n\n //Copies Files into the response body\n Files.copy(filePath, exchange.getResponseBody());\n\n\n //Completes the exchange\n exchange.getResponseBody().close();\n }\n wasSuccessful = true;\n\n\n }\n\n if (!wasSuccessful) {\n //Bad Server Response\n exchange.sendResponseHeaders(HttpURLConnection.HTTP_BAD_REQUEST, 0);\n\n //Completes the exchange\n exchange.getResponseBody().close();\n }\n }\n catch (IOException e) {\n //Bad Server Response\n exchange.sendResponseHeaders(HttpURLConnection.HTTP_SERVER_ERROR, 0);\n //Completes the exchange\n exchange.getResponseBody().close();\n e.printStackTrace();\n }\n }", "public String handle(String path, HttpRequest req, HttpResponse resp){\n\n if(route.containsKey(path)){\n try {\n if(path.equals(\"/prueba\")){\n return httpOk() + \"prueba pasada\";\n }else if (path.equals(\"/dogs.jpg\")){\n return doDogs();\n }else if(path.equals(\"/cats.png\")){\n return doCats();\n }else if(path.equals(\"/js\")){\n return js();\n }else if(path.equals(\"/css\")){\n return doCss();\n }else{\n return httpOk() + route.get(path).invoke(null,null).toString();\n }\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n } catch (InvocationTargetException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return httpNotOk() + \"Error\";\n }", "public void setPath(String path)\r\n/* 21: */ {\r\n/* 22:53 */ this.path = path;\r\n/* 23: */ }", "public void setPath(int sender, Stack<Integer> prevPath)\n { \n if (prevPath.isEmpty() || prevPath.peek()!=sender)\n prevPath.push(sender);\n path = (Stack)prevPath.clone();\n }", "@Override\n public void fileDownLoad(HttpServletResponse response, String path) {\n }", "private void planningPaths(String url) {\n removePolyline();\n JSONObject json = new JSONObject();\n JSONObject origin = new JSONObject();\n JSONObject destination = new JSONObject();\n try {\n origin.put(\"lng\", 2.334595);\n origin.put(\"lat\", 48.893478);\n destination.put(\"lng\", destinationLng);\n destination.put(\"lat\", destinationLat);\n json.put(\"origin\", origin);\n json.put(\"destination\", destination);\n } catch (JSONException e) {\n }\n RequestBody body = RequestBody.create(MediaType.parse(\"application/json; charset=utf-8\"), String.valueOf(json));\n OkHttpClient client = new OkHttpClient();\n Request request = new Request.Builder().url(url).post(body).build();\n client.newCall(request).enqueue(new Callback() {\n @Override\n public void onFailure(Call call, IOException e) {\n Message msg = Message.obtain();\n Bundle bundle = new Bundle();\n bundle.putString(\"errorMsg\", e.getMessage());\n msg.what = ROUTE_PLANNING_FAILED;\n msg.setData(bundle);\n mHandler.sendMessage(msg);\n }\n\n @Override\n public void onResponse(Call call, Response response) throws IOException {\n try {\n String json = response.body().string();\n generateRoute(json);\n } catch (Exception e) {\n e.getMessage();\n }\n }\n });\n }", "public abstract String getRequestServletPath();", "@Override\r\n\tpublic void changeInf2(Scanner input, String path) {\n\t\tSystem.out.println(\"原联系方式为\"+this.getInfo2());\r\n\t\tSystem.out.println(\"请输入新的信息\");\r\n\t\tthis.setInfo2(input.next());\r\n\t\tSystem.out.println(\"修改完成\");\r\n\t}", "private void selectNextPath(boolean inc) {\n\t\tif (this.allPathsList.size() < 1)\n\t\t\treturn;\n\t\tList<GraphPath<PathwayVertexRep, DefaultEdge>> paths = this.allPathsList.get(this.allPathsList.size() - 1)\n\t\t\t\t.getFirst();\n\t\tif (paths.size() > 1) {\n\t\t\t// System.out.println(\"allPaths.size() > 1\");\n\n\t\t\tif (inc)\n\t\t\t\tselectedPathID++;\n\t\t\telse\n\t\t\t\tselectedPathID--;\n\n\t\t\tif (selectedPathID < 0)\n\t\t\t\tselectedPathID = paths.size() - 1;\n\t\t\tif (selectedPathID > paths.size() - 1)\n\t\t\t\tselectedPathID = 0;\n\n\t\t\tif (allPaths.size() > 0) {\n\t\t\t\tselectedPath = paths.get(selectedPathID);\n\t\t\t\t// System.out.println(\"selectedPathID\"+selectedPathID);\n\t\t\t\tif (selectedPath.getEdgeList().size() > 0 && !isShiftKeyDown) {\n\t\t\t\t\tPathwayVertexRep startPrevVertex = selectedPath.getStartVertex();\n\t\t\t\t\tPathwayVertexRep endPrevVertex = selectedPath.getEndVertex();\n\t\t\t\t\tList<DefaultEdge> edgePrevList = selectedPath.getEdgeList();\n\t\t\t\t\tpreviousSelectedPath = new GraphPathImpl<PathwayVertexRep, DefaultEdge>(pathway, startPrevVertex,\n\t\t\t\t\t\t\tendPrevVertex, edgePrevList, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tselectedPathID = 0;\n\t\t}\n\n\t\t// System.out.println(\"selectedPathID=\"+selectedPathID);\n\t\tthis.allPathsList.get(this.allPathsList.size() - 1).setSecond(selectedPathID);\n\t\tisBubbleTextureDirty = true;\n\t\tsetDisplayListDirty();\n\t\ttriggerPathUpdate();\n\t}", "void setChosenPath(Path path) throws Exception {\r\n\t\t// Changing direction, assume we need to clear current set of choices\r\n\t\tcurrentChoices.clear();\r\n\r\n\t\tsetCurrentPath(path);\r\n\r\n\t\tcurrentTurnIndex++;\r\n\t}", "@Override\n protected void processPathAction(GridNode start, GridNode goal, Stack<GridNode> path) {\n path.pop();\n\n // Make the robot follow the path\n Mover mover = new Mover(\n robot.getDifferentialPilot(),\n new LightSensor(leftSensorPort),\n new LightSensor(rightSensorPort),\n path,\n initialDirection);\n mover.run();\n }", "public void advPath(BGPPath incPath) {\n this.incUpdateQueue.add(new BGPUpdate(incPath));\n }", "public void handleRequest(Request req) {\n\n }", "public void handle(HttpServletRequest request, HttpServletResponse response) throws IOException\n {\n try\n {\n String pathInfo = request.getPathInfo();\n String servletPath = request.getServletPath();\n String contextPath = request.getContextPath();\n \n if (nullPathInfoWorkaround && pathInfo == null)\n {\n pathInfo = request.getServletPath();\n servletPath = PathConstants.PATH_ROOT;\n log.debug(\"Default servlet suspected. pathInfo=\" + pathInfo + \"; contextPath=\" + contextPath + \"; servletPath=\" + servletPath); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$\n }\n \n if (pathInfo == null ||\n pathInfo.length() == 0 ||\n pathInfo.equals(PathConstants.PATH_ROOT))\n {\n response.sendRedirect(contextPath + servletPath + PathConstants.FILE_INDEX);\n }\n else if (pathInfo.startsWith(PathConstants.FILE_INDEX))\n {\n String page = debugPageGenerator.generateIndexPage(contextPath + servletPath);\n \n response.setContentType(MimeConstants.MIME_HTML);\n PrintWriter out = response.getWriter();\n out.print(page);\n response.flushBuffer();\n }\n else if (pathInfo.startsWith(PathConstants.PATH_TEST))\n {\n String scriptName = pathInfo;\n scriptName = LocalUtil.replace(scriptName, PathConstants.PATH_TEST, \"\"); //$NON-NLS-1$\n scriptName = LocalUtil.replace(scriptName, PathConstants.PATH_ROOT, \"\"); //$NON-NLS-1$\n \n String page = debugPageGenerator.generateTestPage(contextPath + servletPath, scriptName);\n \n response.setContentType(MimeConstants.MIME_HTML);\n PrintWriter out = response.getWriter();\n out.print(page);\n response.flushBuffer();\n }\n else if (pathInfo.startsWith(PathConstants.PATH_INTERFACE))\n {\n String scriptName = pathInfo;\n scriptName = LocalUtil.replace(scriptName, PathConstants.PATH_INTERFACE, \"\"); //$NON-NLS-1$\n scriptName = LocalUtil.replace(scriptName, PathConstants.EXTENSION_JS, \"\"); //$NON-NLS-1$\n String path = contextPath + servletPath;\n \n String script = remoter.generateInterfaceScript(scriptName, path);\n \n // Officially we should use MimeConstants.MIME_JS, but if we cheat and\n // use MimeConstants.MIME_PLAIN then it will be easier to read in a\n // browser window, and will still work just fine.\n response.setContentType(MimeConstants.MIME_PLAIN);\n PrintWriter out = response.getWriter();\n out.print(script);\n response.flushBuffer();\n }\n else if (pathInfo.startsWith(PathConstants.PATH_PLAINJS))\n {\n Calls calls = plainJsMarshaller.marshallInbound(request, response);\n Replies replies = remoter.execute(calls);\n plainJsMarshaller.marshallOutbound(replies, request, response);\n }\n else if (pathInfo.startsWith(PathConstants.PATH_HTMLJS))\n {\n Calls calls = htmlJsMarshaller.marshallInbound(request, response);\n Replies replies = remoter.execute(calls);\n htmlJsMarshaller.marshallOutbound(replies, request, response);\n }\n else if (pathInfo.equalsIgnoreCase(PathConstants.FILE_ENGINE))\n {\n doFile(request, response, PathConstants.FILE_ENGINE, MimeConstants.MIME_JS, true);\n }\n else if (pathInfo.equalsIgnoreCase(PathConstants.FILE_UTIL))\n {\n doFile(request, response, PathConstants.FILE_UTIL, MimeConstants.MIME_JS, false);\n }\n else if (pathInfo.startsWith(PathConstants.PATH_STATUS))\n {\n Container container = WebContextFactory.get().getContainer();\n ScriptSessionManager manager = (ScriptSessionManager) container.getBean(ScriptSessionManager.class.getName());\n if (manager instanceof DefaultScriptSessionManager)\n {\n DefaultScriptSessionManager dssm = (DefaultScriptSessionManager) manager;\n dssm.debug();\n }\n }\n else\n {\n log.warn(\"Page not found (\" + pathInfo + \"). In debug/test mode try viewing /[WEB-APP]/dwr/\"); //$NON-NLS-1$ //$NON-NLS-2$\n response.sendError(HttpServletResponse.SC_NOT_FOUND);\n }\n }\n catch (Exception ex)\n {\n log.warn(\"Error: \" + ex); //$NON-NLS-1$\n if (ex instanceof SecurityException && log.isDebugEnabled())\n {\n log.debug(\"- User Agent: \" + request.getHeader(HttpConstants.HEADER_USER_AGENT)); //$NON-NLS-1$\n log.debug(\"- Remote IP: \" + request.getRemoteAddr()); //$NON-NLS-1$\n log.debug(\"- Request URL:\" + request.getRequestURL()); //$NON-NLS-1$\n log.debug(\"- Query: \" + request.getQueryString()); //$NON-NLS-1$\n log.debug(\"- Method: \" + request.getMethod()); //$NON-NLS-1$\n \n ex.printStackTrace();\n }\n \n response.setContentType(MimeConstants.MIME_HTML);\n response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);\n PrintWriter out = response.getWriter();\n out.println(\"<html><head><title>Error</title</head><body>\"); //$NON-NLS-1$\n out.println(\"<p><b>Error</b>: \" + ex.getMessage() + \"</p>\"); //$NON-NLS-1$ //$NON-NLS-2$\n out.println(\"<p>For further information about DWR see:</p><ul>\"); //$NON-NLS-1$\n out.println(\"<li><a href='http://getahead.ltd.uk/dwr/documentation'>DWR Documentation</a></li>\"); //$NON-NLS-1$\n out.println(\"<li><a href='http://getahead.ltd.uk/dwr/support'>DWR Mailing List</a></li>\"); //$NON-NLS-1$\n out.println(\"</ul>\"); //$NON-NLS-1$\n out.println(\"<script type='text/javascript'>\"); //$NON-NLS-1$\n out.println(\"alert('\" + ex.getMessage() + \"');\"); //$NON-NLS-1$ //$NON-NLS-2$\n out.println(\"</script>\"); //$NON-NLS-1$\n out.println(\"</body></html>\"); //$NON-NLS-1$\n out.flush();\n }\n }", "private void doDispatch(RoutingContext context, String path, HttpClient client, Future<Object> cbFuture) {\n HttpClientRequest toReq = client\n .request(context.request().method(), path, response -> {\n response.bodyHandler(body -> {\n if (response.statusCode() >= 500) { // api endpoint server error, circuit breaker should fail\n cbFuture.fail(response.statusCode() + \": \" + body.toString());\n } else {\n HttpServerResponse toRsp = context.response()\n .setStatusCode(response.statusCode());\n response.headers().forEach(header -> {\n toRsp.putHeader(header.getKey(), header.getValue());\n });\n // send response\n toRsp.end(body);\n cbFuture.complete();\n }\n ServiceDiscovery.releaseServiceObject(discovery, client);\n });\n });\n // set headers\n context.request().headers().forEach(header -> {\n toReq.putHeader(header.getKey(), header.getValue());\n });\n if (context.user() != null) {\n toReq.putHeader(\"user-principal\", context.user().principal().encode());\n }\n // send request\n if (context.getBody() == null) {\n toReq.end();\n } else {\n toReq.end(context.getBody());\n }\n }", "protected void handleRestlessPath(UrlMappingResource resource, List<String> elementList) {\n }", "@Override\n\tpublic void onReCalculateRouteForTrafficJam() {\n\n\t}", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n logger.log(Level.INFO, \"[GUI QUERY] {0}\", request.getRequestURI()+\"?\"+request.getQueryString());\n\n // check to find version and forward\n Map<String, String[]> params = request.getParameterMap(); // get map of parameters and their values\n String[] versions = params.get(\"version\");\n\n if (versions == null) {\n request.getRequestDispatcher(\"/v104GRs\").forward(request, response); \n } else if (versions[0].equals(\"103\")) {\n request.getRequestDispatcher(\"/v103GRs\").forward(request, response); \n } else {\n // otherwise forward to default\n request.getRequestDispatcher(\"/v104GRs\").forward(request, response);\n }\n }", "@Override\n\tprotected void updateAction(HashSet<String> updateSet){\t\n\t\tif (MiddleWareConfig.getInstance().getCurClassLoaderWay() == MiddleWareConfig.ADAPT_DEP_CLASSLOADER){\n\t\t\t// *** important to reconstruct ****\n\t\t\t((AdaptDependencyManager)MiddleWareConfig.getInstance().getDepManager()).updateDeploymentNodeBySet(updateSet);\n\t\t}\n\t\telse{ // *** important for AdaptExtDepClassloader\n\t\t\t((AdaptDependencyManager)MiddleWareConfig.getInstance().getDepManager()).validDeploymentNodeBySet(updateSet);\n\t\t}\t\t\n\t}", "private void recalcBestPath(int dest) {\n boolean changed;\n\n List<BGPPath> possList = this.inRib.get(dest);\n BGPPath currentBest = this.pathSelection(possList);\n BGPPath currentInstall = this.locRib.get(dest);\n\n /*\n * We need to handle advertisements in one of two cases a) we have found\n * a new best path and it's not the same as our current best path b) we\n * had a best path prior, but currently do not\n */\n changed = (currentBest != null && (currentInstall == null || !currentBest.equals(currentInstall)))\n || (currentBest == null && currentInstall != null);\n this.locRib.put(dest, currentBest);\n if (this.isWardenAS()) {\n if (currentBest == null) {\n this.routeStatusMap.put(dest, AS.RS_NULL);\n } else if (this.botSet == null) {\n this.routeStatusMap.put(dest, AS.RS_CLEAN);\n } else if (currentBest.containsAnyOf(this.botSet)) {\n this.routeStatusMap.put(dest, AS.RS_DIRTY);\n } else {\n this.routeStatusMap.put(dest, AS.RS_CLEAN);\n }\n }\n\n /*\n * If we have a new path, mark that we have a dirty destination\n */\n if (changed) {\n this.dirtyDest.add(dest);\n }\n }", "Route route(String path);", "public interface DfsPathPicker\r\n{\r\n /**\r\n * Select path from {@code origin} to any destination server, based on\r\n * simulation task {@code task}.\r\n * \r\n * @param origin origin node\r\n * @param task simulation task associated with this path select\r\n * @param sTime simulation time\r\n * @param forceTarget if we want the path to end at this target server \r\n * (if null, best target will be selected)\r\n * @param simType simulation type\r\n * @return selected path\r\n * @throws NoPathAvailableException when there is no path from {@code origin} to\r\n * a target object given by {@code task}\r\n * @throws FsObjectNotFoundException when the file associated with {@code task}\r\n * cannot be found\r\n * @throws NotMountedException when the file associated with {@code task}\r\n * is not mounted\r\n */\r\n public DfsPath selectPath(ModelNode origin, SimulationTask task, long sTime, ModelServerNode forceTarget, SimulationType simType) throws NoPathAvailableException, FsObjectNotFoundException, NotMountedException;\r\n \r\n /**\r\n * Get the amount of the required to query any registry (metadata server).\r\n * Usually used when we are asking if some file exists or not - this\r\n * will give us the time (latency) required to contact registry.\r\n * \r\n * @param origin origin node\r\n * @return amount of time\r\n * @throws NoNeighboursAvailableException when {@code origin} has no\r\n * server neighbours\r\n */\r\n public long getObjectRegistryQueryTime(ModelClientNode origin) throws NoNeighboursAvailableException;\r\n}", "public void handle(Exchange exchange) {\n Map<String, String> pathTokens = exchange.getPathTokens();\n exchange.getResponse().send(\"from the nested handler, var1: \" + pathTokens.get(\"var1\") + \", \" + pathTokens.get(\"var2\"));\n }", "public void flip() {\r\n\t\tObject[] bak = path.toArray(new Direction[path.size()]);\r\n\t\tpath.clear();\r\n\t\tfor (int i = bak.length-1; i >= 0; i--) {\r\n\t\t\tpath.push((Direction) bak[i]);\r\n\t\t}\r\n\t}", "@Override\n protected final void parseRequest(final HttpServletRequest request, HttpServletResponse response) {\n\n parsePath(request);\n\n LOGGER.warning(\"[REST]: \" + request.getMethod() + \"|\" + apiName + \"/\" + resourceName + \"|\" + request.getHeader(\"Current-Page\"));\n\n // Fixes BS-400. This is ugly.\n I18n.getInstance();\n\n api = APIs.get(apiName, resourceName);\n api.setCaller(this);\n\n super.parseRequest(request, response);\n\n }", "@Override\r\n\tpublic void onReCalculateRouteForTrafficJam() {\n\r\n\t}", "@Override\n public void handle(final ClassicHttpRequest request,\n final ClassicHttpResponse response,\n final HttpContext context)\n throws HttpException, IOException {\n\n final String method = request.getMethod();\n if (!\"GET\".equalsIgnoreCase(method) &&\n !\"HEAD\".equalsIgnoreCase(method) &&\n !\"POST\".equalsIgnoreCase(method) &&\n !\"PUT\".equalsIgnoreCase(method)) {\n throw new MethodNotSupportedException(method + \" not supported by \" + getClass().getName());\n }\n final URI uri;\n try {\n uri = request.getUri();\n } catch (final URISyntaxException ex) {\n throw new ProtocolException(ex.getMessage(), ex);\n }\n final String path = uri.getPath();\n final int slash = path.lastIndexOf('/');\n if (slash != -1) {\n final String payload = path.substring(slash + 1);\n final long n;\n if (!payload.isEmpty()) {\n try {\n n = Long.parseLong(payload);\n } catch (final NumberFormatException ex) {\n throw new ProtocolException(\"Invalid request path: \" + path);\n }\n } else {\n // random length, but make sure at least something is sent\n n = 1 + (int)(Math.random() * 79.0);\n }\n response.setCode(HttpStatus.SC_OK);\n response.setEntity(new RandomEntity(n));\n } else {\n throw new ProtocolException(\"Invalid request path: \" + path);\n }\n }", "@Override\n protected void handleRequest (@Nonnull final IRequestWebScopeWithoutResponse aRequestScope,\n @Nonnull final UnifiedResponse aUnifiedResponse) throws Exception\n {\n String sKey = aRequestScope.getPathWithinServlet ();\n if (sKey.length () > 0)\n sKey = sKey.substring (1);\n\n SimpleURL aTargetURL = null;\n final GoMappingItem aGoItem = getResolvedGoMappingItem (sKey);\n if (aGoItem == null)\n {\n s_aLogger.warn (\"No such go-mapping item '\" + sKey + \"'\");\n // Goto start page\n aTargetURL = getURLForNonExistingItem (aRequestScope, sKey);\n s_aStatsError.increment (sKey);\n }\n else\n {\n // Base URL\n if (aGoItem.isInternal ())\n {\n final IMenuTree aMenuTree = getMenuTree ();\n if (aMenuTree != null)\n {\n // If it is an internal menu item, check if this internal item is an\n // \"external menu item\" and if so, directly use the URL of the\n // external menu item\n final IRequestManager aARM = ApplicationRequestManager.getRequestMgr ();\n final String sTargetMenuItemID = aARM.getMenuItemFromURL (aGoItem.getTargetURL ());\n\n final IMenuObject aMenuObj = aMenuTree.getItemDataWithID (sTargetMenuItemID);\n if (aMenuObj instanceof IMenuItemExternal)\n {\n aTargetURL = new SimpleURL (((IMenuItemExternal) aMenuObj).getURL ());\n }\n }\n }\n if (aTargetURL == null)\n {\n // Default case - use target link from go-mapping\n aTargetURL = aGoItem.getTargetURL ();\n }\n\n // Callback\n modifyResultURL (aRequestScope, sKey, aTargetURL);\n\n s_aStatsOK.increment (sKey);\n }\n\n // Append all request parameters of this request\n // Don't use the request attributes, as there might be more of them\n final Enumeration <?> aEnum = aRequestScope.getRequest ().getParameterNames ();\n while (aEnum.hasMoreElements ())\n {\n final String sParamName = (String) aEnum.nextElement ();\n final String [] aParamValues = aRequestScope.getRequest ().getParameterValues (sParamName);\n if (aParamValues != null)\n for (final String sParamValue : aParamValues)\n aTargetURL.add (sParamName, sParamValue);\n }\n\n if (s_aLogger.isDebugEnabled ())\n s_aLogger.debug (\"Following go-mapping item '\" + sKey + \"' to \" + aTargetURL.getAsString ());\n else\n if (GlobalDebug.isDebugMode ())\n s_aLogger.info (\"Following go-mapping item '\" + sKey + \"' to \" + aTargetURL.getAsString ());\n\n // Main redirect :)\n aUnifiedResponse.setRedirect (aTargetURL);\n }", "public void changeAlgorithm(String algo){\n logger.info(\"Changing algorithm to {}\", algo);\n currentPathingAlgorithm = pathingAlgorithm.get(algo);\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n String action = request.getServletPath();\n\n switch (action) {\n case \"/new\":\n addForm(request, response);\n break;\n case \"/edit\":\n updateForm(request, response);\n break;\n case \"/insert\":\n insert(request, response);\n break;\n case \"/delete\":\n delete(request, response);\n break;\n case \"/update\":\n update(request, response);\n break;\n case \"/upload\":\n upload(request, response);\n break;\n default:\n listAll(request, response);\n break;\n }\n\n }", "private static void setAllowedPathAccess(HttpServletRequest request){\n\t\tString idStr = request.getParameter(PROJECTID);\n\t\tString accessPath = portalProperties.getProperty(\"curriculum_base_dir\");\n\t\t\n\t\t/* catch minify command and set access path to the vle/all */\n\t\tif(\"minify\".equals(request.getParameter(\"command\"))){\n\t\t\taccessPath = accessPath.replace(\"curriculum\", \"vle/all\");\n\t\t}\n\t\t\n\t\tif(\"studentAssetUpload\".equals(request.getParameter(\"cmd\")) || \"studentAssetCopyForReference\".equals(request.getParameter(\"command\"))) {\n\t\t\taccessPath = portalProperties.getProperty(\"studentuploads_base_dir\");\n\t\t}\n\t\t\n\t\t/* if there is a project id parameter, set access level to the project dir */\n\t\tif(idStr != null && !idStr.equals(\"\") && !idStr.equals(\"none\")){\n\t\t\ttry{\n\t\t\t\tProject project = projectService.getById(Long.parseLong(idStr));\n\t\t\t\tString projectPath = (String) project.getCurnit().accept(new CurnitGetCurnitUrlVisitor());\n\t\t\t\tif(projectPath != null){\n\t\t\t\t\tFile accessFile = new File(accessPath + projectPath);\n\t\t\t\t\taccessPath = accessFile.getParentFile().getCanonicalPath();\n\t\t\t\t}\n\t\t\t} catch(IOException e){\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (ObjectNotFoundException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\trequest.setAttribute(\"accessPath\", accessPath);\n\t}", "ServerSwitcherTransmitter getServerSwitcherTransmitter();", "Object handle(Object request);", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n Model model = ModelFactory.getModel();\n String listName = request.getParameter(\"listName\");\n String newListName = request.getParameter(\"newListName\");\n\n // If list name has been changed -> Go to 'ViewAllListsServlet'\n // If list name has not been changed -> Go to 'errorPage'\n String nextPage;\n if (model.changeListName(listName, newListName)){\n nextPage = \"/viewAllLists.jsp\";\n }else{\n request.setAttribute(\"errorMessage\", \"There was an error when changing \" + listName + \" to \" + newListName);\n nextPage = \"/errorPage.jsp\";\n }\n\n // Invokes the next page\n ServletContext context = getServletContext();\n RequestDispatcher dispatch = context.getRequestDispatcher(nextPage);\n dispatch.forward(request, response);\n }", "private void pathFill(Vertex<E> src, Vertex<E> dst, ArrayList<E> path) {\r\n\t\tif(src == dst) {\r\n\t\t\tpath.add(src.getElement());\r\n\t\t} else {\r\n\t\t\tpathFill(src, dst.getPredecessor(), path);\r\n\t\t\tpath.add(dst.getElement());\r\n\t\t}\r\n\t}", "public void passIDFromQueue(int id, int x, int y\n , LinkedList<Node> path, LinkedList<Node> returnPath){\n if(path.size()==0){\n path.addFirst(this);\n Node node = returnPath.removeFirst();\n node.returnID(id,x,y,true,path,returnPath);\n return;\n }\n Node nextNode = path.getFirst();\n if(!liveNeighbors.contains(nextNode)){\n pathsToBaseStation.remove(path);\n path.addFirst(this);\n Node node = returnPath.removeFirst();\n node.returnID(id,x,y,false,path,returnPath);\n return;\n }\n path.removeFirst();\n returnPath.addFirst(this);\n nextNode.passID(id,x,y,path,returnPath);\n }", "@Override\n\tpublic void handle(String target, HttpServletRequest request,\n\t\t\tHttpServletResponse response, boolean[] isHandled) {\n\t\trequest.setAttribute(\"CONTEXT_PATH\", request.getContextPath()); //添加项目根路径配置\n\n\t\tnextHandler.handle(target, request, response, isHandled);\n\t}", "void update(String page, Collection<String> paths, Collection<String> refreshPaths);", "private LoanProtocol ProcessTransferRequest(LoanProtocol protocol)\n\t{\n\t\t// only change the type of the protocol to answer\n\t\tprotocol.setType(messageType.TransferAnswer);\n\t\treturn protocol;\n\t}", "public void findNewAStarPath(PedSimCity state) {\n\n\t\tRouteData route = new RouteData();\n\t\troute.origin = originNode.getID();\n\t\troute.destination = destinationNode.getID();\n\t\t//\t\toriginNode = PedSimCity.nodesMap.get(9406);\n\t\t//\t\tdestinationNode = PedSimCity.nodesMap.get(4456);\n\n\t\tif (UserParameters.empiricalABM) {\n\t\t\tSystem.out.println(\" Agent nr. \"+this.agentID + \" group \" + this.agp.groupName + \" OD \" + originNode.getID()+\" \" +destinationNode.getID());\n\t\t\tagp.defineRouteChoiceParameters();\n\t\t\tCombinedNavigation combinedNavigation = new CombinedNavigation();\n\t\t\tnewPath = combinedNavigation.path(originNode, destinationNode, agp);\n\t\t\troute.group = this.agp.groupID;\n\t\t\troute.localH = this.agp.localHeuristic;\n\t\t\troute.routeID = this.agentID.toString()+\"-\"+originNode.getID().toString()+\"-\"+destinationNode.getID().toString();\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(originNode.getID() + \" \"+ destinationNode.getID()+ \" \"+ap.routeChoice);\n\t\t\tselectRouteChoice();\n\t\t\troute.routeChoice = ap.routeChoice;\n\t\t\t//\t\t\troute.routeID = numTrips;\n\t\t}\n\n\t\tList<Integer> sequenceEdges = new ArrayList<Integer>();\n\n\t\tfor (GeomPlanarGraphDirectedEdge o : newPath) {\n\t\t\t// update edge data\n\t\t\tupdateEdgeData((EdgeGraph) o.getEdge());\n\t\t\tint edgeID = ((EdgeGraph) o.getEdge()).getID();\n\t\t\tsequenceEdges.add(edgeID);\n\t\t}\n\t\troute.sequenceEdges = sequenceEdges;\n\t\tPedSimCity.routesData.add(route);\n\t\tindexOnPath = 0;\n\t\tpath = newPath;\n\n\t\t// set up how to traverse this first link\n\t\tEdgeGraph firstEdge = (EdgeGraph) newPath.get(0).getEdge();\n\t\tsetupEdge(firstEdge); //Sets the Agent up to proceed along an Edge\n\n\t\t// update the current position for this link\n\t\tupdatePosition(segment.extractPoint(currentIndex));\n\t\tnumTrips += 1;\n\t}", "void handleRequest();", "@Override\r\n\tpublic Answer handle(Request request) throws Exception {\r\n\t\tGPS startPoint = request.getStartPos();\r\n\t\tGPS endPoint = request.getEndPos();\r\n\t\tCurrentDistribution curDis = CurrentDistribution.getInstance();\r\n\t\tArrayList<Station> givenTypeAvaStations = null;// whether this init is a correct choice in case that ArrayList can not be covered directly \r\n\t\tdouble ridingSpeed = 0.00001;//if not given proper bicycle type, time cost would be extremely large\r\n\t\tif(request.getBikeType().equalsIgnoreCase(\"E\")) {\r\n\t\t\tridingSpeed = Server.eleRidingSpeed;\r\n\t\t\tgivenTypeAvaStations = curDis.geteAvaStationList();\r\n\t\t}\r\n\t\t\r\n\t\tif(request.getBikeType().equalsIgnoreCase(\"M\")) {\r\n\t\t\tridingSpeed = Server.mecRidingSpeed;\r\n\t\t\tgivenTypeAvaStations = curDis.getmAvaStationList();\r\n\t\t}\r\n\r\n\t\tif(givenTypeAvaStations.size() == 0) {\r\n\t\t\tServer.error(\"no available station containing given type of bicycle\");\r\n\t\t}\r\n\r\n\t\tStation minStartStation = givenTypeAvaStations.get(0);\r\n\t\tStation minEndStation = curDis.getReturnableStationList().get(0);\r\n\t\t\r\n\t\tdouble minEndDis = Math.sqrt((minEndStation.getPos().getX() - endPoint.getX()) * (minEndStation.getPos().getX() - endPoint.getX()) + \r\n\t\t\t\t(minEndStation.getPos().getY() - endPoint.getY())*(minEndStation.getPos().getY() - endPoint.getY()));\r\n\t\t\r\n\t\tfor(Station s: curDis.getReturnableStationList()) {\r\n\t\t\tdouble endDis = Math.sqrt((s.getPos().getX() - endPoint.getX())*(s.getPos().getX() - endPoint.getX()) + \r\n\t\t\t\t\t(s.getPos().getY() - endPoint.getY()) * (s.getPos().getY() - endPoint.getY()));\r\n\t\t\tif( endDis < minEndDis) {\r\n\t\t\t\tminEndStation = s;\r\n\t\t\t\tminEndDis = endDis; \r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tdouble minWalkRideTime = Math.sqrt((minStartStation.getPos().getX() - startPoint.getX()) * (minStartStation.getPos().getX() - startPoint.getX())+\r\n\t\t\t\t(minStartStation.getPos().getY() - startPoint.getY()) * (minStartStation.getPos().getY() - startPoint.getY()))/\r\n\t\t\t\tServer.walkingSpeed +\r\n\t\t\t\t(Math.abs(minStartStation.getPos().getX() - endPoint.getX())+ \r\n\t\t\t\t\t\tMath.abs(minStartStation.getPos().getY() - endPoint.getY()))/\r\n\t\t\t\tridingSpeed;\r\n\t\t\r\n\t\tfor(Station s: givenTypeAvaStations) {\r\n\t\t\tdouble walkRideTime = Math.sqrt((s.getPos().getX() - startPoint.getX()) * (s.getPos().getX() - startPoint.getX())+\r\n\t\t\t\t\t(s.getPos().getY() - startPoint.getY()) * (s.getPos().getY() - startPoint.getY()))/\r\n\t\t\t\t\tServer.walkingSpeed +\r\n\t\t\t\t\t(Math.abs(s.getPos().getX() - endPoint.getX())+ \r\n\t\t\t\t\t\t\tMath.abs(s.getPos().getY() - endPoint.getY()))/\r\n\t\t\t\t\tridingSpeed;\r\n\t\t\tif( walkRideTime < minWalkRideTime) {\r\n\t\t\t\tminStartStation = s;\r\n\t\t\t\tminWalkRideTime = walkRideTime; \r\n\t\t\t}\r\n\t\t}\t\t\t\r\n\r\n\t\tdouble minStartDis = Math.sqrt((minStartStation.getPos().getX() - startPoint.getX())*(minStartStation.getPos().getX() - startPoint.getX())\r\n\t\t\t\t+ (minStartStation.getPos().getY() - startPoint.getY())*(minStartStation.getPos().getY() - startPoint.getY()));\r\n\t\tdouble minRideDis = (Math.abs(minStartStation.getPos().getX() - minEndStation.getPos().getX())+ \r\n\t\t\t\tMath.abs(minStartStation.getPos().getY() - minEndStation.getPos().getY()));\r\n\t\tdouble minTime = (minEndDis + minStartDis)/ Server.walkingSpeed + minRideDis/ridingSpeed;\r\n\t\tdouble minDis = minStartDis + minEndDis + minRideDis;\r\n\t\tif(minTime > 500) {\r\n\t\t\tthrow new Exception(\"BikeType input illegal.\");\r\n\t\t}\r\n\t\t\r\n\t\tAnswer ans = new Answer(minStartStation, minEndStation, minTime, minDis);\r\n\t\treturn ans;\r\n\t}", "@Override\r\n\tprotected byte[] handleSpecificRequest(String request) {\r\n\t\tif (!Utils.isEmpty(request)) {\r\n\t\t\tlogger.info(\"$$$$$$$$$$$$Message received at Tracking Server:\" + request);\r\n\t\t\tif (request.startsWith(NODE_REQUEST_TO_SERVER.FILE_LIST.name())) {\r\n\t\t\t\thandleFileUpdateMessage(request);\r\n\t\t\t\treturn Utils.stringToByte(SharedConstants.COMMAND_SUCCESS);\r\n\t\t\t} else if (request.startsWith(NODE_REQUEST_TO_SERVER.FIND.name())) {\r\n\t\t\t\tString peers = handleFindFileRequest(request);\r\n\t\t\t\treturn Utils.stringToByte((Utils.isEmpty(peers) ? SharedConstants.COMMAND_FAILED\r\n\t\t\t\t\t\t: SharedConstants.COMMAND_SUCCESS) + SharedConstants.COMMAND_PARAM_SEPARATOR + peers);\r\n\r\n\t\t\t} else if (request.startsWith(NODE_REQUEST_TO_SERVER.FAILED_PEERS.name())) {\r\n\t\t\t\thandleFailedPeerRequest(request);\r\n\t\t\t\treturn Utils.stringToByte(SharedConstants.COMMAND_SUCCESS);\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn Utils.stringToByte(SharedConstants.INVALID_COMMAND);\r\n\r\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n try {\n processRequest(request, response);\n } catch (NamingException ex) {\n Logger.getLogger(UpdateLibro.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tString data1 = new String(\"java\");\r\n\t\tArrayList<String> data2 = new ArrayList<String>();\r\n\t\tdata2.add(\"123455\");\r\n\t\tdata2.add(\"abcdef\");\r\n\t\tdata2.add(\"test\");\r\n\t\t\r\n\t\treq.setAttribute(\"v1\", data1);\r\n\t\treq.setAttribute(\"v2\", data2);\r\n\t\t\r\n\t\tServletContext context = this.getServletContext();\r\n\t\tRequestDispatcher dispatcher = context.getRequestDispatcher(\"/Servlet01_request?data3=http01&data4=http02\");\r\n\t\tdispatcher.forward(req, resp);\r\n\t\t\r\n\t\t\r\n\t}", "@FXML\n public void getDirections(ActionEvent event) throws IOException {\n\n if (selectedBtnStart == null) {\n errorLabel.setText(\"Please Choose Start\");\n } else if (selectedBtnDest == null) {\n errorLabel.setText(\"Please Choose Destination\");\n } else if (selectedBtnStart.equals(selectedBtnDest)) {\n errorLabel.setText(\"Please Choose Different Locations\");\n } else {\n //create path finding object\n PathFinding pf = PathFindingFactory.makePathFinding((ArrayList<Node>) nodes,\n selectedBtnStart, selectedBtnDest);\n pf.pathFind();\n PathFindController.setPath(pf.getPath());\n\n\n if (pf.getPath().size() < 2) {\n errorLabel.setText(\"Invalid Path\");\n } else {\n KioskApplication.getHistory().push(() -> {\n KioskApplication.getMainScreenController().changeToDirections(\n pf.getStart(), pf.getDest());\n Platform.runLater(() -> {\n try {\n ((PathFindStartController) KioskApplication.getController())\n .getDirections(null);\n } catch (IOException ex) {\n //wont\n }\n });\n });\n KioskApplication.getMapController().drawPath(PathFindController.getPath());\n\n AnchorPane pathFindText = FXMLLoader.load(getClass()\n .getResource(\"/layout/UI_SoftEng_PathFindText.fxml\"));\n\n KioskApplication.switchPanel(mainAnchorPane, pathFindText);\n }\n }\n }", "public void handleRequest(String request) throws IOException {\n\n String method = getMethod(request);\n\n this.uri = ToolBox.getUri(request);\n this.url = ToolBox.getUrl(uri);\n this.extension = ToolBox.getExtension(url);\n\n System.out.println(\"method :\" + method);\n switch (method) {\n case \"GET\":\n doGet();\n break;\n case \"POST\":\n doPost();\n break;\n case \"HEAD\":\n doHead();\n break;\n case \"PUT\":\n doPut();\n break;\n case \"DELETE\":\n doDelete();\n break;\n default:\n statusCode = BAD_REQUEST;\n this.sendHeader(statusCode, \"text/html\", null);\n break;\n }\n this.out.flush();\n this.out.close();\n }", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\treq.setAttribute(\"model\", model);\r\n\t\treq.getRequestDispatcher(\"param.jsp\").forward(req, resp);\r\n\t}", "@Override\n\t\tpublic RequestDispatcher getRequestDispatcher(String path) {\n\t\t\treturn null;\n\t\t}", "@Override\n void setPath(String sessionId, String path) {\n if (sessionsInfoManager.getPath(sessionId).isEmpty())\n {\n sessionsInfoManager.setPath(sessionId, path);\n }\n }", "@Override\n public List<ActionBuilder> updateAction(List<ActionBuilder> actions, Map<String, Object> params, Integer order,\n NetworkElements netElements, PolicyPair policyPair, FlowMap flowMap, OfContext ctx, Direction direction) {\n String chainName = null;\n if (params != null) {\n LOG.debug(\"updateAction: Searching for named chain\");\n for (String name : params.keySet()) {\n if (name instanceof String) {\n if (name.equals(SFC_CHAIN_NAME)) {\n chainName = (String) params.get(name);\n if (chainName == null) {\n LOG.error(\"updateAction: Chain name was null\");\n return null;\n }\n }\n }\n }\n } else {\n LOG.error(\"updateAction: Parameters null for chain action\");\n return null;\n }\n\n if (chainName == null) {\n LOG.error(\"updateAction: Chain name was null\");\n return null;\n }\n\n /*\n * If path is symmetrical then there are two RSPs.\n * if srcEp is in consumer EPG use \"rspName\"\n * else srcEp is in provider EPG, \"rspName-Reverse\".\n */\n ServiceFunctionPath sfcPath = getSfcPath(chainName);\n if (sfcPath == null || sfcPath.getName() == null) {\n LOG.error(\"updateAction: SFC Path was invalid. Either null or name was null.\", sfcPath);\n return null;\n }\n // Find existing RSP based on following naming convention, else create it.\n String rspName = sfcPath.getName() + \"-gbp-rsp\";\n ReadOnlyTransaction rTx = ctx.getDataBroker().newReadOnlyTransaction();\n RenderedServicePath renderedServicePath;\n RenderedServicePath rsp = getRspByName(rspName, rTx);\n if (rsp == null) {\n renderedServicePath = createRsp(sfcPath, rspName);\n if (renderedServicePath != null) {\n LOG.info(\"updateAction: Could not find RSP {} for Chain {}, created.\", rspName, chainName);\n } else {\n LOG.error(\"updateAction: Could not create RSP {} for Chain {}\", rspName, chainName);\n return null;\n }\n } else {\n renderedServicePath = rsp;\n }\n\n NodeId tunnelDestNodeId;\n if (netElements.getDstNodeId().equals(netElements.getLocalNodeId())) {\n // Return destination is here\n tunnelDestNodeId = netElements.getLocalNodeId();\n } else {\n tunnelDestNodeId = netElements.getDstNodeId();\n }\n\n Long returnVnid = (long) netElements.getSrcEpOrds().getTunnelId();\n\n try {\n if (sfcPath.isSymmetric() && direction.equals(Direction.Out)){\n rspName = rspName + \"-Reverse\";\n rsp = getRspByName(rspName, rTx);\n if (rsp == null) {\n LOG.info(\"updateAction: Could not find Reverse RSP {} for Chain {}\", rspName, chainName);\n renderedServicePath = createSymmetricRsp(renderedServicePath);\n if (renderedServicePath == null) {\n LOG.error(\"updateAction: Could not create RSP {} for Chain {}\", rspName, chainName);\n return null;\n }\n } else {\n renderedServicePath = rsp;\n }\n if(isSrcEpConsumer(netElements.getSrcEp(), policyPair.getConsumerEpgId(), ctx)) {\n if (netElements.getSrcNodeId().equals(netElements.getLocalNodeId())) {\n // Return destination is here\n tunnelDestNodeId = netElements.getLocalNodeId();\n } else {\n tunnelDestNodeId = netElements.getSrcNodeId();\n }\n returnVnid = (long) netElements.getDstEpOrds().getTunnelId();\n }\n }\n } catch (Exception e) {\n LOG.error(\"updateAction: Attemping to determine if srcEp {} was consumer.\", netElements.getSrcEp().getKey(), e);\n return null;\n }\n\n RenderedServicePathFirstHop rspFirstHop = SfcProviderRenderedPathAPI.readRenderedServicePathFirstHop(rspName);\n if (!isValidRspFirstHop(rspFirstHop)) {\n // Errors logged in method.\n return null;\n }\n\n IpAddress tunnelDest = ctx.getSwitchManager().getTunnelIP(tunnelDestNodeId, TunnelTypeVxlanGpe.class);\n if (tunnelDest == null || tunnelDest.getIpv4Address() == null) {\n LOG.error(\"updateAction: Invalid tunnelDest for NodeId: {}\", tunnelDestNodeId);\n return null;\n }\n\n RenderedServicePathHop firstRspHop = renderedServicePath.getRenderedServicePathHop().get(0);\n RenderedServicePathHop lastRspHop = Iterables.getLast(renderedServicePath.getRenderedServicePathHop());\n SfcNshHeader sfcNshHeader = new SfcNshHeaderBuilder().setNshTunIpDst(rspFirstHop.getIp().getIpv4Address())\n .setNshTunUdpPort(rspFirstHop.getPort())\n .setNshNsiToChain(firstRspHop.getServiceIndex())\n .setNshNspToChain(renderedServicePath.getPathId())\n .setNshNsiFromChain((short) (lastRspHop.getServiceIndex().intValue() - 1))\n .setNshNspFromChain(renderedServicePath.getPathId())\n .setNshMetaC1(SfcNshHeader.convertIpAddressToLong(tunnelDest.getIpv4Address()))\n .setNshMetaC2(returnVnid)\n .build();\n\n // Cannot set all actions here. Some actions are destination specific, and we don't know\n // a destination is to be\n // chained until we reach this point. Need to write match/action in External Table for\n // chained packets.\n actions = addActionBuilder(actions, nxSetNsiAction(sfcNshHeader.getNshNsiToChain()), order);\n actions = addActionBuilder(actions, nxSetNspAction(sfcNshHeader.getNshNspToChain()), order);\n boolean swap=false;\n if ((direction.equals(Direction.Out) && !(isSrcEpConsumer(netElements.getSrcEp(), policyPair.getConsumerEpgId(), ctx)))\n || (direction.equals(Direction.In) && (isSrcEpConsumer(netElements.getSrcEp(), policyPair.getConsumerEpgId(), ctx)))){\n swap = true;\n }\n createChainTunnelFlows(sfcNshHeader, netElements, flowMap, ctx, swap);\n return actions;\n }", "public interface WorkflowPathHandler {\n\n /**\n * Validate tracking record.\n *\n * @param trackingRecord the tracking record\n * @return the validation result\n * @throws Exception the exception\n */\n public ValidationResult validateTrackingRecord(TrackingRecord trackingRecord) throws Exception;\n \n /**\n * Validate tracking record for action and user.\n *\n * @param trackingRecord the tracking record\n * @param action the action\n * @param mapUser the map user\n * @return the validation result\n * @throws Exception the exception\n */\n public ValidationResult validateTrackingRecordForActionAndUser(\n TrackingRecord trackingRecord, WorkflowAction action, MapUser mapUser)\n throws Exception;\n\n}", "public<T> Future<Void> update(String pathinfo) throws APIException, CadiException {\n\t\tfinal int idx = pathinfo.indexOf('?');\n\t\tfinal String qp; \n\t\tif(idx>=0) {\n\t\t\tqp=pathinfo.substring(idx+1);\n\t\t\tpathinfo=pathinfo.substring(0,idx);\n\t\t} else {\n\t\t\tqp=queryParams;\n\t\t}\n\n\t\tEClient<CT> client = client();\n\t\tclient.setMethod(PUT);\n\t\tclient.addHeader(CONTENT_TYPE, typeString(Void.class));\n\t\tclient.setQueryParams(qp);\n\t\tclient.setFragment(fragment);\n\t\tclient.setPathInfo(pathinfo);\n//\t\tclient.setPayload(new EClient.Transfer() {\n//\t\t\t@Override\n//\t\t\tpublic void transfer(OutputStream os) throws IOException, APIException {\n//\t\t\t}\n//\t\t});\n\t\tclient.send();\n\t\tqueryParams = fragment = null;\n\t\treturn client.future(null);\n\t}", "void makeService(int loc_temp,int des_temp,ArrayList<Coordinate> path)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tint last_direction = 0;\r\n\t\t\tint[] shortest_path = new int[6400];\r\n\t\t\tint j_current = loc_temp % 80;\r\n\t\t\tint i_current = loc_temp / 80;\r\n\t\t\tBFS.setShortest(des_temp,shortest_path,BFS.adj_const);\r\n\t\t\tint temp = shortest_path[loc_temp];\r\n\t\t\twhile(temp != -1)\r\n\t\t\t{\r\n\t\t\t\tint length_min = BFS.getShortest(temp, des_temp,BFS.adj_const);\r\n\t\t\t\tint direction = -1;\r\n\t\t\t\tint flow_min = Main.MAX_INT;\r\n\t\t\t\tif((i_current-1)>=0 && BFS.adj_const[(i_current-1)*80+j_current][i_current*80+j_current]==1 && Flow.flows[i_current-1][j_current][1]<flow_min)\r\n\t\t\t\t{\r\n\t\t\t\t\tint length_temp = BFS.getShortest((i_current-1)*80+j_current, des_temp, BFS.adj_const);\r\n\t\t\t\t\tif(length_temp <= length_min)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdirection = 0;//up\r\n\t\t\t\t\t\tflow_min = Flow.flows[i_current-1][j_current][1];\r\n\t\t\t\t\t\tlength_min = length_temp;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif((i_current+1)<80 && BFS.adj_const[(i_current+1)*80+j_current][i_current*80+j_current]==1 && Flow.flows[i_current][j_current][1]<flow_min)\r\n\t\t\t\t{\r\n\t\t\t\t\tint length_temp = BFS.getShortest((i_current+1)*80+j_current, des_temp, BFS.adj_const);\r\n\t\t\t\t\tif(length_temp <= length_min)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdirection = 1;//down\r\n\t\t\t\t\t\tflow_min = Flow.flows[i_current][j_current][1];\r\n\t\t\t\t\t\tlength_min = length_temp;\r\n\t\t\t\t\t}\t\r\n\t\t\t\t}\r\n\t\t\t\tif((j_current-1)>=0 && BFS.adj_const[i_current*80+j_current-1][i_current*80+j_current]==1 && Flow.flows[i_current][j_current-1][0]<flow_min)\r\n\t\t\t\t{\t\r\n\t\t\t\t\tint length_temp = BFS.getShortest(i_current*80+j_current-1, des_temp, BFS.adj_const);\r\n\t\t\t\t\tif(length_temp <= length_min)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdirection = 2;//left\r\n\t\t\t\t\t\tflow_min = Flow.flows[i_current][j_current-1][0];\r\n\t\t\t\t\t\tlength_min = length_temp;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tif((j_current+1)<80 && BFS.adj_const[i_current*80+j_current+1][i_current*80+j_current]==1 && Flow.flows[i_current][j_current][0]<flow_min)\r\n\t\t\t\t{\r\n\t\t\t\t\tint length_temp = BFS.getShortest(i_current*80+j_current+1, des_temp, BFS.adj_const);\r\n\t\t\t\t\tif(length_temp <= length_min)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdirection = 3;//right\r\n\t\t\t\t\t\tflow_min = Flow.flows[i_current][j_current][0];\r\n\t\t\t\t\t\tlength_min = length_temp;\r\n\t\t\t\t\t}\t\r\n\t\t\t\t}\r\n\t\t\t\tLight light = Traffic.findLight(i_current,j_current);\r\n\t\t\t\tif(light != null)\r\n\t\t\t\t{\r\n\t\t\t\t\tboolean first = true;\r\n\t\t\t\t\twhile(!leaveLight(light,last_direction,direction))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmeet_light = true;\r\n\t\t\t\t\t\tif(first)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tSystem.out.println(\"Taxi-\" + id + loc + \": Waiting at a traffic light\");\r\n\t\t\t\t\t\t\tfirst = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tThread.sleep(100);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tmeet_light = false;\r\n\t\t\t\t\tSystem.out.println(\"Taxi-\" + id + loc + \": Going through a traffic light\");\r\n\t\t\t\t}\r\n\t\t\t\tswitch(direction)\r\n\t\t\t\t{\r\n\t\t\t\tcase 0 ://up\r\n\t\t\t\t\tif(BFS.adj_matrix[(i_current-1)*80+j_current][i_current*80+j_current] == 1)//open_road\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tFlow.flows[i_current-1][j_current][1]++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\ti_current -= 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 1 ://down\r\n\t\t\t\t\tif(BFS.adj_matrix[(i_current+1)*80+j_current][i_current*80+j_current] == 1)//open_road\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tFlow.flows[i_current][j_current][1]++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\ti_current += 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2 ://left\r\n\t\t\t\t\tif(BFS.adj_matrix[i_current*80+j_current][i_current*80+j_current-1] == 1)//open_road\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tFlow.flows[i_current][j_current-1][0]++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tj_current -= 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3 ://right\r\n\t\t\t\t\tif(BFS.adj_matrix[i_current*80+j_current][i_current*80+j_current+1] == 1)//open_road\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tFlow.flows[i_current][j_current][0]++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tj_current += 1;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tThread.sleep(100);\r\n\t\t\t\tlast_direction = direction;\r\n\t\t\t\tloc = new Coordinate(i_current,j_current);\r\n\t\t\t\tpath.add(loc);\r\n\t\t\t\tSystem.out.println(\"Taxi-\" + id + loc);\r\n\t\t\t\ttemp = shortest_path[i_current*80+j_current];\r\n\t\t\t}\t\t\r\n\t\t\tSystem.out.println(\"Passenger\" + passenger.loc + passenger.des + \": Taxi-\" + id + \" arrives at \" + des);\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Sorry to catch Exception!\");;\r\n\t\t}\r\n\t}", "public static void switchRequest(RequestPanel requestPanel){\n if (mainPanel.getRightComponent() != null)\n mainPanel.remove(mainPanel.getRightComponent());\n mainPanel.setRightComponent(requestPanel);\n frame.pack();\n }", "private void traversePath()\n\t{\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.right(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t\trobot.forward(50);\n\t\trobot.left(90);\n\t}", "public void computeAllPaths(String source)\r\n {\r\n Vertex sourceVertex = network_topology.get(source);\r\n Vertex u,v;\r\n double distuv;\r\n\r\n Queue<Vertex> vertexQueue = new PriorityQueue<Vertex>();\r\n \r\n \r\n // Switch between methods and decide what to do\r\n if(routing_method.equals(\"SHP\"))\r\n {\r\n // SHP, weight of each edge is 1\r\n sourceVertex.minDistance = 0;\r\n vertexQueue.add(sourceVertex);\r\n while(!vertexQueue.isEmpty())\r\n {\r\n u = vertexQueue.remove();\r\n for (String key : u.adjacentVertices.keySet())\r\n {\r\n v = network_topology.get(key);\r\n distuv = u.minDistance + 1;\r\n if(distuv < v.minDistance)\r\n {\r\n v.minDistance = distuv;\r\n v.previous = u;\r\n vertexQueue.add(v);\r\n }\r\n }\r\n \r\n }\r\n \r\n }\r\n \r\n else if (routing_method.equals(\"SDP\"))\r\n {\r\n // SDP, weight of each edge is it's propagation delay\r\n sourceVertex.minDistance = 0;\r\n vertexQueue.add(sourceVertex);\r\n while(!vertexQueue.isEmpty())\r\n {\r\n u = vertexQueue.remove();\r\n for (String key : u.adjacentVertices.keySet())\r\n {\r\n v = network_topology.get(key);\r\n distuv = u.minDistance + u.adjacentVertices.get(key).propDelay;\r\n if(distuv < v.minDistance)\r\n {\r\n v.minDistance = distuv;\r\n v.previous = u;\r\n vertexQueue.add(v);\r\n }\r\n } \r\n }\r\n }\r\n else if (routing_method.equals(\"LLP\"))\r\n {\r\n // LLP, weight each edge is activeCircuits/AvailableCircuits\r\n sourceVertex.minDistance = 0;\r\n vertexQueue.add(sourceVertex);\r\n while(!vertexQueue.isEmpty())\r\n {\r\n u = vertexQueue.remove();\r\n for (String key : u.adjacentVertices.keySet())\r\n {\r\n v = network_topology.get(key);\r\n distuv = Math.max(u.minDistance,u.adjacentGet(key).load());\r\n //System.out.println(u.adjacentGet(key).load());\r\n if(distuv < v.minDistance)\r\n {\r\n v.minDistance = distuv;\r\n v.previous = u;\r\n vertexQueue.add(v);\r\n }\r\n }\r\n }\r\n }\r\n }", "private void installRoute(List<NodePortTuple> path, OFMatch match) {\r\n\r\n\t\tOFMatch m = new OFMatch();\r\n\r\n\t\tm.setDataLayerType(Ethernet.TYPE_IPv4)\r\n\t\t\t\t.setNetworkSource(match.getNetworkSource())\r\n\t\t\t\t.setNetworkDestination(match.getNetworkDestination());\r\n\r\n\t\tfor (int i = 0; i <= path.size() - 1; i += 2) {\r\n\t\t\tshort inport = path.get(i).getPortId();\r\n\t\t\tm.setInputPort(inport);\r\n\t\t\tList<OFAction> actions = new ArrayList<OFAction>();\r\n\t\t\tOFActionOutput outport = new OFActionOutput(path.get(i + 1)\r\n\t\t\t\t\t.getPortId());\r\n\t\t\tactions.add(outport);\r\n\r\n\t\t\tOFFlowMod mod = (OFFlowMod) floodlightProvider\r\n\t\t\t\t\t.getOFMessageFactory().getMessage(OFType.FLOW_MOD);\r\n\t\t\tmod.setCommand(OFFlowMod.OFPFC_ADD)\r\n\t\t\t\t\t.setIdleTimeout((short) 0)\r\n\t\t\t\t\t.setHardTimeout((short) 0)\r\n\t\t\t\t\t.setMatch(m)\r\n\t\t\t\t\t.setPriority((short) 105)\r\n\t\t\t\t\t.setActions(actions)\r\n\t\t\t\t\t.setLength(\r\n\t\t\t\t\t\t\t(short) (OFFlowMod.MINIMUM_LENGTH + OFActionOutput.MINIMUM_LENGTH));\r\n\t\t\tflowPusher.addFlow(\"routeFlow\" + uniqueFlow, mod,\r\n\t\t\t\t\tHexString.toHexString(path.get(i).getNodeId()));\r\n\t\t\tuniqueFlow++;\r\n\t\t}\r\n\t}", "public void resetPath();", "protected abstract boolean swapPointCheck(final TreeStructure tree, final Point current, final Point pending);", "public synchronized void handle(PBFTRequest r){\n \n Object lpid = getLocalServerID();\n\n JDSUtility.debug(\"[handle(request)] s\" + lpid + \", at time \" + getClockValue() + \", received \" + r);\n\n StatedPBFTRequestMessage loggedRequest = getRequestInfo().getStatedRequest(r);\n \n /* if the request has not been logged anymore and it's a old request, so it was garbage by checkpoint procedure then I must send a null reply */\n if(loggedRequest == null && getRequestInfo().isOld(r)){\n IProcess client = new BaseProcess(r.getClientID());\n PBFTReply reply = new PBFTReply(r, null, lpid, getCurrentViewNumber());\n emit(reply, client);\n return;\n \n }\n \n try{\n /*if the request is new and hasn't added yet then it'll be added */\n if(loggedRequest == null){\n /* I received a new request so a must log it */\n loggedRequest = getRequestInfo().add(getRequestDigest(r), r, RequestState.WAITING);\n loggedRequest.setRequestReceiveTime(getClockValue());\n }\n\n /* if I have a entry in request log but I don't have the request then I must update my request log. */\n if(loggedRequest.getRequest() == null) loggedRequest.setRequest(r);\n \n /*if the request was served the I'll re-send the related reply if it has been logged yet.*/\n if(loggedRequest.getState().equals(RequestState.SERVED)){\n JDSUtility.debug(\"[handle(request)] s\" + lpid + \" has already served \" + r);\n\n /* retransmite the reply when the request was already served */\n PBFTReply reply = getRequestInfo().getReply(r);\n IProcess client = new BaseProcess(r.getClientID());\n emit(reply, client);\n return;\n }\n \n /* If I'm changing then I'll do nothing more .*/\n if(changing()) return;\n\n PBFTPrePrepare pp = getPrePreparebackupInfo().get(getCurrentViewNumber(), getCurrentPrimaryID(), loggedRequest.getDigest());\n\n if(pp != null && !isPrimary()){\n /* For each digest in backuped pre-prepare, I haven't all request then it'll be discarded. */\n DigestList digests = new DigestList();\n for(String digest : pp.getDigests()){\n if(!getRequestInfo().hasRequest(digest)){\n digests.add(digest);\n }\n }\n \n if(digests.isEmpty()){\n handle(pp);\n getPrePreparebackupInfo().rem(pp);\n return;\n } \n }\n\n boolean committed = loggedRequest.getState().equals( RequestState.COMMITTED );\n \n// /* if my request was commit and it hasn't been served yet I must check the stated of the request */\n if(committed){\n tryExecuteRequests();\n return;\n }\n \n /* performs the batch procedure if the server is the primary replica. */\n if(isPrimary()){\n JDSUtility.debug(\"[handle(request)] s\" + lpid + \" (primary) is executing the batch procedure for \" + r + \".\");\n batch();\n }else{\n /* schedules a timeout for the arriving of the pre-prepare message if the server is a secundary replica. */\n scheduleViewChange();\n }//end if is primary\n \n }catch(Exception e){\n e.printStackTrace();\n }\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n //order history\n }" ]
[ "0.5280813", "0.5249504", "0.5197915", "0.51716256", "0.5158334", "0.5130922", "0.51029384", "0.50980866", "0.5091888", "0.5056005", "0.5024534", "0.4971316", "0.4953376", "0.489825", "0.48723242", "0.4866231", "0.4828901", "0.48214757", "0.48128533", "0.47977445", "0.4791135", "0.47810838", "0.47809806", "0.47808903", "0.47774416", "0.47703376", "0.47151378", "0.47048774", "0.47023132", "0.46768996", "0.465154", "0.46389186", "0.46341127", "0.4629274", "0.46288761", "0.46085033", "0.4603646", "0.4600976", "0.4593838", "0.45882693", "0.45839748", "0.45753103", "0.45657408", "0.45402017", "0.45359623", "0.4532382", "0.45265096", "0.45179793", "0.45128763", "0.45086053", "0.45057955", "0.45026347", "0.44880563", "0.44727018", "0.4463107", "0.44559926", "0.4452109", "0.4440873", "0.44380173", "0.4428955", "0.4428048", "0.4424404", "0.44213754", "0.4405293", "0.44040677", "0.4393402", "0.43854913", "0.43846577", "0.4379611", "0.4375461", "0.4372999", "0.43693346", "0.43683887", "0.43651256", "0.4364794", "0.4362143", "0.43617183", "0.43616173", "0.43581632", "0.4357755", "0.43577442", "0.43534398", "0.43491948", "0.43485528", "0.43432137", "0.43423823", "0.43356335", "0.43351877", "0.4329814", "0.43282467", "0.43190098", "0.43154922", "0.43143362", "0.43026018", "0.42991376", "0.42965126", "0.42937642", "0.42937613", "0.4289869", "0.42865884" ]
0.7052746
0
Handles async response from worker.
public void handleAsyncResponse(@NonNull String key, @NonNull SpeakerResponse speakerResponse) throws UnknownKeyException { log.debug("Received flow command response {}", speakerResponse); YFlowPathSwapFsm fsm = fsmRegister.getFsmByKey(key) .orElseThrow(() -> new UnknownKeyException(key)); if (speakerResponse instanceof SpeakerFlowSegmentResponse) { SpeakerFlowSegmentResponse response = (SpeakerFlowSegmentResponse) speakerResponse; String flowId = response.getMetadata().getFlowId(); if (fsm.getSwappingSubFlows().contains(flowId)) { flowPathSwapService.handleAsyncResponseByFlowId(flowId, response); } } else if (speakerResponse instanceof SpeakerCommandResponse) { SpeakerCommandResponse response = (SpeakerCommandResponse) speakerResponse; YFlowPathSwapContext context = YFlowPathSwapContext.builder() .speakerResponse(response) .build(); fsmExecutor.fire(fsm, Event.RESPONSE_RECEIVED, context); } else { log.debug("Received unexpected speaker response: {}", speakerResponse); } // After handling an event by FlowPathSwap service, we should propagate execution to the FSM. if (!fsm.isTerminated()) { fsmExecutor.fire(fsm, Event.NEXT); } removeIfFinished(fsm, key); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\t\t\t\t\t public void run() {\n\t\t\t\t\t\t\t getResponse();\n\t\t\t\t\t\t }", "@Override\n\tpublic void handleResponse() {\n\t\t\n\t}", "@Override\n public void processResult(HttpResponseMessage response) {\n }", "public abstract HTTPResponse finish();", "public interface AsyncResponse {\n void processFinish(RoadInfo output);\n }", "@Override\n public void onCompleted() {\n System.out.println(\"Sending final response as client is done\");\n //as client done, setting the result to response observer object\n responseObserver.onNext(LongGreetResponse.newBuilder().setResult(result).build());\n //complete the response\n responseObserver.onCompleted();\n }", "public void handleFinish()\n {\n }", "public interface AsyncResponse {\n void processFinish(String output);\n}", "public interface AsyncResponse {\n\n void processFinish(String output);\n\n}", "@Override\n\t\tprotected void onPostExecute(NetworkTaskResult result) {\n\t\t\tsuper.onPostExecute(result);\n\t\t\tthis.handleResponse(result);\n\t\t}", "void onCompleted(T response);", "protected void awaitResult(){\t\n\t\ttry {\n\t\t\t/*place thread/tuple identifier in waitlist for future responses from web service*/\n\t\t\tResponses.getInstance().addToWaitList(this.transId, this);\n\t\t\tthis.latch.await();\n\t\t\t\n\t\t} catch (InterruptedException e) {\n\n\t\t\tLogger.getLogger(\"RSpace\").log(Level.WARNING, \"Transaction #\" + transId + \" response listener was terminated\");\n\t\t}\n\t}", "public void receivedHttpResponse(ProxyMessageContext context) {\n\t\ttry {\n\t\t\thttpOutQueue.put(context);\n\t\t\t\n synchronized (httpResponder) {\n \thttpResponder.notify();\n }\n \n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "void onResponseTaskCompleted(Request request, Response response, OHException ohex, Object data);", "public interface AsyncResponse {\n void processFinish(HttpJson output);\n}", "@Override\n public void onResponse(String response, int id) {\n processData(response);\n\n }", "@Override\n \t\t\t\tpublic void finished(Response response) {\n \t\t\t\t\tLog.w(\"myApp\", response.getResult() + \" \" + response.getError());\n \t\t\t\t}", "@Override\n \t\t\t\tpublic void finished(Response response) {\n \t\t\t\t\tLog.w(\"myApp\", response.getResult() + \" \" + response.getError());\n \t\t\t\t}", "public void handleResponseInternal(long connection, Object obj) {\n JResponse response = (JResponse) obj;\n Logger.m1416d(TAG, \"Action - handleResponse - connection:\" + connection + \", response:\" + response.toString());\n if (connection != NetworkingClient.sConnection.get()) {\n Logger.m1432w(TAG, \"Response connection is out-dated. \");\n }\n Long rid = response.getHead().getRid();\n Requesting origin = dequeSentQueue(rid);\n if (origin == null) {\n Logger.m1432w(TAG, \"Not found the request in SentQueue when response.\");\n } else {\n rid = origin.request.getHead().getRid();\n endSentTimeout(rid);\n }\n Requesting requesting = (Requesting) this.mRequestingCache.get(rid);\n if (requesting != null) {\n endRequestTimeout(requesting);\n } else {\n Logger.m1432w(TAG, \"Not found requesting in RequestingCache when response.\");\n }\n }", "void inTheEndOfDoInBackground(NetworkResponse networkResponse);", "@Override protected void onPostExecute(String returnVal) {\r\n //Print the response code as toast popup \r\n //android.widget.Toast.makeText(\r\n // mContext, \"[myAsyncTask.onPostExecute] Response: \" + returnVal,\r\n // android.widget.Toast.LENGTH_LONG\r\n //).show();\r\n if (gHandlers != null) gHandlers.onPostExecute(returnVal);\r\n }", "@Override\n public void onCompleted() {\n System.out.println(\"Server has completed sending us response\");\n // on completed will be called right after onNext\n // Whenever server is done sending data latch is going down by 1\n latch.countDown();\n }", "@Override\r\n\t\tpublic void onHttpResponse(String response) {\n\t\t\tif(WebApi.isRespSuccess(response)){\r\n\t\t\t\thandler.sendEmptyMessage(HANDLER_MSG_APKINFO_SYNC);\r\n\t\t\t\tBundle bundle = new Bundle();\r\n\t\t\t\tbundle.putInt(HANDLER_DATA_APK_INDEX, this.getApkIndex());\r\n\t\t\t\tMessage msg =new Message();\r\n\t\t\t\tmsg.setData(bundle);\r\n\t\t\t\tmsg.what = HANDLER_MSG_APK_UPLOAD;\r\n\t\t\t\thandler.sendMessage(msg);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tString resp_msg = WebApi.getRespMsg(response);\r\n\t\t\tMessage msg = new Message();\r\n\t\t\tmsg.what = HANDLER_MSG_TOAST;\r\n\t\t\tBundle bundle = new Bundle();\r\n\t\t\tbundle.putString(HANDLER_DATA_TOAST_TEXT, resp_msg);\r\n\t\t\tmsg.setData(bundle);\r\n\t\t\thandler.sendMessage(msg);\r\n\t\t}", "@Override\n\t\t\t\tpublic void finished(Response response) {\n\t\t\t\t\tLog.w(\"myApp\", response.getResult() + \" \" + response.getError());\n\t\t\t\t}", "public interface AsynchResponse {\n\n void processFinish(String output);\n}", "@Override\n public void onResponse(String response) {\n System.out.print(\"respuesta Server\"+response);\n responseRequest(sync_id);\n /*if (sync_id != 0) {\n responseRequest(sync_id);\n } else {\n background_response = \"ID Sync null\";\n restartRequest(background_response);\n }*/\n }", "void receiveResponse(String invocationId, HttpResponse response);", "@Override\n public void run() {\n handleClientRequest();\n }", "public void handleAsyncResponse(@NonNull String key, @NonNull SpeakerFlowSegmentResponse flowResponse)\n throws UnknownKeyException {\n log.debug(\"Received flow command response {}\", flowResponse);\n FlowDeleteFsm fsm = fsmRegister.getFsmByKey(key)\n .orElseThrow(() -> new UnknownKeyException(key));\n\n FlowDeleteContext context = FlowDeleteContext.builder()\n .speakerFlowResponse(flowResponse)\n .build();\n if (flowResponse instanceof FlowErrorResponse) {\n fsmExecutor.fire(fsm, Event.ERROR_RECEIVED, context);\n } else {\n fsmExecutor.fire(fsm, Event.RESPONSE_RECEIVED, context);\n }\n\n removeIfFinished(fsm, key);\n }", "public void handleResponse(byte[] result, Command originalCommand);", "public String receiveResponse()\n\t{\n\t\t\n\t}", "@Override\n public void onResponse(String response) {\n if(null != listener){\n listener.onComplete(mRespHandler.parse(response));\n }\n }", "@Override\n protected void responseDidFinish(boolean async) {\n // Provide delegate with notification that all file lines have been received\n if (getFileLineReceivedDelegate() != null) {\n getFileLineReceivedDelegate().fileLineReceived(null, false);\n }\n super.responseDidFinish(async);\n }", "void responseReceived(byte[] response);", "public void handleNetworkOutput(Response response) {\n if (playerConnections.containsKey(response.getPlayerID())) playerConnections.get(response.getPlayerID()).sendResponse(response);\n }", "void sendResponseMessage(HttpResponse response) throws IOException;", "public Response callback() throws Exception;", "@Override\n public void onResponse(String response) {\n finalData(response);\n }", "@Override\n\tpublic T handleResponse(HttpResponse arg0) throws ClientProtocolException,\n\t\t\tIOException {\n\t\treturn (this.parser != null && this.processor != null) ? this.processor\n\t\t\t\t.process(this.parser.parse(arg0)) : null;\n\t}", "protected HttpResponse doReceiveResponse(final HttpRequest request, final HttpClientConnection conn,\n final HttpContext context)\n throws HttpException, IOException\n {\n// log.debug(\"EspMeshHttpRequestExecutor::doReceiveResponse()\");\n if (request == null)\n {\n throw new IllegalArgumentException(\"HTTP request may not be null\");\n }\n if (conn == null)\n {\n throw new IllegalArgumentException(\"HTTP connection may not be null\");\n }\n if (context == null)\n {\n throw new IllegalArgumentException(\"HTTP context may not be null\");\n }\n \n HttpResponse response = null;\n int statuscode = 0;\n \n // check whether the request is instantly, instantly request don't wait the response\n boolean isInstantly = request.getParams().isParameterTrue(EspHttpRequest.ESP_INSTANTLY);\n if (isInstantly)\n {\n ProtocolVersion version = new ProtocolVersion(\"HTTP\", 1, 1);\n StatusLine statusline = new BasicStatusLine(version, 200, \"OK\");\n // let the connection used only once to check whether the device is available\n context.setAttribute(\"timeout\", 1);\n response = ResponseFactory.newHttpResponse(statusline, context);\n Header contentLengthHeader = new BasicHeader(HTTP.CONTENT_LEN, \"0\");\n response.addHeader(contentLengthHeader);\n }\n else\n {\n if (!request.getRequestLine().getMethod().equals(EspHttpRequest.METHOD_COMMAND))\n {\n while (response == null || statuscode < HttpStatus.SC_OK)\n {\n \n response = conn.receiveResponseHeader();\n if (canResponseHaveBody(request, response))\n {\n conn.receiveResponseEntity(response);\n }\n statuscode = response.getStatusLine().getStatusCode();\n \n } // while intermediate response\n }\n else\n {\n ProtocolVersion version = new ProtocolVersion(\"HTTP\", 1, 1);\n StatusLine statusline = new BasicStatusLine(version, 200, \"OK\");\n response = ResponseFactory.newHttpResponse(statusline, context);\n // copy request headers\n // Header[] requestHeaders = request.getAllHeaders();\n // for (Header requestHeader : requestHeaders) {\n // System.out.println(\"requestHeader:\" + requestHeader);\n // response.addHeader(requestHeader);\n // }\n \n Header[] contentLengthHeader = request.getHeaders(HTTP.CONTENT_LEN);\n if (contentLengthHeader == null || contentLengthHeader.length != 1)\n {\n throw new IllegalArgumentException(\"contentLengthHeader == null || contentLengthHeader.length != 1\");\n }\n // at the moment, mesh command request and response len is the same\n response.addHeader(contentLengthHeader[0]);\n \n conn.receiveResponseEntity(response);\n }\n }\n \n // for device won't reply \"Connection: Keep-Alive\" by default, add the header by manual\n if (response != null && response.getFirstHeader(HTTP.CONN_DIRECTIVE) == null)\n {\n response.addHeader(HTTP.CONN_DIRECTIVE, HTTP.CONN_KEEP_ALIVE);\n }\n \n return response;\n \n }", "public void onResponse(Response response) throws Exception;", "public void handle(ResultItems result, Task task) {\n\n\t}", "@Override\n public void onCompleted() {\n responseObserver.onCompleted();\n }", "public void doResult() throws Exception {\n\t\tJSONObject map=new JSONObject(getResult());\n\t\tif(!\"ok\".equalsIgnoreCase(map.getString(\"status\"))){\n\t\t\tdoFailureResult();\n\t\t\treturn;\n\t\t}\n\t\tif(getHandler()!=null){\n\t\t\tMessage hmsg=getHandler().obtainMessage();\n\t\t\thmsg.obj=map;\n\t\t\thmsg.arg1=1;\n\t\t\tgetHandler().sendMessage(hmsg);\n\t\t\tsetHandler(null);\n\t\t}\n\t}", "@Override\n public void onResponse(JSONObject response) {\n processResponse(response);\n }", "@Override\r\n\t\tpublic void onHttpResponse(String response) {\n\t\t\tif(WebApi.isRespSuccess(response)){\r\n\t\t\t\thandler.sendEmptyMessage(HANDLER_MSG_APKINFO_SYNC);\r\n\t\t\t\tBundle bundle = new Bundle();\r\n\t\t\t\tbundle.putInt(HANDLER_DATA_APK_INDEX, this.getApkIndex());\r\n\t\t\t\tMessage msg =new Message();\r\n\t\t\t\tmsg.setData(bundle);\r\n\t\t\t\tmsg.what = HANDLER_MSG_APK_ADD;\r\n\t\t\t\thandler.sendMessage(msg);\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\tString resp_msg = WebApi.getRespMsg(response);\r\n\t\t\tMessage msg = new Message();\r\n\t\t\tmsg.what = HANDLER_MSG_TOAST;\r\n\t\t\tBundle bundle = new Bundle();\r\n\t\t\tbundle.putString(HANDLER_DATA_TOAST_TEXT, resp_msg);\r\n\t\t\tmsg.setData(bundle);\r\n\t\t\thandler.sendMessage(msg);\r\n\t\t}", "@Override\n\tpublic void onTaskDone(String result) {\n\t\t\n\t}", "@Override\n\t\t\tpublic void handleError(ClientHttpResponse response) throws IOException {\n\t\t\t\t\n\t\t\t}", "public interface ResponseHandlerInterface {\n\n /**\n * Returns data whether request completed successfully\n *\n * @param response HttpResponse object with data\n * @throws java.io.IOException if retrieving data from response fails\n */\n void sendResponseMessage(HttpResponse response) throws IOException;\n\n /**\n * Notifies callback, that request started execution\n */\n void sendStartMessage();\n\n /**\n * Notifies callback, that request was completed and is being removed from thread pool\n */\n void sendFinishMessage();\n\n /**\n * Notifies callback, that request (mainly uploading) has progressed\n *\n * @param bytesWritten number of written bytes\n * @param bytesTotal number of total bytes to be written\n */\n void sendProgressMessage(int bytesWritten, int bytesTotal);\n\n /**\n * Notifies callback, that request was cancelled\n */\n void sendCancelMessage();\n\n /**\n * Notifies callback, that request was handled successfully\n *\n * @param statusCode HTTP status code\n * @param headers returned headers\n * @param responseBody returned data\n */\n void sendSuccessMessage(int statusCode, Header[] headers, byte[] responseBody);\n\n /**\n * Returns if request was completed with error code or failure of implementation\n *\n * @param statusCode returned HTTP status code\n * @param headers returned headers\n * @param responseBody returned data\n * @param error cause of request failure\n */\n void sendFailureMessage(int statusCode, Header[] headers, byte[] responseBody, Throwable error);\n\n /**\n * Notifies callback of retrying request\n *\n * @param retryNo number of retry within one request\n */\n void sendRetryMessage(int retryNo);\n\n /**\n * Returns URI which was used to request\n *\n * @return uri of origin request\n */\n public URI getRequestURI();\n\n /**\n * Returns Header[] which were used to request\n *\n * @return headers from origin request\n */\n public Header[] getRequestHeaders();\n\n /**\n * Helper for handlers to receive Request URI info\n *\n * @param requestURI claimed request URI\n */\n public void setRequestURI(URI requestURI);\n\n /**\n * Helper for handlers to receive Request Header[] info\n *\n * @param requestHeaders Headers, claimed to be from original request\n */\n public void setRequestHeaders(Header[] requestHeaders);\n\n /**\n * Can set, whether the handler should be asynchronous or synchronous\n *\n * @param useSynchronousMode whether data should be handled on background Thread on UI Thread\n */\n void setUseSynchronousMode(boolean useSynchronousMode);\n\n /**\n * Returns whether the handler is asynchronous or synchronous\n *\n * @return boolean if the ResponseHandler is running in synchronous mode\n */\n boolean getUseSynchronousMode();\n}", "@Override\n\t\tprotected Object doInBackground(Object... params) {\n\t\t\tServerInterface.sendCorrectAnswerResponse();\n\t\t\treturn null;\n\t\t}", "public interface AsyncResponse {\n void processFinish(double calories, double date);\n}", "@Override\n protected void deliverResponse(T response) {\n listener.onSuccessResponse(response);\n }", "public Object handleCommandResponse(Object response) throws RayoProtocolException;", "public interface HandleResponse {\n void downloadComplete(String output, DownloadImageJson.TaskType task);\n void imageDownloadComplete(float scale_x, float scale_y);\n void removeFromTtsList(Boundary b);\n void setUsername(String output);\n}", "public void run() {\n\t\t\t\t\tString resultString = upload(url, formParameters, datas);\n\t\t\t\t\tif (null != resultString) {\n\t\t\t\t\t\tMessage message = handler.obtainMessage(MessageWhat.UPLOADRESP, resultString);\n\t\t\t\t\t\thandler.sendMessage(message);\n\t\t\t\t\t}\n\t\t\t\t}", "@Override\n public void processFinish(int response_code, String response_message, JSONObject output) {\n loading--;\n if (loading == 0) {\n loadingbar.setVisibility(View.GONE);\n } else System.out.println(\"INFO: Open web calls \" + loading);\n\n //Server Response\n response.append(response_code + \" \" + response_message + \"\\r\\n\");\n\n if (response_code == 200 && output != null) {\n trigger = TriggerDetails.fromJson(output);\n\n TextView value_id = getView().findViewById(R.id.value_id);\n value_id.setText(trigger.getId());\n\n TextView value_title = getView().findViewById(R.id.value_title);\n value_title.setText(trigger.getTitle());\n\n Switch active = getView().findViewById(R.id.value_active);\n active.setChecked(trigger.getActive());\n\n Switch current = getView().findViewById(R.id.value_state);\n current.setChecked(trigger.getState());\n\n if (trigger.getType() == 0) {\n\n updateStartDate();\n updateStartTime();\n\n updateEndDate();\n updateEndTime();\n\n Spinner interval = getView().findViewById(R.id.value_interval);\n interval.setSelection(trigger.getInterval());\n } else if (trigger.getType() == 1) {\n Button source = getView().findViewById(R.id.value_rule);\n source.setText(trigger.getSource());\n\n Spinner relop = getView().findViewById(R.id.value_relop);\n relop.setSelection(trigger.getRelop());\n\n TextView threshold = getView().findViewById(R.id.value_threshold);\n threshold.setText(Integer.toString(trigger.getThreshold()));\n\n NegativeProgressSeekerBar tolerance = getView().findViewById(R.id.value_tolerance);\n tolerance.setProgress(25 + trigger.getTolerance());\n\n Spinner interval = getView().findViewById(R.id.value_interval);\n interval.setSelection(trigger.getInterval());\n } else if (trigger.getType() == 2) {\n Spinner relop = getView().findViewById(R.id.value_relop);\n relop.setSelection(trigger.getRelop());\n\n TextView threshold = getView().findViewById(R.id.value_threshold);\n threshold.setText(Integer.toString(trigger.getThreshold()));\n\n TextView counter = getView().findViewById(R.id.value_counter);\n counter.setText(trigger.getCount().toString());\n } else if (trigger.getType() == 3) {\n\n }\n }\n }", "@Override\r\n\t\tpublic void onHttpResponse(String response) {\n\t\t\tif(WebApi.isRespSuccess(response)){\r\n//\t\t\t\thandler.sendEmptyMessage(HANDLER_MSG_APKINFO_SYNC);\r\n\t\t\t}\r\n\t\t\tString resp_msg = WebApi.getRespMsg(response);\r\n\t\t\tMessage msg = new Message();\r\n\t\t\tmsg.what = HANDLER_MSG_TOAST;\r\n\t\t\tBundle bundle = new Bundle();\r\n\t\t\tbundle.putString(HANDLER_DATA_TOAST_TEXT, resp_msg);\r\n\t\t\tmsg.setData(bundle);\r\n\t\t\thandler.sendMessage(msg);\r\n\t\t}", "public interface EPAsyncResponseListener {\n public void getJokesfromEndpoint(String result);\n}", "void onTaskComplete(T result);", "void receiveResponse(V response);", "@Override\r\n\t public void run() {\n\t\tsuper.run();\r\n\t\ttry {\r\n\t\t // String newParams=URLEncoder.encode(params, \"utf-8\");\r\n\t\t String newurl = url + \"?\" + params;\r\n\r\n\t\t URL uri = new URL(newurl);\r\n\t\t try {\r\n\t\t\tHttpURLConnection conn = (HttpURLConnection) uri\r\n\t\t\t\t.openConnection();\r\n\t\t\tconn.connect();\r\n\t\t\t// 获取返回结果\r\n\t\t\tif (conn.getResponseCode() == 200) {\r\n\t\t\t InputStream is = conn.getInputStream();\r\n\t\t\t String result = convertInputStreamToString(is);\r\n\t\t\t // 通过handle发送消息\r\n\t\t\t Message msg = new Message();\r\n\t\t\t msg.what = 2;\r\n\t\t\t msg.obj = result;\r\n\t\t\t handle.sendMessage(msg);\r\n\t\t\t}\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} catch (MalformedURLException e) {\r\n\t\t // TODO Auto-generated catch block\r\n\t\t e.printStackTrace();\r\n\t\t}\r\n\t }", "private void maybeOnSucceededOnExecutor() {\n synchronized (mNativeStreamLock) {\n if (isDoneLocked()) {\n return;\n }\n if (!(mWriteState == State.WRITING_DONE && mReadState == State.READING_DONE)) {\n return;\n }\n mReadState = mWriteState = State.SUCCESS;\n // Destroy native stream first, so UrlRequestContext could be shut\n // down from the listener.\n destroyNativeStreamLocked(false);\n }\n try {\n mCallback.onSucceeded(CronetBidirectionalStream.this, mResponseInfo);\n } catch (Exception e) {\n Log.e(CronetUrlRequestContext.LOG_TAG, \"Exception in onSucceeded method\", e);\n }\n mInflightDoneCallbackCount.decrement();\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n\tpublic void onHandleResponse(WebApiResponse response) {\n\t\tif (response.getHttpCode() == 200) {\n\t\t\tswitch (response.getCode()) {\n\t\t\tcase WebApiResponse.GET_WEB_DATA_TRUE:\n\t\t\t\tbalanceDetail.parseByJson(response.getStringData());\n\t\t\t\tinitValue();\n\t\t\t\tbreak;\n\t\t\tcase WebApiResponse.GET_WEB_DATA_EXCEPTION:\n\t\t\t\tbreak;\n\t\t\tcase WebApiResponse.GET_WEB_DATA_FALSE:\n\t\t\t\tDialogUtil.createShortDialog(getApplicationContext(),response.getMessage());\n\t\t\t\tbreak;\n\t\t\tcase WebApiResponse.GET_DATA_NULL:\n\t\t\t\tbreak;\n\t\t\tcase WebApiResponse.PARSING_ERROR:\n\t\t\t\tDialogUtil.createShortDialog(getApplicationContext(),Constant.NET_ERR_PROMPT);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tsuper.dismissProgressDialog();\n\t}", "protected abstract void handleOk();", "protected void doConsumeResponse() throws Exception {\n if (response.getEntity() != null)\n response_data = EntityUtils.toByteArray(response.getEntity());\n }", "@Override\n\tpublic void processResponse(Response response)\n\t{\n\t\t\n\t}", "public void run() {\n req.response().end(\"0\"); // Default response = 0\n }", "@Override\n public void onResponse(String response) {\n }", "public interface AsyncResponse\n{\n void onAsyncJsonFetcherComplete(int mode, JSONArray json, boolean jsonException);\n}", "public void run() {\n\t\t\t\t\tString resultString = post(url, packet);\n\t\t\t\t\tMessage msg;\n\t\t\t\t\tif (null != handler) {\n\t\t\t\t\t\tif (StringUtils.isEmpty(resultString)) {\n\t\t\t\t\t\t\tmsg = handler.obtainMessage(Constant.FAIL_CODE, Constant.EXCEPTION);\n\t\t\t\t\t\t\thandler.sendMessage(msg);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tLog.i(TAG, \"=\" + resultString);\n\t\t\t\t\t\t\tLog.i(TAG, \"messageWhat=\" + messageWhat);\n\t\t\t\t\t\t\tmsg = handler.obtainMessage(messageWhat, resultString);\n\t\t\t\t\t\t\thandler.sendMessage(msg);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "@Override\n public void onResponse(String response) {\n System.out.println(\"Recieved Response: \" + response);\n }", "@Override\n public void channelRead0(ChannelHandlerContext ctx, HttpObject msg) {\n if (msg instanceof HttpResponse) {\n //clear the buffer.\n _responseBodyBuf.clear();\n //\n HttpResponse response = (HttpResponse) msg;\n //get HTTP Response code.\n this._hcr._responseStatus = response.getStatus();\n //\n //print header.\n Set<String> headers = response.headers().names();\n for (Iterator<String> keyIter = headers.iterator(); keyIter.hasNext();) {\n String keyName = keyIter.next();\n //System.out.println(keyName + \":\" + response.headers().get(keyName));\n this._hcr._responseHeaderMap.put(keyName, response.headers().get(keyName));\n }\n }\n //content or lastContent\n if (msg instanceof HttpContent) {\n HttpContent content = (HttpContent) msg;\n _responseBodyBuf.writeBytes(content.content());\n //if is last content fire done.\n if (content instanceof LastHttpContent) {\n try {\n fireDone(_responseBodyBuf.toString(this._hcr._responseBodyCharset));\n } finally {\n ctx.close();\n releaseResource();\n }\n }\n }\n }", "void onResponse(String response, int requestId);", "@Override\r\n\t\tpublic void onHttpResponse(String response) {\n\t\t\tif(WebApi.isRespSuccess(response)){\r\n\t\t\t\thandler.sendEmptyMessage(HANDLER_MSG_APKINFO_SYNC);\r\n\t\t\t}\r\n\t\t\tString resp_msg = WebApi.getRespMsg(response);\r\n\t\t\tMessage msg = new Message();\r\n\t\t\tmsg.what = HANDLER_MSG_TOAST;\r\n\t\t\tBundle bundle = new Bundle();\r\n\t\t\tbundle.putString(HANDLER_DATA_TOAST_TEXT, resp_msg);\r\n\t\t\tmsg.setData(bundle);\r\n\t\t\thandler.sendMessage(msg);\r\n\t\t}", "@Override\r\n\t\t\t\t\tpublic void onResponse(HttpResponse resp) {\n\t\t\t\t\t\tLog.i(\"HttpPost\", \"Success\");\r\n\r\n\t\t\t\t\t}", "@Override\n\t\t\tpublic void handle(Response response) throws Exception\n\t\t\t{\n\t\t\t\tif(response ==null){\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(response.getStatusCode()==200){\n\t\t\t\t\tSystem.out.println(\"push seccuess\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "void execute(final T response);", "public void handleFutureResult(WorkContainer<K, V> wc) {\n if (checkEpochIsStale(wc)) {\n // no op, partition has been revoked\n log.debug(\"Work result received, but from an old generation. Dropping work from revoked partition {}\", wc);\n // todo mark work as to be skipped, instead of just returning null - related to retry system https://github.com/confluentinc/parallel-consumer/issues/48\n return;\n }\n\n if (wc.getUserFunctionSucceeded().get()) {\n onSuccess(wc);\n } else {\n onFailure(wc);\n }\n }", "private void handleRequestResponse(JSONObject answer) {\n\t\tJSONArray events = answer.optJSONArray(\"events\");\n\t\tif (events!=null) {\n\t\t\tlong time = System.currentTimeMillis();\n\t\t\tint length = events.length();\n\t\t\tfor (int i=0; i<length; i++) {\n\t\t\t\tLogEvent event = LogEvent.fromJSON(events.getJSONObject(i));\n\t\t\t\tevent.time = time;\n\t\t\t\tevent.ignore = true; // don't send back to logging server\n\t\t\t\tthis.plugin.postEvent(event);\n\t\t\t}\n\t\t}\n\t\tJSONObject plugins = answer.optJSONObject(\"plugins\");\n\t\tif (plugins!=null && !plugin.bukkitMode) {\n\t\t\tthis.plugin.updater.setAvailablePlugins(plugins);\n\t\t}\n\t}", "<T> T endProcess(AsyncResult<T> asyncResult) throws ExecutionException, InterruptedException;", "@Override\r\n\t\tpublic void onComplete(String response, Object state) {\n\t\t\t\r\n\t\t}", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n public void onResponse(Response response) throws IOException {\n }", "public abstract void onReceiveResponse(ExchangeContext context);", "@Override\n\tprotected void channelRead0(ChannelHandlerContext ctx, RpcRequest msg) throws Exception {\n\t\tRpcResponse response = new RpcResponse();\n\t\tresponse.setRequestId(msg.getRequestId());\n\t\ttry {\n\t\t\tObject result = handle(msg);\n\t\t\tresponse.setResult(result);\n\t\t} catch (Throwable t) {\n\t\t\tLOGGER.debug(\"handle ocurred error ==> {}\", t);\n\t\t\tresponse.setError(t);\n\t\t}\n\t\tctx.writeAndFlush(response).addListener(ChannelFutureListener.CLOSE);//写完然后关闭channel\n\t}", "private void mHandleSuccessResponse(String tag, String response) {\n if (mListener != null) {\n mListener.onDataLoaded(tag, response);\n }\n }", "@Override\n public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\n throws Exception {\n\n }", "@Override\n public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex)\n throws Exception {\n\n }", "public void handleMessage(Message msg) {\n switch (msg.what) {\n case 1:\n Pair pair = (Pair) msg.obj;\n deliverResultCallback((ResultCallback) pair.first, (Result) pair.second);\n return;\n case 2:\n ((AbstractPendingResult) msg.obj).forceFailureUnlessReady(Status.zzXS);\n return;\n default:\n Log.wtf(\"AbstractPendingResult\", \"Don't know how to handle this message.\");\n return;\n }\n }", "@Override\n protected void onPostExecute(CapsulePingResponse response) {\n if (this.mListener != null) {\n this.mListener.onPostCapsulePing(response);\n }\n }", "public synchronized boolean poll_response(){\n return gotResponse;\n }", "@Override\n public void onResponse(String response) {\n }", "@Override\n protected Response<JSONArray> parseNetworkResponse (NetworkResponse response){\n// This thread is on background thread\n// Handle parsing logic here?\n try {\n String jsonString =\n new String(\n response.data,\n HttpHeaderParser.parseCharset(response.headers, PROTOCOL_CHARSET));\n JSONArray jsonArray = new JSONArray(jsonString);\n\n// Parse on background thread\n parseResponse(jsonArray);\n\n return Response.success(jsonArray, HttpHeaderParser.parseCacheHeaders(response));\n } catch (UnsupportedEncodingException | JSONException e) {\n return Response.error(new ParseError(e));\n }\n }", "@Override\n\tpublic void run() {\n\t\trespond();\n\t\tlisten();\n\t}", "@Override\n protected void decode(ChannelHandlerContext ctx, HttpObject msg, List<Object> out) throws Exception {\n if (continueResponse && msg instanceof LastHttpContent) {\n // Release the last empty content associated with the 100-Continue response\n release(msg);\n return;\n }\n\n if (msg instanceof HttpResponse && CONTINUE.equals(((HttpResponse) msg).status())) {\n continueResponse = true;\n ctx.fireChannelRead(msg);\n return;\n }\n\n continueResponse = false;\n super.decode(ctx, msg, out);\n }", "@Override\n protected void deliverResponse(JSONObject response) {\n listener.onResponse(response);\n System.out.println(\"response \"+response);\n }", "@Override\r\n public void afterCompletion(HttpServletRequest request,\r\n HttpServletResponse response, Object handler, Exception ex)\r\n throws Exception \r\n {\n }", "@Override\n public void onReceivedResponse(WebSocketResponseMessage responseMessage) {\n System.err.println(\"[JVDBG] Got response with status \" + responseMessage.getStatus()+\n \" and requestId = \"+responseMessage.getRequestId());\n long id = responseMessage.getRequestId();\n if (pending.containsKey(id)) {\n Consumer f = pending.get(id);\n f.accept(responseMessage);\n pending.remove(id);\n }\n System.err.println(\"Message = \" + responseMessage);\n if (responseMessage.getBody().isPresent()) {\n System.err.println(\"[JVDBG] Got response body: \" + new String(responseMessage.getBody().get()));\n }\n }" ]
[ "0.6547069", "0.6354635", "0.61831576", "0.6149675", "0.61426663", "0.6102206", "0.6088247", "0.60829324", "0.60429996", "0.6014236", "0.60058695", "0.5985627", "0.5963394", "0.59385496", "0.59241724", "0.59047836", "0.59034944", "0.59034944", "0.5889034", "0.5885533", "0.5877277", "0.58652407", "0.58642584", "0.58587295", "0.58534503", "0.5799039", "0.5793795", "0.5787368", "0.5778709", "0.5762861", "0.5756551", "0.5737017", "0.57284635", "0.57243073", "0.57122105", "0.5708122", "0.5677761", "0.56762856", "0.56560266", "0.56447333", "0.56356287", "0.5628841", "0.56253844", "0.55980015", "0.55946404", "0.55939144", "0.558992", "0.55775946", "0.5575418", "0.55749846", "0.55748427", "0.5572702", "0.5566907", "0.55648214", "0.55636656", "0.55563235", "0.5540534", "0.5538225", "0.55362916", "0.55252725", "0.55229706", "0.55225945", "0.55198145", "0.55172116", "0.5516271", "0.55088794", "0.5507225", "0.55044407", "0.5501127", "0.54960346", "0.5492906", "0.5487096", "0.5485636", "0.5482732", "0.5482303", "0.54820836", "0.5475151", "0.54713535", "0.54686", "0.54624575", "0.5462253", "0.54590267", "0.5446618", "0.5446618", "0.5446618", "0.5442589", "0.5437229", "0.5428463", "0.5427913", "0.5427543", "0.5427543", "0.5425116", "0.5422769", "0.54221517", "0.5420297", "0.5420252", "0.5420127", "0.5417286", "0.5415885", "0.5411119", "0.54040986" ]
0.0
-1
Created by peerapong on 8/19/16.
@Singleton @Component(modules = {VehicleModule.class}) public interface VehicleComponent { Vehicle provideVehicle(); }
{ "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}", "public final void mo51373a() {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\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}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n protected void initialize() {\n\n \n }", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\n public void func_104112_b() {\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\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\n\tprotected void getExras() {\n\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n public void init() {\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void init() {\n }", "@Override\n void init() {\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\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 rozmnozovat() {\n\t}", "@Override\r\n\tpublic void init() {}", "private void init() {\n\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n public void init() {}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "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\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\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "public void mo6081a() {\n }", "private void poetries() {\n\n\t}", "@Override\n\tpublic void ligar() {\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 public void memoria() {\n \n }", "Constructor() {\r\n\t\t \r\n\t }", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n protected void getExras() {\n }", "private Rekenhulp()\n\t{\n\t}", "@Override\n\tpublic void init() {\n\t}", "private void m50366E() {\n }", "private static void cajas() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\n\t\tpublic void init() {\n\t\t}", "@Override\n public void initialize() {\n \n }", "@Override\n public void initialize() { \n }", "private void init() {\n\n\n\n }", "protected boolean func_70814_o() { return true; }", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n\tprotected void initdata() {\n\n\t}", "protected void mo6255a() {\n }", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n public void init() {\n }", "public void mo12628c() {\n }", "@Override\r\n\tpublic final void init() {\r\n\r\n\t}" ]
[ "0.6419887", "0.6259378", "0.61967456", "0.61777467", "0.6154935", "0.6128686", "0.6128686", "0.6117036", "0.60314053", "0.5974033", "0.5959093", "0.59523636", "0.59285223", "0.59198403", "0.59198403", "0.59198403", "0.59198403", "0.59198403", "0.5919151", "0.59131825", "0.5901027", "0.58987975", "0.58987975", "0.58979464", "0.58975846", "0.5890599", "0.5887346", "0.5884547", "0.5884547", "0.5884547", "0.5884547", "0.5884547", "0.5884547", "0.588389", "0.5877755", "0.5870996", "0.5866658", "0.5858999", "0.5855135", "0.58348686", "0.5820364", "0.58131295", "0.58073705", "0.58073705", "0.58073705", "0.58069193", "0.5793371", "0.5793316", "0.5793193", "0.5789099", "0.57837", "0.57837", "0.57837", "0.57805055", "0.57805055", "0.576272", "0.57600963", "0.57600963", "0.57600963", "0.57600963", "0.57600963", "0.57600963", "0.57600963", "0.5754063", "0.5754063", "0.5754063", "0.57455844", "0.57355875", "0.5735353", "0.5732862", "0.57287186", "0.57254076", "0.5702652", "0.5700545", "0.5700545", "0.5698787", "0.5697693", "0.56948966", "0.5692242", "0.56863445", "0.56818837", "0.56815964", "0.56781965", "0.5676332", "0.56646776", "0.56646776", "0.5662766", "0.5662535", "0.5654277", "0.56528133", "0.56508374", "0.56503475", "0.5637455", "0.5637235", "0.56372017", "0.5634087", "0.5625979", "0.5623369", "0.5621211", "0.5618199", "0.56072676" ]
0.0
-1
Spring Data repository for the EventLogging entity.
@SuppressWarnings("unused") @Repository public interface EventLoggingRepository extends JpaRepository<EventLogging, Long> { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface EventRepository extends CrudRepository<EventModel, String> {\n\t\n}", "@Repository\npublic interface LogEntryRepository extends JpaRepository<LogEntry, Long> {\n /**\n * Find all bans.\n *\n * @param roomId the room id\n * @return the list\n */\n @Transactional\n @Query(value = \"SELECT * FROM LOG_BAN WHERE room = ?1\", nativeQuery = true)\n List<LogBan> findAllBans(long roomId);\n\n /**\n * Find all joins.\n *\n * @param roomId the room id\n * @return the list\n */\n @Transactional\n @Query(value = \"SELECT * FROM LOG_JOIN WHERE room = ?1\", nativeQuery = true)\n List<LogJoin> findAllJoins(long roomId);\n\n /**\n * Find all questions.\n *\n * @param roomId the room id\n * @return the list\n */\n @Transactional\n @Query(value = \"SELECT * FROM LOG_QUESTION WHERE room = ?1\", nativeQuery = true)\n List<LogQuestion> findAllQuestions(long roomId);\n}", "@Repository(\"emailLogRepository\")\npublic interface EmailLogRepository extends JpaRepository<EmailLogDB, Integer>{\n}", "public interface IEventoRepository extends IRepositoryBase<Evento> {\n}", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface EventEntryRepository extends JpaRepository<EventEditionEntry,Long> {\n\n\t@EntityGraph(value=\"EventEntryPartial\", type=EntityGraphType.LOAD)\n\t@Transactional(readOnly=true)\n\tStream<EventEditionEntry> streamAllByIdNotNull();\n\n\tList<EventEditionEntry> findByEventEditionIdAndRaceNumber(Long eventEditionId, String raceNumber);\n\n\t@Query(\"SELECT e FROM EventEditionEntry e WHERE e.eventEdition.id = ?1 ORDER BY cast(e.raceNumber as integer) ASC, e.entryName ASC\")\n\tList<EventEditionEntry> findEventEditionEntries(Long eventEditionId);\n\n\t@Query(\"SELECT e FROM EventEditionEntry e WHERE e.id IN ?1 ORDER BY e.eventEdition.eventDate ASC\")\n\tList<EventEditionEntry> findEntriesInList(List<Long> ids);\n\n\tvoid deleteByEventEdition(EventEdition eventEdition);\n\n}", "public interface EventLogsDaoInterface {\n List<EventLog> findAll();\n\n void create(EventLog eventLog);\n\n EventLog update(EventLog eventLog);\n\n EventLog findOne(long id);\n\n void delete(EventLog eventLog);\n\n void deleteById(long entityId);\n}", "public interface EventRepository\n{\n Event getEventToReplay(ObjectId recordingId, int offset);\n\n long countByRecordingId(ObjectId recordingId);\n\n void save(List<Event> lineEvents);\n\n long getAdded();\n}", "@Repository\npublic interface RimsMmsLogRepository extends CrudRepository<RimsMmsLog, Long> {\n}", "public interface UserLogRepository extends JpaRepository<UserLog,Integer> {\n}", "@Repository\npublic interface HistoryRepository extends JpaRepository<LoginHistory, String> {\n\n}", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface EventLanguageRepository extends JpaRepository<EventLanguage, Long> {\n\t\n}", "@SuppressWarnings(\"unused\")\npublic interface EventTypeRepository extends JpaRepository<EventType,Long> {\n\n}", "public interface EventRepositoryService {\n\n EventDeploymentBuilder createDeployment();\n\n void deleteDeployment(String deploymentId);\n\n EventDefinitionQuery createEventDefinitionQuery();\n \n ChannelDefinitionQuery createChannelDefinitionQuery();\n\n /**\n * Changes the category of a deployment.\n * \n * @param deploymentId\n * The id of the deployment of which the category will be changed.\n * @param category\n * The new category.\n */\n void setDeploymentCategory(String deploymentId, String category);\n\n /**\n * Changes the tenant id of a deployment.\n * \n * @param deploymentId\n * The id of the deployment of which the tenant identifier will be changed.\n * @param newTenantId\n * The new tenant identifier.\n */\n void setDeploymentTenantId(String deploymentId, String newTenantId);\n \n /**\n * Changes the parent deployment id of a deployment. This is used to move deployments to a different app deployment parent.\n * \n * @param deploymentId\n * The id of the deployment of which the parent deployment identifier will be changed.\n * @param newParentDeploymentId\n * The new parent deployment identifier.\n */\n void changeDeploymentParentDeploymentId(String deploymentId, String newParentDeploymentId);\n\n List<String> getDeploymentResourceNames(String deploymentId);\n\n InputStream getResourceAsStream(String deploymentId, String resourceName);\n\n EventDeploymentQuery createDeploymentQuery();\n\n EventDefinition getEventDefinition(String eventDefinitionId);\n\n InputStream getEventDefinitionResource(String eventDefinitionId);\n\n void setEventDefinitionCategory(String eventDefinitionId, String category);\n \n ChannelDefinition getChannelDefinition(String channelDefinitionId);\n\n InputStream getChannelDefinitionResource(String channelDefinitionId);\n\n void setChannelDefinitionCategory(String channelDefinitionId, String category);\n \n EventModel getEventModelById(String eventDefinitionId);\n\n EventModel getEventModelByKey(String eventDefinitionKey);\n \n EventModel getEventModelByKey(String eventDefinitionKey, String tenantId);\n\n EventModel getEventModelByKeyAndParentDeploymentId(String eventDefinitionKey, String parentDeploymentId);\n\n EventModel getEventModelByKeyAndParentDeploymentId(String eventDefinitionKey, String parentDeploymentId, String tenantId);\n \n ChannelModel getChannelModelById(String channelDefinitionId);\n\n ChannelModel getChannelModelByKey(String channelDefinitionKey);\n \n ChannelModel getChannelModelByKey(String channelDefinitionKey, String tenantId);\n\n ChannelModel getChannelModelByKeyAndParentDeploymentId(String channelDefinitionKey, String parentDeploymentId);\n\n ChannelModel getChannelModelByKeyAndParentDeploymentId(String channelDefinitionKey, String parentDeploymentId, String tenantId);\n \n /**\n * Programmatically build and register a new {@link EventModel}.\n */\n EventModelBuilder createEventModelBuilder();\n \n InboundChannelModelBuilder createInboundChannelModelBuilder();\n \n OutboundChannelModelBuilder createOutboundChannelModelBuilder();\n}", "@Repository\npublic interface PhotosRepository extends JpaRepository<EventPhotosEntity, Long>{\n List<EventPhotosEntity> findAll();\n}", "public interface UMergeLogRepository extends JpaRepository<UMergeLog,Integer> {\n}", "public interface NotificationRepository extends CrudRepository<Notification,String>, NotificationRepositoryAddon {\r\n\r\n Notification findByPublisherIdAndPublisherNotificationId (String publisherId, String publisherNotificationId);\r\n \r\n List<Notification> findByPublisherId (String publisherId);\r\n\r\n List<Notification> findByPublisherIdAndTopic (String publisherId, String topic);\r\n \r\n List<Notification> findDeletableNotification(Date date);\r\n\r\n}", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface EventTimesRepository extends JpaRepository<EventTimes, Long>, JpaSpecificationExecutor<EventTimes> {\n}", "public interface ResulteventSearchRepository extends ElasticsearchRepository<Resultevent, Long> {\n}", "@Repository\npublic interface PersistenceAuditEventRepository extends MongoRepository<PersistentAuditEvent, String> {\n\n List<PersistentAuditEvent> findByPrincipalAndAuditEventDateAfterAndAuditEventType(String principle, Instant after, String type);\n\n Page<PersistentAuditEvent> findByAuditEventDateBetween(Pageable pageable, LocalDate fromDate, LocalDate toDate);\n}", "public interface CustomerAuditRepository extends JpaRepository<CustomerAudit, Long>{\n\n}", "public interface NotificationRepository extends MongoRepository<Notification, String> { }", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface InvoiceHistoryRepository extends JpaRepository<InvoiceHistory, Long> {\n}", "public interface AuditRepository extends PagingAndSortingRepository<Audit, Long>, JpaSpecificationExecutor<Audit> {\n}", "public interface AuditingRepository extends CrudRepository<AuditingEntity, Long>, JpaSpecificationExecutor<AuditingEntity> {\n}", "@Profile(\"actuators-extended\")\n @Bean\n public AuditEventRepository auditEventRepository() {\n return new InMemoryAuditEventRepository();\n }", "public interface AggregateCurrentTimeRepository extends CrudRepository<AggregateEntityCurrentTime, Long> {\n}", "public IEventLog getEventLog();", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface EventRecordRepository extends JpaRepository<EventRecord, Long> {\n\n @Query(\"select event_record from EventRecord event_record where event_record.user.login = ?#{principal.username}\")\n List<EventRecord> findByUserIsCurrentUser();\n\n}", "@Repository\n@Transactional\npublic interface LensRepository extends JpaRepository<Lens, Long> {\n}", "public interface LoggerJPA extends\n JpaRepository<LoggerEntity,Long>,\n JpaSpecificationExecutor<LoggerEntity>,\n Serializable {\n}", "public interface ConfigRepository extends JpaRepository<Config,Long> {\n}", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface TipoEventoRepository extends JpaRepository<TipoEvento, Long>, JpaSpecificationExecutor<TipoEvento> {\n\n}", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface NotificationRepository extends JpaRepository<NotificationEntity, Long> {\n\n Page<NotificationEntity> findByStatus(NotificationStatus status, Pageable pageable);\n\n Page<NotificationEntity> findByChannel(NotificationChannel channel, Pageable page);\n\n Page<NotificationEntity> findByEvent(String event, Pageable page);\n\n Page<NotificationEntity> findByChannelAndStatus(NotificationChannel channel, NotificationStatus status, Pageable pageable);\n\n}", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface LocationExtensionRepository extends JpaRepository<Location, Long> {\n\n Location findByEventId(Long id);\n}", "public interface LossRepository extends JpaRepository<Loss,Long> {\n\n}", "public interface ActivityLogService {\n\n ActivityLog save(ActivityLog activityLog);\n\n void delete(ActivityLog activityLog);\n\n ActivityLog findOne(String id);\n\n List<ActivityLog> findAll();\n}", "@Override\n\tpublic LogRepository<CreditrepayplanLog> getLogRepository() {\n\t\treturn creditrepayplanLogRepository;\n\t}", "public interface InventoryUserLoginHistoryRepository extends JpaRepository<InventoryUserLoginHistory,Serializable> {\n}", "public interface RenLogEntityRepository extends JpaRepository<RenLogEntity, String> {\n\n List<RenLogEntity> findRenLogEntitiesByRtid(String rtid);\n\n}", "public interface SpringDataJpaOperatorStatusRepository extends OperatorStatusRepository, Repository<OperatorStatus, Integer> {\n}", "@Repository\npublic interface TransactionRepository extends MongoRepository<Transaction, String>, CustomTransactionRepository {\n}", "public interface MessageRepository extends JpaRepository<Message, Long>{\n\n}", "public interface AuditService {\n\n List<Audit> findAll();\n\n}", "public interface LocationLogRepository extends JpaRepository<LocationLog,Long> {\n\n\n\tOptional<LocationLog> findOneById(Long id);\n\n @Query(\"select locationLog from LocationLog locationLog where locationLog.user.login = ?#{principal.username}\")\n List<LocationLog> findByUserIsCurrentUser();\n \n @Query(value=\"select locationLog from LocationLog locationLog where locationLog.user.id in (select id from User user where user.createdBy = ?#{principal.username} or user.login = ?#{principal.username}) and locationLog.createdDateTime between :fromDate and :toDate\",\n \t\tcountQuery = \"select count(locationLog) from LocationLog locationLog where locationLog.user.id in (select id from User user where user.createdBy = ?#{principal.username} or user.login = ?#{principal.username}) and locationLog.createdDateTime between :fromDate and :toDate\")\n \t\t\t\t\n Page<LocationLog> findLogsForLoggedInUser(@Param(\"fromDate\") long fromDate,@Param(\"toDate\") long toDate,Pageable pageable);\n \n \n @Query(\"select locationLog from LocationLog locationLog where locationLog.user.id =:id and locationLog.createdDateTime between :fromDate and :toDate order by locationLog.createdDateTime \")\n LinkedList<LocationLog> listLocationPath(@Param(\"id\") Long id ,@Param(\"fromDate\") long fromDate,@Param(\"toDate\") long toDate);\n \n \n @Query(\"select locationLog from LocationLog locationLog where locationLog.id in (select max(id) from LocationLog where user.id in (select id from User user where user.createdBy = ?#{principal.username} or user.login = ?#{principal.username}) group by user.id ) \")\n \n List<LocationLog> getlatestLocations();\n \n \n @Query(nativeQuery = true)\n List<LiveLogs> getLiveLogs( @Param(\"userName\") String userName,@Param(\"dateTime\") long dateTime,@Param(\"hour\") int hour );\n \n @Query(\"select locationLog from LocationLog locationLog where locationLog.user.login = ?#{principal.username} order by createdDateTime desc\")\n List<LocationLog> latestLogForGPS(@Param(\"pageable\") Pageable pageable);\n \n @Query(\"select locationLog from LocationLog locationLog where locationLog.user.login = ?#{principal.username} and locationLog.createdDateTime <= :createdDateTime order by createdDateTime desc\")\n List<LocationLog> latestLogForNP(@Param(\"pageable\") Pageable pageable,@Param(\"createdDateTime\") long createdDateTime);\n \n @Query(\"select locationLog from LocationLog locationLog where locationLog.id in (select max(id) from LocationLog log where log.user.login =:login)\")\n LocationLog getlatestLocation(@Param(\"login\") String login);\n \n \n}", "public interface JobHistoryRepository extends CrudRepository<JobHistoryEntity,Long> {\n List<JobHistoryEntity> findByJob(JobEntity file);\n}", "@Repository\npublic interface RoomRepository extends JpaRepository<Room, Long> {\n\n\n}", "@Repository\npublic interface EmployeeStoreRepository extends JpaRepository<EmployeeStore,String>{\n\n}", "@Repository\n@Transactional\npublic interface EmployeeRepository extends CrudRepository<Employee, Long> {\n\n\tpublic List<Employee> findAll();\n}", "public interface AttachmentRepository extends JpaRepository<Attachment,Long> {\n}", "public interface EmployeeRepository extends CrudRepository<Employee, Long>{\n}", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface ProjectHistoryRepository extends JpaRepository<ProjectHistory, Long> {\n\n}", "public interface RolRepository extends JpaRepository<Rol,Long> {\n\n}", "public interface GoalLogRepository extends PagingAndSortingRepository<GoalLog, Long>, GoalLogRepositoryCustom {\n\tPage<GoalLog> findAllByStatusIn(List<ContentStatus> statusList, Pageable pageable);\n\n\t@Query(\"From GoalLog n Where :author = n.goal.author\")\n\tList<GoalLog> findAllByAuthor(@Param(\"author\") User author);\n\t\n\t@Query(\"From GoalLog n Where :author = n.goal.author AND n.status In :statusList\")\n\tPage<GoalLog> findAllByAuthorAndStatusIn(@Param(\"author\") User author, @Param(\"statusList\") List<ContentStatus> statusList, Pageable pageable);\n\n\tList<GoalLog> findAllByGoal(Goal goal);\n\n\tPage<GoalLog> findAllByGoalAndStatusIn(Goal goal, List<ContentStatus> statusList, Pageable pageable);\n\n\t// TODO: 여기 한용이는 되는데 나는 안되는곳... 여기하고 GoalLogService의 todo부분\n//\t@Query(\"From GoalLog gl Where gl.goal.id In :goals AND gl.status In :statusList\")\n//\tPage<GoalLog> findComByStatusIn(@Param(\"goals\") List<Long> goals, @Param(\"statusList\") List<ContentStatus> statusList, Pageable pageable);\n\n\t@Query(\"From GoalLog gl Where gl.status In :statusList\")\n\tPage<GoalLog> findComByStatusIn(@Param(\"statusList\") List<ContentStatus> statusList, Pageable pageable);\n\n\t@Query(\"Select count(gl) From GoalLog gl Where :goal = gl.goal AND gl.status In :statusList\")\n\tInteger findNumByGoalAndStatusIn(@Param(\"goal\")Goal goal, @Param(\"statusList\")List<ContentStatus> statusList);\n}", "public interface DataStateSearchRepository extends ElasticsearchRepository<DataState, Long> {\n}", "@SuppressWarnings(\"unused\")\n@Repository\n@JaversSpringDataAuditable\npublic interface ReservoirCapacityRepository extends JpaRepository<ReservoirCapacity, Long> {\n\n}", "public interface DocumentParameterRepository extends JpaRepository<DocumentParameterEntity, Long> {\n}", "public interface EventRepository extends JpaRepository<Event, Long> {\r\n\t@Query(\" from Event where event_city=:city\")\r\n\tpublic List<Event> findByCity(@Param(\"city\") String city);\r\n}", "@Repository\npublic interface StatusRepository extends IRepository<Status, String> {\n\n}", "@Component\npublic interface AnimalRepository extends JpaRepository<Animal, Long> {\n}", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface EmEmpDocumentsRepository extends JpaRepository<EmEmpDocuments, Long> {\n List<EmEmpDocuments> findByIdEmployeeId(long id);\n}", "@Repository\npublic interface EmployeeRepository extends JpaRepository<Employee, Integer> {\n}", "@Repository\npublic interface MessagePushDao extends JpaRepository<MessagePush, Long> {\n\n MessagePush findByClientId(String clientId);\n\n MessagePush findByUserIdAndPlatform(long userId, String platform);\n}", "@Repository\npublic interface DBFileRepository extends JpaRepository<DBFile, Long> {\n\n}", "public interface FeedBackRepositoryCustom extends JpaRepository<FeedBack, Long> {\n\n}", "public interface PublisherRepository extends CrudRepository <Publisher, Long> {\n\n}", "public interface RevokeAskEventPublishRepository extends EventPublishRepository<RevokeAskEventPublish> {\n}", "@Repository\npublic interface ProductRepository extends JpaRepository<Product, Long> {\n\n}", "public interface EmployeeRepository extends JpaRepository<Employee, Integer> {\r\n\r\n}", "public interface MeetingRepository extends JpaRepository<Meeting, Long> {\n}", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface SlackAppRepository extends JpaRepository<SlackApp, Long> {\n\n}", "public interface PollRepository extends CrudRepository<Poll, Long> {\n}", "@Repository\npublic interface SimulationRepository extends CrudRepository<Simulation, Serializable> {\n\n}", "public interface LogsService {\n /**\n * 保存日志\n *\n * @param userCustom\n * @param ipAddr\n * @param logAction\n * @param data\n * @param currentTime\n */\n void saveLogs(User userCustom, String ipAddr, String logAction, String data, long currentTime);\n\n /**\n * 获取所有日志\n *\n * @param loginUserId 用户\n * @return\n */\n List<Logs> findAll(String loginUserId, Integer limit);\n\n /**\n * 查询日志统计信息\n * @param uid\n * @return\n */\n List<CountInfoBean> findLogsInfo(String uid);\n\n /**\n * 查询分类统计信息\n * @param uid\n * @return\n */\n List<CountInfoBean> findCategoryInfo(String uid);\n}", "@Repository\npublic interface TaskRepository extends JpaRepository<Task, Long> {\n\n}", "public interface OrderInvoiceRepository extends Repository<OrderInvoice, Long> {\n\n}", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface LevelDressageHisRepository extends JpaRepository<LevelDressageHis, Long> {\n\n}", "public interface LogDetailRepository extends CrudRepository<LogDetail, Long> {\n List<LogDetail> findByLogIdIn(List<Long> LogIds);\n\n\n}", "@Repository\npublic interface EventRepository extends JpaRepository<Event, Integer> {\n\n @Query(\"select e from Event e where lower(e.title) like lower(concat('%',:search,'%'))\"\n + \" or e.author in (select u.userId from User u \"\n + \" where lower(u.firstName) like lower(concat('%',:search,'%')) \"\n + \" or lower(u.lastName) like lower(concat('%',:search,'%')))\"\n + \" or lower(e.description) like lower(concat('%',:search,'%'))\")\n List<Event> findByTitleOrAuthorOrDescription(\n @Param(\"search\") String search);\n\n @Query(\"select e from Event e where e.startTime between :startTime and :endTime\"\n + \" or e.endTime between :startTime and :endTime\")\n List<Event> findBetweenStartTimeAndEndTime(\n @Param(\"startTime\") Timestamp startTime,\n @Param(\"endTime\") Timestamp endTime);\n\n @Query(\"select e from Event e where e.author = (select u.userId from User u where u.email = :email)\")\n List<Event> findByAuthorEmail(@Param(\"email\") String email);\n \n}", "public interface LevelDressageSearchRepository extends ElasticsearchRepository<LevelDressage, Long> {\n}", "public interface EmployeeRepository extends ArangoRepository<Employee, String> {}", "public PersistentLogEventListener() {\n\t\tthis(new EventDAO());\n\t}", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface ClassDurationRepository extends JpaRepository<ClassDuration, Long> {\n\n}", "@org.springframework.stereotype.Repository\npublic interface EntityRepository<R> {\n\n /* public R get(R entity);*/\n\n public List<R> getAll();\n\n public List<R> getAll(int limit);\n\n public List<R> getAll(Integer firstResult, Integer maxResults);\n\n public List<R> getByExample(final R example);\n\n public R getUniqueByExample(final R example);\n\n public void put(final R record) throws DuplicateKeyException;\n\n public void put(final Collection<R> records);\n\n public Entity getEntity(Entity entity);\n\n public Entity getEntityById(Entity entity);\n\n public Entity getEntityByName(Entity entity);\n\n public void insert(final R record);\n\n public void insertAll(final Collection<R> items);\n\n public void update(final R record);\n\n public void updateAll(final Collection<R> items);\n\n public void remove(final R entity);\n\n public Entity getByColumnName(String columnName, Object columnValue);\n\n public Collection<R> getByEntities(String columnName, Object columnValue);\n\n public void clear();\n\n public void refresh(final R entity);\n\n public Long size();\n}", "public interface SessionRepository extends JpaRepository<Session, Long> {\n}", "public interface SessionRepository extends JpaRepository<Session, Long> {\n}", "public interface RoomRepository extends JpaRepository<Room, Long> {\n}", "public interface ChatMessageSearchRepository extends ElasticsearchRepository<ChatMessage, Long> {\n}", "public interface ActionRepository extends JpaRepository<Action, Integer> {\n\n}", "public interface LogDAO extends JpaRepository<Log,Integer> {\n\n List<Log> findAllByUsername(String username,Sort sort);\n}", "@Repository\npublic interface GameRepository extends JpaRepository<Game, UUID> {\n}", "@SuppressWarnings(\"unused\")\n@Repository\npublic interface ContractDocumentEntryRowRepository extends JpaRepository<ContractDocumentEntryRow, Long> {\n\n}", "public interface SavingsRepository extends Repository<Savings, Long> {\n}", "public interface ActiveLogService extends BaseService<ActiveLog> {\n String save(String log);\n\n String save(List<String> logs);\n\n Page<ActiveLog> findAll(Integer pageIndex, Integer pageSize);\n}", "@Transactional\npublic interface ProjectStageMovementRepository extends JpaRepository<ProjectStageMovement, Long> {\n}", "public interface alertRepo {\n\n List<alerts> findAll();\n\n List<alerts> findAlertsFromVehicle(String vin);\n\n alerts create(alerts alert);\n}", "@Repository\npublic interface PingRepository extends CrudRepository<PingEntity, Long> {\n\t//\n}", "@Repository\npublic interface WallPostPhotoRepository extends JpaRepository<WallPostPhoto, Long> {\n}", "@Repository\npublic interface TicketRepository extends JpaRepository<Ticket, Long> {\n\n}", "public interface AttachmentRepo extends CrudRepository<Attachment,Long> {\n}", "@Transactional\npublic interface ProjectStageActionMovementRepository extends JpaRepository<ProjectStageActionMovement,Long> {\n}" ]
[ "0.6691686", "0.65886253", "0.65730745", "0.625655", "0.62274384", "0.61398983", "0.61222464", "0.6094153", "0.6087512", "0.60395247", "0.5993194", "0.5950223", "0.5917234", "0.5850321", "0.5843508", "0.5811617", "0.5802824", "0.57999855", "0.57813483", "0.5757523", "0.5715373", "0.57040435", "0.56950635", "0.5690875", "0.5658706", "0.5647337", "0.56234246", "0.5616406", "0.5612469", "0.56088746", "0.55875325", "0.5556121", "0.5545961", "0.55414754", "0.55358213", "0.552508", "0.5518834", "0.55146295", "0.5509541", "0.5506167", "0.54982847", "0.54929525", "0.548057", "0.54796", "0.5475696", "0.5458843", "0.5447046", "0.54237115", "0.5422545", "0.5421965", "0.5421431", "0.5401654", "0.53937507", "0.53864014", "0.53838587", "0.53817517", "0.53794837", "0.5377096", "0.53716683", "0.53621745", "0.53612655", "0.5356906", "0.53426236", "0.53343105", "0.53312397", "0.53302276", "0.5321534", "0.53200907", "0.5319476", "0.53161305", "0.5315306", "0.5309587", "0.53044635", "0.530124", "0.5300989", "0.52996373", "0.52996135", "0.5295577", "0.5284029", "0.5279337", "0.5276407", "0.52761865", "0.5254412", "0.5254273", "0.5254273", "0.5253375", "0.52507865", "0.5250428", "0.52484465", "0.5247716", "0.52440137", "0.5241242", "0.52374476", "0.5236917", "0.5232847", "0.5229953", "0.5223598", "0.5222429", "0.52213913", "0.5220961" ]
0.7252163
0
TODO Autogenerated method stub
@Override public void onInit() throws Exception { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void onStartTrading() throws Exception { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void onStopTrading(boolean isException) throws Exception { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void onXMinBar(Bar bar) throws Exception { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@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 onTrade(Trade trade) throws Exception { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void onStopOrder(StopOrder StopOrder) throws Exception { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
krahason elementet e vektorit me nje vlere te caktuar
private boolean contains(int[] piket,int vlera){ for(int i=0; i<piket.length; i++){ if(piket[i]==vlera) return true; //eshte metode booleane spese kthen true ose false ne menyre qe te plotesohet if me lart } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void obrniListu() {\n if (prvi != null && prvi.veza != null) {\n Element preth = null;\n Element tek = prvi;\n \n while (tek != null) {\n Element sled = tek.veza;\n \n tek.veza = preth;\n preth = tek;\n tek = sled;\n }\n prvi = preth;\n }\n }", "public void nastaviIgru() {\r\n\t\t// nastavi igru poslije pobjede\r\n\t\tigrajPoslijePobjede = true;\r\n\t}", "public void skratiListu() {\n if (!jePrazna()) {\n int n = Svetovid.in.readInt(\"Unesite broj elemenata za skracivanje: \");\n obrniListu(); //Zato sto se trazi odsecanje poslednjih n elemenata\n while (prvi != null && n > 0) {\n prvi = prvi.veza;\n n--;\n }\n obrniListu(); //Vraca listu u prvobitni redosled\n }\n }", "public void impactoContra(Elemento elemento){}", "public void spojElementeNaizmenicno(ListaBrojeva novaLista) {\n if (novaLista.prvi == null)\n return;\n else if (jePrazna())\n prvi = novaLista.prvi;\n else {\n Element tek = prvi.veza;\n Element novaListaTek = novaLista.prvi;\n Element pomocni = prvi;\n while (tek != null && novaListaTek != null) {\n pomocni.veza = novaListaTek;\n pomocni = pomocni.veza;\n novaListaTek = novaListaTek.veza;\n \n pomocni.veza = tek;\n pomocni = pomocni.veza;\n tek = tek.veza;\n \n }\n if (novaListaTek != null)\n pomocni.veza = novaListaTek;\n }\n }", "public void enfileira(T elemento){\n\t\t\n\t\tthis.adiciona(elemento);\n\t}", "private void ucitajTestPodatke() {\n\t\tList<Integer> l1 = new ArrayList<Integer>();\n\n\t\tRestoran r1 = new Restoran(\"Palazzo Bianco\", \"Bulevar Cara Dušana 21\", KategorijeRestorana.PICERIJA, l1, l1);\n\t\tRestoran r2 = new Restoran(\"Ananda\", \"Petra Drapšina 51\", KategorijeRestorana.DOMACA, l1, l1);\n\t\tRestoran r3 = new Restoran(\"Dizni\", \"Bulevar cara Lazara 92\", KategorijeRestorana.POSLASTICARNICA, l1, l1);\n\n\t\tdodajRestoran(r1);\n\t\tdodajRestoran(r2);\n\t\tdodajRestoran(r3);\n\t}", "private void setSITACI(Element element) {\r\n\t\tElement eSitaci = new Element(\"D_EnviaSITACI\");\r\n\t\tif(this.registrosSitaci.size()<0){\r\n\t\t\teSitaci.setText(\"NO\");\r\n\t\t\telement.addContent(eSitaci);\r\n\t\t}else{\r\n\t\t\teSitaci.setText(\"SI\");\r\n\t\t\telement.addContent(eSitaci);\r\n\t\t\tElement listaSitaci = new Element(\"N_ListaSITACI\");\r\n\t\t\tElement registroSitaci;\r\n\t\t\tElement interiorRegistroSitaci;\r\n\t\t\tfor(RegistroSitaci reg : this.registrosSitaci){\r\n\t\t\t\tregistroSitaci = new Element(\"uniqueKey\");\r\n\t\t\t\tregistroSitaci.setAttribute(\"D_Id\", \"NA\");\r\n\t\t\t\tregistroSitaci.setAttribute(\"campoCQ\", \"dbid\");\r\n\t\t\t\tregistroSitaci.setAttribute(\"entidadCQ\", \"SITACI\");\r\n\t\t\t\t\r\n\t\t\t\t//nroSitaci\r\n\t\t\t\tinteriorRegistroSitaci = new Element(\"D_NroSITACI\");\r\n\t\t\t\tinteriorRegistroSitaci.setText(reg.getNroSitaci());\r\n\t\t\t\tregistroSitaci.addContent(interiorRegistroSitaci);\r\n\t\t\t\t//DNSorigen\r\n\t\t\t\tinteriorRegistroSitaci = new Element(\"D_DNSOrigen\");\r\n\t\t\t\tinteriorRegistroSitaci.setText(reg.getDnsOrigen());\r\n\t\t\t\tregistroSitaci.addContent(interiorRegistroSitaci);\r\n\t\t\t\t//Longitud\r\n\t\t\t\tinteriorRegistroSitaci = new Element(\"D_Long\");\r\n\t\t\t\tinteriorRegistroSitaci.setText(String.valueOf(reg.getLongitud()));\r\n\t\t\t\tregistroSitaci.addContent(interiorRegistroSitaci);\r\n\t\t\t\t//cantReg\r\n\t\t\t\tinteriorRegistroSitaci = new Element(\"D_CantReg\");\r\n\t\t\t\tinteriorRegistroSitaci.setText(String.valueOf(reg.getCantReg()));\r\n\t\t\t\tregistroSitaci.addContent(interiorRegistroSitaci);\r\n\t\t\t\t//Descripcion\r\n\t\t\t\tinteriorRegistroSitaci = new Element(\"D_DescSITACI\");\r\n\t\t\t\tinteriorRegistroSitaci.setText(reg.getDescripcion());\r\n\t\t\t\tregistroSitaci.addContent(interiorRegistroSitaci);\r\n\t\t\t\t//agrego un registro\r\n\t\t\t\tlistaSitaci.addContent(registroSitaci);\r\n\t\t\t}\r\n\t\t\t//Agrego toda la lista al cuerpo del xml\r\n\t\t\telement.addContent(listaSitaci);\r\n\t\t}\t\t\r\n\t\t\r\n\t}", "void rozpiszKontraktyPart2NoEV(int index,float wolumenHandlu, float sumaKupna,float sumaSprzedazy )\n\t{\n\t\tArrayList<Prosument> listaProsumentowTrue =listaProsumentowWrap.getListaProsumentow();\n\t\t\n\n\t\tint a=0;\n\t\twhile (a<listaProsumentowTrue.size())\n\t\t{\n\t\t\t\t\t\t\n\t\t\t// ustala bianrke kupuj\n\t\t\t// ustala clakowita sprzedaz (jako consumption)\n\t\t\t//ustala calkowite kupno (jako generacje)\n\t\t\tDayData constrainMarker = new DayData();\n\t\t\t\n\t\t\tArrayList<Point> L1\t=listaFunkcjiUzytecznosci.get(a);\n\t\t\t\n\t\t\t//energia jaka zadeklarowal prosument ze sprzeda/kupi\n\t\t\tfloat energia = L1.get(index).getIloscEnergiiDoKupienia();\n\t\t\t\n\t\t\tif (energia>0)\n\t\t\t{\n\t\t\t\tfloat iloscEnergiiDoKupienia = energia/sumaKupna*wolumenHandlu;\n\t\t\t\t\n\t\t\t\tconstrainMarker.setKupuj(1);\n\t\t\t\tconstrainMarker.setGeneration(iloscEnergiiDoKupienia);\n\t\t\t\t\n\t\t\t\trynekHistory.ustawBetaDlaWynikowHandlu(iloscEnergiiDoKupienia,a);\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tfloat iloscEnergiiDoSprzedania = energia/sumaSprzedazy*wolumenHandlu;\n\n\t\t\t\t\n\t\t\t\tconstrainMarker.setKupuj(0);\n\t\t\t\tconstrainMarker.setConsumption(iloscEnergiiDoSprzedania);\n\t\t\t\t\n\t\t\t\trynekHistory.ustawBetaDlaWynikowHandlu(iloscEnergiiDoSprzedania,a);\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tArrayList<Float> priceVector = priceVectorsList.get(priceVectorsList.size()-1);\n\t\t\t\n\t\t\t//poinformuj prosumenta o wyniakch handlu i dostosuj go do wynikow\n\t\t\tlistaProsumentowTrue.get(a).getKontrakt(priceVector,constrainMarker);\n\t\t\t\n\t\t\ta++;\n\t\t}\n\t}", "public void addElemento (Elemento obj) {\n if (obj.getPeso() > getPesoLibre() || porNombre.containsKey(obj.getNombre())) {\n System.out.println(nombre +\": No se puede agregar \" + obj.getNombre());\n }\n else {\n porNombre.put(obj.getNombre(), obj);\n addPeso(obj.getPeso());\n }\n }", "public void dodajZmijuPocetak() {\n\t\tthis.zmija.add(new Cvor(1,4));\n\t\tthis.zmija.add(new Cvor(1,3));\n\t\tthis.zmija.add(new Cvor(1,2));\n\t\t\n\t\tint i = this.zmija.get(0).i;\n\t\tint j = this.zmija.get(0).j;\n\t\tthis.tabla[i][j] = 'O';\n\t\t\n\t\tfor (int k = 1; k < this.zmija.size(); k++) {\n\t\t\ti = this.zmija.get(k).i;\n\t\t\tj = this.zmija.get(k).j;\n\t\t\tthis.tabla[i][j] = 'o';\n\t\t}\t\n\t}", "private void crearElementos() {\n\n\t\tRotonda rotonda1 = new Rotonda(new Posicion(400, 120), \"5 de octubre\");\n\t\tthis.getListaPuntos().add(rotonda1);\n\n\t\tCiudad esquel = new Ciudad(new Posicion(90, 180), \"Esquel\");\n\t\tthis.getListaPuntos().add(esquel);\n\n\t\tCiudad trelew = new Ciudad(new Posicion(450, 200), \"Trelew\");\n\t\tthis.getListaPuntos().add(trelew);\n\n\t\tCiudad comodoro = new Ciudad(new Posicion(550, 400), \"Comodoro\");\n\t\tthis.getListaPuntos().add(comodoro);\n\n\t\tCiudad rioMayo = new Ciudad(new Posicion(350, 430), \"Rio Mayo\");\n\t\tthis.getListaPuntos().add(rioMayo);\n\n\t\t// --------------------------------------------------------\n\n\t\tRutaDeRipio rutaRipio = new RutaDeRipio(230, 230, rotonda1, esquel);\n\t\tthis.getListaRuta().add(rutaRipio);\n\n\t\tRutaPavimentada rutaPavimentada1 = new RutaPavimentada(380, 100, trelew, comodoro);\n\t\tthis.getListaRuta().add(rutaPavimentada1);\n\n\t\tRutaPavimentada rutaPavimentada2 = new RutaPavimentada(800, 120, esquel, comodoro);\n\t\tthis.getListaRuta().add(rutaPavimentada2);\n\n\t\tRutaDeRipio rutaripio3 = new RutaDeRipio(380, 100, trelew, comodoro);\n\t\tthis.getListaRuta().add(rutaripio3);\n\n\t\tRutaEnConstruccion rutaConst1 = new RutaEnConstruccion(180, 70, rioMayo, comodoro);\n\t\tthis.getListaRuta().add(rutaConst1);\n\n\t\tRutaPavimentada rutaPavimentada3 = new RutaPavimentada(600, 110, rioMayo, esquel);\n\t\tthis.getListaRuta().add(rutaPavimentada3);\n\t}", "@Override\r\n\tpublic boolean buscar(T elemento) {\n\t\treturn false;\r\n\t}", "public void zpracujObjednavky()\n\t{\n\t\tint idtmp = 0;\n\t\tfloat delkaCesty = 0;\n\t\t\n\t\tif (this.objednavky.isEmpty())\n\t\t{\n\t\t\treturn ;\n\t\t}\n\t\t\n\t\tNakladak nakl = (Nakladak) getVolneAuto();\n\t\t\n\t\tnakl.poloha[0] = this.poloha[0];\n\t\tnakl.poloha[1] = this.poloha[1];\n\t\tObjednavka ob = this.objednavky.remove();\n\n\t\t/*System.out.println();\n\t\tSystem.out.println(\"Objednavka hospody:\" + ob.id + \" se zpracuje pres trasu: \");\n\t\t */\n\t\tdelkaCesty += vyberCestu(this.id, ob.id, nakl);\n\t\t\n\t\twhile(nakl.pridejObjednavku(ob))\n\t\t{\n\t\t\tidtmp = ob.id;\n\t\t\t\n\t\t\tob = vyberObjednavku(ob.id);\n\t\t\tif (ob == null)\n\t\t\t{\n\t\t\t\tob=nakl.objednavky.getLast();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tobjednavky.remove(ob);\n\t\t\t\n\t\t\tdelkaCesty += vyberCestu(idtmp, ob.id, nakl);\n\t\t\t\n\t\t\tif((nakl.objem > 24)||(13-Simulator.getCas().hodina)*(nakl.RYCHLOST) + 100 < delkaCesty){\n\t\t\t\t//System.out.println(\"Nakladak ma \"+nakl.objem);\n\t\t\t\tnakl.kDispozici = false;\n\t\t\t\t//System.out.println(\"Auto jede \" + delkaCesty + \"km\");\n\t\t\t\tbreak;\t\t\n\t\t\t}\n\t\t\t/*\n\t\t\tif((Simulator.getCas().hodina > 12) && (delkaCesty > 80) ){\n\t\t\t\t//System.out.println(\"Nakladak ma \"+nakl.objem);\n\t\t\t\tnakl.kDispozici = false;\n\t\t\t\t//System.out.println(\"Auto jede \" + delkaCesty + \"km\");\n\t\t\t\tbreak;\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif((Simulator.getCas().hodina > 9) && (delkaCesty > 130) ){\n\t\t\t\t//System.out.println(\"Nakladak ma \"+nakl.objem);\n\t\t\t\tnakl.kDispozici = false;\n\t\t\t\t//System.out.println(\"Auto jede \" + delkaCesty + \"km\");\n\t\t\t\tbreak;\t\t\n\t\t\t}*/\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t//cesta zpatky\n\t\tvyberCestu(ob.id, this.id, nakl);\n\t\tif (nakl.objem >= 1)\n\t\t{\n\t\t\tnakl.kDispozici = false;\n\t\t\tnakl.jede = true;\n\t\t\t//vytvoreni nove polozky seznamu pro statistiku\n\t\t\tnakl.novaStatCesta();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tnakl.resetCesta();\n\t\t}\n\t}", "@Override\r\n\tpublic boolean getElemento(T elemento) {\n\t\treturn false;\r\n\t}", "public ListaPracownikow() {\n generujPracownikow();\n //dodajPracownika();\n }", "private void actualizarEnConsola() {\n\t\tfor(int i=0; i<elementos.size();i++){\n\t\t\tElemento e = elementos.get(i);\n\t\t\tSystem.out.println(e.getClass().getName()+\"- Posicion: , X: \"+e.getPosicion().getX()+\", Y: \"+ e.getPosicion().getY());\n\t\t}\n\t\t\n\t}", "private void ucitajPodatke() {\n \n DefaultListModel<Voznja> m = new DefaultListModel<>();\n obrada.getPodaci().forEach(s->m.addElement(s));\n lstPodaci.setModel(m);\n\n }", "public ListaBrojeva izdvojElmenteNaParnimPozicijama() {\n if (prvi != null) {\n ListaBrojeva parni = new ListaBrojeva();\n \n Element tek = prvi;\n Element preth = null;\n Element parniKraj = null;\n int br = 0;\n \n while (tek.veza != null) {\n preth = tek;\n tek = tek.veza;\n \n if (br % 2 != 0) {\n preth.veza = tek.veza;\n if (parni.prvi == null) {\n parni.prvi = tek;\n parniKraj = tek;\n tek.veza = null; \n } else {\n parniKraj.veza = tek;\n tek.veza = null;\n parniKraj = parniKraj.veza;\n }\n tek = preth;\n }\n br++;\n }\n /*prvi element iz liste je paran, ali je preskocen, \n tako da ga sad izbacujemo iz liste i dodajemo u novu*/\n Element pom = prvi;\n prvi = prvi.veza;\n pom.veza = parni.prvi;\n parni.prvi = pom;\n return parni;\n }\n return null;\n }", "@Override\t\n\tpublic void innKoe(T element){\n\t\t\tLinearNode<T> nyNode= new LinearNode<T>(element);\n\t\t\t\n\t\t\tif(erTom()){\n\t\t\t\tfront = nyNode;\n\t\t\t\n\t\t\t}else{\n\t\t\t\tbak.setNeste(nyNode);\n\t\t\t}\n\t\t\tbak = nyNode;\n\t\t\tantall++;\n\t\t\t}", "Lista_Simple datos(File tipo1) {\n \n SAXBuilder builder = new SAXBuilder();\n try {\n \n \n \n\n \n //Se obtiene la lista de hijos de la raiz 'tables'\n Document document = builder.build(tipo1);\n Element rootNode = document.getRootElement(); \n // JOptionPane.showMessageDialog(null,\" e1: \"+(rootNode.getChildText(\"dimension\"))); \n tam= Integer.parseInt(rootNode.getChildText(\"dimension\"));\n Element dobles = rootNode.getChild(\"dobles\");\n \n List list = dobles.getChildren(\"casilla\");\n for ( int i = 0; i < list.size(); i++ )\n {\n Element tabla = (Element) list.get(i);\n d1.enlistar(tabla.getChildTextTrim(\"x\"));\n \n d1.enlistar(tabla.getChildTextTrim(\"y\"));\n// JOptionPane.showMessageDialog(null,\"\"+tabla.getChildTextTrim(\"x\").toString());\n// JOptionPane.showMessageDialog(null,\"\"+tabla.getChildTextTrim(\"y\").toString());\n }\n \n \n Element triples = rootNode.getChild(\"triples\");\n \n List listt = triples.getChildren(\"casilla\");\n for ( int i = 0; i < listt.size(); i++ )\n {\n Element tabla = (Element) listt.get(i);\n d2.enlistar(tabla.getChildTextTrim(\"x\"));\n d2.enlistar(tabla.getChildTextTrim(\"y\"));\n// JOptionPane.showMessageDialog(null,\"\"+tabla.getChildTextTrim(\"x\").toString());\n// JOptionPane.showMessageDialog(null,\"\"+tabla.getChildTextTrim(\"y\").toString());\n }\n Element dicc = rootNode.getChild(\"diccionario\");\n List dic = dicc.getChildren();\n\n for ( int i = 0; i < dic.size(); i++ )\n {\n Element tabla = (Element) dic.get(i);\n //JOptionPane.showMessageDialog(null,\"\"+tabla.getText().toString());\n d.enlistar(tabla.getText().toString());\n \n \n \n } \n \n }catch (JDOMException | IOException | NumberFormatException | HeadlessException e){\n JOptionPane.showMessageDialog(null,\" error de archivo\");\n }\n return d;\n \n}", "public boolean klic() {\n\t\tif(first.next.zacetniIndex!=0) {\r\n\t\t\tfirst.next.zacetniIndex = 0;\r\n\t\t\tfirst.next.koncniIndex = first.next.size-1;\r\n\t\t\t//ce je en element, nimamo vec praznega prostora\r\n\t\t\tif(first==last) prazno=0;\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\tList prev = first.next;\r\n\t\tList el = first.next.next;\r\n\t\t\r\n\t\twhile(el!=null) {\r\n\t\t\tif(prev.koncniIndex!=el.zacetniIndex-1) {\r\n\t\t\t\t\r\n\t\t\t\tint razlika = el.zacetniIndex - prev.koncniIndex - 1;\r\n\t\t\t\tel.zacetniIndex = el.zacetniIndex - razlika;\r\n\t\t\t\tel.koncniIndex = el.koncniIndex - razlika;\r\n\t\t\t\t//ce pomeramo zadnega zmanjsujemo praznega prostora\r\n\t\t\t\tif(prev==last) prazno = prazno - razlika;\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\tprev=el;\r\n\t\t\tel=el.next;\r\n\t }\r\n\t\treturn false;\r\n\t}", "public void setElemento(String elemento) {\r\n\t\tthis.elemento = elemento;\r\n\t}", "public void visite(Element element) {\n\t\t\n\t}", "public DobbeltLenketListe() {\n this.hode= null;\n this.hale= null;\n antall=0; }", "@Override\r\n\tpublic void findElement() {\n\t\t\r\n\t}", "public void GetVehiculos() {\n String A = \"&LOCATION=POR_ENTREGAR\";\n String Pahtxml = \"\";\n \n try {\n \n DefaultListModel L1 = new DefaultListModel();\n Pahtxml = Aso.SendGetPlacas(A);\n Lsvehiculo = Aso.Leerxmlpapa(Pahtxml);\n Lsvehiculo.forEach((veh) -> {\n System.out.println(\"Placa : \" + veh.Placa);\n L1.addElement(veh.Placa);\n });\n \n Lista.setModel(L1);\n \n } catch (Exception ex) {\n Logger.getLogger(Entrega.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }", "private Karta kartaErabaki(ArrayList<ArrayList<Karta>> pMatrizea) \r\n\t{\r\n\t\tKarta karta = (Karta) new KartaNormala(ElementuMota.ELURRA,0,KoloreMota.BERDEA);\r\n\t\tfor(int i=0;i<pMatrizea.size();i++) \r\n\t\t{\r\n\t\t\tfor(int x=0;x<5;x++) \r\n\t\t\t{\r\n\t\t\t\tif(pMatrizea.get(i).get(0).getElementua()!=pMatrizea.get(i).get(1).getElementua() &&\r\n\t\t\t\t\t\tpMatrizea.get(i).get(0).getElementua()!=this.lortuJolastekoKartaPosz(x).getElementua() &&\r\n\t\t\t\t\t\tpMatrizea.get(i).get(1).getElementua()!=this.lortuJolastekoKartaPosz(x).getElementua() &&\r\n\t\t\t\t\t\tpMatrizea.get(i).get(0).getKolorea()!=this.lortuJolastekoKartaPosz(x).getKolorea() &&\r\n\t\t\t\t\t\tpMatrizea.get(i).get(1).getKolorea()!=this.lortuJolastekoKartaPosz(x).getKolorea() &&\r\n\t\t\t\t\t\tthis.lortuJolastekoKartaPosz(x).getBalioa()>karta.getBalioa() &&\r\n\t\t\t\t\t\tthis.lortuJolastekoKartaPosz(x).getErabilgarria()) \r\n\t\t\t\t{\r\n\t\t\t\t\tkarta = lortuJolastekoKartaPosz(x);\r\n\t\t\t\t}\r\n\t\t\t\tif(pMatrizea.get(i).get(0).getElementua()==pMatrizea.get(i).get(1).getElementua() &&\r\n\t\t\t\t\t\tpMatrizea.get(i).get(0).getElementua()==this.lortuJolastekoKartaPosz(x).getElementua() &&\r\n\t\t\t\t\t\tpMatrizea.get(i).get(1).getElementua()==this.lortuJolastekoKartaPosz(x).getElementua() &&\r\n\t\t\t\t\t\tpMatrizea.get(i).get(0).getKolorea()!=this.lortuJolastekoKartaPosz(x).getKolorea() &&\r\n\t\t\t\t\t\tpMatrizea.get(i).get(1).getKolorea()!=this.lortuJolastekoKartaPosz(x).getKolorea() &&\r\n\t\t\t\t\t\tthis.lortuJolastekoKartaPosz(x).getBalioa()>karta.getBalioa() &&\r\n\t\t\t\t\t\tthis.lortuJolastekoKartaPosz(x).getErabilgarria()) \r\n\t\t\t\t{\r\n\t\t\t\t\tkarta = this.lortuJolastekoKartaPosz(x);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn karta;\r\n\t}", "private void renderObjetos()\n {\n for (int i=0;i<NCONSUMIBLES;i++)\n {\n //EDIT:Ruta de Inventario\n Consumible consumible=(Consumible)VenganzaBelial.atributoGestion.getInv().getItems().get(i);\n if(eleccionJugador==i)\n {\n opcionesJugadorTTF.drawString(10,i*20+400,consumible.getNombre()+\" \"+consumible.getNumero()+\"/10\");\n }\n else{\n opcionesJugadorTTF.drawString(10, i * 20 + 400, consumible.getNombre()+\" \"+consumible.getNumero()+\"/10\", notChosen);\n }\n }\n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public void atakuj() {\n\n System.out.println(\"to metoda atakuj z klasy Potwor \");\n\n }", "private void lisaaMiinaOikealle(int i, int j) {\n ArrayList<Ruutu> lista;\n if (i + 1 < x) {\n lista = this.ruudukko[i + 1];\n lista.get(j).setViereisetMiinat(1);\n if (j - 1 >= 0) {\n lista.get(j - 1).setViereisetMiinat(1);\n }\n if (j + 1 < x) {\n lista.get(j + 1).setViereisetMiinat(1);\n }\n }\n }", "private static void statistique(){\n\t\tfor(int i = 0; i<7; i++){\n\t\t\tfor(int j = 0; j<7; j++){\n\t\t\t\tfor(int l=0; l<jeu.getJoueurs().length; l++){\n\t\t\t\t\tif(jeu.cases[i][j].getCouleurTapis() == jeu.getJoueurs()[l].getNumJoueur()){\n\t\t\t\t\t\tjeu.getJoueurs()[l].setTapis(jeu.getJoueurs()[l].getTapisRest()+1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tJoueur j;\n\t\tSystem.out.println(\"// Fin de la partie //\");\n\t\tfor(int i=0; i<jeu.getJoueurs().length; i++) {\n\t\t\tj =jeu.getJoueurs()[i];\n\t\t\tSystem.out.println(\"Joueur \"+ (j.getNumJoueur()+1) + \" a obtenue \"+j.getTapisRest()+j.getMonnaie()+\" points\" );\n\t\t}\n\t}", "private void laskeMatkojenPituus() {\n matkojenpituus = 0.0;\n\n for (Matka m : matkat) {\n matkojenpituus += m.getKuljettumatka();\n }\n\n }", "@Override\r\n\tprotected void initVentajas() {\n\r\n\t}", "Groepen maakGroepsindeling(Groepen aanwezigheidsGroepen);", "private void vulKeuzeBordIn()\n {\n String[] lijstItems = dc.geefLijstItems();\n for (int i = 0; i < canvasKeuzeveld.length; i++)\n {\n for (int j = 0; j < canvasKeuzeveld[i].length; j++)\n {\n GraphicsContext gc = canvasKeuzeveld[i][j].getGraphicsContext2D();\n //checkImage(j + 1, gc);\n vulIn(lijstItems[j], gc);\n }\n }\n //dc.geefLijstItems();\n }", "@objid (\"002ff058-0d4f-10c6-842f-001ec947cd2a\")\n @Override\n public Object visitElement(Element theElement) {\n return null;\n }", "public HTMLElement getElementValorEd() { return this.$element_ValorEd; }", "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 izbaciElementeSaDecimalnimZarezom() {\n while (prvi != null && (int)prvi.info != prvi.info) {\n prvi = prvi.veza;\n }\n if (prvi != null) {\n Element tekuci = prvi;\n Element prethodni;\n while (tekuci.veza != null) {\n prethodni = tekuci;\n tekuci = tekuci.veza;\n if ((int)tekuci.info != tekuci.info) {\n prethodni.veza = tekuci.veza;\n tekuci = prethodni;\n }\n }\n }\n }", "private void hienThiMaPDK(){\n ThuePhongService thuePhongService = new ThuePhongService();\n thuePhongModels = thuePhongService.layToanBoPhieuDangKyThuePhong();\n cbbMaPDK.removeAllItems();\n for (ThuePhongModel thuePhongModel : thuePhongModels) {\n cbbMaPDK.addItem(thuePhongModel.getMaPDK());\n }\n }", "private void setRegla(IVersionableRegla regla, Element reglas) {\r\n\t\tElement descripcion;\r\n\t\tElement uniqueKey;\r\n\t\t\r\n\t\tuniqueKey = new Element(\"uniqueKey\");\t\t\r\n\t\tuniqueKey.setAttribute(\"D_Id\", StringUtils.leftPad(regla.getId().toString(), 5, '0'));\r\n\t\tuniqueKey.setAttribute(\"campoCQ\", \"D_Nombre\");\r\n\t\tuniqueKey.setAttribute(\"entidadCQ\", \"Regla\");\r\n\t\tElement nombre = new Element(\"D_Nombre\");\r\n\t\tnombre.setText(regla.getNombre());\r\n\t\tuniqueKey.addContent(nombre);\r\n\t\tdescripcion = new Element(\"D_Descripcion\");\r\n\t\tdescripcion.setText(regla.getDescripcion());\r\n\t\tuniqueKey.addContent(descripcion);\r\n\t\tElement tipo = new Element(\"D_Tipo\");\r\n\t\tif(getReq() instanceof MuestraRequerimientoInformatico){\r\n\t\t\ttipo.setText(((MuestraRequerimientoInformatico)getReq()).getTipoRegla());\t\r\n\t\t}else if(getReq() instanceof PasajeRequerimientoInformatico){\r\n\t\t\ttipo.setText(((PasajeRequerimientoInformatico)getReq()).getTipoRegla());\r\n\t\t}\r\n\t\tuniqueKey.addContent(tipo);\r\n\t\tElement dominio = new Element(\"D_Dominio\");\r\n\t\tdominio.setText(regla.getDominio().getDescripcion());\r\n\t\tuniqueKey.addContent(dominio);\r\n\t\tElement version = new Element(\"D_Version\");\r\n\t\tversion.setText(regla.getVersionRegla());\r\n\t\tuniqueKey.addContent(version);\r\n\t\treglas.addContent(uniqueKey);\r\n\t}", "public void zmiana_rozmiaru_okna()\n {\n b.dostosowanie_rozmiaru(getWidth(),getHeight());\n w.dostosowanie_rozmiaru(getWidth(),getHeight());\n\n for (Pilka np : p) {\n np.dostosowanie_rozmiaru(getWidth(),getHeight());\n }\n for (Naboj np : n) {\n np.dostosowanie_rozmiaru(getWidth(),getHeight());\n }\n for (Bonus np : bon) {\n np.dostosowanie_rozmiaru(getWidth(),getHeight());\n }\n\n }", "public void insererEnTeteDeListe(Personne personne) {\n\t\tElement ancienPremier= premier;\n\t\tpremier= new Element(personne,ancienPremier);\n\t\t nbElt ++;\n\t}", "public HTMLTableElement getElementDetalle() { return this.$element_Detalle; }", "private static void kapazitaetPruefen(){\n\t\tList<OeffentlichesVerkehrsmittel> loev = new ArrayList<OeffentlichesVerkehrsmittel>();\n\t\t\n\t\tLinienBus b1 = new LinienBus();\n\t\tFaehrschiff f1 = new Faehrschiff();\n\t\tLinienBus b2 = new LinienBus();\t\n\t\t\n\t\tloev.add(b1);\n\t\tloev.add(b2);\n\t\tloev.add(f1);\n\t\t\n\t\tint zaehlung = 500;\n\t\tboolean ausreichend = kapazitaetPruefen(loev,500);\n\t\tp(\"Kapazitaet ausreichend? \" + ausreichend);\n\t\t\n\t}", "public HTMLTableSectionElement getElementDetalle() { return this.$element_Detalle; }", "public void ustawPojazdNaPoczatek()\n\t{\n\t\tSciezka pierwszaSc = droga.get(0);\n\t\tfinal double y = 10;\n\t\tpojazd.zmienPozycje(pierwszaSc.getCenterDownX(), y);\n\t}", "public HTMLElement getElementCodigoPoaEd() { return this.$element_CodigoPoaEd; }", "public void pretraziPoslovneKorisnike() throws BazaPodatakaException {\r\n\t\tString naziv = nazivTF.getText().toLowerCase();\r\n\t\tString web = webTF.getText().toLowerCase();\r\n\t\tString email = emailTF.getText().toLowerCase();\r\n\t\tString telefon = telefonTF.getText();\r\n\r\n\t\tList<PoslovniKorisnik> listaKorisnika = BazaPodataka.dohvatiPoslovnogKorisnikaPremaKriterijima(email, telefon,\r\n\t\t\t\tnaziv, web);\r\n\t\ttablicaPoslovnihKorisnika.setItems(FXCollections.observableArrayList(listaKorisnika));\r\n\r\n\t}", "public abstract String dohvatiKontakt();", "private void pojedi (int i, int j) {\n\t\trezultat++;\n\t\tthis.zmija.add(0, new Cvor(i,j));\n\t\tthis.dodajZmiju();\n\t\tthis.dodajHranu();\n\t}", "public void StampaPotenziali()\r\n {\r\n System.out.println(\"----\"+this.nome+\"----\\n\"); \r\n \r\n if(!Potenziale.isEmpty())\r\n {\r\n Set<Entry<Integer,ArrayList<Carta>>> Es = Potenziale.entrySet();\r\n \r\n for(Entry<Integer,ArrayList<Carta>> E : Es)\r\n {\r\n System.out.println(\" -OPZIONE \"+E.getKey()+\"\");\r\n\r\n for(Carta c : E.getValue())\r\n {\r\n System.out.println(\" [ \"+c.GetName()+\" ]\");\r\n }\r\n \r\n System.out.println(\"\\n\");\r\n }\r\n }\r\n else\r\n {\r\n System.out.println(\"-NESSUNA CARTA O COMBINAZIONE DI CARTE ASSOCIATA-\\n\");\r\n }\r\n }", "public void MieiOrdini()\r\n {\r\n getOrdini();\r\n\r\n }", "public T darElemento(){\r\n\t\treturn elemento;\r\n\t}", "public void urciStupneVrcholu(){\n\t\tfor(int i = 0;i < vrchP.length; i++){\n\t\t\tstupenVrcholu(vrchP[i].klic);\n\t\t}\n\t}", "private void aumentaCapacidade(){\n\t\tif(this.tamanho == this.elementos.length){\n\t\t\tObject[] elementosNovos = new Object[this.elementos.length*2];\n\t\t\tfor(int i =0; i<this.elementos.length;i++){\n\t\t\t\telementosNovos[i]=this.elementos[i];\n\t\t\t}\n\t\t\tthis.elementos=elementosNovos;\n\t\t}\n\t}", "public HTMLElement getElementEstadoEd() { return this.$element_EstadoEd; }", "private void printArrElement() {\n\t\tIterator iter = arrTag.keySet().iterator();\r\n\t\twhile (iter.hasNext()) {\r\n\t\t\tObject key = iter.next();\r\n\t\t\tTag valores = arrTag.get(key);\r\n\t\t\t//System.out.print(\"key=\" + key + \"\\n\");\r\n\t\t\t//System.out.print(\"\\ttagsPermitidas:\");\r\n\t\t\tHashSet<Tag> tags = valores.getTagsPermitidasDentro();\r\n\t\t\tfor (Tag tag : tags) {\r\n\t\t\t\t//System.out.print(\"'\" + tag.getNome() + \"',\");\r\n\t\t\t}\r\n\t\t\t//System.out.print(\"\\n\");\r\n\t\t}\r\n\t}", "private void lisaaMiinaVasemmalle(int i, int j) {\n ArrayList<Ruutu> lista;\n if (i - 1 >= 0) {\n lista = this.ruudukko[i - 1];\n lista.get(j).setViereisetMiinat(1);\n if (j - 1 >= 0) {\n lista.get(j - 1).setViereisetMiinat(1);\n }\n if (j + 1 < x) {\n lista.get(j + 1).setViereisetMiinat(1);\n }\n }\n }", "void rozpiszKontraktyPart2EV(int index,float wolumenHandlu, float sumaKupna,float sumaSprzedazy )\n\t{\n\t\t//wektor z ostatecznie ustalona cena\n\t\t//rozpiszKontrakty() - wrzuca jako ostatnia cene cene obowiazujaa na lokalnym rynku \n\t\tArrayList<Float> priceVector = priceVectorsList.get(priceVectorsList.size()-1);\n\n\t\t\n\t\t//ograniczenia handlu prosumenta\n\t\tArrayList<DayData> constrainMarkerList = new ArrayList<DayData>();\n\t\t\n\t\t//ograniczenia handlu EV\n\t\tArrayList<DayData> constrainMarkerListEV = new ArrayList<DayData>();\n\t\t\n\t\t//print(listaFunkcjiUzytecznosci.size());\n\t\t//getInput(\"rozpiszKontraktyPart2EV first stop\");\n\t\t\n\t\tint i=0;\n\t\twhile(i<listaFunkcjiUzytecznosci.size())\n\t\t{\n\t\t\t\n\t\t\t//lista funkcji uzytecznosci o indeksie i\n\t\t\tArrayList<Point> L1\t=listaFunkcjiUzytecznosci.get(i);\n\t\t\t\n\t\t\t//point z cena = cena rynkowa\n\t\t\tPoint point = L1.get(index);\n\t\t\t\n\t\t\t\n\t\t\tDayData d =rozpiszKontraktyPointToConstrainMarker(point, wolumenHandlu, sumaKupna, sumaSprzedazy, i);\n\t\t\t\n\t\t\tif (i<Stale.liczbaProsumentow)\n\t\t\t{\n\t\t\t\tconstrainMarkerList.add(d);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tconstrainMarkerListEV.add(d);\n\t\t\t\t\n\t\t\t\t/*print(d.getKupuj());\n\t\t\t\tprint(d.getConsumption());\n\t\t\t\tprint(d.getGeneration());\n\t\t\t\t\n\t\t\t\tgetInput(\"rozpiszKontraktyPart2EV - Ostatni kontrakt\");*/\n\t\t\t}\n\n\t\t\t\n\t\t\t//print(\"rozpiszKontraktyPart2EV \"+i);\n\t\t\ti++;\n\t\t}\n\t\t\n\t\tArrayList<Prosument> listaProsumentow =listaProsumentowWrap.getListaProsumentow();\n\n\t\t//wyywolaj pobranie ontraktu\n\t\ti=0;\n\t\twhile (i<Stale.liczbaProsumentow)\n\t\t{\n\t\t\tif (i<constrainMarkerListEV.size())\n\t\t\t{\n\t\t\t\t((ProsumentEV)listaProsumentow.get(i)).getKontrakt(priceVector,constrainMarkerList.get(i),constrainMarkerListEV.get(i));\n\t\t\t\t//print(\"constrainMarkerListEV \"+i);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tlistaProsumentow.get(i).getKontrakt(priceVector,constrainMarkerList.get(i));\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\t\n\t\t//getInput(\"rozpiszKontraktyPart2EV -end\");\n\t}", "public void asetaTeksti(){\n }", "public void vincula(){\n for (Nodo n : exps)\n n.vincula();\n }", "public void hentTrekk() {\n\n Parti parti = this.fp_liste_parti.getSelectionModel().getSelectedItem();\n\n if (this.partierLastet && parti != null){\n\n valgtParti = fp_liste_parti.getSelectionModel().getSelectedItem();\n\n for(Trekk t: valgtParti.getTrekkListe()) {\n sp_liste_trekk.getItems().add(t);\n }\n\n tab_pane.getSelectionModel().select(tab_sp);\n\n this.initierAnimasjon();\n\n } else {\n\n Sjakkbrett.visFeil(\"Parti ikke valgt\", \"Du har ikke valgt et parti\", \"Vennligst velg et parti!\");\n\n }\n\n this.sp_knapp_forrige_trekk.setDisable(false);\n this.sp_knapp_spill_av_pause.setDisable(false);\n this.sp_knapp_neste_trekk.setDisable(false);\n this.sp_kombo_hastighet.setDisable(false);\n this.sp_knapp_velg_trekk.setDisable(false);\n\n }", "public IzvajalecZdravstvenihStoritev() {\n\t}", "public void oppdaterJliste()\n {\n bModel.clear();\n\n Iterator<Boligsoker> iterator = register.getBoligsokere().iterator();\n\n while(iterator.hasNext())\n bModel.addElement(iterator.next());\n }", "@Override\n\tpublic int sacameVida(ElementoPiedra a) {\n\t\treturn 20;\n\t}", "private void napuniCbPozoriste() {\n\t\t\r\n\t\tfor (Pozoriste p:Kontroler.getInstanca().vratiPozorista())\r\n\t\t\t\r\n\t\t\tcbPozoriste.addItem(p.getImePozorista());\r\n\t}", "public MatkaKokoelma() {\n tallentaja = new TXTTallentaja();\n matkat = new ArrayList<Matka>();\n matkojenkesto = 0.0;\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Test\r\n public void testGetElement() throws Exception {\r\n System.out.println(\"getElement ModeloListaOrganizadores\");\r\n\r\n String expResult = \"Diana\";\r\n Utilizador u = new Utilizador(\"teste\", \"[email protected]\", \"teste\", \"teste\", true, 5);\r\n u.setNome(\"Diana\");\r\n Organizador o = new Organizador(u);\r\n\r\n ModeloListaOrganizadores instance = new ModeloListaOrganizadores(e.getListaOrganizadores());\r\n instance.addElement(o);\r\n instance.getElementAt(0);\r\n\r\n Organizador teste = e.getListaOrganizadores().getListaOrganizadores().get(0);\r\n\r\n String result = teste.getUtilizador().getNome();\r\n assertEquals(expResult, result);\r\n\r\n }", "@Test\n public void testAvaaRuutu() {\n int x = 0;\n int y = 0;\n Peli pjeli = new Peli(new Alue(3, 0));\n pjeli.avaaRuutu(x, y);\n ArrayList[] lista = pjeli.getAlue().getRuudukko();\n ArrayList<Ruutu> ruudut = lista[0];\n assertEquals(true, ruudut.get(0).isAvattu());\n assertEquals(false, pjeli.isLahetetty());\n }", "public ElementoInicial() {\r\n\t\tsuper();\r\n\t}", "private void srediTabelu() {\n\n mtu = (ModelTabeleUlica) jtblUlica.getModel();\n ArrayList<Ulica> ulice = kontrolor.Kontroler.getInstanca().vratiUlice();\n mtu.setLista(ulice);\n\n }", "public void settInn(T element){\n Node temp = new Node(element);\n temp.neste = hode.neste;\n temp.neste.forrige = temp;\n temp.forrige = hode;\n hode.neste = temp;\n elementer++;\n\n\n }", "public RuimteFiguur() {\n kleur = \"zwart\";\n }", "public void pobierzukladprzegladRZiSBO() {\r\n if (uklad.getUklad() == null) {\r\n uklad = ukladBRDAO.findukladBRPodatnikRokPodstawowy(wpisView.getPodatnikObiekt(), wpisView.getRokWpisuSt());\r\n }\r\n List<PozycjaRZiSBilans> pozycje = UkladBRBean.pobierzpozycje(pozycjaRZiSDAO, pozycjaBilansDAO, uklad, \"\", \"r\");\r\n UkladBRBean.czyscPozycje(pozycje);\r\n rootProjektRZiS.getChildren().clear();\r\n List<StronaWiersza> zapisy = StronaWierszaBean.pobraniezapisowwynikoweBO(stronaWierszaDAO, wpisView);\r\n try {\r\n PozycjaRZiSFKBean.ustawRoota(rootProjektRZiS, pozycje, zapisy);\r\n level = PozycjaRZiSFKBean.ustawLevel(rootProjektRZiS, pozycje);\r\n Msg.msg(\"i\", \"Pobrano układ \");\r\n } catch (Exception e) {\r\n E.e(e);\r\n rootProjektRZiS.getChildren().clear();\r\n Msg.msg(\"e\", e.getLocalizedMessage());\r\n }\r\n }", "private void laskeMatkojenKesto() {\n matkojenkesto = 0.0;\n\n for (Matka m : matkat) {\n matkojenkesto += m.getKesto();\n }\n }", "public void displayPhieuXuatKho() {\n\t\tlog.info(\"-----displayPhieuXuatKho()-----\");\n\t\tif (!maPhieu.equals(\"\")) {\n\t\t\ttry {\n\t\t\t\tDieuTriUtilDelegate dieuTriUtilDelegate = DieuTriUtilDelegate.getInstance();\n\t\t\t\tPhieuTraKhoDelegate pxkWS = PhieuTraKhoDelegate.getInstance();\n\t\t\t\tCtTraKhoDelegate ctxWS = CtTraKhoDelegate.getInstance();\n\t\t\t\tDmKhoa dmKhoaNhan = new DmKhoa();\n\t\t\t\tdmKhoaNhan = (DmKhoa)dieuTriUtilDelegate.findByMa(IConstantsRes.KHOA_KC_MA, \"DmKhoa\", \"dmkhoaMa\");\n\t\t\t\tphieuTra = pxkWS.findByPhieutrakhoByKhoNhan(maPhieu, dmKhoaNhan.getDmkhoaMaso());\n\t\t\t\tif (phieuTra != null) {\n\t\t\t\t\tmaPhieu = phieuTra.getPhieutrakhoMa();\n\t\t\t\t\tresetInfo();\n\t\t\t\t\tSimpleDateFormat df = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\t\t\t\tngayXuat = df.format(phieuTra.getPhieutrakhoNgay());\n\t\t\t\t\tfor (CtTraKho ct : ctxWS.findByphieutrakhoMa(phieuTra.getPhieutrakhoMa())) {\n\t\t\t\t\t\tCtTraKhoExt ctxEx = new CtTraKhoExt();\n\t\t\t\t\t\tctxEx.setCtTraKho(ct);\n\t\t\t\t\t\tlistCtKhoLeTraEx.add(ctxEx);\n\t\t\t\t\t}\n\t\t\t\t\tcount = listCtKhoLeTraEx.size();\n\t\t\t\t\tisFound=\"true\";\n\t\t\t\t\t// = null la chua luu ton kho -> cho ghi nhan\n\t\t\t\t\t// = 1 da luu to kho -> khong cho ghi nhan\n\t\t\t\t\tif(phieuTra.getPhieutrakhoNgaygiophat()==null)\n\t\t\t\t\tisUpdate = \"1\";\n\t\t\t\t\telse\n\t\t\t\t\t\tisUpdate = \"0\";\n\t\t\t\t} else {\n\t\t\t\t\tFacesMessages.instance().add(IConstantsRes.PHIEUXUATKHO_NULL, maPhieu);\n\t\t\t\t\treset();\n\t\t\t\t}\n\t\t\t\ttinhTien();\n\t\t\t} catch (Exception e) {\n\t\t\t\tFacesMessages.instance().add(IConstantsRes.PHIEUXUATKHO_NULL, maPhieu);\n\t\t\t\treset();\n\t\t\t\tlog.error(String.format(\"-----Error: %s\", e));\n\t\t\t}\n\t\t}\n\t\t\n\t}", "private void avaliaTagObrigatoria() throws SQLException {\r\n\t\t/*\r\n\t\t * busca as tags obrigatorias do documento.\r\n\t\t */\r\n\t\t// TODO ESTE SELECT SOH TRAZ A TAG !DOCTYPE, OU SEJA, SE ELE TRAZ AS\r\n\t\t// TAGS OBRIGATORIAS,\r\n\t\t// ENTAO ELE SOH TAH CONSIDERANDO O !DOCTYPE COMO OBRIGATORIO. OU ENTAO\r\n\t\t// TEM ALGUMA\r\n\t\t// COISA ERRADA NO BANCO DE DADOS. OBS: NA BASE DE DADOS SOH TEM\r\n\t\t// CADASTRADA UMA LINHA\r\n\t\t// COM ID_ATITUDE = 4 (TABELA ESPERADO) : (9,4,9,0,0,'','',0)\r\n\t\t// TRECHO COMENTADO E HARDCODED PARA DIMINUIR AS CONSULTAS A BANCO DE\r\n\t\t// DADOS\r\n\t\t// final String sql = \"SELECT ta.nome_tag, v.pv3 \"\r\n\t\t// + \" FROM esperado e, validante v, tipoavaliacaoerro t, tag ta \"\r\n\t\t// + \" WHERE e.idesperado=v.idesperado \"\r\n\t\t// + \" AND v.pv3=t.pv3 AND idatitude = 4 \"\r\n\t\t// + \" AND v.idtag=ta.idtag AND t.idorgao = \" + orgao;\r\n\t\t//\r\n\t\t// ResultSet rs = con.getCon().createStatement().executeQuery(sql);\r\n\t\t//\r\n\t\t// String nome = null;\r\n\t\t// ArrayList<Validado> validados = null;\r\n\t\t//\r\n\t\t// /*\r\n\t\t// * Monta as tags especificas.\r\n\t\t// */\r\n\t\t// while (rs.next()) {\r\n\t\t// nome = rs.getString(1);\r\n\t\t// validados = new ArrayList<Validado>();\r\n\t\t// validados.add(new Validado(nome, rs.getInt(2)));\r\n\t\t// this.erradosMap.put(nome, validados);\r\n\t\t// }\r\n\t\t// gambiarra?????\r\n\t\t// TRECHO HARDCODED QUE SUBSTITUI A CONSULTA AO BD ACIMA\r\n\r\n\t\tArrayList<ArmazenaErroOuAvisoAntigo> validados = new ArrayList<ArmazenaErroOuAvisoAntigo>();\r\n\r\n\t\tvalidados.add(new ArmazenaErroOuAvisoAntigo(\"!DOCTYPE\", 33));\r\n\r\n\t\tthis.erradosMap.put(\"!DOCTYPE\", validados);\r\n\r\n\t\t// FIM DO TRECHO\r\n\t\tfor (String element : this.erradosMap.keySet()) {\r\n\r\n\t\t\t/*\r\n\t\t\t * Verifica se a existencia da tag dentro do documento. N�o\r\n\t\t\t * existindo a tag, adiciona a mesma a lista de erros.\r\n\t\t\t */\r\n\t\t\tif (!tag.contains(element)) {\r\n\r\n\t\t\t\tthis.errados.addAll(this.erradosMap.get(element));\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}", "@Override\r\n public boolean equals(Object obj) {\r\n if (this == obj) {\r\n return true;\r\n }\r\n if (!super.equals(obj)) {\r\n return false;\r\n }\r\n if (obj == null){\r\n return false;\r\n }\r\n if (getClass() != obj.getClass()) {\r\n return false;\r\n }\r\n Repertoire other = (Repertoire) obj;\r\n if (element == null) {\r\n if (other.element != null) {\r\n return false;\r\n }\r\n } else if (!element.equals(other.element)) {\r\n return false;\r\n }\r\n if (nbElem != other.nbElem) {\r\n return false;\r\n }\r\n if (nom == null) {\r\n if (other.nom != null) {\r\n return false;\r\n }\r\n } else if (!nom.equals(other.nom)) {\r\n return false;\r\n }\r\n return true;\r\n }", "public void ordenaPontos(){\r\n\t\tloja.ordenaPontos();\r\n\t}", "public void klikkaa(Tavarat tavarat, Klikattava klikattava);", "@Override\n\tpublic boolean estaElemento(String elemento) {\n\t\treturn false;\n\t}", "void novyVrchol(String klic){\n\t\tVrchol pom = new Vrchol(klic,'B');\n\t\t\n\t\tvrchP[pocet] = pom;\n\t\tpocet++;\n\t\n\t}", "long getNombreElements();", "public ArrayList<Elezione> caricaElezioni() {\n\t\t\t\n\t\t\tDB db = getDB();\n\t\t\tMap<Integer, Elezione> map = db.getTreeMap(\"elezione\");\n\t\t\tArrayList<Elezione> elezioni = new ArrayList<Elezione>();\n\t\t\tSet<Integer> keys = map.keySet();\n\t\t\tfor (int key : keys) {\n\t\t\t\telezioni.add(map.get(key));\n\t\t\t}\n\t\t\treturn elezioni;\n\t\t}", "private WebElement getEintrag(int zeilennr) {\n final int zeilennrAb2 = zeilennr + 2;\r\n\r\n // PrimeFaces:\r\n\t\t// <form jsf:id=\"selectForm\" jsf:prependId=\"false\">\r\n\t\t// <p:panelGrid id=\"selectGrid\"\r\n\t\t// <p:selectOneMenu id=\"artikelBezeichnung\" value=\"#{warenkorb.artikel}\" var=\"a\">\r\n\t\t// <f:selectItems id=\"artikelItems\" value=\"#{katalogModel.verfuegbareArtikel}\" var=\"artikel\"\r\n\t\t// <p:column>#{a.bezeichnung}\r\n\t\t// HTML:\r\n\t\t// <div id=\"artikelBezeichnung_panel\" ...>\r\n // <div class=\"ui-selectonemenu-items-wrapper\" ...>\r\n\t\t// <table class=\"ui-selectonemenu-items ui-selectonemenu-table ui-widget-content ui-widget ui-corner-all ui-helper-reset\">\r\n // <tbody>\r\n\t\t// <tr class=\"ui-selectonemenu-item ui-selectonemenu-row ui-widget-content\" data-label=\"Tisch 'Oval'\">\r\n // <td>Tisch 'Oval'</td>\r\n\t\treturn body.findElement(id(\"artikelBezeichnung_panel\"))\r\n .findElement(xpath(\"div/table/tbody/tr[\" + zeilennrAb2 + ']'));\r\n\t}", "public void elementosMapa() {\n\t\t\n\t\tHeroes heroe = (Heroes) ven.getHeroe();\n\t\t\n\t\tif(heroe.getPosX() >= 250 && heroe.getPosX() <= 302 && heroe.getPosY() >= 208 && heroe.getPosY() <= 255 && pregunta1 == false) {\n\n\t\t\tString respuesta = JOptionPane.showInputDialog(this, \"¿Cuántas transformaciones sufre Freezer?\" + \"\\n\" + \"a) 4\" + \"\\n\" + \"b) 5\" + \"\\n\" + \"c) 2\");\n\t\t\t\n\t\t\tif(respuesta == null){\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tthrow new RespuestaNulaException();\n\t\t\t\t} catch (RespuestaNulaException e) {\n\t\t\t\t\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\telse if(respuesta.equalsIgnoreCase(\"a\")) {\n\t\t\t\t\n\t\t\t\tpregunta1 = true;\n\t\t\t\tJOptionPane.showMessageDialog(this, \"La respuesta es correcta, acabas de ganar una nueva esfera :D\");\n\t\t\t\tven.modificarEsfera(2);\n\t\t\t\tven.actualizarInfo();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\telse if(respuesta != \"a\") {\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(this, \"La respuesta es incorrecta :(\");\n\t\t\t\theroe.setPosX(281); \n\t\t\t\theroe.setPosY(311);\n\t\t\t\tven.actualizarMapa();\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\telse if(heroe.getPosX() >= 1148 && heroe.getPosX() <= 1202 && heroe.getPosY() >= 33 && heroe.getPosY() <= 84 && pregunta2 == false) {\n\t\t\t\n\t\t\tString respuesta = JOptionPane.showInputDialog(this, \"¿Quién logró liberar la espada Z?\" + \"\\n\" + \"a) Goten\" + \"\\n\" + \"b) Goku\" + \"\\n\" + \"c) Gohan\");\n\t\t\t\n\t\t\tif(respuesta == null){\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tthrow new RespuestaNulaException();\n\t\t\t\t} catch (RespuestaNulaException e) {\n\t\t\t\t\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\telse if(respuesta.equalsIgnoreCase(\"c\")) {\n\t\t\t\t\n\t\t\t\tpregunta2 = true;\n\t\t\t\tJOptionPane.showMessageDialog(this, \"La respuesta es correcta, acabas de ganar una nueva esfera\");\n\t\t\t\tven.modificarEsfera(4);\n\t\t\t\tven.actualizarInfo();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\telse if(respuesta != \"a\") {\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(this, \"La respuesta es incorrecta :(\");\n\t\t\t\theroe.setPosX(1280);\n\t\t\t\theroe.setPosY(119);\n\t\t\t\tven.actualizarMapa();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\telse if(heroe.getPosX() >= 50 && heroe.getPosX() <= 103 && heroe.getPosY() >= 558 && heroe.getPosY() <= 607 && pregunta3 == false) {\n\t\t\t\n\t\t\t\n\t\t\tString respuesta = JOptionPane.showInputDialog(this, \"¿Quién es hijo de Paragus?\" + \"\\n\" + \"a) Bardock\" + \"\\n\" + \"b) Broly\" + \"\\n\" + \"c) Freezer\");\n\t\t\t\n\t\t\tif(respuesta == null){\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tthrow new RespuestaNulaException();\n\t\t\t\t} catch (RespuestaNulaException e) {\n\t\t\t\t\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\telse if(respuesta.equalsIgnoreCase(\"b\")) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tpregunta3 = true;\n\t\t\t\tJOptionPane.showMessageDialog(this, \"La respuesta es correcta, acabas de ganar una nueva esfera :D\");\n\t\t\t\tven.modificarEsfera(6);\n\t\t\t\tven.actualizarInfo();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\telse if(respuesta != \"b\") {\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(this, \"La respuesta es incorrecta :(\");\n\t\t\t\theroe.setPosX(135);\n\t\t\t\theroe.setPosY(593);\n\t\t\t\tven.actualizarMapa();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\telse if(heroe.getPosX() >= 70 && heroe.getPosX() <= 130 && heroe.getPosY() >= 1 && heroe.getPosY() <= 55 && pregunta4 == false) {\n\n\t\t\tString respuesta = JOptionPane.showInputDialog(this, \"¿Quién se convirtío primero en SSJ2?\" + \"\\n\" + \"a) Goku\" + \"\\n\" + \"b) Trunks\" + \"\\n\" + \"c) Gohan\");\n\t\t\t\n\t\t\tif(respuesta == null){\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tthrow new RespuestaNulaException();\n\t\t\t\t} catch (RespuestaNulaException e) {\n\t\t\t\t\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\telse if(respuesta.equalsIgnoreCase(\"c\")) {\n\t\t\t\t\n\t\t\t\tpregunta4 = true;\n\t\t\t\tJOptionPane.showMessageDialog(this, \"La respuesta es correcta, has aumentado el poder de tus ataques :D\");\n\t\t\t\theroe.setAtaque1(20);\n\t\t\t\theroe.setAtaque2(20);\n\t\t\t\theroe.setAtaque3(20);\n\t\t\t\theroe.setAtaqueEspecial(20);\n\t\t\t}\n\t\t\t\n\t\t\telse if(respuesta != \"c\") {\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(this, \"La respuesta es incorrecta :(\");\n\t\t\t\theroe.setPosX(208); \n\t\t\t\theroe.setPosY(47);\n\t\t\t\tven.actualizarMapa();\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\n\t\telse if(heroe.getPosX() >= 585 && heroe.getPosX() <= 640 && heroe.getPosY() >= 258 && heroe.getPosY() <= 310 && pregunta5 == false) {\n\n\t\t\tString respuesta = JOptionPane.showInputDialog(this, \"¿Quién mantuvo su cola hasta la muerte?\" + \"\\n\" + \"a) Vegeta\" + \"\\n\" + \"b) Bardock\" + \"\\n\" + \"c) Gohan\");\n\t\t\t\n\t\t\tif(respuesta == null){\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tthrow new RespuestaNulaException();\n\t\t\t\t} catch (RespuestaNulaException e) {\n\t\t\t\t\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\telse if(respuesta.equalsIgnoreCase(\"b\")) {\n\t\t\t\t\n\t\t\t\tpregunta5 = true;\n\t\t\t\tJOptionPane.showMessageDialog(this, \"La respuesta es correcta, has aumentado el poder de tus ataques :D\");\n\t\t\t\theroe.setAtaque1(20);\n\t\t\t\theroe.setAtaque2(20);\n\t\t\t\theroe.setAtaque3(20);\n\t\t\t\theroe.setAtaqueEspecial(20);\n\t\t\t}\n\t\t\t\n\t\t\telse if(respuesta != \"b\") {\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(this, \"La respuesta es incorrecta :(\");\n\t\t\t\theroe.setPosX(577); \n\t\t\t\theroe.setPosY(356);\n\t\t\t\tven.actualizarMapa();\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\telse if(heroe.getPosX() >= 396 && heroe.getPosX() <= 444 && heroe.getPosY() >= 230 && heroe.getPosY()<= 300 && Broly == false) {\n\t\t\t\n\t\t\tVillanos villano = (Villanos) ven.getJuego().getHeroe(\"Broly\");\n\t\t\tvillanoActual = \"Broly\";\n\t\t\t\n\t\t\tint resp = JOptionPane.showConfirmDialog(null,\"Broly: \" + villano.getFrasePelea() + \"\\n\" + \"\\n\" + \"¿Desea pelear para ganar una esfera?\" , \"Batallar\", JOptionPane.YES_NO_OPTION);\n\n\t\t\tif(resp == JOptionPane.YES_OPTION) {\n\n\t\t\t\tven.getBatalla().getFondo().setImagenRuta(\"Datos/Fondos/FondoBatalla3.jpg\");\n\t\t\t\theroe.setVida(500);\n\t\t\t\tvillano.setVida(500);\n\t\t\t\tven.visualizarBatalla();\n\t\t\t\theroe.setPosX(414);\n\t\t\t\theroe.setPosY(352);\n\t\t\t\tven.actualizarMapa();\n\t\t\t\t\n\t\t\t}else if(resp == JOptionPane.NO_OPTION) {\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(this, \"Debes pelear para ganar una esfera :(\");\n\t\t\t\theroe.setPosX(414);\n\t\t\t\theroe.setPosY(352);\n\t\t\t\tven.actualizarMapa();\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\telse if(heroe.getPosX() >= 1235 && heroe.getPosX() <= 1295 && heroe.getPosY() >= 290 && heroe.getPosY() <= 360 && Freezer == false) {\n\t\t\tVillanos villano = (Villanos) ven.getJuego().getHeroe(\"Freezer\");\n\t\t\tvillanoActual = \"Freezer\";\n\t\t\t\n\t\t\tint resp = JOptionPane.showConfirmDialog(null,\"Freezer: \" + villano.getFrasePelea() + \"\\n\" + \"\\n\" + \"¿Desea pelear para ganar una esfera?\" , \"Batallar\", JOptionPane.YES_NO_OPTION);\n\t\t\t\n\t\t\tif(resp == JOptionPane.YES_OPTION) {\n\n\t\t\t\tven.getBatalla().getFondo().setImagenRuta(\"Datos/Fondos/FondoBatalla2.png\");\n\t\t\t\theroe.setVida(500);\n\t\t\t\tvillano.setVida(500);\n\t\t\t\tven.visualizarBatalla();\n\t\t\t\theroe.setPosX(1279);\n\t\t\t\theroe.setPosY(229);\n\t\t\t\tven.actualizarMapa();\n\t\t\t\t\n\t\t\t}else if(resp == JOptionPane.NO_OPTION) {\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(this, \"Debes pelear para ganar una esfera :(\");\n\t\t\t\theroe.setPosX(1279);\n\t\t\t\theroe.setPosY(229);\n\t\t\t\tven.actualizarMapa();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\telse if(heroe.getPosX() >= 1015 && heroe.getPosX() <= 1067 && heroe.getPosY() >= 7 && heroe.getPosY() <= 57 && MajinB == false) {\n\t\t\tVillanos villano = (Villanos) ven.getJuego().getHeroe(\"Majin boo\");\n\t\t\tvillanoActual = \"Majin boo\";\n\t\t\t\n\t\t\tint resp = JOptionPane.showConfirmDialog(null,\"Majin boo: \" + villano.getFrasePelea() + \"\\n\" + \"\\n\" + \"¿Desea pelear para ganar una esfera?\" , \"Batallar\", JOptionPane.YES_NO_OPTION);\n\t\t\t\n\t\t\tif(resp == JOptionPane.YES_OPTION) {\n\n\t\t\t\tven.getBatalla().getFondo().setImagenRuta(\"Datos/Fondos/FondoBatalla4.jpg\");\n\t\t\t\theroe.setVida(500);\n\t\t\t\tvillano.setVida(500);\n\t\t\t\tven.visualizarBatalla();\n\t\t\t\theroe.setPosX(1020);\n\t\t\t\theroe.setPosY(106);\n\t\t\t\tven.actualizarMapa();\n\t\t\t\t\n\t\t\t}else if(resp == JOptionPane.NO_OPTION) {\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(this, \"Debes pelear para ganar una esfera :(\");\n\t\t\t\theroe.setPosX(1020);\n\t\t\t\theroe.setPosY(106);\n\t\t\t\tven.actualizarMapa();\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}else if(heroe.getPosX() >= 222 && heroe.getPosX() <= 294 && heroe.getPosY() >= 480 && heroe.getPosY() <= 560 && Cell == false) {\n\t\t\tVillanos villano = (Villanos) ven.getJuego().getHeroe(\"Cell\");\n\t\t\tvillanoActual = \"Cell\";\n\t\t\t\n\t\t\tint resp = JOptionPane.showConfirmDialog(null,\"Cell: \" + villano.getFrasePelea() + \"\\n\" + \"\\n\" + \"¿Desea pelear para ganar una esfera?\" , \"Batallar\", JOptionPane.YES_NO_OPTION);\n\t\t\t\n\t\t\tif(resp == JOptionPane.YES_OPTION) {\n\n\t\t\t\tven.getBatalla().getFondo().setImagenRuta(\"Datos/Fondos/FondoBatalla.jpg\");\n\t\t\t\theroe.setVida(500);\n\t\t\t\tvillano.setVida(500);\n\t\t\t\tven.visualizarBatalla();\n\t\t\t\theroe.setPosX(364);\n\t\t\t\theroe.setPosY(583);\n\t\t\t\tven.actualizarMapa();\n\t\t\t\t\n\t\t\t}else if(resp == JOptionPane.NO_OPTION) {\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(this, \"Debes pelear para ganar una esfera :(\");\n\t\t\t\theroe.setPosX(364);\n\t\t\t\theroe.setPosY(583);\n\t\t\t\tven.actualizarMapa();\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}else if(heroe.getPosX() >= 900 && heroe.getPosX() <= 988 && heroe.getPosY() >= 314 && heroe.getPosY() <= 421) {\n\t\t\t\n\t\t\theroe.setPosX(956);\n\t\t\theroe.setPosY(484);\n\t\t\t\n\t\t\tString respuesta = JOptionPane.showInputDialog(this, \"¿Qué deseas hacer \" + ven.getNombreUsuario() + \"?\" + \"\\n\" + \"a) Guardar puntaje\" + \"\\n\" + \"b) Ver información de los personajes\" + \"\\n\" + \"c) Ver puntajes\");\n\t\t\tif(respuesta.equalsIgnoreCase(\"a\")) {\n\t\t\t\t\n\t\t\t\tven.guardarPuntaje();\n\t\t\t\t\n\t\t\t\t\n\t\t\t}else if(respuesta.equalsIgnoreCase(\"c\")){\n\t\t\t\tven.cargarPuntajes();\n\t\t\t\tven.visualizarPuntajes();\n\t\t\t}\n\t\t\t\n\t\t\telse if(respuesta.equalsIgnoreCase(\"b\")) {\n\t\t\t\t\n\t\t\t\tString per = JOptionPane.showInputDialog(this, \"¿De qué personaje deseas ver la información \" + ven.getNombreUsuario() + \"\\n\" + \"a) Goku\" + \"\\n\" + \"b) Roshi\" + \"\\n\" + \"c) Vegeta\" + \"\\n\" + \"d) Freezer\" + \"\\n\" + \"e) Cell\" + \"\\n\" + \"f) Majin boo\" + \"\\n\" + \"g) Broly\");\n\t\t\t\t\n\t\t\t\tif(per.equalsIgnoreCase(\"a\")) {\n\t\t\t\t\t\n\t\t\t\t\tven.mostrarInfoPersonajes(\"Goku\");\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if(per.equalsIgnoreCase(\"b\")) {\n\t\t\t\t\t\n\t\t\t\t\tven.mostrarInfoPersonajes(\"Roshi\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if(per.equalsIgnoreCase(\"c\")) {\n\t\t\t\t\t\n\t\t\t\t\tven.mostrarInfoPersonajes(\"Vegeta\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if(per.equalsIgnoreCase(\"d\")) {\n\t\t\t\t\t\n\t\t\t\t\tven.mostrarInfoPersonajes(\"Freezer\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if(per.equalsIgnoreCase(\"e\")) {\n\t\t\t\t\t\n\t\t\t\t\tven.mostrarInfoPersonajes(\"Cell\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if(per.equalsIgnoreCase(\"f\")) {\n\t\t\t\t\t\n\t\t\t\t\tven.mostrarInfoPersonajes(\"Majin boo\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if(per.equalsIgnoreCase(\"g\")) {\n\t\t\t\t\t\n\t\t\t\t\tven.mostrarInfoPersonajes(\"Broly\");\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else {\n\t\t\t\ttry {\n\t\t\t\t\tthrow new CaracterEquivocadoException();\n\t\t\t\t} catch (CaracterEquivocadoException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\t\n\t\t}\n\t\t\n\t}", "public static void TroskoviPredjenogPuta() {\n\t\tUtillMethod.izlistavanjeVozila();\n\t\tSystem.out.println(\"Unesite redni broj vozila za koje zelite da racunate predjeni put!\");\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\tSystem.out.println(\"Unesite broj kilometara koje ste presli sa odgovarajucim vozilom\");\n\t\t\t\tdouble km = UtillMethod.unesiteBroj();\n\t\t\t\tVozilo v = Main.getVozilaAll().get(redniBroj);\n\t\t\t\tdouble rezultat;\n\t\t\t\tif(v.getGorivaVozila().size()>1) {\n\t\t\t\t\tGorivo g = UtillMethod.izabirGoriva();\n\t\t\t\t\trezultat = cenaTroskaVoz(v,km,g);\n\t\t\t\t}else {\n\t\t\t\t\t rezultat = cenaTroskaVoz(v,km,v.getGorivaVozila().get(0));\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"Cena troskova za predjeni put je \" + rezultat + \"Dinara!\");\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}", "protected Trein bevatTrein(int baandeel) {\r\n for (int i = 0; i < treinaantal; i++) {\r\n if (baandeel == treinlijst[i].getPositie()) {\r\n return treinlijst[i];\r\n }\r\n }\r\n return null;\r\n }", "public static void mengurutkanDataBubble_TeknikTukarNilai(){\n \t\tint N = hitungJumlahSimpul();\n \t\tsimpul A=null;\n \t\tsimpul B=null;\n \t\tsimpul berhenti = akhir.kanan;\n\n \t\tSystem.out.println (\"Banyaknya simpul = \" + hitungJumlahSimpul());\n\n \t\tfor (int i=1; i<= hitungJumlahSimpul()-1; i++){\n \t\t\tA = awal;\n \t\t\tB = awal.kanan;\n \t\t\tint nomor = 1;\n\n \t\t\twhile (B != berhenti){\n\t\t\t\tif (A.nama.compareTo(B.nama)>0){\n \t\t\t\t//tukarkan elemen dari simpul A dan elemen dari simpul B\n \t\t\t\ttukarNilai(A,B);\n \t\t\t}\n\n \t\t\tA = A.kanan;\n \t\t\tB = B.kanan;\n \t\t\tnomor++;\n \t\t\t}\n \t\t\tberhenti = A;\n \t\t}\n \t\tSystem.out.println(\"===PROSES PENGURUTAN BUBBLE SELESAI======\");\n \t}", "public Elemento getElemento (String nombre) {\n Elemento tmp = null;\n if (porNombre.containsKey(nombre)) {\n tmp=porNombre.remove(nombre);\n addPeso(-tmp.getPeso());\n }\n return tmp;\n }", "public Kupcek() {\r\n kup = new ArrayList<Karta>();\r\n\r\n for (int i = 0; i < 4; i++) { //gremo preko vseh simbolo kart\r\n for (int j = 0; j < 13; j++) { //in njihovih rangov\r\n if (j == 0) { //prvi indeks je vedno as torej mu damo vrednost 11\r\n Karta card = new Karta(i, j, 11); //ustvarimo nasega asa z i-tim simbolom in j-tim rangom\r\n kup.add(card); //karto dodamo v kupcek\r\n }\r\n else if (j >= 10) { //podobno storimo za karte Fant, Kraljica, Kralj in jim dodamo vrednost 10\r\n Karta card = new Karta(i, j, 10);\r\n kup.add(card);\r\n }\r\n else { //za vse preostale karte povecamo vrednost za +1 indeksa zaradi poteka kart 2[1] 3[2] etc.\r\n Karta card = new Karta(i, j, j+1);\r\n kup.add(card);\r\n }\r\n }\r\n }\r\n }", "private void verarbeiteInWarenkorbKlick() {\n\n\t\tString titel = text2.getText();\n\t\tString anzahlString = text1.getText();\n\t\tint menge = Integer.parseInt(anzahlString);\n\n\t\tList<Artikel> liste1 = shop.sucheArtikelBezeichnung(titel);\n\n\t\ttry {\n\t\t\ttry {\n\t\t\t\tshop.warenHinzufügen(liste1.get(0), kunde, menge);\n\t\t\t} catch (ArtikelBestandReichtNichtAusException e) {\n\t\t\t\t// TODO Automatisch generierter Erfassungsblock\n\t\t\t\tJOptionPane.showMessageDialog(null, e.getMessage());\n\t\t\t}\n\t\t} catch (MassengutartikelException e1) {\n\n\t\t\tJOptionPane.showMessageDialog(null, e1.getMessage());\n\t\t}\n\t\ttry {\n\t\t\tshop.schreibeArtikel();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Automatisch generierter Erfassungsblock\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void setPolaznik(Polaznik polaznik) {\n this.polaznik = polaznik;\n }", "public static void trazenjeVozila(Iznajmljivac o) {\n\t\tLocalDate pocetniDatum = UtillMethod.unosDatum(\"pocetni\");\n\t\tLocalDate krajnjiDatum = UtillMethod.unosDatum(\"krajnji\");\n\t\tSystem.out.println(\"------------------------------------\");\n\t\tSystem.out.println(\"Provera dostupnosti vozila u toku...\\n\");\n\t\tArrayList<Vozilo> dostupnaVoz = new ArrayList<Vozilo>();\n\t\tint i = 0;\n\t\tfor (Vozilo v : Main.getVozilaAll()) {\n\t\t\tif (!postojiLiRezervacija(v, pocetniDatum, krajnjiDatum) && !v.isVozObrisano()) {\n\t\t\t\tSystem.out.println(i + \"-\" + v.getVrstaVozila() + \"-\" + \"Registarski broj\" + \"-\" + v.getRegBR()\n\t\t\t\t\t\t+ \"-Potrosnja na 100km-\" + v.getPotrosnja100() + \"litara\");\n\t\t\t\ti++;\n\t\t\t\tdostupnaVoz.add(v);\n\t\t\t}\n\t\t}\n\t\tif (i > 0) {\n\t\t\tSystem.out.println(\"------------------------------------------------\");\n\t\t\tSystem.out.println(\"Ukucajte kilometrazu koju planirate da predjete:\");\n\t\t\tdouble km = UtillMethod.unesiteBroj();\n\t\t\tint km1 = (int) km;\n\t\t\tporedjenjeVozila d1 = new poredjenjeVozila(km1);\n\t\t\tCollections.sort(dostupnaVoz,d1);\n\t\t\tint e = 0;\n\t\t\tfor(Vozilo v : dostupnaVoz) {\n\t\t\t\tdouble temp = cenaTroskaVoz(v, km, v.getGorivaVozila().get(0));\n\t\t\t\tSystem.out.println(e + \" - \" + v.getVrstaVozila()+ \"-Registarski broj: \"+ v.getRegBR()+\" | \"+ \"Cena na dan:\"+v.getCenaDan() +\" | Broj sedista:\"+ v.getBrSedist()+ \" | Broj vrata:\"+ v.getBrVrata() + \"| Cena troskova puta:\" + temp + \" Dinara\");\n\t\t\t\te++;\n\t\t\t}\n\t\t\tSystem.out.println(\"---------------------------------------\");\n\t\t\tSystem.out.println(\"Unesite redni broj vozila kojeg zelite:\");\n\t\t\tint redniBroj = UtillMethod.unesiteInt();\n\t\t\tif (redniBroj < dostupnaVoz.size()) {\n\t\t\t\tDateTimeFormatter formatters = DateTimeFormatter.ofPattern(\"dd/MM/yyyy\");\n\t\t\t\tString pocetni = pocetniDatum.format(formatters);\n\t\t\t\tString krajnji = krajnjiDatum.format(formatters);\n\t\t\t\tdouble cena = UtillMethod.cenaIznaj(pocetniDatum, krajnjiDatum, dostupnaVoz.get(redniBroj));\n\t\t\t\tRezervacija novaRez = new Rezervacija(dostupnaVoz.get(redniBroj), o, cena, false, pocetni, krajnji);\n\t\t\t\tMain.getRezervacijeAll().add(novaRez);\n\t\t\t\tSystem.out.println(\"Uspesno ste napravili rezervaciju!\");\n\t\t\t\tSystem.out.println(\"---------------------------------\");\n\t\t\t\tSystem.out.println(novaRez);\n\t\t\t\tSystem.out.println(\"---------------------------------\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Uneli ste pogresan redni broj!\");\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.out.println(\"Nema dostupnih vozila za rezervaaciju.\");\n\t\t}\n\t}", "private void setAdjuntos(Element element) {\r\n\t\tElement adjuntos = new Element(\"A_AdjuntosReglas\");\r\n\t\tadjuntos.setText(getReq().getObservaciones());\r\n\t\telement.addContent(adjuntos);\r\n\t}", "public void fjernAlle() {\n listehode.neste = null;\n antall = 0;\n }", "@Override\n\tpublic void prijmiNaklad(Objednavka ob, int idAuta) {\n\t\tsuper.prijmiNaklad(ob, idAuta);\n\t\tthis.sklad += ob.objem;\n\t}" ]
[ "0.65622216", "0.60307074", "0.5975613", "0.5971603", "0.59430337", "0.5929201", "0.5896329", "0.58396626", "0.581264", "0.5792087", "0.5784599", "0.57727396", "0.5751276", "0.57440335", "0.57366794", "0.57359093", "0.5718389", "0.5716595", "0.5704505", "0.56770945", "0.5662263", "0.56586057", "0.565673", "0.5654", "0.56313133", "0.5629572", "0.56258404", "0.56158066", "0.56078726", "0.5592559", "0.5569703", "0.5567911", "0.5565629", "0.5557908", "0.55548984", "0.5539787", "0.55340445", "0.55305105", "0.5526046", "0.552289", "0.5516108", "0.5507426", "0.55059475", "0.55046177", "0.54993564", "0.54968876", "0.5496341", "0.54951084", "0.54831296", "0.548306", "0.5477964", "0.5472887", "0.54692227", "0.5464065", "0.54616785", "0.54535264", "0.5447838", "0.54347736", "0.5433342", "0.54326755", "0.543061", "0.5429754", "0.5428469", "0.5424942", "0.5423482", "0.54208523", "0.5412142", "0.54049444", "0.5400194", "0.53962857", "0.53943366", "0.5390207", "0.53875226", "0.53794813", "0.537551", "0.53742146", "0.5370761", "0.5368379", "0.5355157", "0.5353493", "0.53526765", "0.5352334", "0.53517574", "0.53501195", "0.53499687", "0.5345841", "0.53449804", "0.53446585", "0.53443193", "0.5336102", "0.5328956", "0.53284836", "0.5325155", "0.5324201", "0.5317726", "0.5315509", "0.5306856", "0.53046125", "0.5304408", "0.5297513", "0.5296309" ]
0.0
-1
Create the GUI allowing configure the clock of router and IP.
public InterfaceClock(Project project,Router router,ArrayList<AvailableClock> clock_list,HermesGInterface g) { super("Select the clock of the router " + router.getAddress() + " and its ip"); this.project = project; this.r = router; this.clocks = clock_list; hermesg = g; initilize(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void $$$setupUI$$$() {\n container = new JPanel();\n container.setLayout(new FormLayout(\"fill:335px:noGrow,left:4dlu:noGrow,fill:334px:noGrow\", \"center:d:grow\"));\n container.setBorder(BorderFactory.createTitledBorder(null, \"港机数据采集服务配置\", TitledBorder.CENTER, TitledBorder.DEFAULT_POSITION, new Font(container.getFont().getName(), container.getFont().getStyle(), container.getFont().getSize()), new Color(-16777216)));\n serverContainer = new JPanel();\n serverContainer.setLayout(new FlowLayout(FlowLayout.LEFT, 5, 5));\n CellConstraints cc = new CellConstraints();\n container.add(serverContainer, cc.xy(1, 1, CellConstraints.FILL, CellConstraints.FILL));\n serverContainer.setBorder(BorderFactory.createTitledBorder(\"服务器配置\"));\n serverConfigPanel = new JPanel();\n serverConfigPanel.setLayout(new FormLayout(\"fill:80px:noGrow,left:4dlu:noGrow,fill:225px:grow\", \"center:40px:noGrow,top:4dlu:noGrow,center:40px:noGrow,top:4dlu:noGrow,center:40px:noGrow,top:4dlu:noGrow,center:40px:noGrow\"));\n serverContainer.add(serverConfigPanel);\n serverIpLabel = new JLabel();\n serverIpLabel.setText(\"IP地址\");\n serverConfigPanel.add(serverIpLabel, cc.xy(1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT));\n serverIpTxt = new JTextField();\n serverConfigPanel.add(serverIpTxt, cc.xy(3, 1, CellConstraints.FILL, CellConstraints.DEFAULT));\n serverPortLabel = new JLabel();\n serverPortLabel.setText(\"端口\");\n serverConfigPanel.add(serverPortLabel, cc.xy(1, 3, CellConstraints.CENTER, CellConstraints.DEFAULT));\n serverPortTxt = new JTextField();\n serverConfigPanel.add(serverPortTxt, cc.xy(3, 3, CellConstraints.FILL, CellConstraints.DEFAULT));\n serverIntervalLabel = new JLabel();\n serverIntervalLabel.setText(\"监听间隔\");\n serverConfigPanel.add(serverIntervalLabel, cc.xy(1, 5, CellConstraints.CENTER, CellConstraints.DEFAULT));\n serverIntervalTxt = new JTextField();\n serverConfigPanel.add(serverIntervalTxt, cc.xy(3, 5, CellConstraints.FILL, CellConstraints.DEFAULT));\n serverFileLabel = new JLabel();\n serverFileLabel.setText(\"配置文件路径\");\n serverConfigPanel.add(serverFileLabel, cc.xy(1, 7, CellConstraints.CENTER, CellConstraints.DEFAULT));\n serverFileTxt = new JTextField();\n serverConfigPanel.add(serverFileTxt, cc.xy(3, 7, CellConstraints.FILL, CellConstraints.DEFAULT));\n serverControlPanel = new JPanel();\n serverControlPanel.setLayout(new FormLayout(\"fill:d:grow,left:4dlu:noGrow,fill:150px:noGrow,left:4dlu:noGrow,fill:150px:grow\", \"center:d:grow,top:4dlu:noGrow,center:42px:grow,top:4dlu:noGrow,center:max(d;4px):noGrow\"));\n serverContainer.add(serverControlPanel);\n serverSaveBtn = new JButton();\n serverSaveBtn.setText(\"保存\");\n serverControlPanel.add(serverSaveBtn, cc.xy(5, 3));\n serverFileOpener = new JButton();\n serverFileOpener.setText(\"打开\");\n serverControlPanel.add(serverFileOpener, cc.xy(3, 3));\n serverStartBtn = new JButton();\n serverStartBtn.setText(\"启动服务器\");\n serverControlPanel.add(serverStartBtn, cc.xy(3, 5));\n serverStopBtn = new JButton();\n serverStopBtn.setText(\"停止服务器\");\n serverControlPanel.add(serverStopBtn, cc.xy(5, 5));\n redisContainer = new JPanel();\n redisContainer.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));\n container.add(redisContainer, cc.xy(3, 1, CellConstraints.DEFAULT, CellConstraints.FILL));\n redisContainer.setBorder(BorderFactory.createTitledBorder(\"Redis配置\"));\n redisConfigPanel = new JPanel();\n redisConfigPanel.setLayout(new FormLayout(\"fill:83px:noGrow,left:4dlu:noGrow,fill:221px:grow\", \"center:40px:noGrow,top:4dlu:noGrow,center:40px:noGrow,top:4dlu:noGrow,center:40px:noGrow,top:4dlu:noGrow,center:40px:noGrow\"));\n redisContainer.add(redisConfigPanel);\n redisIpLabel = new JLabel();\n redisIpLabel.setText(\"IP地址\");\n redisConfigPanel.add(redisIpLabel, cc.xy(1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT));\n redisIpTxt = new JTextField();\n redisConfigPanel.add(redisIpTxt, cc.xy(3, 1, CellConstraints.FILL, CellConstraints.DEFAULT));\n redisPortLabel = new JLabel();\n redisPortLabel.setText(\"端口\");\n redisConfigPanel.add(redisPortLabel, cc.xy(1, 3, CellConstraints.CENTER, CellConstraints.DEFAULT));\n redisPortTxt = new JTextField();\n redisConfigPanel.add(redisPortTxt, cc.xy(3, 3, CellConstraints.FILL, CellConstraints.DEFAULT));\n redisExpireLabel = new JLabel();\n redisExpireLabel.setText(\"过期时间\");\n redisConfigPanel.add(redisExpireLabel, cc.xy(1, 5, CellConstraints.CENTER, CellConstraints.DEFAULT));\n redisExpireTxt = new JTextField();\n redisConfigPanel.add(redisExpireTxt, cc.xy(3, 5, CellConstraints.FILL, CellConstraints.DEFAULT));\n redisFileLabel = new JLabel();\n redisFileLabel.setText(\"配置文件路径\");\n redisConfigPanel.add(redisFileLabel, cc.xy(1, 7, CellConstraints.CENTER, CellConstraints.DEFAULT));\n redisFileTxt = new JTextField();\n redisConfigPanel.add(redisFileTxt, cc.xy(3, 7, CellConstraints.FILL, CellConstraints.DEFAULT));\n redisControlPanel = new JPanel();\n redisControlPanel.setLayout(new FormLayout(\"fill:d:grow,left:4dlu:noGrow,fill:150px:noGrow,left:4dlu:noGrow,fill:150px:grow\", \"center:d:grow,top:4dlu:noGrow,center:42px:grow,top:4dlu:noGrow,center:max(d;4px):noGrow\"));\n redisContainer.add(redisControlPanel);\n redisSaveBtn = new JButton();\n redisSaveBtn.setText(\"保存\");\n redisControlPanel.add(redisSaveBtn, cc.xy(5, 3));\n redisFileOpener = new JButton();\n redisFileOpener.setText(\"打开\");\n redisControlPanel.add(redisFileOpener, cc.xy(3, 3));\n redisStartBtn = new JButton();\n redisStartBtn.setText(\"启动服务器\");\n redisControlPanel.add(redisStartBtn, cc.xy(3, 5));\n redisStopBtn = new JButton();\n redisStopBtn.setText(\"停止服务器\");\n redisControlPanel.add(redisStopBtn, cc.xy(5, 5));\n }", "public void createGui() {\r\n setResizable(false);\r\n setSize(500, 300);\r\n setTitle(\"TechAndCrack StopWatch\");\r\n setLocation(s.width / 2 - getWidth() / 2, s.height / 2 - getHeight()\r\n / 2);\r\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n setLayout(new BorderLayout());\r\n \r\n textarea.setEditable(false);\r\n textarea.setLineWrap(true);\r\n JScrollPane scrollpane = new JScrollPane(textarea);\r\n \r\n toppanel.add(scrollpane);\r\n toppanel.setLayout(new GridLayout());\r\n add(toppanel, BorderLayout.NORTH);\r\n \r\n labeltimer.setForeground(Color.GRAY);\r\n labeltimer.setFont(new Font(\"Courier New\", Font.BOLD, 36));\r\n centerpanel.add(labeltimer);\r\n add(centerpanel, BorderLayout.CENTER);\r\n \r\n add(bottompanel, BorderLayout.PAGE_END);\r\n bottompanel.setLayout(new GridLayout());\r\n bottompanel.add(btstart);\r\n bottompanel.add(btreset);\r\n bottompanel.add(btlap);\r\n \r\n btstart.addActionListener(new buttonstart());\r\n btreset.addActionListener(new buttonreset());\r\n btlap.addActionListener(new buttonlap());\r\n \r\n setVisible(true);\r\n }", "public ControlUI(DataStore ds) {\n // initComponents(); // The GUI code, generated by NetBeans is not called\n calculateRoute = false;\n changeRFID = false;\n this.ds = ds;\n manualMode = false;\n time = \"\";\n \n myinitComponents();\n setTitle(\"Grupp 2 - Planeringssystem\");\n }", "public void actionPerformed(ActionEvent e)\n\t{\n\t\tif(e.getSource() == ok)\n\t\t{\n\t\t\n\t\t// Router Clock\n\t\t\t\n\t\tClock c = new Clock();\n\t\tString saidaf,saida,clock_unit;\n\t\tdouble clk;\n\t\tint total=0,x;\n\t\t\t\n\t\tsaida = new String((String)routerclock.getSelectedItem());\n\t\tint cont=0,inter=0;\n\t\tsaidaf = new String();\n\n\t\t/* Bloco que le o o label do clock */\n\t\twhile(saida.charAt(cont) != ' ')\n\t\t{\n\t\t\tsaidaf = \"\"+saidaf+ saida.charAt(cont); \n\t\t\tcont++;\n\t\t}\n\t\tc.setLabelClockRouter(saidaf);\n\t\t//System.out.println(\"label_router : \" + saidaf);\n\n\t\tsaidaf=\"\";\n\t\tcont++;\n\t\t\n\t\t/* Bloco que le o clock do roteador */\n\t\twhile(saida.charAt(cont) != ' ')\n\t\t{\n\t\t\tsaidaf = \"\"+saidaf+ saida.charAt(cont); \n\t\t\tcont++;\n\t\t}\n\t\tclk = Double.parseDouble(saidaf); // \n\t\t//System.out.println(\"clock_router : \" + clk);\n\n\t\tcont++;\n\t\tsaidaf=\"\";\n\t\t/* Bloco que le a unidade do clock do roteador */\n\t\twhile(cont < saida.length())\n\t\t{\n\t\t\tsaidaf = \"\"+saidaf+ saida.charAt(cont); \n\t\t\tcont++;\n\t\t}\n\t\t\n\t\tclock_unit = saidaf; // \n\t\t//System.out.println(\"clock_unit_router : \" + clock_unit);\n\t\t\n\t\tc.setClockRouter(clk,clock_unit);\n\t\tc.setNumberRouter(r.getAddressX(),r.getAddressY());\n\n\t\t// Ip Clock Input\t \t\n\n\t\tcont=0;\n\t\tsaidaf=\"\";\n\t\tsaida = new String((String)ipinputclock.getSelectedItem());\n\n\t\t/* Bloco que le o o label do clock */\n\t\twhile(saida.charAt(cont) != ' ')\n\t\t{\n\t\t\tsaidaf = \"\"+saidaf+ saida.charAt(cont); \n\t\t\tcont++;\n\t\t}\n\t\tc.setLabelClockIpInput(saidaf);\n\t\t//System.out.println(\"label_ip : \" + saidaf);\n\n\t\tsaidaf=\"\";\n\t\tcont++;\n\n\t\t/* Bloco que le o clock do roteador */\n\t\twhile(saida.charAt(cont) != ' ')\n\t\t{\n\t\t\tsaidaf = \"\"+saidaf+ saida.charAt(cont); \n\t\t\tcont++;\n\t\t}\n\t\tclk = Double.parseDouble(saidaf); // \n\t\t//System.out.println(\"clock_ip : \" + clk);\n\n\t\tcont++;\n\t\tsaidaf=\"\";\n\t\t/* Bloco que le a unidade do clock do roteador */\n\t\twhile(cont < saida.length())\n\t\t{\n\t\t\tsaidaf = \"\"+saidaf+ saida.charAt(cont); \n\t\t\tcont++;\n\t\t}\n\t\t\n\t\tclock_unit = saidaf; // \n\t\t//System.out.println(\"clock_unit : \" + clock_unit);\n\t\t\n\t\tc.setClockIpInput(clk,clock_unit);\n\t\tc.setNumberRouter(r.getAddressX(),r.getAddressY());\n\n\t\t// Ip Clock Output\n\n\t\tcont=0;\n\t\tsaidaf=\"\";\n\t\tsaida = new String((String)ipoutputclock.getSelectedItem());\n\n\t\t/* Bloco que le o o label do clock */\n\t\twhile(saida.charAt(cont) != ' ')\n\t\t{\n\t\t\tsaidaf = \"\"+saidaf+ saida.charAt(cont); \n\t\t\tcont++;\n\t\t}\n\t\tc.setLabelClockIpOutput(saidaf);\n\t\t//System.out.println(\"label_ip : \" + saidaf);\n\n\t\tsaidaf=\"\";\n\t\tcont++;\n\n\t\t/* Bloco que le o clock do roteador */\n\t\twhile(saida.charAt(cont) != ' ')\n\t\t{\n\t\t\tsaidaf = \"\"+saidaf+ saida.charAt(cont); \n\t\t\tcont++;\n\t\t}\n\t\tclk = Double.parseDouble(saidaf); // \n\t\t//System.out.println(\"clock_ip : \" + clk);\n\n\t\tcont++;\n\t\tsaidaf=\"\";\n\t\t/* Bloco que le a unidade do clock do roteador */\n\t\twhile(cont < saida.length())\n\t\t{\n\t\t\tsaidaf = \"\"+saidaf+ saida.charAt(cont); \n\t\t\tcont++;\n\t\t}\n\t\t\n\t\tclock_unit = saidaf; // \n\t\t//System.out.println(\"clock_unit : \" + clock_unit);\n\t\t\n\t\tc.setClockIpOutput(clk,clock_unit);\n\t\tc.setNumberRouter(r.getAddressX(),r.getAddressY());\n\t\t\n\t\t\n\t\tfor(int i=0;i<project.getNoC().getNumRotX()*project.getNoC().getNumRotY();i++)\n\t\t{\n\t\t\tif(project.getNoC().getClock().get(i).getNumberRouter().equals(r.getAddress()))\n\t\t\t{\n\t\t\t\tproject.getNoC().getClock().set(i,c);\n\t\t\t}\n\t\t}\n\n\t\thermesg.getNoCPanel().setEnabled(true);\n\t\tsuper.dispose();\n\n\t\t}\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.getContentPane().setLayout(null);\n\n\t\tJPanel chatInfoSec = new JPanel();\n\t\tchatInfoSec.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.LOWERED, new Color(0, 0, 0), null),\n\t\t\t\t\"CHAT INFO \", TitledBorder.LEADING, TitledBorder.TOP, null, new Color(0, 0, 0)));\n\t\tchatInfoSec.setBounds(20, 23, 347, 100);\n\t\tframe.getContentPane().add(chatInfoSec);\n\t\tchatInfoSec.setLayout(null);\n\n\t\tJLabel ipLabel = new JLabel(\"IP\");\n\t\tipLabel.setFont(new Font(\"굴림\", Font.BOLD, 12));\n\t\tipLabel.setBounds(39, 30, 32, 15);\n\t\tchatInfoSec.add(ipLabel);\n\n\t\tipText = new JTextField();\n\t\tipText.setBounds(114, 26, 179, 21);\n\t\tipText.setBorder(null);\n\t\tchatInfoSec.add(ipText);\n\n\t\tJLabel portLabel = new JLabel(\"Port\");\n\t\tportLabel.setFont(new Font(\"굴림\", Font.BOLD, 12));\n\t\tportLabel.setBounds(39, 65, 32, 15);\n\t\tchatInfoSec.add(portLabel);\n\n\t\tportText = new JTextField();\n\t\tportText.setBounds(114, 61, 179, 21);\n\t\tportText.setBorder(null);\n\t\tchatInfoSec.add(portText);\n\n\t\tRoundedButton1 inBtn = new RoundedButton1(\"IN\");\n\t\tinBtn.setBounds(398, 30, 75, 90);\n\t\tRoundedButton1 outBtn = new RoundedButton1(\"OUT\");\n\t\toutBtn.setBounds(505, 30, 75, 90);\n\t\tframe.getContentPane().add(inBtn);\n\t\tframe.getContentPane().add(outBtn);\n\n\t\tinBtn.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tClientThread clientThread = new ClientThread();\n\t\t\t\tclientThread.setDaemon(true);\n\t\t\t\tclientThread.start();\n\t\t\t}\n\t\t});\n\t\toutBtn.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\ttry {\n\t\t\t\t\tif(socket != null) {\n\t\t\t\t\t\tsocket.close();\n\t\t\t\t\t}else {\n\t\t\t\t\t\tchatSec.append(\"채팅방에 접속을 하지 않았습니다\\n\");\n\t\t\t\t\t}\n\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tJPanel mySec = new JPanel();\n\t\tmySec.setLayout(null);\n\t\tmySec.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.LOWERED, new Color(0, 0, 0), null), \" MY \",\n\t\t\t\tTitledBorder.LEADING, TitledBorder.TOP, null, new Color(0, 0, 0)));\n\t\tmySec.setBounds(20, 133, 563, 100);\n\t\tframe.getContentPane().add(mySec);\n\n\t\tJLabel myIpLabel = new JLabel(\"IP\");\n\t\tmyIpLabel.setFont(new Font(\"굴림\", Font.BOLD, 12));\n\t\tmyIpLabel.setBounds(39, 30, 32, 15);\n\t\tmySec.add(myIpLabel);\n\n\t\tJTextField myIpText = new JTextField();\n\t\tmyIpText.setBackground(UIManager.getColor(\"Button.background\"));\n\t\tmyIpText.setEditable(false);\n\t\tmyIpText.setBounds(114, 26, 437, 21);\n\t\tmyIpText.setBorder(new LineBorder(Color.LIGHT_GRAY));\n\t\tmyIpText.setText(common.myIp());\n\t\tmySec.add(myIpText);\n\n\t\tJLabel nameLabel = new JLabel(\"Name\");\n\t\tnameLabel.setFont(new Font(\"굴림\", Font.BOLD, 12));\n\t\tnameLabel.setBounds(39, 65, 47, 15);\n\t\tmySec.add(nameLabel);\n\n\t\tnameText = new JTextField();\n\t\tnameText.setBounds(114, 61, 323, 21);\n\t\tnameText.setBorder(null);\n\t\tnameText.setText(myName);\n\t\tmySec.add(nameText);\n\n\t\tRoundedButton2 changeBtn = new RoundedButton2(\"CHANGE\");\n\t\tchangeBtn.setBounds(463, 60, 88, 23);\n\t\tmySec.add(changeBtn);\n\t\tchangeBtn.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tchangeName(myName);\n\t\t\t}\n\t\t});\n\n\t\tchatSec = new JTextArea();\n\t\tchatSec.setEditable(false);\n\t\tJScrollPane scrollPane = new JScrollPane(chatSec);\n\t\tscrollPane.setBounds(22, 255, 560, 235);\n\t\tframe.getContentPane().add(scrollPane);\n\n\t\tchatText = new JTextField();\n\t\tchatText.setBounds(22, 500, 458, 21);\n\t\tchatText.setBorder(null);\n\t\tchatText.addKeyListener(new KeyAdapter() {\n\t\t\t@Override\n\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tsuper.keyPressed(e);\n\n\t\t\t\t// 입력받은 키가 엔터인지\n\t\t\t\tint keyCode = e.getKeyCode();\n\t\t\t\tswitch (keyCode) {\t\n\t\t\t\t\tcase KeyEvent.VK_ENTER:\n\t\t\t\t\t\tsendMessage();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tframe.getContentPane().add(chatText);\n\n\t\twindowbuilder.RoundedButton2 sendBtn = new windowbuilder.RoundedButton2(\"SEND\");\n\t\tsendBtn.setBounds(492, 499, 88, 23);\n\t\tframe.getContentPane().add(sendBtn);\n\t\tsendBtn.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tsendMessage();\n\t\t\t}\n\t\t});\n\n\t\tframe.setTitle(\"\\uCC44\\uD305\\uCC38\\uC5EC\");\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.setBackground(Color.WHITE);\n\t\tframe.setBounds(720, 120, 609, 573);\n\t}", "public NetworkPanel() {\r\n\t\t//super(parent);\r\n\t\t//this.mainFrame = parent;\r\n\t\t//setTitle(getResourceString(\"networkDialog.title\"));\r\n\t\t//setSize(200, 135);\r\n\t\t//setLocation(parent.getLocation().x + parent.getWidth() / 2 - getWidth() / 2, parent.getLocation().y + parent.getHeight() / 2 - getHeight() / 2);\r\n\t\t//setAlwaysOnTop(true);\r\n\t\t//setResizable(false);\r\n\t\t// setLayout(new GridLayout(4,2));\r\n\r\n\t\t//JPanel panel = new JPanel();\r\n\t\t//panel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createLineBorder(Color.BLACK), getResourceString(\"networkDialog.title\")));\r\n\t\tsetLayout(null);\r\n\t\t//setBorder(BorderFactory.createEmptyBorder(50, 50, 0, 0));\r\n\t\tint x = 8;\r\n\t\tint y = 10;\r\n\r\n\t\taetText = new JLabel(getResourceString(\"networkDialog.aet\"));\r\n\t\taetText.setBorder(BorderFactory.createEmptyBorder());\r\n\t\taetText.setBounds(5 + x, 0 + y, 100, 20);\r\n\t\taetField = new JTextField(30);\r\n\t\taetField.setBounds(80 + x, 0 + y, 100, 20);\r\n\t\tdestIPText = new JLabel(getResourceString(\"networkDialog.ip\"));\r\n\t\tdestIPText.setBorder(BorderFactory.createEmptyBorder());\r\n\t\tdestIPText.setBounds(5 + x, 25 + y, 100, 20);\r\n\t\tdestIPField = new JTextField(15);\r\n\t\tdestIPField.setBounds(80 + x, 25 + y, 100, 20);\r\n\t\tdestPortText = new JLabel(getResourceString(\"networkDialog.port\"));\r\n\t\tdestPortText.setBorder(BorderFactory.createEmptyBorder());\r\n\t\tdestPortText.setBounds(5 + x, 50 + y, 100, 20);\r\n\t\tdestPortField = new JTextField(5);\r\n\t\tdestPortField.setBounds(80 + x, 50 + y, 100, 20);\r\n\t\t//ok = new JButton(getResourceString(\"ok\"));\r\n\t\t//ok.setBounds(25, 75, 70, 25);\r\n\t\t//cancel = new JButton(getResourceString(\"cancel\"));\r\n\t\t//cancel.setBounds(110, 75, 70, 25);\r\n\t\t//setArgs();\r\n\r\n\t\tadd(aetText);\r\n\t\tadd(aetField);\r\n\t\tadd(destIPText);\r\n\t\tadd(destIPField);\r\n\t\tadd(destPortText);\r\n\t\tadd(destPortField);\r\n\r\n\t\taet = GeneralUtils.getProp().getString(Constant.CONFIG_KEY_PACS_AET);\r\n\t\thost = GeneralUtils.getProp().getString(Constant.CONFIG_KEY_PACS_HOST);\r\n\t\tport = GeneralUtils.getProp().getInt(Constant.CONFIG_KEY_PACS_PORT);\r\n\r\n\t\tload();\r\n\r\n\t\t//setLayout(new BorderLayout());\r\n\t\t//add(panel);\r\n\t\t//add(ok);\r\n\t\t//add(cancel);\r\n\r\n//\t\t\tok.addActionListener(new ActionListener() {\r\n//\r\n//\t\t\t\t@Override\r\n//\t\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n//\t\t\t\t\tString aetP = OptionMenu.aet;\r\n//\t\t\t\t\tString hostP = OptionMenu.host;\r\n//\t\t\t\t\tint portP = OptionMenu.port;\r\n//\t\t\t\t\tString aetT = aetP;\r\n//\t\t\t\t\tString hostT = hostP;\r\n//\t\t\t\t\tString portStr = null;\r\n//\t\t\t\t\tint portT = portP;\r\n//\t\t\t\t\tboolean isClean = true;\r\n//\t\t\t\t\ttry {\r\n//\t\t\t\t\t\taetT = aetField.getText();\r\n//\t\t\t\t\t\tportStr = destPortField.getText();\r\n//\t\t\t\t\t\thostT = destIPField.getText();\r\n//\t\t\t\t\t\ttry {\r\n//\t\t\t\t\t\t\tcheckIP(hostT);\r\n//\t\t\t\t\t\t} catch (NumberRangeException e1) {\r\n//\t\t\t\t\t\t\t// e1.printStackTrace();\r\n//\t\t\t\t\t\t\tJOptionPane.showMessageDialog(mainFrame, e1.getMsg(), getResourceString(\"Teemo\"), JOptionPane.ERROR_MESSAGE);\r\n//\t\t\t\t\t\t\t// hostT = hostP;\r\n//\t\t\t\t\t\t\tisClean = false;\r\n//\t\t\t\t\t\t}\r\n//\t\t\t\t\t\ttry {\r\n//\t\t\t\t\t\t\tportT = Integer.parseInt(portStr);\r\n//\t\t\t\t\t\t} catch (NumberFormatException e1) {\r\n//\t\t\t\t\t\t\t// e1.printStackTrace();\r\n//\t\t\t\t\t\t\tJOptionPane.showMessageDialog(mainFrame, getResourceString(\"networkDialog.portException\"), getResourceString(\"Teemo\"), JOptionPane.ERROR_MESSAGE);\r\n//\t\t\t\t\t\t\tisClean = false;\r\n//\t\t\t\t\t\t}\r\n//\t\t\t\t\t\ttry {\r\n//\t\t\t\t\t\t\tcheckHost(portT);\r\n//\t\t\t\t\t\t} catch (NumberRangeException e1) {\r\n//\t\t\t\t\t\t\t// e1.printStackTrace();\r\n//\t\t\t\t\t\t\tJOptionPane.showMessageDialog(mainFrame, e1.getMsg(), getResourceString(\"Teemo\"), JOptionPane.ERROR_MESSAGE);\r\n//\t\t\t\t\t\t\tportT = portP;\r\n//\t\t\t\t\t\t\tisClean = false;\r\n//\t\t\t\t\t\t}\r\n//\t\t\t\t\t} finally {\r\n//\r\n//\t\t\t\t\t\tif (isClean == false) {\r\n//\t\t\t\t\t\t\taetField.setText(aetT);\r\n//\t\t\t\t\t\t\tdestIPField.setText(hostT);\r\n//\t\t\t\t\t\t\tdestPortField.setText(portStr);\r\n//\t\t\t\t\t\t} else {\r\n//\t\t\t\t\t\t\tOptionMenu.aet = aetT;\r\n//\t\t\t\t\t\t\tOptionMenu.host = hostT;\r\n//\t\t\t\t\t\t\tOptionMenu.port = portT;\r\n//\t\t\t\t\t\t\tdispose();\r\n//\t\t\t\t\t\t}\r\n//\t\t\t\t\t}\r\n//\r\n//\t\t\t\t}\r\n//\r\n//\t\t\t});\r\n\r\n//\t\t\tcancel.addActionListener(new ActionListener() {\r\n//\r\n//\t\t\t\t@Override\r\n//\t\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n//\t\t\t\t\tdispose();\r\n//\t\t\t\t}\r\n//\r\n//\t\t\t});\r\n\r\n\t}", "private void geometry()\n\t\t{\n\t\tjLabelNickName = new JLabel(\"Pseudo: \");\n\t\tjLabelPort = new JLabel(\"Port: \");\n\t\tjNickname = new JTextField();\n\t\tjIPLabel = new JIPLabel();\n\t\tjIP = new JTextField();\n\t\tjPort = new JSpinner();\n\t\tjButtonConnection = new JButton(\"Connexion\");\n\n\t\tthis.setLayout(new GridLayout(-1, 1));\n\n\t\tthis.add(jLabelNickName);\n\t\tthis.add(jNickname);\n\t\tthis.add(jIPLabel);\n\t\tthis.add(jIP);\n\t\tthis.add(jLabelPort);\n\t\tthis.add(jPort);\n\t\tthis.add(Box.createVerticalStrut(SPACE));\n\t\tthis.add(jButtonConnection);\n\t\tthis.add(Box.createVerticalGlue());\n\t\t}", "public void initGui() {\n/* 34 */ Keyboard.enableRepeatEvents(true);\n/* 35 */ this.buttonList.clear();\n/* 36 */ this.buttonList.add(new GuiButton(0, this.width / 2 - 100, this.height / 4 + 96 + 12, I18n.format(\"selectServer.select\", new Object[0])));\n/* 37 */ this.buttonList.add(new GuiButton(1, this.width / 2 - 100, this.height / 4 + 120 + 12, I18n.format(\"gui.cancel\", new Object[0])));\n/* 38 */ this.ipEdit = new GuiTextField(2, this.fontRendererObj, this.width / 2 - 100, 116, 200, 20);\n/* 39 */ this.ipEdit.setMaxStringLength(128);\n/* 40 */ this.ipEdit.setFocused(true);\n/* 41 */ this.ipEdit.setText(this.mc.gameSettings.lastServer);\n/* 42 */ ((GuiButton)this.buttonList.get(0)).enabled = (!this.ipEdit.getText().isEmpty() && (this.ipEdit.getText().split(\":\")).length > 0);\n/* */ }", "private void setupForm() {\n\t\tlabelIp = new JLabel(\"IP Address:\");\n\t\tconstraints.gridx = 0;\n\t\tconstraints.gridy = 0;\n\t\tadd(labelIp, constraints);\t\n\t\tfieldIp = new JTextField(30);\n\t\tfieldIp.setText(DataStore.getInstance().getConfig().getIPAddr());\n\t\tconstraints.gridx = 1;\n\t\tconstraints.fill = GridBagConstraints.HORIZONTAL;\n\t\tadd(fieldIp, constraints);\n\t\t\n\t\tlabelPort = new JLabel(\"Port number: \");\n\t\tconstraints.gridx = 0;\n\t\tconstraints.gridy = 1;\n\t\tadd(labelPort, constraints);\t\n\t\tfieldPort = new JTextField(30);\n\t\tfieldPort.setText(DataStore.getInstance().getConfig().getPort());\n\t\tconstraints.gridx = 1;\n\t\tconstraints.fill = GridBagConstraints.HORIZONTAL;\n\t\tadd(fieldPort, constraints);\n\t\t\n\t\tlabelEmail = new JLabel(\"User Email:\");\n\t\tconstraints.gridx = 0;\n\t\tconstraints.gridy = 2;\n\t\tadd(labelEmail, constraints);\t\n\t\tfieldEmail = new JTextField(30);\n\t\tfieldEmail.setText(DataStore.getInstance().getConfig().getEAddr());\n\t\tconstraints.gridx = 1;\n\t\tconstraints.fill = GridBagConstraints.HORIZONTAL;\n\t\tadd(fieldEmail, constraints);\n\t\t\n\t\tlabelPass = new JLabel(\"Password: \");\n\t\tconstraints.gridx = 0;\n\t\tconstraints.gridy = 3;\n\t\tadd(labelPass, constraints);\n\t\tfieldPass = new JPasswordField(30);\n\t\tfieldPass.setText(DataStore.getInstance().getConfig().getpWrd());\n\t\tfieldPass.setEchoChar('*');\n\t\tconstraints.gridx = 1;\n\t\tconstraints.fill = GridBagConstraints.HORIZONTAL;\n\t\tadd(fieldPass, constraints);\n\t\t\n\t\tJPanel buttonPanel = new JPanel();\n\t\tsaveButton = new ConfigSave(al, med, this);\n\t\tsaveButton.setFont(new Font(\"Arial\", Font.BOLD, 16));\n\t\tconstraints.gridx = 0;\n\t\tconstraints.gridy = 4;\n\t\tconstraints.gridheight = 2;\n\t\tconstraints.gridwidth = 2;\n\t\t\n\t\tbuttonPanel.add(saveButton);\n\t\t\n\t\tcancelButton = new CancelButton(al, med, this);\n\t\tcancelButton.setFont(new Font(\"ariel\", Font.BOLD, 14));\n\t\tconstraints.gridx = 0;\n\t\tconstraints.gridy = 4;\n\t\tconstraints.gridwidth = 2;\n\t\tconstraints.gridheight = 2;\n\t\tbuttonPanel.add(cancelButton);\n\t\t\n\t\tadd(buttonPanel, constraints);\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n checkInPane = new javax.swing.JScrollPane();\n checkInTimeList = new HostCheckInList( this );\n schedulePanel = new javax.swing.JPanel();\n permTimePanel = new javax.swing.JPanel();\n hourLabel = new javax.swing.JLabel();\n minuteLabel = new javax.swing.JLabel();\n startLabel = new javax.swing.JLabel();\n endLabel = new javax.swing.JLabel();\n startHourSpinner = new javax.swing.JSpinner();\n endHourSpinner = new javax.swing.JSpinner();\n startMinSpinner = new javax.swing.JSpinner();\n endMinSpinner = new javax.swing.JSpinner();\n genButton = new javax.swing.JButton();\n freqLabel = new javax.swing.JLabel();\n occurLabel = new javax.swing.JLabel();\n freqCombo = new javax.swing.JComboBox();\n occurSpinner = new javax.swing.JSpinner();\n\n checkInPane.setBorder(javax.swing.BorderFactory.createTitledBorder(null, \"Check-In Times\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Tahoma\", 1, 11))); // NOI18N\n checkInPane.setViewportView(checkInTimeList);\n\n schedulePanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, \"Schedule Assistant\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Tahoma\", 1, 11))); // NOI18N\n\n permTimePanel.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Permitted Time Range\"));\n\n hourLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n hourLabel.setText(\"Hour\");\n\n minuteLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n minuteLabel.setText(\"Minute\");\n\n startLabel.setText(\"Start Time:\");\n\n endLabel.setText(\"End Time:\");\n\n startHourSpinner.setModel(new javax.swing.SpinnerNumberModel(0, 0, 23, 1));\n startHourSpinner.setMinimumSize(new java.awt.Dimension(40, 20));\n startHourSpinner.setPreferredSize(new java.awt.Dimension(40, 20));\n\n endHourSpinner.setModel(new javax.swing.SpinnerNumberModel(0, 0, 23, 1));\n endHourSpinner.setMinimumSize(new java.awt.Dimension(40, 20));\n endHourSpinner.setPreferredSize(new java.awt.Dimension(40, 20));\n\n startMinSpinner.setModel(new javax.swing.SpinnerNumberModel(0, 0, 59, 1));\n startMinSpinner.setMinimumSize(new java.awt.Dimension(40, 20));\n startMinSpinner.setPreferredSize(new java.awt.Dimension(40, 20));\n\n endMinSpinner.setModel(new javax.swing.SpinnerNumberModel(0, 0, 59, 1));\n endMinSpinner.setMinimumSize(new java.awt.Dimension(40, 20));\n endMinSpinner.setPreferredSize(new java.awt.Dimension(40, 20));\n\n javax.swing.GroupLayout permTimePanelLayout = new javax.swing.GroupLayout(permTimePanel);\n permTimePanel.setLayout(permTimePanelLayout);\n permTimePanelLayout.setHorizontalGroup(\n permTimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(permTimePanelLayout.createSequentialGroup()\n .addContainerGap(28, Short.MAX_VALUE)\n .addGroup(permTimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(startLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 65, Short.MAX_VALUE)\n .addComponent(endLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(18, 18, 18)\n .addGroup(permTimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(startHourSpinner, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(hourLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(endHourSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(permTimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(startMinSpinner, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(endMinSpinner, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(minuteLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(32, Short.MAX_VALUE))\n );\n permTimePanelLayout.setVerticalGroup(\n permTimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(permTimePanelLayout.createSequentialGroup()\n .addGap(5, 5, 5)\n .addGroup(permTimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(hourLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(minuteLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(permTimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addGroup(permTimePanelLayout.createSequentialGroup()\n .addGroup(permTimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(startHourSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(startMinSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(permTimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(endHourSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(endMinSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(permTimePanelLayout.createSequentialGroup()\n .addComponent(startLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(endLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(20, Short.MAX_VALUE))\n );\n\n genButton.setText(\"Generate\");\n genButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n genButtonActionPerformed(evt);\n }\n });\n\n freqLabel.setText(\"Frequency:\");\n\n occurLabel.setText(\"Occurences:\");\n\n freqCombo.setBorder(javax.swing.BorderFactory.createCompoundBorder());\n freqCombo.setRenderer( new pwnbrew.generic.gui.DefaultCellBorderRenderer(BorderFactory.createEmptyBorder(0, 4, 0, 0)));\n\n occurSpinner.setModel(new javax.swing.SpinnerNumberModel(0, 0, 1000, 1));\n occurSpinner.setMinimumSize(new java.awt.Dimension(40, 20));\n occurSpinner.setPreferredSize(new java.awt.Dimension(40, 20));\n\n javax.swing.GroupLayout schedulePanelLayout = new javax.swing.GroupLayout(schedulePanel);\n schedulePanel.setLayout(schedulePanelLayout);\n schedulePanelLayout.setHorizontalGroup(\n schedulePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(schedulePanelLayout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(genButton)\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(schedulePanelLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(schedulePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(schedulePanelLayout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addGroup(schedulePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(freqLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(occurLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(schedulePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(freqCombo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(occurSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(0, 0, Short.MAX_VALUE))\n .addComponent(permTimePanel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addContainerGap())\n );\n schedulePanelLayout.setVerticalGroup(\n schedulePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(schedulePanelLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(permTimePanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(schedulePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(schedulePanelLayout.createSequentialGroup()\n .addGap(24, 24, 24)\n .addGroup(schedulePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(occurSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(occurLabel)))\n .addGroup(schedulePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(freqLabel)\n .addComponent(freqCombo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(genButton)\n .addGap(35, 35, 35))\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 .addContainerGap()\n .addComponent(checkInPane, javax.swing.GroupLayout.PREFERRED_SIZE, 162, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(schedulePanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(27, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(25, 25, 25)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(schedulePanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(checkInPane, javax.swing.GroupLayout.PREFERRED_SIZE, 291, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(39, Short.MAX_VALUE))\n );\n }", "public void initGui()\n {\n StringTranslate var2 = StringTranslate.getInstance();\n int var4 = this.height / 4 + 48;\n\n this.controlList.add(new GuiButton(1, this.width / 2 - 100, var4 + 24 * 1, \"Offline Mode\"));\n this.controlList.add(new GuiButton(2, this.width / 2 - 100, var4, \"Online Mode\"));\n\n this.controlList.add(new GuiButton(3, this.width / 2 - 100, var4 + 48, var2.translateKey(\"menu.mods\")));\n\t\tthis.controlList.add(new GuiButton(0, this.width / 2 - 100, var4 + 72 + 12, 98, 20, var2.translateKey(\"menu.options\")));\n\t\tthis.controlList.add(new GuiButton(4, this.width / 2 + 2, var4 + 72 + 12, 98, 20, var2.translateKey(\"menu.quit\")));\n this.controlList.add(new GuiButtonLanguage(5, this.width / 2 - 124, var4 + 72 + 12));\n }", "private void createUI(Container pane) {\n try {\n setupTrayIcon();\n } catch (Exception e) { }\n\n EmptyBorder emptyBorder = new EmptyBorder(5, 5, 5, 5);\n GridBagConstraints gbc = new GridBagConstraints();\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.weightx = 1; gbc.ipadx = 2; gbc.gridx = 0;\n gbc.weighty = 0; gbc.ipady = 2; gbc.gridy = 0;\n gbc.anchor = GridBagConstraints.PAGE_START;\n\n try {\n UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\n } catch (ClassNotFoundException | InstantiationException | UnsupportedLookAndFeelException | IllegalAccessException e) {\n LOGGER.error(\"[!] Exception setting system theme:\", e);\n }\n\n ripTextfield = new JTextField(\"\", 20);\n ripTextfield.addMouseListener(new ContextMenuMouseListener());\n ImageIcon ripIcon = new ImageIcon(mainIcon);\n ripButton = new JButton(\"<html><font size=\\\"5\\\"><b>Rip</b></font></html>\", ripIcon);\n stopButton = new JButton(\"<html><font size=\\\"5\\\"><b>Stop</b></font></html>\");\n stopButton.setEnabled(false);\n try {\n Image stopIcon = ImageIO.read(getClass().getClassLoader().getResource(\"stop.png\"));\n stopButton.setIcon(new ImageIcon(stopIcon));\n } catch (Exception ignored) { }\n JPanel ripPanel = new JPanel(new GridBagLayout());\n ripPanel.setBorder(emptyBorder);\n\n gbc.fill = GridBagConstraints.BOTH;\n gbc.weightx = 0;\n gbc.gridx = 0; ripPanel.add(new JLabel(\"URL:\", JLabel.RIGHT), gbc);\n gbc.weightx = 1;\n gbc.weighty = 1;\n gbc.gridx = 1; ripPanel.add(ripTextfield, gbc);\n gbc.weighty = 0;\n gbc.weightx = 0;\n gbc.gridx = 2; ripPanel.add(ripButton, gbc);\n gbc.gridx = 3; ripPanel.add(stopButton, gbc);\n gbc.weightx = 1;\n\n statusLabel = new JLabel(rb.getString(\"inactive\"));\n statusLabel.setHorizontalAlignment(JLabel.CENTER);\n openButton = new JButton();\n openButton.setVisible(false);\n JPanel statusPanel = new JPanel(new GridBagLayout());\n statusPanel.setBorder(emptyBorder);\n\n gbc.gridx = 0; statusPanel.add(statusLabel, gbc);\n gbc.gridy = 1; statusPanel.add(openButton, gbc);\n gbc.gridy = 0;\n\n JPanel progressPanel = new JPanel(new GridBagLayout());\n progressPanel.setBorder(emptyBorder);\n statusProgress = new JProgressBar(0, 100);\n progressPanel.add(statusProgress, gbc);\n\n JPanel optionsPanel = new JPanel(new GridBagLayout());\n optionsPanel.setBorder(emptyBorder);\n optionLog = new JButton(rb.getString(\"Log\"));\n optionHistory = new JButton(rb.getString(\"History\"));\n optionQueue = new JButton(rb.getString(\"Queue\"));\n optionConfiguration = new JButton(rb.getString(\"Configuration\"));\n optionLog.setFont(optionLog.getFont().deriveFont(Font.PLAIN));\n optionHistory.setFont(optionLog.getFont().deriveFont(Font.PLAIN));\n optionQueue.setFont(optionLog.getFont().deriveFont(Font.PLAIN));\n optionConfiguration.setFont(optionLog.getFont().deriveFont(Font.PLAIN));\n try {\n Image icon;\n icon = ImageIO.read(getClass().getClassLoader().getResource(\"comment.png\"));\n optionLog.setIcon(new ImageIcon(icon));\n icon = ImageIO.read(getClass().getClassLoader().getResource(\"time.png\"));\n optionHistory.setIcon(new ImageIcon(icon));\n icon = ImageIO.read(getClass().getClassLoader().getResource(\"list.png\"));\n optionQueue.setIcon(new ImageIcon(icon));\n icon = ImageIO.read(getClass().getClassLoader().getResource(\"gear.png\"));\n optionConfiguration.setIcon(new ImageIcon(icon));\n } catch (Exception e) { }\n gbc.gridx = 0; optionsPanel.add(optionLog, gbc);\n gbc.gridx = 1; optionsPanel.add(optionHistory, gbc);\n gbc.gridx = 2; optionsPanel.add(optionQueue, gbc);\n gbc.gridx = 3; optionsPanel.add(optionConfiguration, gbc);\n\n logPanel = new JPanel(new GridBagLayout());\n logPanel.setBorder(emptyBorder);\n logText = new JTextPane();\n logText.setEditable(false);\n JScrollPane logTextScroll = new JScrollPane(logText);\n logTextScroll.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\n logPanel.setVisible(false);\n logPanel.setPreferredSize(new Dimension(300, 250));\n gbc.fill = GridBagConstraints.BOTH;\n gbc.weighty = 1;\n logPanel.add(logTextScroll, gbc);\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.weighty = 0;\n\n historyPanel = new JPanel(new GridBagLayout());\n historyPanel.setBorder(emptyBorder);\n historyPanel.setVisible(false);\n historyPanel.setPreferredSize(new Dimension(300, 250));\n historyTableModel = new AbstractTableModel() {\n private static final long serialVersionUID = 1L;\n @Override\n public String getColumnName(int col) {\n return HISTORY.getColumnName(col);\n }\n @Override\n public Class<?> getColumnClass(int c) {\n return getValueAt(0, c).getClass();\n }\n @Override\n public Object getValueAt(int row, int col) {\n return HISTORY.getValueAt(row, col);\n }\n @Override\n public int getRowCount() {\n return HISTORY.toList().size();\n }\n @Override\n public int getColumnCount() {\n return HISTORY.getColumnCount();\n }\n @Override\n public boolean isCellEditable(int row, int col) {\n return (col == 0 || col == 4);\n }\n @Override\n public void setValueAt(Object value, int row, int col) {\n if (col == 4) {\n HISTORY.get(row).selected = (Boolean) value;\n historyTableModel.fireTableDataChanged();\n }\n }\n };\n historyTable = new JTable(historyTableModel);\n historyTable.addMouseListener(new HistoryMenuMouseListener());\n historyTable.setAutoCreateRowSorter(true);\n for (int i = 0; i < historyTable.getColumnModel().getColumnCount(); i++) {\n int width = 130; // Default\n switch (i) {\n case 0: // URL\n width = 270;\n break;\n case 3:\n width = 40;\n break;\n case 4:\n width = 15;\n break;\n }\n historyTable.getColumnModel().getColumn(i).setPreferredWidth(width);\n }\n JScrollPane historyTableScrollPane = new JScrollPane(historyTable);\n historyButtonRemove = new JButton(rb.getString(\"remove\"));\n historyButtonClear = new JButton(rb.getString(\"clear\"));\n historyButtonRerip = new JButton(rb.getString(\"re-rip.checked\"));\n gbc.gridx = 0;\n // History List Panel\n JPanel historyTablePanel = new JPanel(new GridBagLayout());\n gbc.fill = GridBagConstraints.BOTH;\n gbc.weighty = 1;\n historyTablePanel.add(historyTableScrollPane, gbc);\n gbc.ipady = 180;\n gbc.gridy = 0;\n historyPanel.add(historyTablePanel, gbc);\n gbc.ipady = 0;\n JPanel historyButtonPanel = new JPanel(new GridBagLayout());\n historyButtonPanel.setPreferredSize(new Dimension(300, 10));\n historyButtonPanel.setBorder(emptyBorder);\n gbc.gridx = 0; historyButtonPanel.add(historyButtonRemove, gbc);\n gbc.gridx = 1; historyButtonPanel.add(historyButtonClear, gbc);\n gbc.gridx = 2; historyButtonPanel.add(historyButtonRerip, gbc);\n gbc.gridy = 1; gbc.gridx = 0;\n gbc.weighty = 0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n historyPanel.add(historyButtonPanel, gbc);\n\n queuePanel = new JPanel(new GridBagLayout());\n queuePanel.setBorder(emptyBorder);\n queuePanel.setVisible(false);\n queuePanel.setPreferredSize(new Dimension(300, 250));\n queueListModel = new DefaultListModel();\n JList queueList = new JList(queueListModel);\n queueList.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);\n queueList.addMouseListener(new QueueMenuMouseListener());\n JScrollPane queueListScroll = new JScrollPane(queueList,\n JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,\n JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);\n for (String item : Utils.getConfigList(\"queue\")) {\n queueListModel.addElement(item);\n }\n updateQueueLabel();\n gbc.gridx = 0;\n JPanel queueListPanel = new JPanel(new GridBagLayout());\n gbc.fill = GridBagConstraints.BOTH;\n gbc.weighty = 1;\n queueListPanel.add(queueListScroll, gbc);\n queuePanel.add(queueListPanel, gbc);\n gbc.fill = GridBagConstraints.HORIZONTAL;\n gbc.weighty = 0;\n gbc.ipady = 0;\n\n configurationPanel = new JPanel(new GridBagLayout());\n configurationPanel.setBorder(emptyBorder);\n configurationPanel.setVisible(false);\n // TODO Configuration components\n configUpdateButton = new JButton(rb.getString(\"check.for.updates\"));\n configUpdateLabel = new JLabel( rb.getString(\"current.version\") + \": \" + UpdateUtils.getThisJarVersion(), JLabel.RIGHT);\n configThreadsLabel = new JLabel(rb.getString(\"max.download.threads\") + \":\", JLabel.RIGHT);\n configTimeoutLabel = new JLabel(rb.getString(\"timeout.mill\"), JLabel.RIGHT);\n configRetriesLabel = new JLabel(rb.getString(\"retry.download.count\"), JLabel.RIGHT);\n configThreadsText = new JTextField(Integer.toString(Utils.getConfigInteger(\"threads.size\", 3)));\n configTimeoutText = new JTextField(Integer.toString(Utils.getConfigInteger(\"download.timeout\", 60000)));\n configRetriesText = new JTextField(Integer.toString(Utils.getConfigInteger(\"download.retries\", 3)));\n configOverwriteCheckbox = addNewCheckbox(rb.getString(\"overwrite.existing.files\"), \"file.overwrite\", false);\n configAutoupdateCheckbox = addNewCheckbox(rb.getString(\"auto.update\"), \"auto.update\", true);\n configPlaySound = addNewCheckbox(rb.getString(\"sound.when.rip.completes\"), \"play.sound\", false);\n configShowPopup = addNewCheckbox(rb.getString(\"notification.when.rip.starts\"), \"download.show_popup\", false);\n configSaveOrderCheckbox = addNewCheckbox(rb.getString(\"preserve.order\"), \"download.save_order\", true);\n configSaveLogs = addNewCheckbox(rb.getString(\"save.logs\"), \"log.save\", false);\n configSaveURLsOnly = addNewCheckbox(rb.getString(\"save.urls.only\"), \"urls_only.save\", false);\n configSaveAlbumTitles = addNewCheckbox(rb.getString(\"save.album.titles\"), \"album_titles.save\", true);\n configClipboardAutorip = addNewCheckbox(rb.getString(\"autorip.from.clipboard\"), \"clipboard.autorip\", false);\n configSaveDescriptions = addNewCheckbox(rb.getString(\"save.descriptions\"), \"descriptions.save\", true);\n configPreferMp4 = addNewCheckbox(rb.getString(\"prefer.mp4.over.gif\"),\"prefer.mp4\", false);\n configWindowPosition = addNewCheckbox(rb.getString(\"restore.window.position\"), \"window.position\", true);\n configURLHistoryCheckbox = addNewCheckbox(rb.getString(\"remember.url.history\"), \"remember.url_history\", true);\n configUrlFileChooserButton = new JButton(rb.getString(\"download.url.list\"));\n\n configLogLevelCombobox = new JComboBox<>(new String[] {\"Log level: Error\", \"Log level: Warn\", \"Log level: Info\", \"Log level: Debug\"});\n configSelectLangComboBox = new JComboBox<>(supportedLanges);\n configLogLevelCombobox.setSelectedItem(Utils.getConfigString(\"log.level\", \"Log level: Debug\"));\n setLogLevel(configLogLevelCombobox.getSelectedItem().toString());\n configSaveDirLabel = new JLabel();\n try {\n String workingDir = (Utils.shortenPath(Utils.getWorkingDirectory()));\n configSaveDirLabel.setText(workingDir);\n configSaveDirLabel.setForeground(Color.BLUE);\n configSaveDirLabel.setCursor(new Cursor(Cursor.HAND_CURSOR));\n } catch (Exception e) { }\n configSaveDirLabel.setToolTipText(configSaveDirLabel.getText());\n configSaveDirLabel.setHorizontalAlignment(JLabel.RIGHT);\n configSaveDirButton = new JButton(rb.getString(\"select.save.dir\") + \"...\");\n\n addItemToConfigGridBagConstraints(gbc, 0, configUpdateLabel, configUpdateButton);\n addItemToConfigGridBagConstraints(gbc, 1, configAutoupdateCheckbox, configLogLevelCombobox);\n addItemToConfigGridBagConstraints(gbc, 2, configThreadsLabel, configThreadsText);\n addItemToConfigGridBagConstraints(gbc, 3, configTimeoutLabel, configTimeoutText);\n addItemToConfigGridBagConstraints(gbc, 4, configRetriesLabel, configRetriesText);\n addItemToConfigGridBagConstraints(gbc, 5, configOverwriteCheckbox, configSaveOrderCheckbox);\n addItemToConfigGridBagConstraints(gbc, 6, configPlaySound, configSaveLogs);\n addItemToConfigGridBagConstraints(gbc, 7, configShowPopup, configSaveURLsOnly);\n addItemToConfigGridBagConstraints(gbc, 8, configClipboardAutorip, configSaveAlbumTitles);\n addItemToConfigGridBagConstraints(gbc, 9, configSaveDescriptions, configPreferMp4);\n addItemToConfigGridBagConstraints(gbc, 10, configWindowPosition, configURLHistoryCheckbox);\n addItemToConfigGridBagConstraints(gbc, 11, configSelectLangComboBox, configUrlFileChooserButton);\n addItemToConfigGridBagConstraints(gbc, 12, configSaveDirLabel, configSaveDirButton);\n\n\n\n\n emptyPanel = new JPanel();\n emptyPanel.setPreferredSize(new Dimension(0, 0));\n emptyPanel.setSize(0, 0);\n\n gbc.anchor = GridBagConstraints.PAGE_START;\n gbc.gridy = 0; pane.add(ripPanel, gbc);\n gbc.gridy = 1; pane.add(statusPanel, gbc);\n gbc.gridy = 2; pane.add(progressPanel, gbc);\n gbc.gridy = 3; pane.add(optionsPanel, gbc);\n gbc.weighty = 1;\n gbc.fill = GridBagConstraints.BOTH;\n gbc.gridy = 4; pane.add(logPanel, gbc);\n gbc.gridy = 5; pane.add(historyPanel, gbc);\n gbc.gridy = 5; pane.add(queuePanel, gbc);\n gbc.gridy = 5; pane.add(configurationPanel, gbc);\n gbc.gridy = 5; pane.add(emptyPanel, gbc);\n gbc.weighty = 0;\n gbc.fill = GridBagConstraints.HORIZONTAL;\n }", "private void setupUI(){\n this.setupTimerSchedule(controller, 0, 500);\n this.setupFocusable(); \n this.setupSensSlider();\n this.setupInitEnable();\n this.setupDebugger();\n }", "public void GUISetup(){\n simTime.setText(\"50\");\n qMean.setText(\"24\");\n dMean.setText(\"45\");\n pMean.setText(\"55\");\n changeNorth.add(simTime2);\n changeNorth.add(simTime);\n changeNorth.add(pMean2);\n changeNorth.add(pMean);\n changeNorth.add(dMean2);\n changeNorth.add(dMean);\n changeNorth.add(qMean2);\n changeNorth.add(qMean);\n changeSouth.add(okay);\n \n resultDisplay.setEditable(false);\n descriptionDisplay.setEditable(false);\n \n changeFrame.add(changeNorth, BorderLayout.NORTH);\n changeFrame.add(changeSouth, BorderLayout.SOUTH);\n \n center.add(totalCus, BorderLayout.CENTER);\n center.add(doorCus, BorderLayout.CENTER);\n center.add(phoneCus, BorderLayout.CENTER);\n center.add(unhelped, BorderLayout.CENTER);\n\n help.add(programDescription);\n menuBar.add(help);\n north.add(menuBar);\n \n frame.setBounds(650, 400, 500, 200);\n changeFrame.setBounds(500, 400, 1100, 145);\n resultFrame.setBounds(500, 200, 600, 500);\n dFrame.setBounds(500, 200, 600, 500);\n frame.add(north, BorderLayout.NORTH);\n frame.add(south, BorderLayout.SOUTH);\n frame.add(center, BorderLayout.CENTER);\n frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n resultFrame.add(scroll);\n dFrame.add(dScroll);\n showDetails.setEnabled(false);\n \n south.add(runSim);\n south.add(showDetails);\n south.add(changeSimProp);\n \n time = simTime.getText();\n questionT = qMean.getText();\n phoneT = pMean.getText();\n doorT = dMean.getText();\n frame.setVisible(true);\n buttonFunctions();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n modificarHora1 = new javax.swing.JButton();\n sendHour1 = new javax.swing.JButton();\n jScrollPane1 = new javax.swing.JScrollPane();\n clock1 = new javax.swing.JTextArea();\n jScrollPane2 = new javax.swing.JScrollPane();\n clock2 = new javax.swing.JTextArea();\n jScrollPane3 = new javax.swing.JScrollPane();\n clock3 = new javax.swing.JTextArea();\n host1 = new javax.swing.JLabel();\n host2 = new javax.swing.JLabel();\n host3 = new javax.swing.JLabel();\n modificarHora2 = new javax.swing.JButton();\n sendHour2 = new javax.swing.JButton();\n sendHour3 = new javax.swing.JButton();\n modificarHora3 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n modificarHora1.setText(\"Modificar Hora\");\n modificarHora1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n modificarHora1ActionPerformed(evt);\n }\n });\n\n sendHour1.setText(\"Enviar\");\n sendHour1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n sendHour1ActionPerformed(evt);\n }\n });\n\n jScrollPane1.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);\n jScrollPane1.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);\n\n clock1.setColumns(20);\n clock1.setFont(new java.awt.Font(\"Avenir\", 1, 90)); // NOI18N\n clock1.setRows(5);\n jScrollPane1.setViewportView(clock1);\n\n jScrollPane2.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);\n jScrollPane2.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);\n\n clock2.setColumns(20);\n clock2.setFont(new java.awt.Font(\"Avenir\", 1, 90)); // NOI18N\n clock2.setRows(5);\n jScrollPane2.setViewportView(clock2);\n\n jScrollPane3.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);\n jScrollPane3.setVerticalScrollBarPolicy(javax.swing.ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER);\n\n clock3.setColumns(20);\n clock3.setFont(new java.awt.Font(\"Avenir\", 1, 90)); // NOI18N\n clock3.setRows(5);\n jScrollPane3.setViewportView(clock3);\n\n modificarHora2.setText(\"Modificar Hora\");\n modificarHora2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n modificarHora2ActionPerformed(evt);\n }\n });\n\n sendHour2.setText(\"Enviar\");\n sendHour2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n sendHour2ActionPerformed(evt);\n }\n });\n\n sendHour3.setText(\"Enviar\");\n sendHour3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n sendHour3ActionPerformed(evt);\n }\n });\n\n modificarHora3.setText(\"Modificar Hora\");\n modificarHora3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n modificarHora3ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(host3, javax.swing.GroupLayout.PREFERRED_SIZE, 456, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(host2, javax.swing.GroupLayout.PREFERRED_SIZE, 456, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 456, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 456, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(host1, javax.swing.GroupLayout.PREFERRED_SIZE, 456, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 456, javax.swing.GroupLayout.PREFERRED_SIZE)))))\n .addGap(47, 47, 47)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(modificarHora1)\n .addGap(35, 35, 35)\n .addComponent(sendHour1))\n .addGroup(layout.createSequentialGroup()\n .addComponent(modificarHora2)\n .addGap(35, 35, 35)\n .addComponent(sendHour2)))\n .addGroup(layout.createSequentialGroup()\n .addComponent(modificarHora3)\n .addGap(35, 35, 35)\n .addComponent(sendHour3)))\n .addContainerGap(26, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(30, 30, 30)\n .addComponent(host1, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(77, 77, 77)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(modificarHora1)\n .addComponent(sendHour1)))\n .addGroup(layout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 136, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 22, Short.MAX_VALUE)\n .addComponent(host2, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 136, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(64, 64, 64)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(modificarHora2)\n .addComponent(sendHour2))))\n .addGap(22, 22, 22)\n .addComponent(host3, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 136, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(26, 26, 26))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(modificarHora3)\n .addComponent(sendHour3))\n .addGap(75, 75, 75))))\n );\n\n pack();\n setLocationRelativeTo(null);\n }", "public static void main(String[] args) throws IOException, FontFormatException {\n clockDesign = new display(clock.gethour(),true);\n clockDesign.setVisible(true);\n //clockDesign.getHours1().setBackground(new Color(0,0,0));\n clockDesign.getAlarm().addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n alarmDesign.setVisible(true);\n alarmDesign.getSetAlarm().addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n alarm.setAlarmHour(Integer.parseInt(alarmDesign.getHours().getText().toString()));\n alarm.setAlarmMinute(Integer.parseInt(alarmDesign.getMinutes().getText().toString()));\n Alarm.setFlag(1);\n clockDesign.setVisible(true);\n }\n });\n }\n });\n\n Timer timer = new Timer();\n timer.schedule(new DigitalClockProject(), 0, 1000);\n }", "private void initialize() {\r\n\t\tframe = new JFrame(\"CarParkingManagementSystem\");\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\tJLabel lblSetTime = new JLabel(\"Set Time\");\r\n\t\tlblSetTime.setBounds(59, 114, 88, 26);\r\n\t\tframe.getContentPane().add(lblSetTime);\r\n\t\t\r\n\t\tJTextField settime = new JTextField();\r\n\t\tsettime.setBounds(171, 116, 148, 23);\r\n\t\tframe.getContentPane().add(settime);\r\n\t\tsettime.setColumns(10);\r\n\t\t\r\n\t\tJLabel lblMin = new JLabel(\"min\");\r\n\t\tlblMin.setBounds(329, 120, 46, 14);\r\n\t\tframe.getContentPane().add(lblMin);\r\n\t\t\r\n\t\tJButton ok = new JButton(\"ok\");\r\n\t\tok.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t}\r\n\t\t});\r\n\t\tok.setBounds(169, 202, 89, 23);\r\n\t\tframe.getContentPane().add(ok);\r\n\t}", "public ClockView(SimulatorModel model) {\n super(model);\n clock = new JLabel(\"test\");\n add(clock);\n updateView();\n setVisible(true);\n }", "void guiInit(){\n //Some default names used\n Label label;\n Container container;\n Font font;\n\n GridBagConstraints c = new GridBagConstraints();\n\n font = new Font(\"Dialog\",Font.PLAIN,12);\n \n container = this;\n //container = new Panel();\n container.setLayout(new GridBagLayout());\n container.setFont(font);\n container.setBackground(SystemColor.menu);\n c.insets = new Insets(3,3,3,3);\n \n c.gridx=0; c.gridy=0;\n c.gridwidth=1; c.gridheight=1;\n c.anchor=GridBagConstraints.NORTHEAST;\n label = new Label(\"Host:\");\n container.add(label,c);\n \n c.gridx=1; c.gridy=0;\n c.gridwidth=2; c.gridheight=1;\n c.anchor=GridBagConstraints.NORTHWEST;\n host_text = new TextField(\"socks-proxy\",15);\n container.add(host_text,c);\n \n c.gridx=3; c.gridy=0;\n c.gridwidth=1; c.gridheight=1;\n c.anchor=GridBagConstraints.NORTHEAST;\n label = new Label(\"Port:\");\n container.add(label,c);\n \n c.gridx=4; c.gridy=0;\n c.gridwidth=1; c.gridheight=1;\n c.anchor=GridBagConstraints.NORTHWEST;\n port_text = new TextField(\"1080\",5);\n container.add(port_text,c);\n \n c.gridx=0; c.gridy=1;\n c.gridwidth=3; c.gridheight=1;\n c.anchor=GridBagConstraints.NORTH;\n socks4radio = new Checkbox(\"Socks4\",socks_group,false);\n //1.0 compatible code\n //socks4radio = new Checkbox(\"Socks4\",false);\n //socks4radio.setCheckboxGroup(socks_group);\n socks4radio.setFont(new Font(font.getName(),Font.BOLD,14));\n container.add(socks4radio,c);\n \n c.gridx=3; c.gridy=1;\n c.gridwidth=2; c.gridheight=1;\n c.anchor=GridBagConstraints.NORTH;\n socks5radio = new Checkbox(\"Socks5\",socks_group,true);\n //1.0 compatible code\n //socks5radio = new Checkbox(\"Socks5\",true);\n //socks5radio.setCheckboxGroup(socks_group);\n socks5radio.setFont(new Font(font.getName(),Font.BOLD,14));\n container.add(socks5radio,c);\n \n c.gridx=0; c.gridy=2;\n c.gridwidth=1; c.gridheight=1;\n c.anchor=GridBagConstraints.EAST;\n label = new Label(\"User Id:\");\n container.add(label,c);\n \n c.gridx=1; c.gridy=2;\n c.gridwidth=2; c.gridheight=1;\n c.anchor=GridBagConstraints.NORTHWEST;\n user_text = new TextField(\"\",15);\n user_text.setEnabled(false);\n container.add(user_text,c);\n \n c.gridx=3; c.gridy=2;\n c.gridwidth=2; c.gridheight=1;\n c.anchor=GridBagConstraints.NORTH;\n label = new Label(\"Authentication\");\n label.setFont(new Font(font.getName(),Font.BOLD,14));\n container.add(label,c);\n \n c.gridx=0; c.gridy=3;\n c.gridwidth=1; c.gridheight=1;\n c.anchor=GridBagConstraints.EAST;\n label = new Label(\"Password:\");\n container.add(label,c);\n \n c.gridx=1; c.gridy=3;\n c.gridwidth=2; c.gridheight=1;\n c.anchor=GridBagConstraints.NORTHWEST;\n password_text = new TextField(\"\",15);\n password_text.setEchoChar('*');\n password_text.setEnabled(false);\n //password_text.setEchoCharacter('*');//1.0\n container.add(password_text,c);\n \n c.gridx=3; c.gridy=3;\n c.gridwidth=2; c.gridheight=1;\n c.anchor=GridBagConstraints.NORTHWEST;\n none_check = new Checkbox(\"None\",true);\n container.add(none_check,c);\n \n c.gridx=0; c.gridy=4;\n c.gridwidth=3; c.gridheight=1;\n c.anchor=GridBagConstraints.NORTH;\n label = new Label(\"Direct Hosts\");\n label.setFont(new Font(font.getName(),Font.BOLD,14));\n container.add(label,c);\n \n c.gridx=3; c.gridy=4;\n c.gridwidth=2; c.gridheight=1;\n c.anchor=GridBagConstraints.NORTHWEST;\n up_check = new Checkbox(\"User/Password\",false);\n container.add(up_check,c);\n \n c.gridx=0; c.gridy=5;\n c.gridwidth=3; c.gridheight=2;\n c.anchor=GridBagConstraints.NORTHWEST;\n c.fill = GridBagConstraints.BOTH;\n direct_list = new List(3);\n container.add(direct_list,c);\n \n c.gridx=3; c.gridy=5;\n c.gridwidth=2; c.gridheight=1;\n c.anchor=GridBagConstraints.NORTHWEST;\n gssapi_check = new Checkbox(\"GSSAPI\",false);\n gssapi_check.setEnabled(false);\n container.add(gssapi_check,c);\n \n c.gridx=0; c.gridy=7;\n c.gridwidth=3; c.gridheight=1;\n c.anchor=GridBagConstraints.NORTHWEST;\n direct_text = new TextField(\"\",25);\n container.add(direct_text,c);\n \n c.gridx=3; c.gridy=7;\n c.gridwidth=1; c.gridheight=1;\n c.anchor=GridBagConstraints.NORTH;\n add_button = new Button(\"Add\");\n container.add(add_button,c);\n \n c.gridx=3; c.gridy=6;\n c.gridwidth=1; c.gridheight=1;\n c.anchor=GridBagConstraints.NORTH;\n remove_button = new Button(\"Remove\");\n container.add(remove_button,c);\n \n c.gridx=1; c.gridy=8;\n c.gridwidth=1; c.gridheight=1;\n c.anchor=GridBagConstraints.NORTH;\n cancel_button = new Button(\"Cancel\");\n container.add(cancel_button,c);\n \n c.gridx=0; c.gridy=8;\n c.gridwidth=1; c.gridheight=1;\n c.anchor=GridBagConstraints.NORTHWEST;\n ok_button = new Button(\"OK\");\n container.add(ok_button,c);\n\n //up_check.setEnabled(false);\n\n //Warning Dialog\n dismiss_button = new Button(\"Dismiss\");\n warning_label = new Label(\"\",Label.CENTER);\n warning_label.setFont(new Font(\"Dialog\",Font.BOLD,15));\n\n Panel p = new Panel();\n p.add(dismiss_button);\n warning_dialog.add(p,BorderLayout.SOUTH);\n warning_dialog.add(warning_label,BorderLayout.CENTER);\n warning_dialog.setResizable(false);\n }", "public MainUI() throws UnknownHostException {\n initComponents();\n //server();\n Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\nwidth = screenSize.getWidth();\n height = screenSize.getHeight();\n setIcon();\n \n }", "@SuppressWarnings(\"unchecked\")\r\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\r\n private void initComponents() {\r\n\r\n start = new javax.swing.JButton();\r\n storno = new javax.swing.JButton();\r\n jLabel1 = new javax.swing.JLabel();\r\n canvasWidth = new javax.swing.JSpinner();\r\n canvasHeight = new javax.swing.JSpinner();\r\n jLabel2 = new javax.swing.JLabel();\r\n jLabel4 = new javax.swing.JLabel();\r\n serverName = new javax.swing.JTextField();\r\n jLabel3 = new javax.swing.JLabel();\r\n portEdit = new javax.swing.JFormattedTextField();\r\n\r\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\r\n setTitle(\"Spustit server\");\r\n\r\n start.setText(\"Spustit\");\r\n start.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n startActionPerformed(evt);\r\n }\r\n });\r\n\r\n storno.setText(\"Storno\");\r\n storno.addActionListener(new java.awt.event.ActionListener() {\r\n public void actionPerformed(java.awt.event.ActionEvent evt) {\r\n stornoActionPerformed(evt);\r\n }\r\n });\r\n\r\n jLabel1.setText(\"Rozměry plátna:\");\r\n jLabel1.setToolTipText(\"\");\r\n\r\n jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\r\n jLabel2.setText(\"×\");\r\n\r\n jLabel4.setText(\"Název:\");\r\n\r\n serverName.setText(\"New server\");\r\n\r\n jLabel3.setText(\"Port:\");\r\n\r\n portEdit.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat(\"#\"))));\r\n portEdit.setText(\"1234\");\r\n\r\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\r\n getContentPane().setLayout(layout);\r\n layout.setHorizontalGroup(\r\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(layout.createSequentialGroup()\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\r\n .addGroup(layout.createSequentialGroup()\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(layout.createSequentialGroup()\r\n .addGap(30, 30, 30)\r\n .addComponent(jLabel1))\r\n .addGroup(layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addComponent(jLabel4))\r\n .addGroup(layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\r\n .addComponent(storno, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n .addComponent(canvasWidth))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\r\n .addComponent(canvasHeight)\r\n .addComponent(start, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))\r\n .addGap(0, 0, Short.MAX_VALUE))\r\n .addGroup(layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addComponent(serverName)\r\n .addGroup(layout.createSequentialGroup()\r\n .addComponent(jLabel3)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(portEdit)))))\r\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\r\n );\r\n layout.setVerticalGroup(\r\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\r\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\r\n .addContainerGap()\r\n .addComponent(jLabel4)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(serverName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(jLabel3)\r\n .addComponent(portEdit, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addComponent(jLabel1)\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(canvasWidth, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(canvasHeight, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\r\n .addComponent(jLabel2))\r\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\r\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\r\n .addComponent(storno)\r\n .addComponent(start))\r\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\r\n );\r\n\r\n pack();\r\n }", "private void initialize() {\r\n\r\n\t\ttitleFont = new Font(\"宋体\", Font.BOLD + Font.PLAIN, 16);\r\n\t\tfont = new Font(\"宋体\", Font.PLAIN, 12);\r\n\t\ttry {\r\n\t\t\tcolor = new Color(Integer.parseInt(\"D3D3D3\", 16));\r\n\t\t} catch (NumberFormatException e) {\r\n\t\t\t// codes to deal with this exception\r\n\t\t}\r\n\t\tdaojLabel = new JLabel();\r\n\t\tdaojLabel.setBounds(new Rectangle(255, 33, 15, 18));\r\n\t\tdaojLabel.setText(\"到\");\r\n\t\tdaojLabel.setFont(font);\r\n\t\tdaojLabel.setForeground(color);\r\n\t\tcxsjjLabel = new JLabel();\r\n\t\tcxsjjLabel.setBounds(new Rectangle(92, 33, 59, 18));\r\n\t\tcxsjjLabel.setText(\"查询时间:\");\r\n\t\tcxsjjLabel.setFont(font);\r\n\t\tcxsjjLabel.setForeground(color);\r\n\t\t// 设置导航panel\r\n\t\tnavigatePanel = new JPanel();\r\n\t\tnavigatePanel.setLayout(null);\r\n\t\tnavigatePanel.add(this.getProjButton());\r\n\t\tnavigatePanel.add(this.getNextjButton());\r\n\t\tnavigatePanel.setBounds(new Rectangle(95, 510, 788, 20));\r\n\t\tColor color = new Color(35, 35, 35);\r\n\t\t// navigatePanel.setBackground(Color.GRAY);\r\n\t\tnavigatePanel.setBackground(color);\r\n\t\tthis.add(navigatePanel);\r\n\r\n\t\tthis.setSize(976, 601);\r\n\t\tthis.setLayout(null);\r\n\t\tthis.add(cxsjjLabel, null);\r\n\t\tthis.add(getBegjTextField(), null);\r\n\t\tthis.add(daojLabel, null);\r\n\t\tthis.add(getEndjTextField(), null);\r\n\t\tthis.add(getCxjButton(), null);\r\n\r\n\t\tgetylcs = new GetYlcs();\r\n\t\tthis.add(getMainjPanel(), null);\r\n\r\n\t}", "public void uiBuilder(){\n fontLoader();\n\n jfFrame = new JFrame(String.format(\"Coronos - %s\", username));\n jfFrame.setLayout(new BorderLayout());\n //Instantiate JFrame, add Title, add LayoutManager GridLayout\n\n\n jmMenuBar = new JMenuBar();\n //Instantiate JMenuBar\n\n jmFile = new JMenu(\"File\");\n jmHelp = new JMenu(\"Help\");\n //Adding Menus to JMenuBar\n\n jmExit = new JMenuItem(\"Exit\");\n jmAbout = new JMenuItem(\"About\");\n //Instantiating Options for JMenus\n\n jmExit.addActionListener(this);\n jmAbout.addActionListener(this);\n\n jmFile.add(jmExit);\n jmHelp.add(jmAbout);\n //adding Options to JMenus\n\n jmMenuBar.add(jmFile);\n jmMenuBar.add(jmHelp);\n //adding JMenus to JMenuBar\n\n jfFrame.setJMenuBar(jmMenuBar);\n //adding JMenuBar to JFrame\n\n jpClockPanel = new JPanel(new FlowLayout());\n jpContainerPanel = new JPanel(new FlowLayout());\n Border blackLine = BorderFactory.createTitledBorder(\"Current Time\");\n jpClockPanel.setBorder(blackLine);\n //instantiate JPanel for clock\n\n clockLabelOne = new JLabel();\n clockLabelOne.setFont(customFont);\n clockLabelOne.setForeground(Color.BLACK);\n jpClockPanel.add(clockLabelOne);\n //instantiating JLabel, setting Font and Color, adding to clockPanel\n\n clockLabelTwo = new JLabel();\n clockLabelTwo.setFont(customFont);\n clockLabelTwo.setForeground(Color.BLACK);\n jpClockPanel.add(clockLabelTwo);\n clockLabelTwo.setVisible(false);\n //instantiating JLabel, setting Font and Color, adding to clockPanel\n\n jpGridPanel1 = new JPanel(new GridLayout(4, 1, 15, 15));\n jpGridPanel2 = new JPanel(new GridLayout(4, 1, 15, 15));\n\n jbPunchIn = new JButton(\"Punch In\");\n jbReport = new JButton(\"View Report\");\n jbProfile = new JButton(\"View Profile\");\n jbSave = new JButton(\"Save\");\n jbPunchOut = new JButton(\"Punch Out\");\n jbViewPunches = new JButton(\"View Punches\");\n jbFormatTime = new JButton(\"12/24HR Time\");\n jbHideChat = new JButton(\"Hide Chat\");\n\n jbHideChat.setToolTipText(\"Hate your co-workers? Want to hide from your boss? Just close chat!\");\n\n jbPunchIn.addActionListener(this);\n jbReport.addActionListener(this);\n jbProfile.addActionListener(this);\n jbSave.addActionListener(this);\n jbPunchOut.addActionListener(this);\n jbViewPunches.addActionListener(this);\n jbFormatTime.addActionListener(this);\n jbHideChat.addActionListener(this);\n\n jpGridPanel1.add(jbPunchIn);\n jpGridPanel1.add(jbReport);\n jpGridPanel1.add(jbProfile);\n jpGridPanel1.add(jbSave);\n\n jpGridPanel2.add(jbPunchOut);\n jpGridPanel2.add(jbViewPunches);\n jpGridPanel2.add(jbFormatTime);\n jpGridPanel2.add(jbHideChat);\n\n jpActionPanel = new JPanel(new FlowLayout());\n Border actionBorder = BorderFactory.createTitledBorder(\"Employee Actions\");\n jpActionPanel.setBorder(actionBorder);\n jpActionPanel.add(jpGridPanel1);\n jpActionPanel.add(jpGridPanel2);\n jpContainerPanel.add(jpActionPanel);\n\n jpChatPanel = new JPanel(new BorderLayout());\n jpAreaPanel = new JPanel(new FlowLayout());\n jtaChatArea = new JTextArea(10, 10);\n jtaChatArea.setLineWrap(true);\n jtaChatArea.setWrapStyleWord(true);\n jtaChatArea.setEditable(false);\n jspChatPane = new JScrollPane(jtaChatArea);\n jtfChatField = new JTextField(12);\n jtfChatField.addActionListener(this);\n jtfChatField.setActionCommand(\"Send\");\n chatButton = new JButton(\"Send\");\n chatButton.addActionListener(this);\n jpSendPanel = new JPanel(new FlowLayout());\n jpSendPanel.add(jtfChatField);\n jpSendPanel.add(chatButton);\n Border chatBorder = BorderFactory.createTitledBorder(\"Chat\");\n jpChatPanel.setBorder(chatBorder);\n jpChatPanel.add(jspChatPane, BorderLayout.NORTH);\n jpChatPanel.add(jpSendPanel, BorderLayout.SOUTH);\n jpContainerPanel.add(jpChatPanel);\n\n // jfFrame.add(clockPanelTwo, BorderLayout.NORTH);\n jfFrame.add(jpClockPanel, BorderLayout.NORTH);\n jfFrame.add(jpContainerPanel, BorderLayout.SOUTH);\n\n //adding JPanels to JFrame\n\n jfFrame.setLocationRelativeTo(null);\n jfFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n jfFrame.setVisible(false);\n jfFrame.pack();\n jfFrame.setSize(600, 375);\n jfFrame.setResizable(false);\n \n //settings for frame\n\n ActionListener clockUpdateOne = new ActionListener(){\n /**\n * actionPerformed: A method to handle Events from a Timer\n * @param ae an ActionEvent\n */\n public void actionPerformed(ActionEvent ae){\n Date date = new Date();\n //instantiate new Date object\n\n DateFormat format = new SimpleDateFormat(\"E, MMM d y HH:mm:ss\");\n //set format of clock\n\n DateFormat otherFormat = new SimpleDateFormat(\"E, MMM, d y KK:mm:ss a\");\n //12 hour time\n\n String dateTime = format.format(date);\n //formatting date object using format template\n\n String otherDateTime = otherFormat.format(date);\n\n clockLabelOne.setText(dateTime);\n //setting clock text to formatted String\n }\n };\n clockTimerOne = new javax.swing.Timer(0, clockUpdateOne);\n clockTimerOne.start();\n //timer to update clockLabel\n ActionListener clockUpdateTwo = new ActionListener(){\n /**\n * actionPerformed: A method to handle Events from a Timer\n * @param ae an ActionEvent\n */\n public void actionPerformed(ActionEvent ae){\n Date date = new Date();\n //instantiate new Date object\n\n DateFormat otherFormat = new SimpleDateFormat(\"E, MMM, d y K:mm:ss a\");\n //12 hour time\n\n String otherDateTime = otherFormat.format(date);\n\n clockLabelTwo.setText(otherDateTime);\n //setting clock text to formatted String\n }\n };\n clockTimerTwo = new javax.swing.Timer(0, clockUpdateTwo);\n clockTimerTwo.start();\n\n }", "@Override\r\n\tpublic void createControl(Composite parent) {\r\n\t\t// the container\r\n\t\tcontainer = new Composite(parent, SWT.NULL);\r\n\t\tFillLayout fillLayout = new FillLayout();\r\n\t\tfillLayout.type = SWT.VERTICAL;\r\n\t\tcontainer.setLayout(fillLayout);\r\n\r\n\t\t// the status of the connection\r\n\t\tconnectionStatus = new CLabel(container, SWT.LEFT);\r\n\t\t// the image to display\r\n\t\tif (NetSource.getInstance().getConnection() != null) {\r\n\t\t\tsetTitle(\"Verbindung hergestellt\");\r\n\t\t\tsetDescription(\"Die Ausführung des Assistenten ist nicht notwendig\");\r\n\t\t\t// show true image\r\n\t\t\tconnectionStatus.setText(\"Es besteht bereits eine Verbindung zum Server.\\n\" + \"Die Ausführung des Assistenten is nicht nötig\");\r\n\t\t\tconnectionStatus.setImage(ImageFactory.getInstance().getRegisteredImage(\"wizars.server.connected\"));\r\n\t\t}\r\n\t\telse {\r\n\t\t\tsetTitle(\"Verbindung zum Server unterbrochen\");\r\n\t\t\tsetDescription(\"Mit diesem Assistenten können sie eine neue Verbindung aufbauen\");\r\n\t\t\t// show true image\r\n\t\t\tconnectionStatus.setText(\"Verbindung zum Server wurde unterbrochen.\\n\"\r\n\t\t\t\t\t+ \"Mit diesem Wizard kann die Verbindung zum Server wiederhergstellt werden\");\r\n\t\t\tconnectionStatus.setImage(ImageFactory.getInstance().getRegisteredImage(\"wizard.server.disconnected\"));\r\n\r\n\t\t\t// the label\r\n\t\t\tinfoText = new CLabel(container, SWT.LEFT);\r\n\t\t\tinfoText.setText(\"Klicken Sie auf weiter um einen neuen Server auszuwählen.\");\r\n\t\t}\r\n\t\t// Required to avoid an error in the system\r\n\t\tsetControl(container);\r\n\t}", "public GuiStart()\r\n \r\n {\r\n \r\n super(\"Transfer-Client \" + Conf.VERSION);\r\n \r\n // -----------------------------------------//\r\n // Icon, Frame-Zentrierung, Exit-Operation //\r\n // -----------------------------------------//\r\n \r\n this.setIconImage(Conf.IMAGE_FOR_ICON);\r\n \r\n // Frame-Zentrierung\r\n this.setSize(WIDTH, HEIGHT);\r\n Dimension frameSize = getSize();\r\n Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\r\n int x = (screenSize.width - frameSize.width) / 2;\r\n int y = (screenSize.height - frameSize.height) / 2;\r\n this.setLocation(x, y);\r\n \r\n // Exit-Operation definieren\r\n this.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);\r\n \r\n JPanel panel = new JPanel();\r\n panel.setBorder(new EmptyBorder(20, 20, 20, 20));\r\n panel.setLayout(new BoxLayout(panel, BoxLayout.Y_AXIS));\r\n \r\n // --------------//\r\n // Inneres Panel //\r\n // --------------//\r\n JPanel innerpanel = new JPanel();\r\n FlowLayout flowlayout = new FlowLayout(FlowLayout.LEFT,5,5);\r\n innerpanel.setLayout(flowlayout);\r\n \r\n // ---------------------------------------------//\r\n // Inneres Panel: Linke Seite: Bild hinzufuegen //\r\n // ---------------------------------------------//\r\n JLabel bild = new JLabel(Conf.IMAGE_ICON_LOGO);\r\n innerpanel.add(bild);\r\n \r\n \r\n // ----------------------------------------------//\r\n // Inneres Panel: Rechte Seite: Text hinzufuegen //\r\n // ----------------------------------------------//\r\n //Panel fuer Text1 und Text2\r\n JPanel textpanel = new JPanel();\r\n GridLayout gridlayout = new GridLayout(4,1); //Es sind 4 Texte untereinander.\r\n textpanel.setLayout(gridlayout);\r\n \r\n //Titelzeile\r\n JLabel titel = new JLabel(\"Initialization\");\r\n Font font_titel = new Font(\"Sans Serif\", Font.BOLD, 16);\r\n titel.setFont(font_titel);\r\n textpanel.add(titel);\r\n \r\n //Erste Textzeile: Statusfeld 1\r\n Font font_status = new Font(\"Sans Serif\", Font.PLAIN, 12);\r\n this.statusfield1 = new JLabel(\"\"); \r\n this.statusfield1.setFont(font_status);\r\n textpanel.add(this.statusfield1);\r\n \r\n //Zweite Textzeile: Statusfeld 2\r\n this.statusfield2 = new JLabel(\"\");\r\n this.statusfield2.setFont(font_status);\r\n textpanel.add(this.statusfield2);\r\n \r\n //Dritte Textzeile: Statusfeld 3\r\n this.statusfield3 = new JLabel(\"\");\r\n this.statusfield3.setFont(font_status);\r\n textpanel.add(this.statusfield3);\r\n \r\n innerpanel.add(textpanel);\r\n \r\n // ----------------------------------------------//\r\n // Inneres Panel dem aeusseren Panel hinzufuegen //\r\n // ----------------------------------------------//\r\n panel.add(innerpanel);\r\n \r\n // Zwischenraum\r\n JLabel empty = new JLabel(\"\");\r\n panel.add(empty);\r\n \r\n // ------------//\r\n // GUI-Objekt //\r\n // ------------//\r\n this.setContentPane(panel);\r\n this.setResizable(false);\r\n this.setVisible(true);\r\n \r\n }", "public CarRentalGUI() {\n initComponents();\n this.setLocationRelativeTo(null);\n\n //set outer border\n Border globalBorder = BorderFactory.createMatteBorder(1, 1, 1, 1, Color.BLUE);\n jPanel6.setBorder(globalBorder);\n\n Border labelBorder = BorderFactory.createMatteBorder(1, 1, 1, 1, Color.black);\n minimazeLabel.setBorder(labelBorder);\n closeLabel.setBorder(labelBorder);\n\n createSocket();\n fillExistCombo();\n }", "private void initComponents()\n {\n setBG = new javax.swing.ButtonGroup();\n nameTF = new javax.swing.JTextField();\n jLabel1 = new javax.swing.JLabel();\n jPanel1 = new javax.swing.JPanel();\n manualmodeTB = new javax.swing.JToggleButton();\n jSeparator1 = new javax.swing.JSeparator();\n jLabel2 = new javax.swing.JLabel();\n routeCB = new javax.swing.JComboBox();\n setButton = new javax.swing.JButton();\n jLabel3 = new javax.swing.JLabel();\n signalTF = new javax.swing.JTextField();\n showSignalButton = new javax.swing.JButton();\n jLabel5 = new javax.swing.JLabel();\n messageLabel = new javax.swing.JLabel();\n pathCB = new javax.swing.JComboBox();\n route_RB = new javax.swing.JRadioButton();\n path_RB = new javax.swing.JRadioButton();\n closeButton = new javax.swing.JButton();\n nextRouteCB = new javax.swing.JComboBox();\n jLabel6 = new javax.swing.JLabel();\n showTrainButton = new javax.swing.JButton();\n\n setTitle(\"Manuelle Zugsteuerung\");\n addWindowListener(new java.awt.event.WindowAdapter()\n {\n public void windowClosing(java.awt.event.WindowEvent evt)\n {\n formWindowClosing(evt);\n }\n });\n\n nameTF.setEditable(false);\n\n jLabel1.setText(\"Zug\");\n\n jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Manuelle Zugsteuerung\"));\n manualmodeTB.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/org/railsim/gui/resources/disable path.png\")));\n manualmodeTB.setText(\"manuelle Steuerung\");\n manualmodeTB.addActionListener(new java.awt.event.ActionListener()\n {\n public void actionPerformed(java.awt.event.ActionEvent evt)\n {\n manualmodeTBActionPerformed(evt);\n }\n });\n\n jLabel2.setText(\"Welche Route soll beim n\\u00e4chsten Signal genommen werden?\");\n\n setButton.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/org/railsim/gui/resources/pathroutes.png\")));\n setButton.setText(\"setzen\");\n setButton.setEnabled(false);\n setButton.addActionListener(new java.awt.event.ActionListener()\n {\n public void actionPerformed(java.awt.event.ActionEvent evt)\n {\n setButtonActionPerformed(evt);\n }\n });\n\n jLabel3.setText(\"Signal\");\n\n signalTF.setEditable(false);\n\n showSignalButton.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/org/railsim/gui/resources/show.png\")));\n showSignalButton.setToolTipText(\"Signal zeigen\");\n showSignalButton.setEnabled(false);\n showSignalButton.setMargin(new java.awt.Insets(1, 2, 1, 2));\n showSignalButton.addActionListener(new java.awt.event.ActionListener()\n {\n public void actionPerformed(java.awt.event.ActionEvent evt)\n {\n showSignalButtonActionPerformed(evt);\n }\n });\n\n jLabel5.setText(\"<html>\\nDie manuelle Steuerung muss aktiviert sein um einen Zug steuern zu k\\u00f6nnen.\\nEs kann nur ein Zug zeitgleich manuell gesteuert werden.\\n</html>\");\n jLabel5.setVerticalAlignment(javax.swing.SwingConstants.TOP);\n\n messageLabel.setText(\"<html><br><br><br><br><br></html>\");\n\n pathCB.setEnabled(false);\n\n setBG.add(route_RB);\n route_RB.setSelected(true);\n route_RB.setText(\"Route\");\n route_RB.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));\n route_RB.setMargin(new java.awt.Insets(0, 0, 0, 0));\n route_RB.addActionListener(new java.awt.event.ActionListener()\n {\n public void actionPerformed(java.awt.event.ActionEvent evt)\n {\n route_RBActionPerformed(evt);\n }\n });\n\n setBG.add(path_RB);\n path_RB.setText(\"Fahrstra\\u00dfe\");\n path_RB.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));\n path_RB.setMargin(new java.awt.Insets(0, 0, 0, 0));\n path_RB.addActionListener(new java.awt.event.ActionListener()\n {\n public void actionPerformed(java.awt.event.ActionEvent evt)\n {\n path_RBActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, 530, Short.MAX_VALUE)\n .addContainerGap())\n .addComponent(jSeparator1, javax.swing.GroupLayout.DEFAULT_SIZE, 542, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(manualmodeTB)\n .addGap(7, 7, 7)\n .addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE, 356, Short.MAX_VALUE)\n .addContainerGap())\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(messageLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 530, Short.MAX_VALUE)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel3)\n .addComponent(route_RB)\n .addComponent(path_RB))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(signalTF, javax.swing.GroupLayout.DEFAULT_SIZE, 408, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(showSignalButton))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(pathCB, 0, 344, Short.MAX_VALUE))\n .addComponent(routeCB, 0, 344, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(setButton)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)))))\n .addContainerGap())\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(manualmodeTB)\n .addComponent(jLabel5))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 6, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(signalTF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(showSignalButton))\n .addGap(14, 14, 14)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(routeCB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(route_RB))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(path_RB)\n .addComponent(pathCB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(setButton))\n .addGap(11, 11, 11)\n .addComponent(messageLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 45, Short.MAX_VALUE))\n );\n\n closeButton.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/org/railsim/gui/resources/ok.png\")));\n closeButton.setText(\"schlie\\u00dfen\");\n closeButton.setMargin(new java.awt.Insets(2, 7, 2, 7));\n closeButton.addActionListener(new java.awt.event.ActionListener()\n {\n public void actionPerformed(java.awt.event.ActionEvent evt)\n {\n closeButtonActionPerformed(evt);\n }\n });\n\n nextRouteCB.setEnabled(false);\n\n jLabel6.setText(\"Route nach Verlassen der manuellen Steuerung\");\n\n showTrainButton.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/org/railsim/gui/resources/show.png\")));\n showTrainButton.setToolTipText(\"Zug zeigen\");\n showTrainButton.setMargin(new java.awt.Insets(1, 2, 1, 2));\n showTrainButton.addActionListener(new java.awt.event.ActionListener()\n {\n public void actionPerformed(java.awt.event.ActionEvent evt)\n {\n showTrainButtonActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(nameTF, javax.swing.GroupLayout.DEFAULT_SIZE, 500, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(showTrainButton))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addComponent(jLabel6)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(nextRouteCB, 0, 182, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(closeButton)))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(nameTF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1))\n .addComponent(showTrainButton))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 307, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(closeButton)\n .addComponent(jLabel6)\n .addComponent(nextRouteCB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap())\n );\n pack();\n }", "public ServerGUI() {\n\t\t\n\t\tinitialize();\n\n\t}", "private void init(Shell shell) {\r\n\t\t\r\n // GridLayout setzen\r\n\t\tGridLayout thisLayout = new GridLayout();\r\n\t thisLayout.numColumns = 2;\r\n\t\tshell.setLayout(thisLayout);\r\n\r\n\t\tshell.setText(\"Serververbindung\");\t\t\r\n\r\n\t\t// ConnectWindow-Elemente initialisieren\t\t\r\n\t\tipLabel = new Label(shell, SWT.NONE);\r\n\t\tipLabel.setText(\"Server IP:\");\r\n\t\tipLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));\r\n\t\tipLabel.pack();\r\n\t\t\r\n\t\tip = new Text(shell, SWT.BORDER);\r\n\t\tip.setText(\"255.255.255.255\");\r\n\t\tip.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\r\n\t\tip.pack();\r\n\t\t\r\n\t\tportLabel = new Label(shell, SWT.NONE);\r\n\t\tportLabel.setText(\"Server Port:\");\r\n\t\tportLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));\r\n\t\tportLabel.pack();\r\n\t\r\n\t\tport = new Text(shell, SWT.BORDER);\r\n\t\tport.setText(\"4711\");\r\n\t\tport.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));\r\n\t\tport.pack();\r\n\t\r\n\t\tLabel empty = new Label(shell, SWT.NONE);\r\n\t\tempty.pack();\r\n\r\n\t\tconnect = new Button(shell, SWT.PUSH);\r\n\t\tconnect.setText(\"Verbinden\");\r\n\t\tconnect.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));\r\n\t\tconnect.pack();\r\n\t\t\r\n\t\t// Aktion beim Klicken auf connect-Button\r\n\t\tconnect.addSelectionListener(new SelectionAdapter() {\r\n\t\t\tpublic void widgetSelected(SelectionEvent evt) {\r\n\t\t\t\t\r\n\t\t\t\t// Verbindung zum Server wird aufgebaut\r\n\t\t\t\tConnectToServer();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tshell.pack();\r\n\t\t\r\n\t\t// Position von ConnectWindow wird an Position von MainWindow gebunden (Mitte)\r\n\t\t// Ermittlung und Setzen der Position\r\n Rectangle shellBounds = parent.shell.getBounds();\r\n Point dialogSize = shell.getSize();\r\n\r\n shell.setLocation(\r\n \t\tshellBounds.x + (shellBounds.width / 2) - (dialogSize.x / 2),\r\n \t\tshellBounds.y + (shellBounds.height / 2) - (dialogSize.y / 2));\r\n \r\n ip.setText(\"localhost\");\r\n\r\n\t}", "public RailwayUI()\n{\nsetSize(800,500);\nsetLocation(200,200);\nsetResizable(false);\nsetLayout(new FlowLayout());\nImageIcon imgtitle = new ImageIcon(\"title.gif\");\ntitle = new JLabel(imgtitle);\ntypelbl = new JLabel(\"Ticket Type: \");\ntypelbl.setFont(new Font(\"Verdana\", Font.BOLD, 22));\ntype = new Choice();\ntype.add(\"Adult\");\ntype.add(\"Child\");\ntype.add(\"OAP\");\nblocklbl = new JLabel(\"Block:\");\nblocklbl.setFont(new Font(\"Verdana\", Font.BOLD, 22));\nblock = new Choice();\nblock.add(\"Left Block\");\nblock.add(\"Middle Block\");\nblock.add(\"Right Block\");\n\nsourcelbl = new JLabel(\"Source:\");\nsourcelbl.setFont(new Font(\"Verdana\", Font.BOLD, 22));\nsource = new Choice();\nsource.add(\"Mumbai\");\nsource.add(\"Delhi\");\nsource.add(\"Chennai\");\ndestinationlbl = new JLabel(\"Destination:\");\ndestinationlbl.setFont(new Font(\"Verdana\", Font.BOLD, 22));\ndestination = new Choice();\ndestination.add(\"Kolkata\");\ndestination.add(\"Pune\");\ndestination.add(\"Manali\");\n\ntimelbl = new JLabel(\"Time: \");\ntimelbl.setFont(new Font(\"Verdana\", Font.BOLD, 22));\ntime = new Choice();\ntime.add(\"13:00\");\ntime.add(\"15:00\");\ntime.add(\"17:00\");\ntime.add(\"19:00\");\ntime.add(\"21:00\");\npaybut = new JButton(\"Pay\");\npaybut.setBackground(Color.white);\nImageIcon lbimg = new ImageIcon(\"lblogo.gif\");\nlblbl = new JLabel (lbimg);\nImageIcon mbimg = new ImageIcon(\"mblogo.gif\");\nmblbl = new JLabel (mbimg);\nImageIcon rbimg = new ImageIcon(\"rblogo.gif\");\nrblbl = new JLabel (rbimg);\ninputseatlbl = new JLabel (\"Enter Seat Num: \");\ninputseatlbl.setFont(new Font(\"Verdana\", Font.BOLD, 22));\nseat = new JTextField(2);\nseat.setFont(new Font(\"Verdana\", Font.BOLD, 20));\nseat.setHorizontalAlignment(seat.CENTER);\ntotallbl = new JLabel (\"Total Price: \");\ntotallbl.setFont(new Font(\"Verdana\", Font.BOLD, 22));\ntotalcost = new JTextField(7);\ntotalcost.setFont(new Font(\"Verdana\", Font.BOLD, 22));\ntotalcost.setHorizontalAlignment(totalcost.CENTER);\ntotalcost.setEditable(false);\nsubmitbut = new JButton(\"Submit\");\nsubmitbut.setBackground(Color.white);\nshowbut = new JButton(\"Show\");\nshowbut.setBackground(Color.white);\n\n/* The following delcarations\ninitialise the variables for\nthe positions of the blocks */\n\nint xleft = 0;\nint yleft = 0;\nint xmid = 0;\nint ymid = 0;\nint xright = 0;\nint yright = 0;\n\n\nxleft = 50;\nyleft = 310; //Initial positions\nint totalleftside1 = 0; //'Total' is the total and is used to label the seats\n\nfor (int i = 0; i < leftside1.length; i++)\n{\nfor (int j = 0; j < 4; j++)\n{\nleftside1[i][j]=new Seat(totalleftside1, 0, xleft, yleft);\nxleft += 50; //Moving the next seat along the x position by 50\ntotalleftside1 ++; //Adding one to the total for the next seat\n}\nxleft = 50; //Moving back to the left for the next row\nyleft += 30; //Moving down for the next row\n}\n\nxmid = 300;\nymid = 310; //Initial positions\nint totalmidside1 = 0; //'Total' is the total and is used to label the seats\nfor (int i = 0; i < midside1.length; i++)\n{\nfor (int j = 0; j < 4; j++)\n{\nmidside1[i][j]=new Seat(totalmidside1, 0, xmid, ymid);\nxmid += 50; //Moving the next seat along the x position by 50\ntotalmidside1 ++; //Adding one to the total for the next seat\n}\nxmid = 300; //Moving back to the left for the next row\nymid += 30; //Moving down for the next row\n}\n\nxright = 550;\nyright = 310; //Initial positions\nint totalrightside1 = 0; //'Total' is the total and is used to label the seats\nfor (int i = 0; i < rightside1.length; i++)\n{\nfor (int j = 0; j < 4; j++)\n{\nrightside1[i][j]=new Seat(totalrightside1, 0, xright, yright);\nxright += 50; //Moving the next seat along the x position by 50\ntotalrightside1 ++; //Adding one to the total for the next seat\n}\nxright = 550; //Moving back to the left for the next row\nyright += 30; //Moving down for the next row\n}\n\n/* The next lines of code perform the same processes as the ones before such as positions for each block */\n\nxleft = 50;\nyleft = 310;\nint totalleftside3 = 0;\n\nfor (int i = 0; i < leftside3.length; i++)\n{\nfor (int j = 0; j < 4; j++)\n{\nleftside3[i][j]=new Seat(totalleftside3, 0, xleft, yleft);\nxleft += 50;\ntotalleftside3 ++;\n}\nxleft = 50;\nyleft += 30;\n}\n\nxmid = 300;\nymid = 310;\nint totalmidside3 = 0;\nfor (int i = 0; i < midside3.length; i++)\n{\nfor (int j = 0; j < 4; j++)\n{\nmidside3[i][j]=new Seat(totalmidside3, 0, xmid, ymid);\nxmid += 50;\ntotalmidside3 ++;\n}\nxmid = 300;\nymid += 30;\n}\n\nxright = 550;\nyright = 310;\nint totalrightside3 = 0;\nfor (int i = 0; i < rightside3.length; i++)\n{\nfor (int j = 0; j < 4; j++)\n{\nrightside3[i][j]=new Seat(totalrightside3, 0, xright, yright);\nxright += 50;\ntotalrightside3 ++;\n}\nxright = 550;\nyright += 30;\n}\n\n\nxleft = 50;\nyleft = 310;\nint totalleftside5 = 0;\n\nfor (int i = 0; i < leftside5.length; i++)\n{\nfor (int j = 0; j < 4; j++)\n{\nleftside5[i][j]=new Seat(totalleftside5, 0, xleft, yleft);\nxleft += 50;\ntotalleftside5 ++;\n}\nxleft = 50;\nyleft += 30;\n}\n\nxmid = 300;\nymid = 310;\nint totalmidside5 = 0;\nfor (int i = 0; i < midside5.length; i++)\n{\nfor (int j = 0; j < 4; j++)\n{\nmidside5[i][j]=new Seat(totalmidside5, 0, xmid, ymid);\nxmid += 50;\ntotalmidside5 ++;\n}\nxmid = 300;\nymid += 30;\n}\n\nxright = 550;\nyright = 310;\nint totalrightside5 = 0;\nfor (int i = 0; i < rightside5.length; i++)\n{\nfor (int j = 0; j < 4; j++)\n{\nrightside5[i][j]=new Seat(totalrightside5, 0, xright, yright);\nxright += 50;\ntotalrightside5 ++;\n}\nxright = 550;\nyright += 30;\n}\n\n\nxleft = 50;\nyleft = 310;\nint totalleftside7 = 0;\n\nfor (int i = 0; i < leftside7.length; i++)\n{\nfor (int j = 0; j < 4; j++)\n{\nleftside7[i][j]=new Seat(totalleftside7, 0, xleft, yleft);\nxleft += 50;\ntotalleftside7 ++;\n}\nxleft = 50;\nyleft += 30;\n}\n\nxmid = 300;\nymid = 310;\nint totalmidside7 = 0;\nfor (int i = 0; i < midside7.length; i++)\n{\nfor (int j = 0; j < 4; j++)\n{\nmidside7[i][j]=new Seat(totalmidside7, 0, xmid, ymid);\nxmid += 50;\ntotalmidside7 ++;\n}\nxmid = 300;\nymid += 30;\n}\n\nxright = 550;\nyright = 310;\nint totalrightside7 = 0;\nfor (int i = 0; i < rightside7.length; i++)\n{\nfor (int j = 0; j < 4; j++)\n{\nrightside7[i][j]=new Seat(totalrightside7, 0, xright, yright);\nxright += 50;\ntotalrightside7 ++;\n}\nxright = 550;\nyright += 30;\n}\n\nxleft = 50;\nyleft = 310;\nint totalleftside9 = 0;\n\nfor (int i = 0; i < leftside9.length; i++)\n{\nfor (int j = 0; j < 4; j++)\n{\nleftside9[i][j]=new Seat(totalleftside9, 0, xleft, yleft);\nxleft += 50;\ntotalleftside9 ++;\n}\nxleft = 50;\nyleft += 30;\n}\n\nxmid = 300;\nymid = 310;\nint totalmidside9 = 0;\nfor (int i = 0; i < midside9.length; i++)\n{\nfor (int j = 0; j < 4; j++)\n{\nmidside9[i][j]=new Seat(totalmidside9, 0, xmid, ymid);\nxmid += 50;\ntotalmidside9 ++;\n}\nxmid = 300;\nymid += 30;\n}\n\nxright = 550;\nyright = 310;\nint totalrightside9 = 0;\nfor (int i = 0; i < rightside9.length; i++)\n{\nfor (int j = 0; j < 4; j++)\n{\nrightside9[i][j]=new Seat(totalrightside9, 0, xright, yright);\nxright += 50;\ntotalrightside9 ++;\n}\nxright = 550;\nyright += 30;\n}\n/* Adding the labels and text boxes to the screen */\n\ngetContentPane().add(title);\ngetContentPane().add(typelbl);\ngetContentPane().add(type);\ngetContentPane().add(blocklbl);\ngetContentPane().add(block);\ngetContentPane().add(sourcelbl);\ngetContentPane().add(source);\ngetContentPane().add(destinationlbl);\ngetContentPane().add(destination);\ngetContentPane().add(timelbl);\ngetContentPane().add(time);\ngetContentPane().add(showbut);\ngetContentPane().add(inputseatlbl);\ngetContentPane().add(seat);\ngetContentPane().add(submitbut);\ngetContentPane().add(totallbl);\ngetContentPane().add(totalcost);\ngetContentPane().add(paybut);\ngetContentPane().add(lblbl);\ngetContentPane().add(mblbl);\ngetContentPane().add(rblbl);\nsetVisible(true);\nsetDefaultCloseOperation(EXIT_ON_CLOSE);\nColor mycolor = new Color(255,255,255);\ngetContentPane().setBackground(mycolor);\n\nsubmitbut.addActionListener(this);\nshowbut.addActionListener(this); //Action listener for each individual button\npaybut.addActionListener(this);\n}", "private void initUI(int width, int height) {\n\t\tsetSize(width, height);\n\t\tsetTitle(ClientParameters.WINDOW_TITLE);\n\t\tsetLocationRelativeTo(null);\n\t\tsetResizable(ClientParameters.IS_RESIZABLE);\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\t// adding components\n\t\tpane.setLayout(new BorderLayout());\n\t\tpane.add(host, BorderLayout.NORTH);\n\t\tpane.add(portNumber, BorderLayout.CENTER);\n\t\tpane.add(connectButton, BorderLayout.SOUTH);\n\t}", "public mythologyBattleGui() {\n initComponents();\n labelClear();\n groupBoardArea();\n playBoard.initGame();\n initRan(18);\n }", "public History_GUI(){\n super();\n InitializeComponents();\n ConfigureWin();\n\n }", "protected void addOscServerAddressPanel() {\n\n\t\t// variable addressPanel holds an instance of JPanel.\n\t\t// instance of JPanel received from makeNewJPanel method\n\t\tfinal JPanel addressPanel = makeNewJPanel1();\n\t\taddressPanel.setBackground(new Color(123, 150, 123));\n\t\t// variable addressWidget holds an instance of JTextField\n\t\taddressWidget = new JTextField(\"localhost\");\n\t\t// variable setAddressButton holds an insatnce of JButton with\n\t\t// a \"Set Address\" argument for its screen name\n\t\tfinal JButton setAddressButton = new JButton(\"Set Address\");\n\t\tsetAddressButton.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(final ActionEvent evt) {\n\t\t\t\t// perform the addressChanged method when action is received\n\t\t\t\taddressChanged();\n\t\t\t}\n\t\t});\n\n\t\t// variable portWidget holds an instance of JLabel with the OSCPortOut\n\t\t// as the text it looks like OSCPortOut has a method to get the default\n\t\t// SuperCollider port\n\t\tportWidget = new JLabel(Integer.toString(OSCPort.defaultSCOSCPort()));\n\n\t\tportWidget.setForeground(new Color(255, 255, 255));\n\t\tfinal JLabel portLabel = new JLabel(\"Port\");\n\t\tportLabel.setForeground(new Color(255, 255, 255));\n\n\t\t// add the setAddressButton to the addressPanel\n\t\taddressPanel.add(setAddressButton);\n\t\t// portWidget = new JTextField(\"57110\");\n\t\t// add the addressWidget to the addressPanel\n\t\taddressPanel.add(addressWidget);\n\t\t// add the JLabel \"Port\" to the addressPanel\n\t\taddressPanel.add(portLabel);\n\t\t// add te portWidget tot eh addressPanel\n\t\taddressPanel.add(portWidget);\n\n\t\t//??? add address panel to the JPanel OscUI\n\t\tadd(addressPanel);\n\t}", "private static void createAndShowGUI() {\r\n\t\tString pathwayFile = System.getenv(\"PATHWAY_FILE\");\r\n\t\tString defaultsFile = System.getenv(\"DEFAULTS_FILE\");\r\n\r\n\t\tPathway path;\r\n\r\n\t\tif (defaultsFile == null) {\r\n\t\t\tpath = new Pathway(pathwayFile);\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"Using defaults file \" + defaultsFile);\r\n\t\t\tpath = new Pathway(pathwayFile, defaultsFile);\r\n\t\t}\r\n\r\n\t\t// Disable boldface controls.\r\n\t\tUIManager.put(\"swing.boldMetal\", Boolean.FALSE);\r\n\r\n\t\t// Create and set up the window.\r\n\t\tJFrame frame = new JFrame(\"Pathway Simulator\");\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\r\n\t\t// Create and set up the content pane.\r\n\t\tSimPanel newContentPane = new SimPanel(path);\r\n\t\tnewContentPane.setOpaque(true); // content panes must be opaque\r\n\t\tframe.setContentPane(newContentPane);\r\n\r\n\t\t// Display the window.\r\n\t\tframe.pack();\r\n\t\tframe.setVisible(true);\r\n\t}", "public Gui(String ip, boolean creative){\n super(\"TicTacToe\");\n \n this.setAlwaysOnTop(true);\n this.setSize(new Dimension(WINDOW_WIDTH, WINDOW_HEIGHT));\n this.setResizable(false);\n this.setLocationRelativeTo(null);\n this.setLayout(new BorderLayout());\n \n myTheme = new Theme(creative);\n \n JLabel topBar = myTheme.topField;\n topBar.setPreferredSize(new Dimension(500, 140));\n this.add(topBar, BorderLayout.NORTH);\n \n gameGrid = new JPanel();\n gameGrid.setPreferredSize(new Dimension(500, 500));\n gameGrid.setLayout(new GridLayout(3, 3, BORDER_SIZE, BORDER_SIZE));\n gameGrid.setBackground(new Color(0x71450B));\n\n for(int i=0; i<3; i++){\n for(int j=0; j<3; j++){\n grid[i][j] = new JButton();\n grid[i][j].setName(Integer.toString(i*3 + j));\n grid[i][j].setIcon(myTheme.blankSquare);\n gameGrid.add(grid[i][j]);\n }\n }\n gameGrid.setBorder(new MatteBorder(BORDER_SIZE, BORDER_SIZE,\n BORDER_SIZE, BORDER_SIZE, new Color(0x71450B)));\n this.add(gameGrid, BorderLayout.CENTER);\n \n statusBar = myTheme.statusField;\n statusBar.setPreferredSize(new Dimension(500, 60));\n statusBar.setFont(new Font(\"Dialog\", 1, 20));\n statusBar.setText(\"Waiting for an opponent ...\");\n statusBar.setHorizontalTextPosition(JLabel.CENTER);\n this.add(statusBar, BorderLayout.SOUTH);\n \n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n \n (myClient = new Client(this, ip)).execute();\n }", "public ClockPanel() {\n initComponents();\n comboTimeZones.setModel(timeZoneModel);\n }", "private GUIReminder() {\n\n initComponents();\n initOthers();\n\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n tfOrigin = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n tfDest = new javax.swing.JTextField();\n jbtSee = new javax.swing.JButton();\n jPanel2 = new javax.swing.JPanel();\n slider = new javax.swing.JSlider();\n jLabel4 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jScrollBar1 = new javax.swing.JScrollBar();\n jScrollBar2 = new javax.swing.JScrollBar();\n jMenuBar1 = new javax.swing.JMenuBar();\n jMenu1 = new javax.swing.JMenu();\n jMenu3 = new javax.swing.JMenu();\n jMenu4 = new javax.swing.JMenu();\n jMenu2 = new javax.swing.JMenu();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Route Manager\");\n\n jLabel1.setText(\"Origen\");\n\n tfOrigin.setText(\"Calle San Pablo, San Vicente del Raspeig\");\n\n jLabel2.setText(\"Destino\");\n\n tfDest.setText(\"Calle Mayor, San Vicente del Raspeig\");\n\n jbtSee.setText(\"Ver mapa\");\n jbtSee.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jbtSeeActionPerformed(evt);\n }\n });\n\n slider.setMaximum(20);\n slider.setToolTipText(\"\");\n slider.setValue(10);\n slider.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() {\n public void mouseDragged(java.awt.event.MouseEvent evt) {\n sliderMouseDragged(evt);\n }\n });\n\n jLabel4.setText(\"Zoom:\");\n\n jLabel3.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));\n jLabel3.setPreferredSize(new java.awt.Dimension(640, 640));\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(22, 22, 22)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(slider, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(jLabel4)\n .addGap(0, 101, Short.MAX_VALUE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addGap(36, 36, 36)\n .addComponent(jLabel4)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(slider, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(826, Short.MAX_VALUE))\n .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, 928, Short.MAX_VALUE)\n );\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(61, 61, 61)\n .addComponent(jbtSee))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(22, 22, 22)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(tfDest))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addGap(18, 18, 18)\n .addComponent(tfOrigin, javax.swing.GroupLayout.PREFERRED_SIZE, 328, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addContainerGap(504, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(0, 0, 0)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(tfOrigin, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(tfDest, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2))\n .addGap(28, 28, 28)\n .addComponent(jbtSee)\n .addGap(29, 29, 29)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(503, Short.MAX_VALUE))\n );\n\n jScrollBar1.setValue(50);\n jScrollBar1.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n\n jScrollBar2.setOrientation(javax.swing.JScrollBar.HORIZONTAL);\n jScrollBar2.setValue(50);\n\n jMenu1.setText(\"Archivo\");\n\n jMenu3.setText(\"Nuevo mapa\");\n jMenu1.add(jMenu3);\n\n jMenu4.setText(\"Mapas de usuario\");\n jMenu1.add(jMenu4);\n\n jMenuBar1.add(jMenu1);\n jMenuBar1.add(jMenu2);\n\n setJMenuBar(jMenuBar1);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(252, 252, 252)\n .addComponent(jScrollBar2, javax.swing.GroupLayout.PREFERRED_SIZE, 640, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jScrollBar1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(47, 47, 47)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jScrollBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 640, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jScrollBar2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n }", "@Action\n public void showChronosBox()\n {\n int answer, i;\n \n ChronosPanel chronosPanel = new ChronosPanel();\n answer = JOptionPane.showConfirmDialog(null, chronosPanel, \"ez430-Chronos Settings\",\n JOptionPane.OK_CANCEL_OPTION, JOptionPane.PLAIN_MESSAGE);\n\n if (answer == JOptionPane.OK_OPTION)\n {\n SwapValue dateTime = chronosPanel.getDateTimeString();\n SwapValue alarm = chronosPanel.getAlarmString();\n SwapValue calibration = chronosPanel.getCalibration();\n SwapValue period = chronosPanel.getTxPeriod();\n\n ArrayList pages = new ArrayList(ChronosWatch.NUMBER_OF_PAGES);\n \n for(i=0 ; i<ChronosWatch.NUMBER_OF_PAGES ; i++)\n {\n pages.add(chronosPanel.getPage(i));\n }\n\n configChronos(dateTime, alarm, calibration, period, pages);\n }\n }", "public TimeView() {\r\n label = new JLabel(\" \");\r\n kAvondLabel = new JLabel(\" - Koopavond\");\r\n weekendLabel = new JLabel(\" - Weekend\");\r\n eventLabel = new JLabel(\"Evenement: Theater\");\r\n time = time.getInstance();\r\n setPreferredSize(new Dimension(200,50));\r\n add(label);\r\n }", "private void init() {\n\t\tSwingUtilities.invokeLater(new Runnable() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tclient = new AuctioneerWindow();\n\t\t\t\tsure = client.getSure();\n\t\t\t\tip_text = client.getIp_text();\n\t\t\t\tcontent = client.getContent();\n\t\t\t\tsure.addActionListener(new ActionListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t\t\t\tIP = ip_text.getText();\n\t\t\t\t\t\tip_text.setEnabled(false);\n\t\t\t\t\t\tsure.setEnabled(false);\n\n\t\t\t\t\t\tcontent.append(\"获取IP成功\");\n\n\t\t\t\t\t\tnew Thread(new Runnable() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\tinitBroadCastClient();\n\t\t\t\t\t\t\t\t\tReceivePublicKey();\n\t\t\t\t\t\t\t\t\tReceiveEncryptPrice();\n\t\t\t\t\t\t\t\t\tgenerateEProduct();\n\t\t\t\t\t\t\t\t\tsendEProduct();\n\t\t\t\t\t\t\t\t\tGarbleCircuits();\n\t\t\t\t\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}).start();\n\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t}\n\t\t});\n\n\t}", "public Planner(){\r\n\t\tsetLayout(new BorderLayout());\r\n\r\n\t\taptManager=new AirportManager(this);\r\n\t\tapt=aptManager.getAirport();\r\n\r\n\r\n JPanel btnPanel= new JPanel();\r\n final JButton btnClear=new JButton(\"Clear All\");\r\n final JButton btnCal=new JButton(\"Make Plan\");\r\n\t\tfinal JButton btnMap=new JButton(\"View Map\");\r\n final JButton btnExit=new JButton(\"Save/Exit\");\r\n Color color = Color.RED.darker();\r\n btnCal.setToolTipText(\"Select 'Make Plan' to start the flight plan, after entering a valid starting airport and destination(s).\");\r\n btnCal.setFont(btnFont);\r\n\t\tbtnCal.setBackground(color);\r\n\t\tbtnCal.setForeground(Color.white);\r\n btnCal.addActionListener(this);\r\n btnClear.setToolTipText(\"Select 'Clear All' to clear all of the currently entered airport data within the Routine Planner.\");\r\n \tbtnClear.addActionListener(this);\r\n \tbtnClear.setFont(btnFont);\r\n \tbtnMap.setToolTipText(\"Select 'View Map' to view a map of the world and current airports.\");\r\n \tbtnMap.setFont(btnFont);\r\n \tbtnMap.addActionListener(this);\r\n \tcolor = Color.GREEN.darker();\r\n \tbtnExit.setToolTipText(\"Select 'Save/Exit' to save and exit the flight plan.\");\r\n \tbtnExit.setFont(btnFont);\r\n\t\tbtnExit.setBackground(color);\r\n\t\tbtnExit.setForeground(Color.white);\r\n \tbtnExit.addActionListener(this);\r\n\r\n \tbtnPanel.setLayout(new GridLayout(4,1,10,10));\r\n \tbtnCal.setPreferredSize(new Dimension(120,70));\r\n \tbtnPanel.add(btnCal);\r\n \tbtnPanel.add(btnClear);\r\n \tbtnPanel.add(btnMap);\r\n \tbtnPanel.add(btnExit);\r\n\r\n \tJPanel show=new JPanel();\r\n \tshow.setLayout(new BoxLayout(show,BoxLayout.Y_AXIS));\r\n \tshow.add(new InputPanel(0));\r\n \tshow.add(new JLabel(\"TO\"));\r\n \tshow.add(new InputPanel(1));\r\n \tmdnScreen=new MultiDestnPanel();\r\n \tshow.add(mdnScreen);\r\n\r\n \tJScrollPane js=new JScrollPane(show);\r\n \tjs.setPreferredSize(new Dimension(300,310));\r\n\r\n\r\n \tJPanel description=new JPanel(new GridLayout(2,1));\r\n \t MatteBorder matte = new MatteBorder(5, 5, 5, 5, Color.LIGHT_GRAY);\r\n des.setBorder(matte);\r\n des.setHorizontalTextPosition(JLabel.CENTER);\r\n \tdes.setVerticalTextPosition(JLabel.TOP);\r\n des.setFont(font);\r\n des.setOpaque(true);\r\n des.setBackground(Color.CYAN);\r\n\t\tdescription.add(des);\r\n \tdescription.add(new JLabel(new ImageIcon(\"image/airplane.png\")));\r\n \tdescription.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));\r\n\r\n \tJPanel routinePlanner=new JPanel();\r\n \troutinePlanner.add(js,BorderLayout.CENTER);\r\n \troutinePlanner.add(btnPanel,BorderLayout.EAST);\r\n \troutinePlanner.setBorder(new TitledBorder(\"Routine Planner\"));\r\n\r\n \taptManager.setPreferredSize(new Dimension(380,300));\r\n \taptManager.setBorder(new TitledBorder(\"Airport Manager\"));\r\n\r\n \tadd(description,BorderLayout.NORTH);\r\n \tadd(aptManager,BorderLayout.WEST);\r\n \tadd(routinePlanner,BorderLayout.CENTER);\r\n\r\n\t\tMap m=new Map(apt);\r\n\t\taptManager.setMap(m);\r\n \tmapScreen=new JDialog(); //map dialog set up\r\n \tmapScreen.add(m);\r\n \tmapScreen.setTitle(\"World Map\");\r\n \tmapScreen.pack();\r\n \tmapScreen.setLocationRelativeTo(null);\r\n \tmapScreen.setResizable(false);\r\n \tmapScreen.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\r\n }", "private void initialize() {\r\n\t\tIpPortConfiguration ipConfig = new IpPortConfiguration();\r\n\t\tipAddress = ipConfig.getIpAddress();\r\n\t\tportNumer = ipConfig.getPortNumber();\r\n\t\tframe = new JFrame(\"CarParkingManagementSystem\");\r\n\t\tDimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\r\n\t\tframe.setSize((screenSize.width),(screenSize.height));\r\n\t\t//frame.setBounds(0, 0, 1500, 800);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\tframe.setVisible(true);\r\n\r\n\t\tJButton back = new JButton(\"Back\");\r\n\t\tback.addActionListener(new ActionListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tframe.setVisible(false);\r\n\t\t\t\tnew ReportPage(value);\r\n\t\t\t}\r\n\t\t});\r\n\t\tback.setBounds(10, 10, 80, 20);\r\n\t\tframe.getContentPane().add(back);\r\n\r\n\t\tJButton ok = new JButton(\"Ok\");\r\n\t\tok.addActionListener(new ActionListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tframe.setVisible(false);\r\n\t\t\t\tnew AdminHome(value);\r\n\t\t\t}\r\n\t\t});\r\n\t\tok.setBounds(600, 650, 102, 31);\r\n\t\tframe.getContentPane().add(ok);\r\n\r\n\t\tuserType = new JComboBox<String>();\r\n\t\tuserType.setBounds(150, 40, 100, 30);\r\n\t\tframe.getContentPane().add(userType);\r\n\t\tuserType.addItem(\"All\");\r\n\t\tuserType.addItem(\"Prepaid\");\r\n\t\tuserType.addItem(\"Postpaid\");\r\n\t\tuserType.setSelectedIndex(1);\r\n\r\n\t\tlblTotalIncome = new JLabel(\"Total User :\");\r\n\t\tlblTotalIncome.setBounds(1098, 33, 142, 31);\r\n\t\tincome = new JLabel(\"\");\r\n\t\tincome.setFont(new Font(\"Tahoma\", Font.PLAIN, 20));\r\n\t\tincome.setForeground(Color.RED);\r\n\t\tincome.setBounds(1221, 33, 142, 31);\r\n\t\tframe.getContentPane().add(lblTotalIncome);\r\n\r\n\t\tframe.getContentPane().add(income);\r\n\t\tlblTotalIncome.setVisible(false);\r\n\t\tincome.setVisible(false);\r\n\r\n\t\tint typeSelected = userType.getSelectedIndex();\r\n\t\tif (typeSelected == 0) {\r\n\t\t\tframe.setVisible(false);\r\n\t\t\tnew VipInfo(value);\r\n\t\t} else if (typeSelected == 1) {\r\n\t\t\tvipinfo();\r\n\t\t} else if (typeSelected == 2) {\r\n\t\t\tframe.setVisible(false);\r\n\t\t\tnew VipInfoPostpaid(value);\r\n\t\t}\r\n\r\n\t\tDefaultTableModel model = new DefaultTableModel(data, header);\r\n\r\n\t\tJTable table = new JTable(model);\r\n\t\ttable.setBounds(133, 100, 1100, 500);\r\n\t\tframe.getContentPane().add(table);\r\n\r\n\t\tJScrollPane js = new JScrollPane(table);\r\n\t\tjs.setBounds(133, 100, 1100, 500);\r\n\t\tframe.getContentPane().add(js);\r\n\r\n\t}", "private void setUpGUI()\n\t{\n\t\tgetContentPane().setLayout(new BorderLayout());\n\n\t\t//center panel (project and developer dropdown lists, and state of\n\t\t//server label)\n\t\tJPanel centerPanel = new JPanel();\n\t\tcenterPanel.setLayout(new GridLayout(3, 2));\n\n\t\tcenterPanel.add(new JLabel(\"Choose a project\"));\n\t\tprojectsComboBox = new JComboBox<String>(selectADBString);\n\t\tcenterPanel.add(projectsComboBox);\n\n\t\tcenterPanel.add(new JLabel(\"Choose a developer group\"));\n\t\tdevNamesComboBox = new JComboBox<String>(selectADBString);\n\t\tcenterPanel.add(devNamesComboBox);\n\n\t\tstateOfServerLabel = new JLabel(\"The server is NOT running\");\n\t\tcenterPanel.add(stateOfServerLabel);\n\n\t\tgetContentPane().add(centerPanel, BorderLayout.CENTER);\n\n\t\t//south panel (start the server)\n\t\tJPanel southPanel = new JPanel();\n\t\tsouthPanel.setLayout(new FlowLayout());\n\n\t\tstartStopServerButton = new JButton(START_SERVER_BUTTON_TEXT);\n\t\tstartStopServerButton.addActionListener(this);\n\n\t\topenPlaybackInBrowserCheckbox = new JCheckBox(\"Open the playback in the browser?\");\n\n\t\tsouthPanel.add(startStopServerButton);\n\t\tsouthPanel.add(openPlaybackInBrowserCheckbox);\n\n\t\tgetContentPane().add(southPanel, BorderLayout.SOUTH);\n\n\t\t//create the north panel by looking for the last used db file\n\t\tJPanel northPanel = createNorthPanel();\n\n\t\tgetContentPane().add(northPanel, BorderLayout.NORTH);\n\n\t\t//window controls\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tsetSize(800, 250);\n\t\tsetVisible(true);\n\t}", "private void initializeGUI() {\n\n\t\t// system's main frame and its properties\n\t\tframeSystem = new JFrame(\"NBodies System Configuration\");\n\t\tframeSystem.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframeSystem.setResizable(false);\n\t\tframeSystem.setBackground(Color.white);\n\n\t\t// number of bodies controls and their properties\n\t\tlblNBodies = new JLabel(\" Insert the system bodies's number: \");\n\t\tlblNBodies.setAlignmentX(JLabel.CENTER_ALIGNMENT);\n\t\ttxtNBodies = new JTextField(\"0\");\n\t\ttxtNBodies.setAlignmentX(JTextField.CENTER_ALIGNMENT);\n\n\t\t// time controls and their properties\n\t\tlblTime = new JLabel(\" Insert the system's evolution time: \");\n\t\tlblTime.setAlignmentX(JLabel.CENTER_ALIGNMENT);\n\t\ttxtTime = new JTextField(\"0\");\n\t\ttxtTime.setAlignmentX(JTextField.CENTER_ALIGNMENT);\n\n\t\t// number of bodies console and its properties and internal controls\n\t\tnumberBodiesControlConsole = new JPanel();\n\t\tnumberBodiesControlConsole.setBounds(0, 0, 550, 28);\n\t\tnumberBodiesControlConsole.setBackground(Color.white);\n\t\tLayoutManager numberLayout = new BorderLayout();\n\t\tnumberBodiesControlConsole.setLayout(numberLayout);\n\t\tnumberBodiesControlConsole.add(lblNBodies, BorderLayout.WEST);\n\t\tnumberBodiesControlConsole.add(txtNBodies, BorderLayout.CENTER);\n\n\t\t// time console and its properties and internal controls\n\t\ttimeControlConsole = new JPanel();\n\t\ttimeControlConsole.setBounds(0, 28, 550, 30);\n\t\ttimeControlConsole.setBackground(Color.white);\n\t\tLayoutManager timeLayout = new BorderLayout();\n\t\ttimeControlConsole.setLayout(timeLayout);\n\t\ttimeControlConsole.add(lblTime, BorderLayout.WEST);\n\t\ttimeControlConsole.add(txtTime, BorderLayout.CENTER);\n\n\t\t// start and communication console and its properties and internal\n\t\t// controls\n\t\tstartAndCommunicationConsole = new JPanel();\n\t\tstartAndCommunicationConsole.setBounds(0, 56, 550, 58);\n\t\tstartAndCommunicationConsole.setBackground(Color.white);\n\t\tLayoutManager startLayout = new BorderLayout();\n\t\tstartAndCommunicationConsole.setLayout(startLayout);\n\n\t\t// master panel and its layout's properties\n\t\tmasterPanel = new JPanel();\n\t\tmasterPanel.setLayout(null);\n\t\tmasterPanel.add(numberBodiesControlConsole);\n\t\tmasterPanel.add(timeControlConsole);\n\t\tmasterPanel.add(startAndCommunicationConsole);\n\n\t\t// button to start the n-bodies system and its properties\n\t\tbtnStartSystem = new JButton(\"Start the n-bodies system\");\n\t\tstartAndCommunicationConsole.add(btnStartSystem, BorderLayout.CENTER);\n\n\t\tbtnOpenFileConfig = new JButton(\n\t\t\t\t\"Start System from a Configuration File\");\n\t\tSystemConfigurationViewController controller = new SystemConfigurationViewController(\n\t\t\t\tthis);\n\t\tstartAndCommunicationConsole.add(btnOpenFileConfig, BorderLayout.NORTH);\n\t\tbtnOpenFileConfig.addActionListener(controller\n\t\t\t\t.getChooseConfigurationFileListener());\n\t\tbtnStartSystem.addActionListener(controller.getStartListener());\n\n\t\t// view's main frame and its properties\n\t\tframeSystem.setContentPane(masterPanel);\n\n\t\t// label to show errors and its properties\n\t\tlblCommunication = new JLabel(\n\t\t\t\t\" Please insert the n-bodies system's configuration values.\");\n\t\tlblCommunication.setBounds(0, 114, 550, 36);\n\t\tmasterPanel.add(lblCommunication);\n\t\tlblCommunication.setAlignmentX(JLabel.CENTER_ALIGNMENT);\n\t\tlblCommunication.setForeground(Color.BLUE);\n\t\tframeSystem.setSize(new Dimension(550, 181));\n\t\tframeSystem.setLocationRelativeTo(null);\n\t\tframeSystem.setVisible(true);\n\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 jPanel2 = new javax.swing.JPanel();\n jPanel1 = new javax.swing.JPanel();\n jLabel3 = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"START!! Server\");\n setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\n jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\n jLabel1.setText(\"Enter this IP in your Android Device : \");\n\n jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, \"CONNECTION STATUS\", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font(\"Tahoma\", 1, 12))); // NOI18N\n\n jPanel1.setBackground(new java.awt.Color(255, 0, 0));\n\n jLabel3.setFont(new java.awt.Font(\"Aharoni\", 1, 18)); // NOI18N\n jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel3.setText(\"Waiting for the connection...\");\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 141, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(73, 73, 73))\n );\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 166, Short.MAX_VALUE)\n .addContainerGap())\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 349, Short.MAX_VALUE)\n .addGap(41, 41, 41))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 44, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(15, Short.MAX_VALUE))\n );\n\n getAccessibleContext().setAccessibleName(\"START Server\");\n\n pack();\n setLocationRelativeTo(null);\n }", "public ConnectToServerGUI() {\n super(\"Connect to Server\");\n initComponents();\n setVisible(true);\n }", "private void initNewConnect() {\r\n\t\tthis.newConnect = new JMenu(\"Connect To\");\r\n\t\t\r\n\t\t// textfield for ip address with keylistener\r\n\t\tJTextField ipAddress = new JTextField(\"000.000.0.000\");\r\n ipAddress.setPreferredSize(new Dimension(100,18));\r\n ipAddress.setMaximumSize(new Dimension(100,18));\r\n\t\tipAddress.addKeyListener(new KeyListener() {\r\n\t\t\tpublic void keyTyped(KeyEvent e) {}\r\n\t\t\tpublic void keyPressed(KeyEvent e) {\r\n\t\t\t\tint key = e.getKeyCode();\r\n\t\t\t\tif(key == KeyEvent.VK_ENTER) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tactController.setRemoteIPadress(e);\r\n\t\t\t\t\t} catch (UnknownHostException e1) {\r\n\t\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tpublic void keyReleased(KeyEvent e) {}\r\n\t\t});\r\n\t\r\n\t\t// add textfield to newconnect\r\n newConnect.add(ipAddress);\r\n \r\n // add newconnect to option\r\n\t\tthis.option.add(newConnect);\r\n\t}", "private void setUpDialoguebox() {\n\t\tinput = new CTS_GUI_Dialoguebox();\n\t\tinput.setTitle(\"Settings\");\n\t\tBorderPane pane = new BorderPane();\n\t\tLocalTime t = LocalTime.now();\n\t\tLocalDate d = LocalDate.now();\n\t\tuicontrols = new VBox(10);\n\t\tHBox box0 = new HBox(5);\n\t\tbox0.getChildren().addAll(new Label(\"Latitude: \"),new TextField(\"0\"));\n\t\tHBox box1 = new HBox(5);\n\t\tbox1.getChildren().addAll(new Label(\"Longitude: \"),new TextField(\"0\"));\n\t\tHBox box2 = new HBox(5);\n\t\tbox2.getChildren().addAll(new Label(\"Date: \"),new TextField(d.toString()));\n\t\tTextField time = new TextField(t.getHour() + \":\" + t.getMinute() + \":\" + (int) floor(t.getSecond()));\n\t\tHBox box3 = new HBox(5);\n\t\tbox3.getChildren().addAll(new Label(\"Time: \"),time);\n\t\t// Check boxes\n\t\tHBox box5 = new HBox(5);\n\t\tCheckBox c1 = new CheckBox(\"Plot Stars\");\n\t\tc1.setSelected(true);\n\t\tCheckBox c2 = new CheckBox(\"Plot DSOs\");\n\t\tc2.setSelected(true);\n\t\tCheckBox c3 = new CheckBox(\"Plot Constellations\");\n\t\tc3.setSelected(true);\n\t\tCheckBox c4 = new CheckBox(\"Plot Planets\");\n\t\tc4.setSelected(true);\n\t\tbox5.getChildren().addAll(c1,c2,c3,c4);\n\t\t// Color Picker\n\t\t// 0 = Star color, 1 = Low mag star, 2 = Very low mag star.\n\t\t// 3 = DSO, 4 = Sky background, 5 = Circle around sky background\n\t\t// 6 = Overall background, 7 = Lat/long txt color, 8 = Constellation line color.\n\t\tHBox box6 = new HBox(5);\n\t\tTextField colorSet = new TextField(\"255,255,255,1\");\n\t\tButton setcolorbutton = new Button(\"Submit Color\");\n\t\tbox6.getChildren().addAll(new Label(\"Color to Set: \"),colorSet,setcolorbutton,new Label(\"[PREVIEW COLOR]\"));\n\t\tsetcolorbutton.setOnAction((event) -> { colorPickerHander(); });\n MenuBar mainmenu = new MenuBar();\n Menu colorpickermenu = new Menu(\"Set Custom Colors\");\n String[] colorstrs = {\"Star Color\",\"Low Magnituide Star Color\",\"Very Low Magnituide Star Color\", \"Deep Space Object Color\",\"Sky Background Color\",\n \t\t\"Circle Around Sky Background Color\",\"Overall Background Color\", \"Latitude/Longitude Text Color\",\"Constellation Line Color\"};\n for(int x = 0; x < colorstrs.length; x++) {\n \tMenuItem opt = new MenuItem(colorstrs[x]);\n \tint id = x;\n \topt.setOnAction((event) -> { colorSetterId = id; });\n \tcolorpickermenu.getItems().add(opt);\n }\n \n ComboBox<String> consts = new ComboBox<>();\n HashMap<String, String> cdbs = controller.getModelConstellationDBs();\n\n for (String name : cdbs.keySet()) {\n consts.getItems().add(name);\n }\n HBox box7 = new HBox(5);\n box7.getChildren().addAll(new Label(\"Select Constellation Set\"), consts);\n \n consts.getSelectionModel().select(\"Western\");\n mainmenu.getMenus().addAll(colorpickermenu);\n\t\tHBox box4 = new HBox(5);\n\t\tButton but = new Button(\"Cancel\");\n\t\tbut.setPadding(new Insets(5));\n\t\tButton but2 = new Button(\"Submit\");\n\t\tbut2.setPadding(new Insets(5));\n\t\tbox4.getChildren().addAll(but,but2);\n\t\tuicontrols.getChildren().addAll(box0,box1,box2,box3,box5,box6,box7,box4);\n\t\tbut.setOnAction((event) -> { input.close(); });\n\t\tbut2.setOnAction((event) -> {\n\t\t\tuserSelectedConstellationFileName = cdbs.get(consts.getValue());\n\t\t\tlong i = validateInput();\n\t\t\tif (i == 0) {\n\t\t\t\tchartTheStars();\n\t\t\t\tinput.close();\n\t\t\t} else {\n\t\t\t\tGUIerrorout = new Alert(AlertType.ERROR, getGUIErrorMsg(i));\n\t\t\t\tGUIerrorout.showAndWait();\n\t\t\t}\n });\n\t\tpane.setTop(mainmenu);\n\t\tpane.setCenter(uicontrols);\n\t\tpane.setPadding(new Insets(10));\n\t\tScene scene = new Scene(pane, 520, 310);\n\t\tinput.setScene(scene);\n\t}", "public TimeSelector() {\n super(new GridBagLayout());\n createInterface();\n }", "private void makeDisplay() {\n\n\t\t// setLayout to be a BoxLayout\n\t\tsetLayout(new BoxLayout(this, BoxLayout.Y_AXIS));\n\t\t// call these methods ???? to be defined later\n\n\t\taddOscServerAddressPanel();\n\t\taddGlobalControlPanel();\n\t\taddFirstSynthPanel();\n\t\taddSecondSynthPanel();\n\t\taddThirdSynthPanel();\n\t}", "public void initGui()\n {\n StringTranslate var1 = StringTranslate.getInstance();\n int var2 = this.func_73907_g();\n\n for (int var3 = 0; var3 < this.options.keyBindings.length; ++var3)\n {\n this.controlList.add(new GuiSmallButton(var3, var2 + var3 % 2 * 160, this.height / 6 + 24 * (var3 >> 1), 70, 20, this.options.getOptionDisplayString(var3)));\n }\n\n this.controlList.add(new GuiButton(200, this.width / 2 - 100, this.height / 6 + 168, var1.translateKey(\"gui.done\")));\n this.screenTitle = var1.translateKey(\"controls.minimap.title\");\n }", "private void addWidgets() {\n\t\tgrid.setHgap(10);\n\t\tgrid.setVgap(5);\n\t\tgrid.setPadding(new Insets(150, 80, 80, 80));\n\t\tgrid.add(lblPort, 0, 1);\n\t\tgrid.add(txtPort, 1, 1);\n\t\tgrid.add(lblAdress, 0, 2);\n\t\tgrid.add(txtAdress, 1, 2);\n\t\tgrid.add(lblNick, 0, 4);\n\t\tgrid.add(txtNickname, 1, 4);\n\t\tgrid.add(lblNickTaken, 1, 5);\n\t\tgrid.add(lblCardDesign, 0, 3);\n\t\tgrid.add(comboBoxCardDesign, 1, 3);\n\t\tgrid.add(btnLogin, 0, 7);\n\t\timvStart.setImage(imageStart);\n\t}", "@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 jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n jLabel4 = new javax.swing.JLabel();\n jTextField1 = new javax.swing.JTextField();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jButton3 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setFont(new java.awt.Font(\"Calibri\", 1, 36)); // NOI18N\n jLabel1.setText(\"JumpingJackServer\");\n\n jLabel2.setFont(new java.awt.Font(\"Calibri\", 0, 24)); // NOI18N\n jLabel2.setText(\"Adres IP:\");\n\n jLabel3.setFont(new java.awt.Font(\"Calibri\", 0, 24)); // NOI18N\n jLabel3.setText(\"Port:\");\n\n jLabel4.setFont(new java.awt.Font(\"Calibri\", 0, 24)); // NOI18N\n jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);\n\n jTextField1.setFont(new java.awt.Font(\"Calibri\", 0, 24)); // NOI18N\n jTextField1.setHorizontalAlignment(javax.swing.JTextField.RIGHT);\n jTextField1.setText(\"1219\");\n jTextField1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jTextField1ActionPerformed(evt);\n }\n });\n\n jButton1.setText(\"Start\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jButton2.setText(\"Wyjście\");\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n jButton3.setText(\"Stop\");\n jButton3.setEnabled(false);\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(57, 57, 57)\n .addComponent(jLabel1))\n .addGroup(layout.createSequentialGroup()\n .addGap(80, 80, 80)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel2)\n .addComponent(jLabel3))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel4, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jTextField1, javax.swing.GroupLayout.DEFAULT_SIZE, 149, Short.MAX_VALUE)))\n .addGroup(layout.createSequentialGroup()\n .addGap(48, 48, 48)\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(48, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(26, 26, 26)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(32, 32, 32)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, 37, Short.MAX_VALUE)\n .addComponent(jTextField1))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 44, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addContainerGap())\n );\n\n pack();\n }", "private void setup() {\n\t\tJTextArea jta = new JTextArea();\n\t\tsetLayout(new BorderLayout());\n\t\tadd(new JScrollPane(jta), BorderLayout.CENTER);\n\t\tsetTitle(SERVER_NAME);\n\t\tjta.setEditable(false);\n\t\tsetSize(500, 300);\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tsetVisible(true);\n\t\tjta.append(new Date().toString());\n\t}", "public FrontScreen() {\n\t\tsetLayout(null);\n\t\tsetBounds(0, 0, 1024, 768);\n\n\n\t\tController mycontroller = new Controller();\n\t\tbtnCalendar.setIcon(new ImageIcon(FrontScreen.class.getResource(\"/images/calendarbtn.png\")));\n\t\tbtnCalendar.setBounds(342, 74, 153, 41);\n\t\tadd(btnCalendar);\n\t\tbtnEventlist.setIcon(new ImageIcon(FrontScreen.class.getResource(\"/images/eventbtn.png\")));\n\t\tbtnEventlist.setBounds(550, 74, 153, 41);\n\t\tadd(btnEventlist);\n\t\tbtnLogOut.setIcon(new ImageIcon(FrontScreen.class.getResource(\"/images/Logout.png\")));\n\t\tbtnLogOut.setBounds(10, 22, 153, 41);\n\t\tadd(btnLogOut);\n\t\tbtnExit.setIcon(new ImageIcon(FrontScreen.class.getResource(\"/images/exit.png\")));\n\t\tbtnExit.setBounds(10, 74, 153, 41);\n\t\tadd(btnExit);\n\t\tlblgetUserName.setBounds(821, 59, 76, 14);\n\t\tSystem.out.println();\n\n\t\tadd(lblgetUserName);\n\t\tlblQotd.setFont(new Font(\"Snap ITC\", Font.PLAIN, 18));\n\t\tlblQotd.setBounds(342, 138, 415, 50);\n\n\t\tadd(lblQotd);\n\n\t\tBorder border = BorderFactory.createLineBorder(Color.BLUE, 3);\n\t\tlblWeatherInfo.setBounds(10, 420, 985, 247);\n\n\t\tString forecast = mycontroller.userControls(\"getWeather\");\n\t\tforecast = forecast.replace(\"},\", \"<br/>\");\n\t\tforecast = forecast.replace(\"[\", \"\");\n\t\tforecast = forecast.replace(\"{date='\", \" Date: \");\n\t\tforecast = forecast.replace(\"12:00:00 CET\", \"\");\n\t\tforecast = forecast.replace(\", desc=\", \" Description: \");\n\t\tforecast = forecast.replace(\"Forecast{date=\", \"\");\n\t\tforecast = forecast.replace(\", celsius='\", \" Temperature: \");\n\n\n\t\tlblWeatherInfo.setText(\"<html><body><p>\" + forecast + \"</body></p></html>\");\n\t\tlblWeatherInfo.setBorder(border);\n\t\tadd(lblWeatherInfo);\n\n\n\t\tlblWeather.setFont(new Font(\"Snap ITC\", Font.PLAIN, 18));\n\t\tlblWeather.setBounds(328, 379, 294, 50);\n\n\t\tadd(lblWeather);\n\n\n\n\t\tString qotd = mycontroller.userControls(\"qotd\");\n\t\tString[] qotdparts = qotd.split(\":\");\n\t\tString quotedontuse = qotdparts[0]; \n\t\tString quote = qotdparts[1];\n\t\tString author = qotdparts[2]; \n\t\tString topic = qotdparts[3];\n\n\t\t// Trying to remove {}:\n\t\tString quoteF = quote;\n\t\tquoteF = quoteF.replace(\"{\", \"\");\n\t\tquoteF = quoteF.replace(\"quote\", \"\");\n\t\tquoteF = quoteF.replace(\"author\", \"\");\n\n\t\tString authorF = author;\n\t\tauthorF = authorF.replace(\"{\", \"\");\n\t\tauthorF = authorF.replace(\"topic\", \"\");\n\n\t\tString topicF = topic;\n\t\ttopicF = topicF.replace(\"{\", \"\");\n\t\ttopicF = topicF.replace(\"}\", \"\");\n\n\n\n\n\t\tlblQuote.setBounds(81, 248, 914, 41);\n\n\n\t\tlblQuote.setText(quoteF);\n\n\t\tadd(lblQuote);\n\t\tlblAuthor.setBounds(81, 300, 816, 20);\n\t\tlblAuthor.setText(authorF);\n\n\t\tadd(lblAuthor);\n\t\tlblgetQotd.setBounds(10, 187, 985, 203);\n\n\t\tlblgetQotd.setBorder(border);\n\n\t\tadd(lblgetQotd);\n\t\tlblCategory.setBounds(81, 336, 816, 14);\n\n\t\tlblCategory.setText(topicF);\n\n\t\tadd(lblCategory);\n\t\tlblIconAuthor.setIcon(new ImageIcon(FrontScreen.class.getResource(\"/images/author.png\")));\n\t\tlblIconAuthor.setBounds(26, 295, 32, 32);\n\n\t\tadd(lblIconAuthor);\n\t\tlblIconQuote.setIcon(new ImageIcon(FrontScreen.class.getResource(\"/images/quote.png\")));\n\t\tlblIconQuote.setBounds(26, 258, 32, 32);\n\n\t\tadd(lblIconQuote);\n\t\tlblIconCategory.setIcon(new ImageIcon(FrontScreen.class.getResource(\"/images/Nuvola_apps_bookcase.png\")));\n\t\tlblIconCategory.setBounds(27, 338, 32, 32);\n\n\t\tadd(lblIconCategory);\n\n\n\t\tlblBackground.setIcon(new ImageIcon(FrontScreen.class.getResource(\"/images/login-mainframe.jpg\")));\n\t\tlblBackground.setBounds(0, 0, 1024, 768);\n\n\t\tadd(lblBackground);\n\n\t}", "private void $$$setupUI$$$() {\n rootPanel = new JPanel();\n rootPanel.setLayout(new GridLayoutManager(3, 5, new Insets(0, 5, 5, 5), -1, -1));\n worldMap = new JPanel();\n worldMap.setLayout(new GridBagLayout());\n worldMap.setBackground(new Color(-1250068));\n rootPanel.add(worldMap, new GridConstraints(1, 0, 2, 5, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, new Dimension(500, 500), null, null, 0, false));\n simulationTime = new JLabel();\n simulationTime.setText(\"0s\");\n rootPanel.add(simulationTime, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label1 = new JLabel();\n label1.setText(\"Simulation time:\");\n rootPanel.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final Spacer spacer1 = new Spacer();\n rootPanel.add(spacer1, new GridConstraints(0, 4, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_HORIZONTAL, GridConstraints.SIZEPOLICY_WANT_GROW, 1, null, null, null, 0, false));\n averageWaitingTime = new JLabel();\n averageWaitingTime.setText(\"0s\");\n rootPanel.add(averageWaitingTime, new GridConstraints(0, 3, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n final JLabel label2 = new JLabel();\n label2.setText(\"Average waiting time\");\n rootPanel.add(label2, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));\n }", "public ClockPanel() {\n Border border = BorderFactory.createLineBorder(Color.green, 5); //creates a border\n setLayout(new FlowLayout(FlowLayout.CENTER, 5, 0));\n setLabels();\n setBackground(new Color(0, 0, 0));\n setBorder(border);\n setBounds(0, 0, 390, 170);\n setVisible(true);\n\n timer = new Timer();\n TimerTask task = new TimerTask() {\n @Override\n public void run() {\n tickTock();\n }\n };\n timer.scheduleAtFixedRate(task, 0, 1000);\n }", "public computerVcomputer(){\n\t\tsuper.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tsuper.setLayout(null);\n\n\t\tboardOne.setLayout(null);\n\t\tboardTwo.setLayout(null);\n\t\tbuttonArea.setLayout(null);\n\t\t\n\t\tsetLocations();\n\t\t\n\t\tgameTimer = new Timer(10, new TimerListener());\n\n\t\tsuper.add(buttonArea);\n\t\tsuper.add(boardOne);\n\t\tsuper.add(boardTwo);\n\n\t\tnewGame.addActionListener(new newGameListener());\n\t\tbuttonArea.add(newGame);\n\t\tbuttonArea.add(cp1shipLabel);\n\t\tbuttonArea.add(cp2shipLabel);\n\n\t\tsuper.setSize(FRAME_WIDTH, FRAME_HEIGHT);\n\t\tsuper.setResizable(false);\n\t\tsuper.setVisible(true);\n\t\tsuper.setLocationRelativeTo(null);\n\t}", "private void layoutControls()\n {\n getChildren().addAll(\n new Label(\"Abfahrt\"),\n departureTimeField,\n new Label(\"Bahnhof\"),\n destinationField\n );\n }", "public HomePanel() {\n initComponents();\n setTime();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n portTypeComboBox = new javax.swing.JComboBox<>();\n portLbl = new javax.swing.JLabel();\n portTxtBox = new javax.swing.JTextField();\n userNameTxtBox = new javax.swing.JTextField();\n userNameLbl = new javax.swing.JLabel();\n passWordTxtBox = new javax.swing.JPasswordField();\n passWordLbl = new javax.swing.JLabel();\n saveBtn = new javax.swing.JButton();\n cancelBtn = new javax.swing.JButton();\n hostLbl = new javax.swing.JLabel();\n hostTxtBox = new javax.swing.JTextField();\n background = new javax.swing.JLabel();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Configuration\");\n setIconImage(new javax.swing.ImageIcon(Constants.WORKING_DIRECTORY + \"/src/main/resources/images/icon-setting.png\").getImage().getScaledInstance(30, 30, java.awt.Image.SCALE_SMOOTH));\n setResizable(false);\n\n jPanel1.setLayout(null);\n\n portTypeComboBox.setFont(new java.awt.Font(\"Arial Black\", 0, 14)); // NOI18N\n portTypeComboBox.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"Bolt\", \"HTTP\" }));\n jPanel1.add(portTypeComboBox);\n portTypeComboBox.setBounds(250, 210, 270, 30);\n\n portLbl.setFont(new java.awt.Font(\"Arial Black\", 0, 14)); // NOI18N\n portLbl.setText(\"Port:\");\n jPanel1.add(portLbl);\n portLbl.setBounds(250, 310, 52, 30);\n\n portTxtBox.setText(\"7687\");\n portTxtBox.setToolTipText(\"\");\n jPanel1.add(portTxtBox);\n portTxtBox.setBounds(370, 310, 150, 30);\n\n userNameTxtBox.setText(\"reader\");\n userNameTxtBox.setToolTipText(\"\");\n jPanel1.add(userNameTxtBox);\n userNameTxtBox.setBounds(370, 360, 150, 30);\n\n userNameLbl.setFont(new java.awt.Font(\"Arial Black\", 0, 14)); // NOI18N\n userNameLbl.setText(\"Username:\");\n jPanel1.add(userNameLbl);\n userNameLbl.setBounds(250, 360, 97, 30);\n\n passWordTxtBox.setText(\"1234\");\n jPanel1.add(passWordTxtBox);\n passWordTxtBox.setBounds(370, 410, 150, 30);\n\n passWordLbl.setFont(new java.awt.Font(\"Arial Black\", 0, 14)); // NOI18N\n passWordLbl.setText(\"Password:\");\n jPanel1.add(passWordLbl);\n passWordLbl.setBounds(250, 410, 97, 30);\n\n saveBtn.setBackground(new java.awt.Color(153, 153, 153));\n saveBtn.setText(\"Check\");\n saveBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n saveBtnActionPerformed(evt);\n }\n });\n jPanel1.add(saveBtn);\n saveBtn.setBounds(420, 460, 100, 30);\n\n cancelBtn.setBackground(new java.awt.Color(153, 153, 153));\n cancelBtn.setText(\"Cancel\");\n cancelBtn.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cancelBtnActionPerformed(evt);\n }\n });\n jPanel1.add(cancelBtn);\n cancelBtn.setBounds(240, 460, 100, 30);\n\n hostLbl.setFont(new java.awt.Font(\"Arial Black\", 0, 14)); // NOI18N\n hostLbl.setText(\"Host:\");\n jPanel1.add(hostLbl);\n hostLbl.setBounds(250, 260, 52, 30);\n\n hostTxtBox.setText(\"localhost\");\n hostTxtBox.setToolTipText(\"\");\n jPanel1.add(hostTxtBox);\n hostTxtBox.setBounds(370, 260, 150, 30);\n\n background.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/main/resources/images/background01.png\"))); // NOI18N\n jPanel1.add(background);\n background.setBounds(0, 0, 560, 559);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 564, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 542, Short.MAX_VALUE)\n );\n\n pack();\n }", "private void setLayout() {\n\t\ttxtNickname.setId(\"txtNickname\");\n\t\ttxtPort.setId(\"txtPort\");\n\t\ttxtAdress.setId(\"txtAdress\");\n\t\tlblNickTaken.setId(\"lblNickTaken\");\n\n\t\tgrid.setPrefSize(516, 200);\n\t\tbtnLogin.setDisable(true);\n\t\ttxtNickname.setPrefSize(200, 25);\n\t\tlblNickTaken.setPrefSize(250, 10);\n\t\tlblNickTaken.setText(null);\n\t\tlblNickTaken.setTextFill(Color.RED);\n\t\tlblNick.setPrefSize(120, 50);\n\t\ttxtAdress.setText(\"localhost\");\n\t\ttxtPort.setText(\"4455\");\n\t\tlblCardDesign.setPrefSize(175, 25);\n\t\tcomboBoxCardDesign.getSelectionModel().select(0);\n\t\tbtnLogin.setGraphic(imvStart);\n\t}", "public NewSessionGui() {\n initComponents();\n client = new HttpBraimClient();\n setLocationRelativeTo(null);\n }", "private void initialize() {\n\t\tfrmISO8583Simulator = new JFrame();\n\t\tfrmISO8583Simulator.setTitle(\"ISO8583 Host Simulator\");\n\t\tfrmISO8583Simulator.setBounds(100, 100, 558, 803);\n\t\tfrmISO8583Simulator.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t\ttbpnTABS = new JTabbedPane(JTabbedPane.TOP);\n\t\tGroupLayout groupLayout = new GroupLayout(frmISO8583Simulator.getContentPane());\n\t\tgroupLayout.setHorizontalGroup(groupLayout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(groupLayout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addComponent(tbpnTABS, GroupLayout.DEFAULT_SIZE, 514, Short.MAX_VALUE).addGap(20)));\n\t\tgroupLayout.setVerticalGroup(groupLayout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(groupLayout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addComponent(tbpnTABS, GroupLayout.PREFERRED_SIZE, 721, Short.MAX_VALUE).addContainerGap()));\n\n\t\tList<String> fepNames = new ArrayList<String>();\n\n\t\tfor (Map.Entry<String, String> currentEntry : Initializer.getFepPropertyFiles().entrySet()) {\n\t\t\tif (currentEntry.getKey() != \"Common\") {\n\t\t\t\tfepNames.add(currentEntry.getKey());\n\t\t\t}\n\t\t}\n\n\t\tbtngrpSendResponseOrNot = new ButtonGroup();\n\n\t\t/*\n\t\t * IP is taken from the system in which the simulator is running and is\n\t\t * displayed in the txtip field\n\t\t */\n\t\tInetAddress inet = null;\n\t\ttry {\n\t\t\tinet = InetAddress.getLocalHost();\n\t\t} catch (UnknownHostException e1) {\n\t\t\tSystem.out.println(\"Unable to fetch the system details\");\n\t\t\tlogger.error(\"Unable to fetch the system details\");\n\t\t}\n\t\tbtngrpauthorizationResult = new ButtonGroup();\n\n\t\tpnMain = new JPanel();\n\t\ttbpnTABS.addTab(\"Server Configuration\", null, pnMain, null);\n\n\t\tpnFEP = new JPanel();\n\t\tpnFEP.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null), \"FEP\", TitledBorder.LEFT,\n\t\t\t\tTitledBorder.ABOVE_TOP, null, new Color(0, 0, 0)));\n\n\t\tlblName = new JLabel(\"Name : \");\n\t\tcbxFEP = new JComboBox(fepNames.toArray());\n\t\tcbxFEP.setSelectedItem(Initializer.getFEPname());\n\t\tGroupLayout gl_pnFEP = new GroupLayout(pnFEP);\n\t\tgl_pnFEP.setHorizontalGroup(gl_pnFEP.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_pnFEP.createSequentialGroup().addContainerGap().addComponent(lblName).addGap(18)\n\t\t\t\t\t\t.addComponent(cbxFEP, GroupLayout.PREFERRED_SIZE, 406, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));\n\t\tgl_pnFEP.setVerticalGroup(gl_pnFEP.createParallelGroup(Alignment.LEADING).addGroup(gl_pnFEP\n\t\t\t\t.createSequentialGroup().addContainerGap()\n\t\t\t\t.addGroup(gl_pnFEP.createParallelGroup(Alignment.BASELINE).addComponent(lblName).addComponent(cbxFEP,\n\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t.addContainerGap(15, Short.MAX_VALUE)));\n\t\tpnFEP.setLayout(gl_pnFEP);\n\n\t\tpnServerConfiguration = new JPanel();\n\t\tpnServerConfiguration.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null),\n\t\t\t\t\"Connectivity\", TitledBorder.LEFT, TitledBorder.ABOVE_TOP, null, new Color(0, 0, 0)));\n\n\t\tlblIp = new JLabel(\"IP : \");\n\t\ttxtIP = new JTextField(inet.getHostAddress());\n\t\ttxtIP.setToolTipText(\"This field is non-editable. It takes the IP of the system at run-time. This is only to provide the information of the System ip so that this simulator can be connected from any other system as well.\");\n\t\ttxtIP.setEnabled(false);\n\t\ttxtIP.setColumns(10);\n\n\t\tJLabel lblPort = new JLabel(\"Port : \");\n\n\t\ttxtPort = new JTextField();\n\t\ttxtPort.setText(String.valueOf(Initializer.getPortNumber()));\n\t\ttxtPort.setColumns(10);\n\t\tGroupLayout gl_pnServerConfiguration = new GroupLayout(pnServerConfiguration);\n\t\tgl_pnServerConfiguration.setHorizontalGroup(gl_pnServerConfiguration.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_pnServerConfiguration.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(gl_pnServerConfiguration\n\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING).addComponent(lblIp).addComponent(lblPort))\n\t\t\t\t\t\t.addGap(29)\n\t\t\t\t\t\t.addGroup(gl_pnServerConfiguration.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t.addComponent(txtPort, GroupLayout.DEFAULT_SIZE, 407, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t.addComponent(txtIP, GroupLayout.DEFAULT_SIZE, 407, Short.MAX_VALUE))\n\t\t\t\t\t\t.addContainerGap()));\n\t\tgl_pnServerConfiguration\n\t\t\t\t.setVerticalGroup(\n\t\t\t\t\t\tgl_pnServerConfiguration.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t.addGroup(gl_pnServerConfiguration.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t\t\t\t\t.addGroup(gl_pnServerConfiguration.createParallelGroup(Alignment.BASELINE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(lblIp).addComponent(txtIP, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t.addGap(18)\n\t\t\t\t\t\t\t\t\t\t.addGroup(gl_pnServerConfiguration.createParallelGroup(Alignment.BASELINE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(lblPort).addComponent(txtPort, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t.addContainerGap(52, Short.MAX_VALUE)));\n\t\tpnServerConfiguration.setLayout(gl_pnServerConfiguration);\n\n\t\tlblStatusValue = new JLabel(\"Offline\");\n\n\t\tlblStatus = new JLabel(\"Status : \");\n\n\t\tbtnSaveServerConfiguration = new JButton(\"Save Server Configuration\");\n\t\tbtnSaveServerConfiguration.setBackground(SystemColor.controlHighlight);\n\n\t\tbtnStartServer = new JButton(\"Start Server\");\n\n\t\tbtnStartServer.setBackground(SystemColor.controlHighlight);\n\n\t\tbtnStopServer = new JButton(\"Stop Server\");\n\t\tbtnStopServer.setEnabled(false);\n\n\t\tbtnStopServer.setBackground(SystemColor.controlHighlight);\n\n\t\tGroupLayout gl_pnMain = new GroupLayout(pnMain);\n\t\tgl_pnMain.setHorizontalGroup(gl_pnMain.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_pnMain.createSequentialGroup()\n\t\t\t\t\t\t.addGroup(gl_pnMain.createParallelGroup(Alignment.TRAILING).addGroup(Alignment.LEADING,\n\t\t\t\t\t\t\t\tgl_pnMain.createSequentialGroup().addGap(412).addComponent(lblStatus)\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(lblStatusValue))\n\t\t\t\t\t\t\t\t.addGroup(gl_pnMain.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t\t\t\t\t.addComponent(pnFEP, GroupLayout.PREFERRED_SIZE, 491,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addGap(0, 0, Short.MAX_VALUE))\n\t\t\t\t\t\t\t\t.addGroup(Alignment.LEADING,\n\t\t\t\t\t\t\t\t\t\tgl_pnMain.createSequentialGroup().addContainerGap().addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\tpnServerConfiguration, GroupLayout.PREFERRED_SIZE, 491,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t.addGroup(Alignment.LEADING,\n\t\t\t\t\t\t\t\t\t\tgl_pnMain.createSequentialGroup().addContainerGap().addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\tbtnSaveServerConfiguration, GroupLayout.PREFERRED_SIZE, 491,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t.addGroup(gl_pnMain.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t\t\t\t\t.addComponent(btnStartServer, GroupLayout.PREFERRED_SIZE, 224,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addGap(44)\n\t\t\t\t\t\t\t\t\t\t.addComponent(btnStopServer, GroupLayout.PREFERRED_SIZE, 223,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addGap(0, 0, Short.MAX_VALUE)))\n\t\t\t\t\t\t.addContainerGap(17, Short.MAX_VALUE)));\n\t\tgl_pnMain.setVerticalGroup(gl_pnMain.createParallelGroup(Alignment.LEADING).addGroup(gl_pnMain\n\t\t\t\t.createSequentialGroup().addGap(7)\n\t\t\t\t.addGroup(gl_pnMain.createParallelGroup(Alignment.BASELINE).addComponent(lblStatusValue)\n\t\t\t\t\t\t.addComponent(lblStatus))\n\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t.addComponent(pnFEP, GroupLayout.PREFERRED_SIZE, 73, GroupLayout.PREFERRED_SIZE).addGap(32)\n\t\t\t\t.addComponent(pnServerConfiguration, GroupLayout.PREFERRED_SIZE, 122, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t.addGap(18).addComponent(btnSaveServerConfiguration).addGap(26)\n\t\t\t\t.addGroup(gl_pnMain.createParallelGroup(Alignment.BASELINE).addComponent(btnStartServer)\n\t\t\t\t\t\t.addComponent(btnStopServer))\n\t\t\t\t.addGap(335)));\n\t\tpnMain.setLayout(gl_pnMain);\n\n\t\tJPanel pnTransactionConfiguration = new JPanel();\n\t\ttbpnTABS.addTab(\"Transaction Configuration\", null, pnTransactionConfiguration, null);\n\n\t\tpnAuthorization = new JPanel();\n\t\tpnAuthorization.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null),\n\t\t\t\t\"Authorisation(x100)\", TitledBorder.LEADING, TitledBorder.ABOVE_TOP, null, null));\n\n\t\tpnFinancialSales = new JPanel();\n\t\tpnFinancialSales.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null),\n\t\t\t\t\"Financial Sales(x200)\", TitledBorder.LEADING, TitledBorder.ABOVE_TOP, null, null));\n\n\t\tpnFinancialForceDraft = new JPanel();\n\t\tpnFinancialForceDraft.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null),\n\t\t\t\t\"Financial Force Draft(x220)\", TitledBorder.LEADING, TitledBorder.ABOVE_TOP, null, null));\n\n\t\tpnReversal = new JPanel();\n\t\tpnReversal.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null), \"Reversal(x420)\",\n\t\t\t\tTitledBorder.LEADING, TitledBorder.ABOVE_TOP, null, null));\n\n\t\tpnReconciliation = new JPanel();\n\t\tpnReconciliation.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null),\n\t\t\t\t\"Reconciliation(x520)\", TitledBorder.LEADING, TitledBorder.ABOVE_TOP, null, null));\n\n\t\tpnSendResponse = new JPanel();\n\t\tpnSendResponse.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null), \"Send Response\",\n\t\t\t\tTitledBorder.LEFT, TitledBorder.ABOVE_TOP, null, new Color(0, 0, 0)));\n\n\t\trdbtnSendResponse = new JRadioButton(\"Yes\");\n\t\trdbtnDontSendResponse = new JRadioButton(\"No\");\n\t\tbtngrpSendResponseOrNot.add(rdbtnSendResponse);\n\t\tbtngrpSendResponseOrNot.add(rdbtnDontSendResponse);\n\t\tif (Initializer.getConfigurationTracker().getFepPropertiesMap().get(\"sendResponse\").equalsIgnoreCase(\"No\")) {\n\t\t\trdbtnDontSendResponse.setSelected(true);\n\t\t} else {\n\t\t\trdbtnSendResponse.setSelected(true);\n\t\t}\n\t\tGroupLayout gl_pnSendResponse = new GroupLayout(pnSendResponse);\n\t\tgl_pnSendResponse.setHorizontalGroup(gl_pnSendResponse.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_pnSendResponse.createSequentialGroup().addContainerGap().addComponent(rdbtnSendResponse)\n\t\t\t\t\t\t.addGap(124).addComponent(rdbtnDontSendResponse).addContainerGap(273, Short.MAX_VALUE)));\n\t\tgl_pnSendResponse.setVerticalGroup(gl_pnSendResponse.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_pnSendResponse.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(gl_pnSendResponse.createParallelGroup(Alignment.BASELINE)\n\t\t\t\t\t\t\t\t.addComponent(rdbtnSendResponse).addComponent(rdbtnDontSendResponse))\n\t\t\t\t\t\t.addContainerGap(17, Short.MAX_VALUE)));\n\t\tpnSendResponse.setLayout(gl_pnSendResponse);\n\n\t\tpnConfiguration = new JPanel();\n\t\tpnConfiguration.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null),\n\t\t\t\t\"Response Code & Amount\", TitledBorder.LEFT, TitledBorder.ABOVE_TOP, null, new Color(0, 0, 0)));\n\n\t\tlblDeclineCode = new JLabel(\"Decline Code : \");\n\n\t\ttxtDeclineCode = new JFormattedTextField();\n\t\ttxtDeclineCode\n\t\t\t\t.setText(Initializer.getConfigurationTracker().getFepPropertiesMap().get(\"ValueOfBitfield39Decline\"));\n\n\t\tlblApprovalAmount = new JLabel(\"Approval Amount : \");\n\n\t\ttxtApprovalAmount = new JFormattedTextField();\n\t\ttxtApprovalAmount.setToolTipText(\"This field should contain 12 digits of numbers. Last two digits denotes the decimal points. For example, to set the amount as $12.49, amount should be configured as 000000001249.\");\n\t\ttxtApprovalAmount.setText(Initializer.getConfigurationTracker().getFepPropertiesMap().get(\"valueOfBitfield4\"));\n\t\ttxtApprovalAmount.setEnabled(false);\n\n\t\tchckbxApproveForHalf = new JCheckBox(\"Approve for half of transaction amount\");\n\t\tchckbxApproveForHalf.setSelected(true);\n\t\tif (Initializer.getConfigurationTracker().getFepPropertiesMap().get(\"isHalfApprovalRequired\")\n\t\t\t\t.equalsIgnoreCase(\"true\")) {\n\t\t\tchckbxApproveForHalf.setSelected(true);\n\t\t\ttxtApprovalAmount.setEnabled(true);\n\t\t} else {\n\t\t\tchckbxApproveForHalf.setSelected(false);\n\t\t\ttxtApprovalAmount.setEnabled(false);\n\t\t}\n\n\t\tGroupLayout gl_pnConfiguration = new GroupLayout(pnConfiguration);\n\t\tgl_pnConfiguration.setHorizontalGroup(gl_pnConfiguration.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_pnConfiguration.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(gl_pnConfiguration.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t.addComponent(lblApprovalAmount).addComponent(lblDeclineCode))\n\t\t\t\t\t\t.addGap(16)\n\t\t\t\t\t\t.addGroup(gl_pnConfiguration.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t.addComponent(txtDeclineCode, GroupLayout.DEFAULT_SIZE, 361, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t.addComponent(chckbxApproveForHalf)\n\t\t\t\t\t\t\t\t.addComponent(txtApprovalAmount, GroupLayout.DEFAULT_SIZE, 361, Short.MAX_VALUE))\n\t\t\t\t\t\t.addContainerGap()));\n\t\tgl_pnConfiguration.setVerticalGroup(gl_pnConfiguration.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_pnConfiguration.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(gl_pnConfiguration.createParallelGroup(Alignment.BASELINE)\n\t\t\t\t\t\t\t\t.addComponent(lblDeclineCode).addComponent(txtDeclineCode, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGap(18)\n\t\t\t\t\t\t.addGroup(gl_pnConfiguration.createParallelGroup(Alignment.BASELINE)\n\t\t\t\t\t\t\t\t.addComponent(lblApprovalAmount).addComponent(txtApprovalAmount,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.UNRELATED).addComponent(chckbxApproveForHalf)\n\t\t\t\t\t\t.addContainerGap(46, Short.MAX_VALUE)));\n\t\tpnConfiguration.setLayout(gl_pnConfiguration);\n\n\t\tbtnSaveTransactionConfiguration = new JButton(\"Save Transaction Configuration\");\n\t\tbtnSaveTransactionConfiguration.setBackground(SystemColor.controlHighlight);\n\n\t\tGroupLayout gl_pnTransactionConfiguration = new GroupLayout(pnTransactionConfiguration);\n\t\tgl_pnTransactionConfiguration.setHorizontalGroup(gl_pnTransactionConfiguration\n\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_pnTransactionConfiguration.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(gl_pnTransactionConfiguration.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t.addComponent(pnConfiguration, 0, 0, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t.addComponent(pnReconciliation, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t.addComponent(pnReversal, 0, 0, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t.addComponent(pnFinancialForceDraft, 0, 0, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t.addComponent(pnFinancialSales, 0, 0, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t.addComponent(pnAuthorization, 0, 0, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t.addComponent(pnSendResponse, GroupLayout.DEFAULT_SIZE, 496, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t.addComponent(btnSaveTransactionConfiguration, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n\t\t\t\t\t\t.addContainerGap(12, Short.MAX_VALUE)));\n\t\tgl_pnTransactionConfiguration.setVerticalGroup(gl_pnTransactionConfiguration\n\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_pnTransactionConfiguration.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addComponent(pnSendResponse, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(pnAuthorization, GroupLayout.PREFERRED_SIZE, 74, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(pnFinancialSales, GroupLayout.PREFERRED_SIZE, 70, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(pnFinancialForceDraft, GroupLayout.PREFERRED_SIZE, 74, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(pnReversal, GroupLayout.PREFERRED_SIZE, 75, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(pnReconciliation, GroupLayout.PREFERRED_SIZE, 78, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(pnConfiguration, GroupLayout.PREFERRED_SIZE, 141, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.UNRELATED).addComponent(btnSaveTransactionConfiguration)\n\t\t\t\t\t\t.addContainerGap(30, Short.MAX_VALUE)));\n\n\t\trdbtnReconciliationApprove = new JRadioButton(\"Approve\");\n\t\trdbtnReconciliationDecline = new JRadioButton(\"Decline\");\n\t\tbtngrpReconciliationResult = new ButtonGroup();\n\t\tbtngrpReconciliationResult.add(rdbtnReconciliationApprove);\n\t\tbtngrpReconciliationResult.add(rdbtnReconciliationDecline);\n\n\t\tGroupLayout gl_pnReconciliation = new GroupLayout(pnReconciliation);\n\t\tgl_pnReconciliation.setHorizontalGroup(gl_pnReconciliation.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_pnReconciliation.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addComponent(rdbtnReconciliationApprove).addGap(103).addComponent(rdbtnReconciliationDecline)\n\t\t\t\t\t\t.addContainerGap(221, Short.MAX_VALUE)));\n\t\tgl_pnReconciliation.setVerticalGroup(gl_pnReconciliation.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_pnReconciliation.createSequentialGroup().addGap(15)\n\t\t\t\t\t\t.addGroup(gl_pnReconciliation.createParallelGroup(Alignment.BASELINE)\n\t\t\t\t\t\t\t\t.addComponent(rdbtnReconciliationApprove).addComponent(rdbtnReconciliationDecline))\n\t\t\t\t\t\t.addContainerGap(19, Short.MAX_VALUE)));\n\t\tpnReconciliation.setLayout(gl_pnReconciliation);\n\n\t\trdbtnReversalApprove = new JRadioButton(\"Approve\");\n\t\trdbtnReversalApprove.setSelected(true);\n\t\trdbtnReversalDecline = new JRadioButton(\"Decline\");\n\t\tbtngrpReversalResult = new ButtonGroup();\n\t\tbtngrpReversalResult.add(rdbtnReversalApprove);\n\t\tbtngrpReversalResult.add(rdbtnReversalDecline);\n\t\tGroupLayout gl_pnReversal = new GroupLayout(pnReversal);\n\t\tgl_pnReversal.setHorizontalGroup(gl_pnReversal.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_pnReversal.createSequentialGroup().addContainerGap().addComponent(rdbtnReversalApprove)\n\t\t\t\t\t\t.addGap(103).addComponent(rdbtnReversalDecline).addContainerGap(272, Short.MAX_VALUE)));\n\t\tgl_pnReversal.setVerticalGroup(gl_pnReversal.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_pnReversal.createSequentialGroup().addGap(14)\n\t\t\t\t\t\t.addGroup(gl_pnReversal.createParallelGroup(Alignment.BASELINE)\n\t\t\t\t\t\t\t\t.addComponent(rdbtnReversalApprove).addComponent(rdbtnReversalDecline))\n\t\t\t\t\t\t.addContainerGap(17, Short.MAX_VALUE)));\n\t\tpnReversal.setLayout(gl_pnReversal);\n\n\t\trdbtnFinancialForceDraftApprove = new JRadioButton(\"Approve\");\n\t\trdbtnFinancialForceDraftApprove.setSelected(true);\n\t\trdbtnFinancialForceDraftDecline = new JRadioButton(\"Decline\");\n\t\tbtngrpFinancialForceDraftResult = new ButtonGroup();\n\t\tbtngrpFinancialForceDraftResult.add(rdbtnFinancialForceDraftApprove);\n\t\tbtngrpFinancialForceDraftResult.add(rdbtnFinancialForceDraftDecline);\n\t\tGroupLayout gl_pnFinancialForceDraft = new GroupLayout(pnFinancialForceDraft);\n\t\tgl_pnFinancialForceDraft.setHorizontalGroup(gl_pnFinancialForceDraft.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_pnFinancialForceDraft.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addComponent(rdbtnFinancialForceDraftApprove).addGap(103)\n\t\t\t\t\t\t.addComponent(rdbtnFinancialForceDraftDecline).addContainerGap(272, Short.MAX_VALUE)));\n\t\tgl_pnFinancialForceDraft.setVerticalGroup(gl_pnFinancialForceDraft.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_pnFinancialForceDraft.createSequentialGroup().addGap(18)\n\t\t\t\t\t\t.addGroup(gl_pnFinancialForceDraft.createParallelGroup(Alignment.BASELINE)\n\t\t\t\t\t\t\t\t.addComponent(rdbtnFinancialForceDraftApprove)\n\t\t\t\t\t\t\t\t.addComponent(rdbtnFinancialForceDraftDecline))\n\t\t\t\t\t\t.addContainerGap(12, Short.MAX_VALUE)));\n\t\tpnFinancialForceDraft.setLayout(gl_pnFinancialForceDraft);\n\n\t\trdbtnFinancialSalesApprove = new JRadioButton(\"Approve\");\n\t\trdbtnFinancialSalesApprove.setSelected(true);\n\t\trdbtnFinancialSalesDecline = new JRadioButton(\"Decline\");\n\t\trdbtnFinancialSalesPartiallyapprove = new JRadioButton(\"PartiallyApprove\");\n\t\tbtngrpFinancialSalesResult = new ButtonGroup();\n\t\tbtngrpFinancialSalesResult.add(rdbtnFinancialSalesApprove);\n\t\tbtngrpFinancialSalesResult.add(rdbtnFinancialSalesDecline);\n\t\tbtngrpFinancialSalesResult.add(rdbtnFinancialSalesPartiallyapprove);\n\t\tGroupLayout gl_pnFinancialSales = new GroupLayout(pnFinancialSales);\n\t\tgl_pnFinancialSales.setHorizontalGroup(gl_pnFinancialSales.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_pnFinancialSales.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addComponent(rdbtnFinancialSalesApprove).addGap(102).addComponent(rdbtnFinancialSalesDecline)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 117, Short.MAX_VALUE)\n\t\t\t\t\t\t.addComponent(rdbtnFinancialSalesPartiallyapprove).addGap(41)));\n\t\tgl_pnFinancialSales.setVerticalGroup(gl_pnFinancialSales.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_pnFinancialSales.createSequentialGroup().addGap(18)\n\t\t\t\t\t\t.addGroup(gl_pnFinancialSales.createParallelGroup(Alignment.BASELINE)\n\t\t\t\t\t\t\t\t.addComponent(rdbtnFinancialSalesApprove).addComponent(rdbtnFinancialSalesDecline)\n\t\t\t\t\t\t\t\t.addComponent(rdbtnFinancialSalesPartiallyapprove))\n\t\t\t\t\t\t.addContainerGap(22, Short.MAX_VALUE)));\n\t\tpnFinancialSales.setLayout(gl_pnFinancialSales);\n\n\t\trdbtnAuthorizationApprove = new JRadioButton(\"Approve\");\n\t\trdbtnAuthorizationApprove.setSelected(true);\n\t\trdbtnAuthorizationDecline = new JRadioButton(\"Decline\");\n\t\trdbtnAuthorizationPartiallyapprove = new JRadioButton(\"PartiallyApprove\");\n\t\tbtngrpauthorizationResult.add(rdbtnAuthorizationApprove);\n\t\tbtngrpauthorizationResult.add(rdbtnAuthorizationDecline);\n\t\tbtngrpauthorizationResult.add(rdbtnAuthorizationPartiallyapprove);\n\n\t\tGroupLayout gl_pnAuthorization = new GroupLayout(pnAuthorization);\n\t\tgl_pnAuthorization.setHorizontalGroup(gl_pnAuthorization.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_pnAuthorization.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addComponent(rdbtnAuthorizationApprove).addGap(101).addComponent(rdbtnAuthorizationDecline)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 118, Short.MAX_VALUE)\n\t\t\t\t\t\t.addComponent(rdbtnAuthorizationPartiallyapprove).addGap(47)));\n\t\tgl_pnAuthorization.setVerticalGroup(gl_pnAuthorization.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t.addGroup(gl_pnAuthorization.createSequentialGroup().addContainerGap(16, Short.MAX_VALUE)\n\t\t\t\t\t\t.addGroup(gl_pnAuthorization.createParallelGroup(Alignment.BASELINE)\n\t\t\t\t\t\t\t\t.addComponent(rdbtnAuthorizationApprove).addComponent(rdbtnAuthorizationDecline)\n\t\t\t\t\t\t\t\t.addComponent(rdbtnAuthorizationPartiallyapprove))\n\t\t\t\t\t\t.addGap(14)));\n\t\tpnAuthorization.setLayout(gl_pnAuthorization);\n\t\tpnTransactionConfiguration.setLayout(gl_pnTransactionConfiguration);\n\n\t\tpnLogs = new JPanel();\n\t\ttbpnTABS.addTab(\"Runtime Logs\", null, pnLogs, null);\n\n\t\tJLabel lblRuntimeLogs = new JLabel(\"Logs : \");\n\n\t\tJScrollPane scrlpnLogs = new JScrollPane();\n\n\t\tJButton btnClearLogs = new JButton(\"Clear Logs\");\n\n\t\tbtnSaveLogs = new JButton(\"Save Logs\");\n\n\t\tString[] logLevel = { \"INFO\", \"DEBUG\", \"WARN\", \"ERROR\", \"FATAL\" };\n\t\tcbxLogLevel = new JComboBox(logLevel);\n\n\t\tJLabel lblLevel = new JLabel(\"Level:\");\n\n\t\tGroupLayout gl_pnLogs = new GroupLayout(pnLogs);\n\t\tgl_pnLogs.setHorizontalGroup(\n\t\t\tgl_pnLogs.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_pnLogs.createSequentialGroup()\n\t\t\t\t\t.addGap(14)\n\t\t\t\t\t.addGroup(gl_pnLogs.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addComponent(scrlpnLogs, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 494, Short.MAX_VALUE)\n\t\t\t\t\t\t.addGroup(gl_pnLogs.createSequentialGroup()\n\t\t\t\t\t\t\t.addComponent(lblRuntimeLogs)\n\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 78, Short.MAX_VALUE)\n\t\t\t\t\t\t\t.addComponent(lblLevel)\n\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t.addComponent(cbxLogLevel, GroupLayout.PREFERRED_SIZE, 97, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t.addGap(28)\n\t\t\t\t\t\t\t.addComponent(btnSaveLogs)\n\t\t\t\t\t\t\t.addGap(18)\n\t\t\t\t\t\t\t.addComponent(btnClearLogs)\n\t\t\t\t\t\t\t.addGap(23)))\n\t\t\t\t\t.addContainerGap())\n\t\t);\n\t\tgl_pnLogs.setVerticalGroup(\n\t\t\tgl_pnLogs.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(gl_pnLogs.createSequentialGroup()\n\t\t\t\t\t.addGap(13)\n\t\t\t\t\t.addGroup(gl_pnLogs.createParallelGroup(Alignment.BASELINE)\n\t\t\t\t\t\t.addComponent(btnClearLogs)\n\t\t\t\t\t\t.addComponent(btnSaveLogs)\n\t\t\t\t\t\t.addComponent(cbxLogLevel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(lblLevel)\n\t\t\t\t\t\t.addComponent(lblRuntimeLogs))\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t.addComponent(scrlpnLogs, GroupLayout.DEFAULT_SIZE, 632, Short.MAX_VALUE)\n\t\t\t\t\t.addGap(12))\n\t\t);\n\n\t\tInitializer.txtareaLogs.setEditable(false);\n\t\tscrlpnLogs.setViewportView(Initializer.txtareaLogs);\n\t\tpnLogs.setLayout(gl_pnLogs);\n\t\tfrmISO8583Simulator.getContentPane().setLayout(groupLayout);\n\n\t\tmenuBar = new JMenuBar();\n\t\tfrmISO8583Simulator.setJMenuBar(menuBar);\n\n\t\tmnFile = new JMenu(\"File\");\n\t\tmenuBar.add(mnFile);\n\n\t\tmntmExit = new JMenuItem(\"Exit\");\n\t\tmnFile.add(mntmExit);\n\n\t\tmnHelp = new JMenu(\"Help\");\n\t\tmenuBar.add(mnHelp);\n\n\t\tmntmAbout = new JMenuItem(\"About\");\n\t\tmnHelp.add(mntmAbout);\n\n\t\trefreshGUIConfiguration();\n\n\t\t// -----------------------------------------------------------------------------------------------------------------------------\n\t\t/*\n\t\t * When the start server button is clicked, i) Server is started ii) if the\n\t\t * server is started successfully, Start server button is disabled & Stop server\n\t\t * button is enabled\n\t\t */\n\t\t// -----------------------------------------------------------------------------------------------------------------------------\n\t\tbtnStartServer.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tlogger.debug(\"Server status update was reset to false\");\n\t\t\t\tif (Initializer.startServer()) {\n\t\t\t\t\tstartServerGUIChanges();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// -----------------------------------------------------------------------------------------------------------------------------\n\t\t/*\n\t\t * When the stop server button is clicked, i) Server is stopped ii) If the\n\t\t * server is stopped successfully, Start server button is disabled & Stop server\n\t\t * button is enabled\n\t\t */\n\t\t// -----------------------------------------------------------------------------------------------------------------------------\n\t\tbtnStopServer.addActionListener(new ActionListener() {\n\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif (Initializer.stopServer()) {\n\t\t\t\t\tstopServerGUIChanges();\n\t\t\t\t} else {\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Unable to stop the server\");\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t// -----------------------------------------------------------------------------------------------------------------------------\n\t\t/*\n\t\t * When the Approve for half of transaction amount checkbox is checked, approval\n\t\t * amount text field will be enabled and simulator will start approving for the\n\t\t * specified amount\n\t\t */\n\t\t// -----------------------------------------------------------------------------------------------------------------------------\n\t\tchckbxApproveForHalf.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif (chckbxApproveForHalf.isSelected()) {\n\t\t\t\t\ttxtApprovalAmount.setEnabled(false);\n\t\t\t\t} else {\n\t\t\t\t\ttxtApprovalAmount.setEnabled(true);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t// -----------------------------------------------------------------------------------------------------------------------------\n\t\t/*\n\t\t * When the save logs button is clicked, user gets the explorer window to save\n\t\t * the runtime logs\n\t\t */\n\t\t// -----------------------------------------------------------------------------------------------------------------------------\n\t\tbtnSaveLogs.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}\n\t\t});\n\t\t// -----------------------------------------------------------------------------------------------------------------------------\n\t\t/*\n\t\t * When the clear logs button is clicked, the runtime logs text area is cleared\n\t\t */\n\t\t// -----------------------------------------------------------------------------------------------------------------------------\n\t\tbtnClearLogs.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\tInitializer.txtareaLogs.getDocument().remove(0, Initializer.txtareaLogs.getDocument().getLength());\n\t\t\t\t} catch (BadLocationException e1) {\n\t\t\t\t\tSystem.out.println(\"Unable to clear the logs\");\n\t\t\t\t\tlogger.error(\"Unable to clear the logs\");\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t// -----------------------------------------------------------------------------------------------------------------------------\n\t\t/*\n\t\t * When the change port number button is clicked, i) Validation if the set port\n\t\t * number is correct is performed. ii) Error message is displayed if the entered\n\t\t * port number is invalid iii) If the entered port number is valid, server is\n\t\t * stopped, port number is changed and server is restarted.\n\t\t */\n\t\t// -----------------------------------------------------------------------------------------------------------------------------\n\t\tbtnSaveServerConfiguration.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tboolean update = false;\n\t\t\t\ttry {\n\t\t\t\t\tif (Integer.parseInt(txtPort.getText()) < 1026 || Integer.parseInt(txtPort.getText()) > 65536) {\n\t\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\t\t\"Entered port number is invalid. Valid port number range is between 1026 and 65535\");\n\t\t\t\t\t\tlogger.info(\n\t\t\t\t\t\t\t\t\"Entered port number is invalid. Valid port number range is between 1026 and 65535\");\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\t\"Entered port number is invalid. Valid port number range is between 1026 and 65535\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (!cbxFEP.getSelectedItem().toString().equals(Initializer.getFEPname())) {\n\t\t\t\t\t\t\tInitializer.setFEPname(cbxFEP.getSelectedItem().toString());\n\t\t\t\t\t\t\tInitializer.getConfigurationTracker().getFepPropertiesMap().put(\"fepName\",\n\t\t\t\t\t\t\t\t\tcbxFEP.getSelectedItem().toString());\n\t\t\t\t\t\t\tInitializer.getConfigurationTracker().updatePropertiesMapFromFepPropertyFile(\n\t\t\t\t\t\t\t\t\tInitializer.getFEPname(), String.valueOf(Initializer.getPortNumber()));\n\t\t\t\t\t\t\tInitializer.setBitfieldData(new BitFieldData());\n\t\t\t\t\t\t\tInitializer.getBaseConstants().loadConstantValues();\n\t\t\t\t\t\t\tInitializer.getBaseVariables().loadDefaultValues();\n\t\t\t\t\t\t\tupdate = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (!txtPort.getText().equals(String.valueOf(Initializer.getPortNumber()))) {\n\t\t\t\t\t\t\tInitializer.setPortNumber(Integer.parseInt(txtPort.getText()));\n\t\t\t\t\t\t\tInitializer.getConfigurationTracker().getFepPropertiesMap().put(\"portNumber\",\n\t\t\t\t\t\t\t\t\ttxtPort.getText());\n\t\t\t\t\t\t\tupdate = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (update) {\n\t\t\t\t\t\t\tproperty.load(new FileInputStream(new File(Initializer.getPropertiesFilePath()\n\t\t\t\t\t\t\t\t\t+ Initializer.getFepPropertyFiles().get(\"Common\"))));\n\t\t\t\t\t\t\tproperty.setProperty(\"fepName\",\n\t\t\t\t\t\t\t\t\tInitializer.getConfigurationTracker().getFepPropertiesMap().get(\"fepName\"));\n\t\t\t\t\t\t\tproperty.setProperty(\"portNumber\",\n\t\t\t\t\t\t\t\t\tInitializer.getConfigurationTracker().getFepPropertiesMap().get(\"portNumber\"));\n\t\t\t\t\t\t\tproperty.store(new FileOutputStream(new File(Initializer.getPropertiesFilePath()\n\t\t\t\t\t\t\t\t\t+ Initializer.getFepPropertyFiles().get(\"Common\"))), \"\");\n\t\t\t\t\t\t\tlogger.debug(\"Configuration changed successfully. FEP : \" + Initializer.getFEPname()\n\t\t\t\t\t\t\t\t\t+ \" Port number: \" + Initializer.getPortNumber());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tInitializer.getBaseVariables().setBitfield39UpperLimit();\n\t\t\t\t\trefreshGUIConfiguration();\n\n\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\tSystem.out.println(\n\t\t\t\t\t\t\t\"Unable to save the server configuration due to exception in loading values.\");\n\t\t\t\t\tlogger.info(\"Unable to save the server configuration due to exception in loading values\");\n\t\t\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\t\t\"Unable to save the server configuration due to exception in loading values\");\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t// -----------------------------------------------------------------------------------------------------------------------------\n\t\t/*\n\t\t * When the Save transaction configuration button is clicked, i) Current\n\t\t * configuration is retrieved ii) FEP property file is updated with the\n\t\t * retrieved values.\n\t\t */\n\t\t// -----------------------------------------------------------------------------------------------------------------------------\n\t\tbtnSaveTransactionConfiguration.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif (validDeclineCodeAndAmount()) {\n\t\t\t\t\tInitializer.getConfigurationTracker().updatePropertiesMapFromGUI();\n\t\t\t\t\tInitializer.getConfigurationTracker().updatePropertiesFileFromMap();\n\t\t\t\t\tInitializer.getBaseVariables().loadDefaultValues();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t// -----------------------------------------------------------------------------------------------------------------------------\n\t\t/*\n\t\t * Logger level combo box will define the level of logging to be done when the\n\t\t * application is running.\n\t\t */\n\t\t// -----------------------------------------------------------------------------------------------------------------------------\n\n\t\tcbxLogLevel.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tswitch (cbxLogLevel.getSelectedItem().toString()) {\n\t\t\t\tcase \"INFO\":\n\t\t\t\t\tLogManager.getRootLogger().setLevel(Level.INFO);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"DEBUG\":\n\t\t\t\t\tLogManager.getRootLogger().setLevel(Level.DEBUG);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"WARN\":\n\t\t\t\t\tLogManager.getRootLogger().setLevel(Level.WARN);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"ERROR\":\n\t\t\t\t\tLogManager.getRootLogger().setLevel(Level.ERROR);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"FATAL\":\n\t\t\t\t\tLogManager.getRootLogger().setLevel(Level.FATAL);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "public void startAgentTime() {\n Timer timer = new Timer(SIBAConst.TIME_AGENT_CHANGE_FOR_HOUR, new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n \t\n \tCalendar c = Calendar.getInstance();\n int minutos = c.get(Calendar.MINUTE);\n int hora = c.get( (Calendar.HOUR_OF_DAY)); \n hora = hora * 60;\n if (minutos >= 30 && minutos <= 59)\n {hora +=30;\t\n }\n if (hora > ctrlHours)\n {ctrlHours = hora;\n //activada bandera de modificacion de programacion\n activatedScheduleChange = true;\n }\n else\n { if (hora < ctrlHours)\n \t ctrlHours = 0;\n }\n \t\n \t\n \n }\n });\n timer.start();\n }", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 558, 493);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tJLabel lblPatientClient = new JLabel(\"RMI Server/Client: Insurance Company\\n\");\n\t\tlblPatientClient.setBounds(164, 6, 250, 16);\n\t\tframe.getContentPane().add(lblPatientClient);\n\t\t\n\t\tJLabel lblNewLabel = new JLabel(\"INSURANCE SERVER:\");\n\t\tlblNewLabel.setBounds(6, 38, 133, 16);\n\t\tframe.getContentPane().add(lblNewLabel);\n\t\t\n\t\tJLabel lblNewLabel_1 = new JLabel(\"IP ADDRESS\");\n\t\tlblNewLabel_1.setBounds(30, 57, 106, 16);\n\t\tframe.getContentPane().add(lblNewLabel_1);\n\t\t\n\t\tJLabel lblPortNumber = new JLabel(\"PORT NUMBER\");\n\t\tlblPortNumber.setBounds(295, 57, 106, 16);\n\t\tframe.getContentPane().add(lblPortNumber);\n\t\t\n\t\tipInsurance = new JTextField();\n\t\tipInsurance.setBounds(134, 51, 145, 28);\n\t\tframe.getContentPane().add(ipInsurance);\n\t\tipInsurance.setColumns(10);\n\t\t\n\t\tportInsurance = new JTextField();\n\t\tportInsurance.setBounds(399, 51, 145, 28);\n\t\tframe.getContentPane().add(portInsurance);\n\t\tportInsurance.setColumns(10);\n\t\t\n\t\tJButton btnNewButton = new JButton(\"Start Insurance Server\");\n\t\tbtnNewButton.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\t//checking input validity\n\t\t\t\tif(portInsurance.getText().isEmpty() || portHospital.getText().isEmpty() || ipHospital.getText().isEmpty()){\n\t\t\t\t\tlogMessage(\"Invalid Input\");\n\t\t\t\t\treturn;\n\t\t\t\t} else if(Constants.isInteger(portHospital.getText()) == false || Constants.isInteger(portInsurance.getText()) == false )\n\t\t\t\t{\n\t\t\t\t\tlogMessage(\"Port number should be a positive integer.\");\n\t\t\t\t\treturn;\n\t\t\t\t} else \n\t\t\t\t\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tstartServer();\n\t\t\t\t} catch (RemoteException | AlreadyBoundException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setBounds(194, 138, 171, 29);\n\t\tframe.getContentPane().add(btnNewButton);\n\t\t\n\t\tJLabel lblInsuranceServer = new JLabel(\"HOSPITAL SERVER:\");\n\t\tlblInsuranceServer.setBounds(6, 85, 133, 16);\n\t\tframe.getContentPane().add(lblInsuranceServer);\n\t\t\n\t\tJLabel label_1 = new JLabel(\"IP ADDRESS\");\n\t\tlabel_1.setBounds(30, 104, 106, 16);\n\t\tframe.getContentPane().add(label_1);\n\t\t\n\t\tipHospital = new JTextField();\n\t\tipHospital.setText(\"localhost\");\n\t\tipHospital.setColumns(10);\n\t\tipHospital.setBounds(134, 98, 145, 28);\n\t\tframe.getContentPane().add(ipHospital);\n\t\t\n\t\tportHospital = new JTextField();\n\t\tportHospital.setText(\"5001\");\n\t\tportHospital.setColumns(10);\n\t\tportHospital.setBounds(399, 98, 145, 28);\n\t\tframe.getContentPane().add(portHospital);\n\t\t\n\t\tJLabel label_2 = new JLabel(\"PORT NUMBER\");\n\t\tlabel_2.setBounds(295, 104, 106, 16);\n\t\tframe.getContentPane().add(label_2);\n\t\t\n\t\tJLabel label = new JLabel(\"Logs:\");\n\t\tlabel.setBounds(6, 168, 37, 16);\n\t\tframe.getContentPane().add(label);\n\t\t\n\t\tJScrollPane scrollPane = new JScrollPane();\n\t\tscrollPane.setBounds(6, 198, 538, 260);\n\t\tframe.getContentPane().add(scrollPane);\n\t\t\n\t\toutputArea = new JTextArea();\n\t\tscrollPane.setViewportView(outputArea);\n\t\tframe.setVisible (true);\n\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 hostnameTextField = new javax.swing.JTextField();\n jSeparator1 = new javax.swing.JSeparator();\n jLabel2 = new javax.swing.JLabel();\n jLabel3 = new javax.swing.JLabel();\n moveToConnectedMachineButton = new javax.swing.JButton();\n moveToMyMachineButton = new javax.swing.JButton();\n myMachineScrollPane = new javax.swing.JScrollPane();\n connectedMachineScrollPane = new javax.swing.JScrollPane();\n toggleConnectedButton = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jLabel1.setText(\"Machine: \");\n\n hostnameTextField.setText(\"<ip/hostname>\");\n\n jSeparator1.setOrientation(javax.swing.SwingConstants.VERTICAL);\n jSeparator1.setAutoscrolls(true);\n jSeparator1.setDoubleBuffered(true);\n\n jLabel2.setText(\"My machine:\");\n\n jLabel3.setText(\"Connected machine:\");\n\n moveToConnectedMachineButton.setText(\"----->\");\n\n moveToMyMachineButton.setText(\"<-----\");\n\n myMachineScrollPane.setDoubleBuffered(true);\n\n toggleConnectedButton.setText(\"Connect\");\n toggleConnectedButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n toggleConnectedButtonActionPerformed(evt);\n }\n });\n\n org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .add(76, 76, 76)\n .add(moveToConnectedMachineButton)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .add(75, 75, 75)\n .add(jSeparator1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .add(org.jdesktop.layout.GroupLayout.TRAILING, layout.createSequentialGroup()\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 58, Short.MAX_VALUE)\n .add(moveToMyMachineButton))))\n .add(layout.createSequentialGroup()\n .add(103, 103, 103)\n .add(jLabel1)\n .add(18, 18, 18)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(toggleConnectedButton)\n .add(hostnameTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 216, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))\n .add(95, 95, 95))\n .add(layout.createSequentialGroup()\n .add(67, 67, 67)\n .add(jLabel2)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 144, Short.MAX_VALUE)\n .add(jLabel3)\n .add(74, 74, 74))\n .add(layout.createSequentialGroup()\n .addContainerGap()\n .add(myMachineScrollPane, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 223, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(connectedMachineScrollPane, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 219, Short.MAX_VALUE)\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .addContainerGap()\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(hostnameTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(jLabel1))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(toggleConnectedButton)\n .add(37, 37, 37)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)\n .add(jLabel2)\n .add(jLabel3))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .add(connectedMachineScrollPane, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 265, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(18, 18, 18)\n .add(layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(moveToMyMachineButton)\n .add(moveToConnectedMachineButton)))\n .add(layout.createSequentialGroup()\n .add(myMachineScrollPane, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 265, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(jSeparator1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n }", "@Override\n\tprotected void Initialize() {\n\t\tint grayBoxX = (this.width / 2) - 198;\n\t\tint grayBoxY = (this.height / 2) - 83;\n\t\tint color = Color.DARK_GRAY.getRGB();\n\t\tthis.serverConfiguration = Prefab.proxy.getServerConfiguration();\n\t\tthis.houseConfiguration = ClientEventHandler.playerConfig.getClientConfig(\"Starter House\", HouseConfiguration.class);\n\t\tthis.houseConfiguration.pos = this.pos;\n\n\t\t// Create the Controls.\n\t\t// Column 1:\n\t\tthis.btnHouseStyle = new ExtendedButton(grayBoxX + 10, grayBoxY + 20, 90, 20, this.houseConfiguration.houseStyle.getDisplayName(), this::actionPerformed);\n\n\t\tthis.addButton(this.btnHouseStyle);\n\n\t\tthis.btnVisualize = new ExtendedButton(grayBoxX + 10, grayBoxY + 60, 90, 20, GuiLangKeys.translateString(GuiLangKeys.GUI_BUTTON_PREVIEW), this::actionPerformed);\n\t\tthis.addButton(this.btnVisualize);\n\n\t\tint x = grayBoxX + 10;\n\t\tint y = grayBoxY + 10;\n\t\tint secondColumnY = y;\n\t\tint secondColumnX = x + 137;\n\n\t\tthis.btnAddFurnace = new GuiCheckBox(secondColumnX, secondColumnY, GuiLangKeys.translateString(GuiLangKeys.STARTER_HOUSE_ADD_FURNACE), this.houseConfiguration.addFurnace, null);\n\t\tthis.btnAddFurnace.setFGColor(color);\n\t\tthis.btnAddFurnace.setWithShadow(false);\n\t\tthis.btnAddFurnace.visible = false;\n\t\tthis.addButton(this.btnAddFurnace);\n\n\t\tif (this.serverConfiguration.addFurnace) {\n\t\t\tsecondColumnY += 15;\n\t\t}\n\n\t\tthis.btnAddBed = new GuiCheckBox(secondColumnX, secondColumnY, GuiLangKeys.translateString(GuiLangKeys.STARTER_HOUSE_ADD_BED), this.houseConfiguration.addBed, null);\n\t\tthis.btnAddBed.setFGColor(color);\n\t\tthis.btnAddBed.setWithShadow(false);\n\t\tthis.btnAddBed.visible = false;\n\t\tthis.addButton(this.btnAddBed);\n\n\t\tif (this.serverConfiguration.addBed) {\n\t\t\tsecondColumnY += 15;\n\t\t}\n\n\t\tthis.btnAddCraftingTable = new GuiCheckBox(x, y, GuiLangKeys.translateString(GuiLangKeys.STARTER_HOUSE_ADD_CRAFTING_TABLE), this.houseConfiguration.addCraftingTable, null);\n\t\tthis.btnAddCraftingTable.setFGColor(color);\n\t\tthis.btnAddCraftingTable.setWithShadow(false);\n\t\tthis.btnAddCraftingTable.visible = false;\n\t\tthis.addButton(this.btnAddCraftingTable);\n\n\t\tif (this.serverConfiguration.addCraftingTable) {\n\t\t\ty += 15;\n\t\t}\n\n\t\tthis.btnAddTorches = new GuiCheckBox(x, y, GuiLangKeys.translateString(GuiLangKeys.STARTER_HOUSE_ADD_TORCHES), this.houseConfiguration.addTorches, null);\n\t\tthis.btnAddTorches.setFGColor(color);\n\t\tthis.btnAddTorches.setWithShadow(false);\n\t\tthis.btnAddTorches.visible = false;\n\t\tthis.addButton(this.btnAddTorches);\n\n\t\tif (this.serverConfiguration.addTorches) {\n\t\t\ty += 15;\n\t\t}\n\n\t\tthis.btnAddChest = new GuiCheckBox(x, y, GuiLangKeys.translateString(GuiLangKeys.STARTER_HOUSE_ADD_CHEST), this.houseConfiguration.addChest, null);\n\t\tthis.btnAddChest.setFGColor(color);\n\t\tthis.btnAddChest.setWithShadow(false);\n\t\tthis.btnAddChest.visible = false;\n\t\tthis.addButton(this.btnAddChest);\n\n\t\tif (this.serverConfiguration.addChests) {\n\t\t\ty += 15;\n\t\t}\n\n\t\tthis.btnAddMineShaft = new GuiCheckBox(x, y, GuiLangKeys.translateString(GuiLangKeys.STARTER_HOUSE_BUILD_MINESHAFT), this.houseConfiguration.addMineShaft, null);\n\t\tthis.btnAddMineShaft.setFGColor(color);\n\t\tthis.btnAddMineShaft.setWithShadow(false);\n\t\tthis.btnAddMineShaft.visible = false;\n\t\tthis.addButton(this.btnAddMineShaft);\n\n\t\tif (this.serverConfiguration.addMineshaft) {\n\t\t\ty += 15;\n\t\t}\n\n\t\tthis.btnAddChestContents = new GuiCheckBox(x, y, GuiLangKeys.translateString(GuiLangKeys.STARTER_HOUSE_ADD_CHEST_CONTENTS), this.houseConfiguration.addChestContents, null);\n\t\tthis.btnAddChestContents.setFGColor(color);\n\t\tthis.btnAddChestContents.setWithShadow(false);\n\t\tthis.btnAddChestContents.visible = false;\n\t\tthis.addButton(this.btnAddChestContents);\n\n\t\tif (this.allowItemsInChestAndFurnace) {\n\t\t\ty += 15;\n\t\t}\n\n\t\tthis.btnGlassColor = new ExtendedButton(grayBoxX + 10, grayBoxY + 20, 90, 20, GuiLangKeys.translateDye(this.houseConfiguration.glassColor), this::actionPerformed);\n\t\tthis.addButton(this.btnGlassColor);\n\n\t\t// Column 2:\n\n\t\t// Column 3:\n\n\t\t// Tabs:\n\t\tthis.tabGeneral = new GuiTab(this.Tabs, GuiLangKeys.translateString(GuiLangKeys.STARTER_TAB_GENERAL), grayBoxX + 3, grayBoxY - 20);\n\t\tthis.Tabs.AddTab(this.tabGeneral);\n\n\t\tthis.tabConfig = new GuiTab(this.Tabs, GuiLangKeys.translateString(GuiLangKeys.STARTER_TAB_CONFIG), grayBoxX + 54, grayBoxY - 20);\n\t\tthis.Tabs.AddTab(this.tabConfig);\n\n\t\tthis.tabBlockTypes = new GuiTab(this.Tabs, GuiLangKeys.translateString(GuiLangKeys.STARTER_TAB_BLOCK), grayBoxX + 105, grayBoxY - 20);\n\t\tthis.tabBlockTypes.setWidth(70);\n\t\tthis.Tabs.AddTab(this.tabBlockTypes);\n\n\t\t// Create the done and cancel buttons.\n\t\tthis.btnBuild = new ExtendedButton(grayBoxX + 10, grayBoxY + 136, 90, 20, GuiLangKeys.translateString(GuiLangKeys.GUI_BUTTON_BUILD), this::actionPerformed);\n\t\tthis.addButton(this.btnBuild);\n\n\t\tthis.btnCancel = new ExtendedButton(grayBoxX + 147, grayBoxY + 136, 90, 20, GuiLangKeys.translateString(GuiLangKeys.GUI_BUTTON_CANCEL), this::actionPerformed);\n\t\tthis.addButton(this.btnCancel);\n\t}", "public GUIRegistrationRest() {\n initComponents();\n setLocationRelativeTo(null);\n initIcons();\n }", "public static void main(String[] args) {\n String pswd=JOptionPane.showInputDialog(\"Input MySQL root password\");\n try {\n database.initial.initialize(pswd);\n message.initial.initialize(pswd);\n } catch (SQLSyntaxErrorException e) {\n System.out.println(\"Database already exists\");\n } catch (IOException e) {\n JOptionPane.showMessageDialog(null,e.getMessage());\n return;\n } catch (Exception e) {\n e.printStackTrace();\n JOptionPane.showMessageDialog(null,\"Failed to connect to database\");\n return;\n }\n\n //build GUI\n JFrame gui=new JFrame();\n gui.setLayout(new BorderLayout());\n JPanel labels=new JPanel();\n labels.setSize(400,200);\n labels.setLayout(new GridLayout(3,1));\n JLabel ipLabel1=new JLabel(\"IP: Pending...\");\n JLabel ipLabel2=new JLabel(\"Port: Pending...\");\n JLabel notice=new JLabel(\"Tell your clients the above information!\");\n ipLabel1.setHorizontalAlignment(SwingConstants.CENTER);\n ipLabel2.setHorizontalAlignment(SwingConstants.CENTER);\n notice.setHorizontalAlignment(SwingConstants.CENTER);\n labels.add(ipLabel1,0);\n labels.add(ipLabel2,1);\n labels.add(notice,2);\n JTextArea text=new JTextArea();\n text.setEditable(false);\n JScrollPane scrollPane=new JScrollPane(text);\n gui.add(labels,BorderLayout.NORTH);\n gui.add(scrollPane,BorderLayout.CENTER);\n gui.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);\n gui.setSize(400,550);\n gui.setTitle(\"Server\");\n gui.setVisible(true);\n String lip=getLocalIP();\n ipLabel1.setText(\"IP: \"+lip);\n if(!getInternetIP().equals(lip))\n notice.setText(\"Warning: NOT Internet IP! Try natapp.cn for Internet service.\");\n\n //Launch server\n ServerNetManager network;\n try {\n try {\n network = new ServerNetManager(13060);\n } catch (IOException e) {\n network = new ServerNetManager(0);\n }\n ipLabel2.setText(\"Port: \"+network.getPort());\n } catch (IOException e) {\n System.err.println(\"Failed to launch server network!\");\n return;\n }\n\t\tnetwork.parser=new ServerBeanParser(\n network,\n new AccountManager(pswd),\n new FriendSysManager(pswd),\n new MessageManager(pswd),\n new MailVerifier(\"[email protected]\",\"CNKFUFWDLSCRSKYG\", \"smtp.163.com\")\n );\n\n network.log=(s)->\n SwingUtilities.invokeLater(()->text.append(\n new SimpleDateFormat(\"HH:mm:ss\").format(new Date())+\" \"+s+'\\n'));\n try {\n network.start();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void initComponents() {\n\n jLabel1 = new javax.swing.JLabel();\n txtInitialQuantity = new javax.swing.JTextField();\n jButton1 = new javax.swing.JButton();\n jLabel2 = new javax.swing.JLabel();\n txtAutopilotTime = new javax.swing.JTextField();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Configurações\");\n\n jLabel1.setText(\"Initial number of empty places\");\n\n txtInitialQuantity.setHorizontalAlignment(javax.swing.JTextField.RIGHT);\n txtInitialQuantity.setName(\"QUANTIDADE INICIAL\"); // NOI18N\n\n jButton1.setText(\"OK\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n jLabel2.setText(\"Autopilot time (ms)\");\n\n txtAutopilotTime.setHorizontalAlignment(javax.swing.JTextField.RIGHT);\n txtAutopilotTime.setName(\"TEMPO\"); // 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 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton1)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addComponent(jLabel2))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(txtAutopilotTime, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(txtInitialQuantity, javax.swing.GroupLayout.PREFERRED_SIZE, 57, 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 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1)\n .addComponent(txtInitialQuantity, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtAutopilotTime, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2))\n .addGap(18, 18, 18)\n .addComponent(jButton1)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n }", "private void initComponents() {\n\t\t\n java.awt.GridBagConstraints gridBagConstraints;\n\n jPanel3 = new javax.swing.JPanel();\n lbUseProxy = new javax.swing.JLabel();\n chbUseProxy = new javax.swing.JCheckBox();\n jPanel1 = new javax.swing.JPanel();\n btnUpdate = new javax.swing.JButton();\n btnCancel = new javax.swing.JButton();\n jPanel2 = new javax.swing.JPanel();\n lbType = new javax.swing.JLabel();\n lbHost = new javax.swing.JLabel();\n lbPort = new javax.swing.JLabel();\n cmbType = new javax.swing.JComboBox();\n tfHost = new javax.swing.JTextField();\n tfPort = new javax.swing.JTextField();\n\n getContentPane().setLayout(new java.awt.GridBagLayout());\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n lbUseProxy.setText(\"Use Proxy\");\n jPanel3.add(lbUseProxy);\n\n chbUseProxy.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0));\n chbUseProxy.setMargin(new java.awt.Insets(0, 0, 0, 0));\n jPanel3.add(chbUseProxy);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST;\n gridBagConstraints.insets = new java.awt.Insets(5, 5, 5, 5);\n getContentPane().add(jPanel3, gridBagConstraints);\n\n btnUpdate.setText(\"Update\");\n jPanel1.add(btnUpdate);\n\n btnCancel.setText(\"Cancel\");\n jPanel1.add(btnCancel);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridy = 3;\n gridBagConstraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;\n gridBagConstraints.insets = new java.awt.Insets(10, 0, 0, 0);\n getContentPane().add(jPanel1, gridBagConstraints);\n\n jPanel2.setLayout(new java.awt.GridBagLayout());\n\n jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(\"Proxy Settings\"));\n lbType.setText(\"Type\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridy = 1;\n jPanel2.add(lbType, gridBagConstraints);\n\n lbHost.setText(\"Host name\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridy = 1;\n jPanel2.add(lbHost, gridBagConstraints);\n\n lbPort.setText(\"Port\");\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridy = 1;\n jPanel2.add(lbPort, gridBagConstraints);\n\n cmbType.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"HTTP\", \"SOCKS\" }));\n cmbType.setMinimumSize(new java.awt.Dimension(61, 18));\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridy = 2;\n gridBagConstraints.insets = new java.awt.Insets(5, 10, 10, 5);\n jPanel2.add(cmbType, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridy = 2;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.weightx = 1.0;\n gridBagConstraints.insets = new java.awt.Insets(5, 5, 10, 5);\n jPanel2.add(tfHost, gridBagConstraints);\n\n tfPort.setMinimumSize(new java.awt.Dimension(43, 19));\n tfPort.setPreferredSize(new java.awt.Dimension(43, 19));\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridy = 2;\n gridBagConstraints.insets = new java.awt.Insets(5, 5, 10, 10);\n jPanel2.add(tfPort, gridBagConstraints);\n\n gridBagConstraints = new java.awt.GridBagConstraints();\n gridBagConstraints.gridx = 0;\n gridBagConstraints.gridy = 1;\n gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL;\n gridBagConstraints.weightx = 1.0;\n getContentPane().add(jPanel2, gridBagConstraints);\n\n\t\t// add event listeners\n\t\tbtnUpdate.addActionListener(this);\n\t\tbtnCancel.addActionListener(this);\n\t\t//cmbType.addItemListener(this);\n\t\tchbUseProxy.addItemListener(this);\n\n\t\tpack();\n\t\tsetSize(new Dimension(400, 200));\n\t}", "private void initialize() {\r\n\t\tfrmAvailability = new JFrame();\r\n\t\tfrmAvailability.setIconImage(Toolkit.getDefaultToolkit().getImage(\"C:\\\\Users\\\\saina\\\\Documents\\\\Programsinjava\\\\demo_schedoc\\\\demo_schedoc\\\\Images\\\\stethoscope.png\"));\r\n\t\tfrmAvailability.setTitle(\"Availability\");\r\n\t\tfrmAvailability.setBounds(100, 100, 900, 650);\r\n\t\tfrmAvailability.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tfrmAvailability.getContentPane().setLayout(null);\r\n\t\tfrmAvailability.getContentPane().setBackground( Color.decode(\"#f5e8e7\") );\r\n\t\t\r\n\t\tJLabel lblNewLabel = new JLabel(\"Availability\");\r\n\t\tlblNewLabel.setFont(new Font(\"Tahoma\", Font.PLAIN, 35));\r\n\t\tlblNewLabel.setBounds(331, 26, 171, 47);\r\n\t\tfrmAvailability.getContentPane().add(lblNewLabel);\r\n\t\t\r\n\t\tJLabel lblNewLabel_1 = new JLabel(\"Available Days:\");\r\n\t\tlblNewLabel_1.setFont(new Font(\"Tahoma\", Font.PLAIN, 20));\r\n\t\tlblNewLabel_1.setBounds(66, 144, 141, 25);\r\n\t\tfrmAvailability.getContentPane().add(lblNewLabel_1);\r\n\t\t\r\n\t\tJLabel lblNewLabel_1_1 = new JLabel(\"Available Time:\");\r\n\t\tlblNewLabel_1_1.setFont(new Font(\"Tahoma\", Font.PLAIN, 20));\r\n\t\tlblNewLabel_1_1.setBounds(66, 270, 141, 25);\r\n\t\tfrmAvailability.getContentPane().add(lblNewLabel_1_1);\r\n\t\t\r\n\t\tstart = new JLabel(\"Start Time\");\r\n\t\tstart.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\r\n\t\tstart.setBounds(132, 306, 185, 25);\r\n\t\tfrmAvailability.getContentPane().add(start);\r\n\t\t\r\n\t\tend = new JLabel(\"End Time\");\r\n\t\tend.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\r\n\t\tend.setBounds(132, 417, 185, 25);\r\n\t\tfrmAvailability.getContentPane().add(end);\r\n\t\t\r\n\t\tslider1 = new JSlider();\r\n\t\tslider1.setBackground(Color.decode(\"#f5e8e7\") );\r\n\t\tslider1.setValue(9);\r\n\t\tslider1.addChangeListener(new ChangeListener() {\r\n\t\t\tpublic void stateChanged(ChangeEvent e) {\r\n\t\t\t\tstart.setText(\"Start Time = \"+slider1.getValue()+\":00\");\r\n\t\t\t\tslider_1 = slider1.getValue();\r\n\t\t\t}\r\n\t\t});\r\n\t\tslider1.setMajorTickSpacing(1);\r\n\t\tslider1.setMaximum(21);\r\n\t\tslider1.setMinimum(9);\r\n\t\tslider1.setPaintTicks(true);\r\n\t\tslider1.setPaintLabels(true);\r\n\t\tslider1.setBounds(132, 342, 584, 66);\r\n\t\tfrmAvailability.getContentPane().add(slider1);\r\n\t\t\r\n\t\tslider2 = new JSlider();\r\n\t\tslider2.setBackground(Color.decode(\"#f5e8e7\") );\r\n\t\tslider2.addChangeListener(new ChangeListener() {\r\n\t\t\tpublic void stateChanged(ChangeEvent e) {\r\n\t\t\t\tend.setText(\"End Time = \"+slider2.getValue()+\":00\");\r\n\t\t\t\tslider_2 = slider2.getValue();\r\n\t\t\t}\r\n\t\t});\r\n\t\tslider2.setValue(10);\r\n\t\tslider2.setPaintTicks(true);\r\n\t\tslider2.setPaintLabels(true);\r\n\t\tslider2.setMinimum(10);\r\n\t\tslider2.setMaximum(21);\r\n\t\tslider2.setMajorTickSpacing(1);\r\n\t\tslider2.setBounds(131, 450, 584, 66);\r\n\t\tfrmAvailability.getContentPane().add(slider2);\r\n\t\t\r\n\t\tsubmit = new JButton(\"Submit\");\r\n\t\tsubmit.setFocusable(false);\r\n\t\tsubmit.setFocusable(false);\r\n\t\tsubmit.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tsubmitActionPerformed(e);\r\n\t\t\t}\r\n\t\t});\r\n\t\tsubmit.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\r\n\t\tsubmit.setBounds(132, 555, 109, 32);\r\n\t\tfrmAvailability.getContentPane().add(submit);\r\n\t\t\r\n\t\tmon = new JCheckBox(\"Monday\");\r\n\t\tmon.setFocusable(false);\r\n\t\tmon.setBackground(Color.decode(\"#f5e8e7\") );\r\n\t\tmon.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\r\n\t\tmon.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tmonActionPerformed(e);\r\n\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\tmon.setBounds(296, 144, 97, 23);\r\n\t\tfrmAvailability.getContentPane().add(mon);\r\n\t\t\r\n\t\ttue = new JCheckBox(\"Tuesday\");\r\n\t\ttue.setFocusable(false);\r\n\t\ttue.setBackground(Color.decode(\"#f5e8e7\") );\r\n\t\ttue.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\r\n\t\ttue.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\ttueActionPerformed(e);\r\n\t\t\t}\r\n\t\t});\r\n\t\ttue.setBounds(296, 179, 97, 23);\r\n\t\tfrmAvailability.getContentPane().add(tue);\r\n\t\t\r\n\t\twed = new JCheckBox(\"Wednesday\");\r\n\t\twed.setFocusable(false);\r\n\t\twed.setBackground(Color.decode(\"#f5e8e7\") );\r\n\t\twed.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\r\n\t\twed.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\twedActionPerformed(e);\r\n\t\t\t}\r\n\t\t});\r\n\t\twed.setBounds(296, 218, 118, 23);\r\n\t\tfrmAvailability.getContentPane().add(wed);\r\n\t\t\r\n\t\tthu = new JCheckBox(\"Thursday\");\r\n\t\tthu.setFocusable(false);\r\n\t\tthu.setBackground(Color.decode(\"#f5e8e7\") );\r\n\t\tthu.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\r\n\t\tthu.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tthuActionPerformed(e);\r\n\t\t\t}\r\n\t\t});\r\n\t\tthu.setBounds(469, 144, 97, 23);\r\n\t\tfrmAvailability.getContentPane().add(thu);\r\n\t\t\r\n\t\tfri = new JCheckBox(\"Friday\");\r\n\t\tfri.setFocusable(false);\r\n\t\tfri.setBackground(Color.decode(\"#f5e8e7\") );\r\n\t\tfri.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\r\n\t\tfri.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tfriActionPerformed(e);\r\n\t\t\t}\r\n\t\t});\r\n\t\tfri.setBounds(469, 179, 97, 23);\r\n\t\tfrmAvailability.getContentPane().add(fri);\r\n\t\t\r\n\t\tsat = new JCheckBox(\"Saturday\");\r\n\t\tsat.setFocusable(false);\r\n\t\tsat.setBackground(Color.decode(\"#f5e8e7\") );\r\n\t\tsat.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\r\n\t\tsat.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tsatActionPerformed(e);\r\n\t\t\t}\r\n\t\t});\r\n\t\tsat.setBounds(469, 218, 97, 23);\r\n\t\tfrmAvailability.getContentPane().add(sat);\r\n\t\t\r\n\t\tsun = new JCheckBox(\"Sunday\");\r\n\t\tsun.setFocusable(false);\r\n\t\tsun.setBackground(Color.decode(\"#f5e8e7\") );\r\n\t\tsun.setFont(new Font(\"Tahoma\", Font.PLAIN, 15));\r\n\t\tsun.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tsunActionPerformed(e);\t\t\t}\r\n\t\t});\r\n\t\tsun.setBounds(619, 144, 97, 23);\r\n\t\tfrmAvailability.getContentPane().add(sun);\r\n\t\t\r\n\t\tJLabel lblNewLabel_2 = new JLabel(\"(Select your schedule for next 7 days)\");\r\n\t\tlblNewLabel_2.setBounds(43, 163, 272, 25);\r\n\t\tfrmAvailability.getContentPane().add(lblNewLabel_2);\r\n\t\t\r\n\t\tJButton logout = new JButton(\"LogOut\");\r\n\t\tlogout.setBorderPainted(false);\r\n\t\tlogout.setFocusable(false);\r\n\t\tlogout.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\thome h = new home();\r\n\t\t\t\tfrmAvailability.dispose();\r\n\t\t\t\th.setVisible(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\tlogout.setFont(new Font(\"Tahoma\", Font.PLAIN, 20));\r\n\t\tlogout.setBounds(714, 48, 128, 33);\r\n\t\tfrmAvailability.getContentPane().add(logout);\r\n\t\t\r\n\t\tJButton back = new JButton(\"Back\");\r\n\t\tback.setBorderPainted(false);\r\n\t\tback.setFocusable(false);\r\n\t\tback.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tdoc_home dh = new doc_home();\r\n\t\t\t\tfrmAvailability.dispose();\r\n\t\t\t\tdh.setVisible(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\tback.setFont(new Font(\"Tahoma\", Font.PLAIN, 20));\r\n\t\tback.setBounds(43, 48, 128, 33);\r\n\t\tfrmAvailability.getContentPane().add(back);\r\n\t}", "private void initUI() {\r\n\t\t//Äußeres Panel\r\n\t\tContainer pane = getContentPane();\r\n\t\tGroupLayout gl = new GroupLayout(pane);\r\n\t\tpane.setLayout(gl);\r\n\t\t//Abstende von den Containern und dem äußeren Rand\r\n\t\tgl.setAutoCreateContainerGaps(true);\r\n\t\tgl.setAutoCreateGaps(true);\r\n\t\t//TextFeld für die Ausgabe\r\n\t\tJTextField output = view.getTextField();\r\n\t\t//Die jeweiligen Panels für die jeweiigen Buttons\r\n\t\tJPanel brackets = view.getBracketPanel();\r\n\t\tJPanel remove = view.getTop2Panel();\r\n\t\tJPanel numbers = view.getNumbersPanel();\r\n\t\tJPanel last = view.getBottomPanel();\r\n\t\t//Anordnung der jeweiligen Panels durch den Layout Manager\r\n\t\tgl.setHorizontalGroup(gl.createParallelGroup().addComponent(output).addComponent(brackets).addComponent(remove).addComponent(numbers).addComponent(last));\r\n\t\tgl.setVerticalGroup(gl.createSequentialGroup().addComponent(output).addComponent(brackets).addComponent(remove).addComponent(numbers).addComponent(last));\r\n\t\tpack();\r\n\t\tsetTitle(\"Basic - Taschenrechner\");\r\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\r\n\t\tsetResizable(false);\r\n\t}", "public void onModuleLoad() {\n\n Button buttonPingServer = new Button(\"Ping Server\");\n Button buttonCreateAppointmentBook = new Button(\"Create AppointmentBook\");\n Button buttonAddCall = new Button(\"Add Appointment\");\n Button buttonPrettyPrintAllCalls = new Button(\"Display All Appointments\");\n Button buttonSearch = new Button(\"Search Appointment\");\n Button buttonHelp = new Button(\"Help\");\n\n //Text box~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n final TextArea textBoxResults = new TextArea();\n textBoxResults.setReadOnly(true);\n textBoxResults.setSize(\"800px\",\"200px\");\n\n //Vertical Panels~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n VerticalPanel panelHeader = new VerticalPanel();\n panelHeader.add(new Label());\n panelHeader.add(textBoxResults);\n\n //Adding a Owner\n VerticalPanel panelAddNewCustomer = new VerticalPanel();\n panelAddNewCustomer.add(new Label(\"Owner Name:\"));\n final TextBox textBoxOwnerName = new TextBox();\n panelAddNewCustomer.add(textBoxOwnerName);\n;\n\n panelAddNewCustomer.add(new Label(\"Description:\"));\n final TextBox textBoxDexcription = new TextBox();\n panelAddNewCustomer.add(textBoxDexcription);\n\n panelAddNewCustomer.add(new Label(\"Begin Time(MM/dd/yyyy HH:mm am/pm (12 Hour format):\"));\n final TextBox textBoxStartTime = new TextBox();\n panelAddNewCustomer.add(textBoxStartTime);\n\n panelAddNewCustomer.add(new Label(\"End Time MM/dd/yyyy HH:mm am/pm (12 Hour format):\"));\n final TextBox textBoxEndTime = new TextBox();\n panelAddNewCustomer.add(textBoxEndTime);\n\n //add all the buttons to the root panel ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n RootPanel rootPanel = RootPanel.get();\n rootPanel.add(buttonAddCall,50,320);\n rootPanel.add(buttonCreateAppointmentBook,200,320);\n rootPanel.add(buttonPrettyPrintAllCalls,400,320);\n rootPanel.add(buttonSearch,600,320);\n //rootPanel.add(buttonPingServer,525,50);\n rootPanel.add(buttonHelp,780,320);\n rootPanel.add(panelAddNewCustomer, 50, 80);\n\n Label l1 = new Label(\"You can see your Appointment details below -\");\n rootPanel.add(l1,50,370);\n\n Label l2 = new Label(\"If you wish to create/add/search/display appointment in appointment book. \\n Please choose the following options by clicking on button -\");\n rootPanel.add(l2,50,270);\n\n Label l3 = new Label(\"Welcome... Please enter following details and create/add/search/display your own appointment book -\");\n rootPanel.add(l3,50,50);\n\n //add Vertical Panels to the root panel~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n rootPanel.add(panelHeader, 50, 400);\n\n //Define all the addClickHandlers here~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n //Ping\n buttonPingServer.addClickHandler(new ClickHandler() {\n public void onClick(ClickEvent clickEvent) {\n AppointmentBookServiceAsync async = GWT.create(AppointmentBookService.class);\n async.createAppointmentBook(new AsyncCallback<AbstractAppointmentBook>() {\n\n public void onFailure(Throwable ex) {\n Window.alert(ex.toString());\n }\n\n public void onSuccess(AbstractAppointmentBook AppointmentBook) {\n StringBuilder sb = new StringBuilder(AppointmentBook.toString());\n Collection<AbstractAppointment> calls = AppointmentBook.getAppointments();\n for (AbstractAppointment call : calls) {\n sb.append(call);\n sb.append(\"\\n\");\n }\n Window.alert(sb.toString());\n }\n });\n }\n });\n\n //Help Readme\n buttonHelp.addClickHandler(new ClickHandler() {\n @Override\n public void onClick(ClickEvent clickEvent) {\n Window.alert(\"This is the README for the AppointmentBook RIA application! PROJECT 5 - POOJA MANE\\n\" +\n \"Please enter the appropriate information for a owner. Including the name,\" +\n \"description, and a begin and end time for the Appointment\\n\" +\n \"You may save owners AppointmentBooks here, search them by begin time and endtime or \" +\n \"display all AppointmentBooks\");\n }\n });\n\n //CreateAppointmentBook\n buttonCreateAppointmentBook.addClickHandler(new ClickHandler() {\n @Override\n public void onClick(ClickEvent clickEvent) {\n try {\n if(textBoxOwnerName.getValue() == \"\"){\n Window.alert(\"Please provide correct arguments for owner name\");\n return;\n }\n if(textBoxDexcription.getValue() == \"\"){\n Window.alert(\"Please provide correct arguments for dscription\");\n return;\n }\n\n if(textBoxStartTime.getValue() == \"\"){\n Window.alert(\"Please provide correct arguments for start time\");\n return;\n }\n if(textBoxEndTime.getValue() == \"\"){\n Window.alert(\"Please provide correct arguments for end Time\");\n return;\n }\n final Appointment tempAppointment = new Appointment(textBoxDexcription.getValue().trim(), textBoxStartTime.getValue().trim(), textBoxEndTime.getValue().trim());\n if(tempAppointment.exceptionWasThrown()){\n return;\n }\n AppointmentBookServiceAsync async = GWT.create(AppointmentBookService.class);\n async.add(textBoxOwnerName.getValue(),tempAppointment , new AsyncCallback<Void>() {\n @Override\n public void onFailure(Throwable throwable) {\n Window.alert(throwable.getMessage());\n throwable.printStackTrace();\n throwable.getStackTrace();\n }\n @Override\n public void onSuccess(Void aVoid) {\n textBoxResults.setValue(textBoxOwnerName.getValue()+\" has added a new Appointment: \"+tempAppointment.toString() );\n }\n });\n }\n catch(Exception ex){\n //Not enough args or something\n Window.alert(\"Please provide correct arguments\"+ex.getMessage());\n return;\n }\n\n }\n });\n\n //Add a Appointment\n buttonAddCall.addClickHandler(new ClickHandler() {\n @Override\n public void onClick(ClickEvent clickEvent) {\n try {\n if(textBoxOwnerName.getValue() == \"\"){\n Window.alert(\"Please provide correct arguments for owner name\");\n return;\n }\n if(textBoxDexcription.getValue() == \"\"){\n Window.alert(\"Please provide correct arguments for description\");\n return;\n }\n\n if(textBoxStartTime.getValue() == \"\"){\n Window.alert(\"Please provide correct arguments for start time\");\n return;\n }\n if(textBoxEndTime.getValue() == \"\"){\n Window.alert(\"Please provide correct arguments for end Time\");\n return;\n }\n final Appointment tempAppointment = new Appointment(textBoxDexcription.getValue(), textBoxStartTime.getValue(), textBoxEndTime.getValue());\n if(tempAppointment.exceptionWasThrown()){\n return;\n }\n AppointmentBookServiceAsync async = GWT.create(AppointmentBookService.class);\n async.add(textBoxOwnerName.getValue().trim(),tempAppointment , new AsyncCallback<Void>() {\n @Override\n public void onFailure(Throwable throwable) {\n Window.alert(throwable.getMessage());\n }\n\n @Override\n public void onSuccess(Void aVoid) {\n textBoxResults.setValue(textBoxOwnerName.getValue()+\" has added a new Appointment: \"+tempAppointment.toString() );\n }\n });\n }\n catch(Exception ex){\n //Not enough args or something\n Window.alert(\"Please provide correct arguments\"+ex.getMessage());\n return;\n }\n\n }\n });\n //pretty Print\n buttonPrettyPrintAllCalls.addClickHandler(new ClickHandler() {\n @Override\n public void onClick(ClickEvent clickEvent) {\n AppointmentBookServiceAsync async = GWT.create(AppointmentBookService.class);\n async.print(new AsyncCallback<Map<String, AppointmentBook>>() {\n\n @Override\n public void onFailure(Throwable throwable) {\n Window.alert(throwable.getMessage());\n }\n\n @Override\n public void onSuccess(Map<String, AppointmentBook> stringAppointmentBookMap) {\n String prettyCalls = \"\";\n //pretty print it\n if (stringAppointmentBookMap == null || stringAppointmentBookMap.isEmpty()) {\n Window.alert(\"No AppointmentBooks to show\");\n return;\n }\n for (String customer : stringAppointmentBookMap.keySet()) {\n Collection calls = stringAppointmentBookMap.get(customer).getAppointments();\n prettyCalls+=prettyPrint((List<Appointment>) calls,customer)+\"\\n\";\n }\n textBoxResults.setValue(\"# OwnerName Description Start Time End Time Duration \\n\"+prettyCalls);\n }\n });\n }\n });\n //Search for user\n buttonSearch.addClickHandler(new ClickHandler() {\n @Override\n public void onClick(ClickEvent clickEvent) {\n if(textBoxOwnerName.getValue() == \"\"){\n Window.alert(\"Please provide correct arguments for OWNER name\");\n return;\n }\n if(textBoxStartTime.getValue() == \"\"){\n Window.alert(\"Please provide correct arguments for begin time\");\n return;\n }\n if(textBoxEndTime.getValue() == \"\"){\n Window.alert(\"Please provide correct arguments for end time\");\n return;\n }\n\n DefaultDateTimeFormatInfo formatInfo = new DefaultDateTimeFormatInfo();\n DateTimeFormat ShortDateFormat = new DateTimeFormat(\"MM/dd/yyyy hh:mm a\",formatInfo){};\n Long begin,end;\n try {\n Date search = ShortDateFormat.parse(textBoxStartTime.getValue().trim());\n Date search1 = ShortDateFormat.parse(textBoxEndTime.getValue().trim());\n }\n catch(Exception ex){\n //System.out.println(\"Error Parsing \"+ ex);\n Window.alert(\"Enter dates in valid format\");\n return;\n\n }\n //Search for appointment\n AppointmentBookServiceAsync async = GWT.create(AppointmentBookService.class);\n async.search(textBoxOwnerName.getValue(), textBoxStartTime.getValue(), textBoxEndTime.getValue(),new AsyncCallback<List<Appointment>>() {\n @Override\n public void onFailure(Throwable throwable) {\n Window.alert(\"error \"+throwable.getMessage());\n }\n\n @Override\n public void onSuccess(List<Appointment> Appointments) {\n if(Appointments==null||Appointments.isEmpty()){\n Window.alert(\"No Appointments matching under \"+textBoxOwnerName.getValue()+\"\\n or values not entered in proper format.. Something wrong .. Please try again\");\n return;\n }\n //pretty print the search calls\n textBoxResults.setValue(\"# OwnerName Description Start Time End Time Duration \\n\"+prettyPrint(Appointments,textBoxOwnerName.getValue()));\n }\n });\n\n }\n });\n }", "private static void createAndShowGUI() {\r\n JFrame.setDefaultLookAndFeelDecorated(true);\r\n\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n frame.setLayout(new BorderLayout());\r\n\r\n JPanel parametersPanel = new JPanel();\r\n parametersPanel.setPreferredSize(new Dimension(preferredWidth, 50));\r\n \r\n addComponentsToPane(parametersPanel);\r\n \r\n frame.add(parametersPanel, BorderLayout.PAGE_START);\r\n \r\n schedulePanel.add(monLabel);\r\n schedulePanel.add(tueLabel);\r\n schedulePanel.add(wedLabel);\r\n schedulePanel.add(thuLabel);\r\n schedulePanel.add(friLabel);\r\n schedulePanel.setPreferredSize(new Dimension(preferredWidth, 500));\r\n JScrollPane scrollPane = new JScrollPane();\r\n scrollPane.setViewportView(schedulePanel);\r\n JPanel bigPanel = new JPanel(); \r\n bigPanel.setLayout(new BorderLayout());\r\n bigPanel.setPreferredSize(schedulePanel.getPreferredSize());\r\n bigPanel.add(scrollPane, BorderLayout.CENTER);\r\n frame.add(bigPanel, BorderLayout.CENTER);\r\n\r\n frame.setJMenuBar(createMenu());\r\n \r\n frame.pack();\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n \r\n frame.setVisible(true);\r\n frame.setResizable(false);\r\n }", "@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 roadNamejTextField = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n roadStatusjTextField = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n weatherjTextField = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n trafficjTextField = new javax.swing.JTextField();\n backjButton = new javax.swing.JButton();\n alternateRoutejButton = new javax.swing.JButton();\n jLabel5 = new javax.swing.JLabel();\n\n jLabel1.setFont(new java.awt.Font(\"Segoe Print\", 0, 14)); // NOI18N\n jLabel1.setText(\"Road Name\");\n\n roadNamejTextField.setEditable(false);\n\n jLabel2.setFont(new java.awt.Font(\"Segoe Print\", 0, 14)); // NOI18N\n jLabel2.setText(\"Road Status\");\n\n roadStatusjTextField.setEditable(false);\n\n jLabel3.setFont(new java.awt.Font(\"Segoe Print\", 0, 14)); // NOI18N\n jLabel3.setText(\"Weather\");\n\n weatherjTextField.setEditable(false);\n\n jLabel4.setFont(new java.awt.Font(\"Segoe Print\", 0, 14)); // NOI18N\n jLabel4.setText(\"Traffic\");\n\n trafficjTextField.setEditable(false);\n\n backjButton.setFont(new java.awt.Font(\"Segoe Print\", 0, 14)); // NOI18N\n backjButton.setText(\"Back\");\n backjButton.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));\n backjButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n backjButtonActionPerformed(evt);\n }\n });\n\n alternateRoutejButton.setFont(new java.awt.Font(\"Segoe Print\", 0, 14)); // NOI18N\n alternateRoutejButton.setText(\"Check Map\");\n alternateRoutejButton.setBorder(new javax.swing.border.SoftBevelBorder(javax.swing.border.BevelBorder.RAISED));\n alternateRoutejButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n alternateRoutejButtonActionPerformed(evt);\n }\n });\n\n jLabel5.setFont(new java.awt.Font(\"Segoe Print\", 2, 36)); // NOI18N\n jLabel5.setText(\"Road Details\");\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(layout.createSequentialGroup()\n .addGap(356, 356, 356)\n .addComponent(jLabel5))\n .addGroup(layout.createSequentialGroup()\n .addGap(255, 255, 255)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel1)\n .addComponent(jLabel4, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(backjButton, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 87, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(224, 224, 224)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addComponent(weatherjTextField)\n .addComponent(roadNamejTextField)\n .addComponent(roadStatusjTextField)\n .addComponent(trafficjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(alternateRoutejButton))))\n .addContainerGap(385, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(46, 46, 46)\n .addComponent(jLabel5)\n .addGap(43, 43, 43)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel1)\n .addGap(54, 54, 54)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2)\n .addComponent(roadStatusjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(54, 54, 54)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel3)\n .addComponent(weatherjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addComponent(roadNamejTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(47, 47, 47)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(trafficjTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel4))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(backjButton)\n .addComponent(alternateRoutejButton))\n .addContainerGap(64, Short.MAX_VALUE))\n );\n }", "private void organizeUI() {\n\t\tfileMenu.add(startServerFileMenu);\n\t\tfileMenu.add(stopServerFileMenu);\n\t\tfileMenu.addSeparator();\n\t\tfileMenu.add(exitFileMenu);\n\n\t\toptionMenu.add(loadJokesOptionMenu);\n\t\toptionMenu.add(setupServerInfoOptionMenu);\n\t\t\n\t\thelpMenu.add(aboutHelpMenu);\n\t\t\n\t\tmenuBar.add(fileMenu);\n\t\tmenuBar.add(optionMenu);\n\t\tmenuBar.add(helpMenu);\n\t\tsetJMenuBar(menuBar);\n\t\t\n\t\ttoolBar.add(startServerToolBarButton);\n\t\ttoolBar.add(stopServerToolBarButton);\n\t\tstopServerToolBarButton.setEnabled(false);\n\t\ttoolBar.addSeparator();\n\t\ttoolBar.add(kkClientToolBarButton);\n\t\t\n\t\tkkServerPortField = new JTextField(String.valueOf(kkServerPort));\n\t\t\n\t\tserverStatusLabel.setText(serverStopped);\n\t\tnorthPanel.setLayout(new BorderLayout());\n\t\tnorthPanel.add(toolBar, BorderLayout.NORTH);\n\t\tnorthPanel.add(serverStatusLabel, BorderLayout.WEST);\n\t\tadd(northPanel, BorderLayout.NORTH);\n\t\t\n\t\tcenterPanel.setLayout(new BorderLayout());\n\t\tadd(centerPanel, BorderLayout.CENTER);\n\t\t\n\t\tsouthPanel.setLayout(new BorderLayout());\n\t\tsouthPanel.add(totalClientConectionLabel, BorderLayout.WEST);\n\t\tsouthPanel.add(totalJokesLabel, BorderLayout.EAST);\n\t\t\n\t\tadd(southPanel, BorderLayout.SOUTH);\n\t}", "public GUI() {\n super(\"Day Planner\");\n setSize(465,550);\n setDefaultCloseOperation(EXIT_ON_CLOSE);\n addWindowListener(new CheckOnExit() {});\n basePanel = new JPanel(new CardLayout());\n init();\n \n \n basePanel.setVisible(true);\n add(basePanel);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n configTabs = new javax.swing.JTabbedPane();\n networkPanel = new javax.swing.JPanel();\n channelLabel = new javax.swing.JLabel();\n networkILabel = new javax.swing.JLabel();\n addressLabel = new javax.swing.JLabel();\n securityLabel = new javax.swing.JLabel();\n intervalLabel = new javax.swing.JLabel();\n channelField = new javax.swing.JTextField();\n networkField = new javax.swing.JTextField();\n addressField = new javax.swing.JTextField();\n securityField = new javax.swing.JTextField();\n intervalField = new javax.swing.JTextField();\n okButton = new javax.swing.JButton();\n cancelButton = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(String.format(\"Mote %d - Settings\", ps.getAddress()));\n setResizable(false);\n\n channelLabel.setText(\"Frequency channel:\");\n\n networkILabel.setText(\"Network ID:\");\n\n addressLabel.setText(\"Device address:\");\n\n securityLabel.setText(\"Security option:\");\n\n intervalLabel.setText(\"Periodic TX interval:\");\n\n channelField.setColumns(4);\n channelField.setDocument(new IntegerDocument(0,255)\n );\n channelField.setText(String.format(getChannel()));\n\n networkField.setColumns(4);\n networkField.setDocument(new HexDocument(0,0xFFFe));\n networkField.setText(getNetwork());\n networkField.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n networkFieldActionPerformed(evt);\n }\n });\n\n addressField.setColumns(4);\n addressField.setDocument(new IntegerDocument(0,255));\n addressField.setText(String.format(\"%d\", ps.getAddress()));\n\n securityField.setColumns(4);\n securityField.setDocument(new IntegerDocument(0,255));\n securityField.setText(getSecurityOption());\n\n intervalField.setColumns(4);\n intervalField.setDocument(new IntegerDocument(0,65535));\n intervalField.setText(getTxInterval());\n\n javax.swing.GroupLayout networkPanelLayout = new javax.swing.GroupLayout(networkPanel);\n networkPanel.setLayout(networkPanelLayout);\n networkPanelLayout.setHorizontalGroup(\n networkPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(networkPanelLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(networkPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(networkPanelLayout.createSequentialGroup()\n .addComponent(intervalLabel)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(intervalField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(networkPanelLayout.createSequentialGroup()\n .addGroup(networkPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(channelLabel)\n .addComponent(networkILabel)\n .addComponent(addressLabel)\n .addComponent(securityLabel))\n .addGap(18, 18, 18)\n .addGroup(networkPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(securityField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(addressField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(networkField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(channelField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addContainerGap(160, Short.MAX_VALUE))\n );\n networkPanelLayout.setVerticalGroup(\n networkPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(networkPanelLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(networkPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(channelLabel)\n .addComponent(channelField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(networkPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(networkILabel)\n .addComponent(networkField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(networkPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(addressLabel)\n .addComponent(addressField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(networkPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(securityLabel)\n .addComponent(securityField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(networkPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(intervalLabel)\n .addComponent(intervalField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(38, Short.MAX_VALUE))\n );\n\n configTabs.addTab(\"Settings\", networkPanel);\n\n okButton.setText(\"OK\");\n okButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n okButtonActionPerformed(evt);\n }\n });\n\n cancelButton.setText(\"Cancel\");\n cancelButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cancelButtonActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(configTabs)\n .addContainerGap())\n .addGroup(layout.createSequentialGroup()\n .addGap(17, 17, 17)\n .addComponent(okButton)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(cancelButton)\n .addGap(18, 18, 18))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(configTabs, javax.swing.GroupLayout.PREFERRED_SIZE, 260, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(okButton)\n .addComponent(cancelButton))\n .addContainerGap())\n );\n\n pack();\n }", "public Dashboard() throws MalformedURLException, AWTException, IOException {\n\n initComponents();\n// init floating window \n fww();\n ImageIcon img = new ImageIcon(\"icon.png\");\n this.setIconImage(img.getImage()); // set icon\n\n this.setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE); // set default closing action\n\n // for floating window \n this.addComponentListener(new ComponentAdapter() {\n public void componentHidden(ComponentEvent e) {\n /* code run when component hidden*/\n f.setVisible(true);\n }\n\n public void componentShown(ComponentEvent e) {\n /* code run when component shown */\n f.setVisible(false);\n }\n });\n\n trackerTray();\n //get geo info\n getGeo();\n\n name.setText(Var.tUserName);\n Var.firstClick = false;\n Var.timerPused = false;\n Var.timerResume = false;\n Var.timerStarted = false;\n Var.timerStop = false;\n Var.timerStart = false;\n Var.isStoped = false;\n\n Var.hours = 0;\n Var.minutes = 0;\n Var.sec = 0;\n //checking connection\n Thread checkConnection = new Thread() {\n @Override\n public void run() {\n while (true) {\n try {\n if (Var.online) {\n iconOnline.setEnabled(true);\n iconOffline.setEnabled(false);\n } else {\n iconOnline.setEnabled(false);\n iconOffline.setEnabled(true);\n }\n\n Thread.sleep(500);\n } catch (Exception ee) {\n ee.printStackTrace();\n }\n }\n }\n };\n if (Var.workOffline) {\n Var.offline = true;\n iconOffline.setEnabled(true);\n } else {\n checkConnection.start();\n }\n\n //sending data\n Thread sd = new Thread() {\n @Override\n public void run() {\n while (true) {\n if (Var.timerStart) {\n Var.tProject = txtProjects.getSelectedItem().toString();\n Var.tTime = timerText.getText();\n if (Var.workOffline) {\n try {\n offline();\n } catch (IOException ex) {\n Logger.getLogger(Dashboard.class.getName()).log(Level.SEVERE, null, ex);\n JOptionPane.showMessageDialog(null, \"Something went working we can't save your working data\");\n }\n } else {\n try {\n if (sendData().equals(\"success\")) {\n status(\"Tracker sent data to client\");\n } else if (sendData().equals(\"error\")) {\n JOptionPane.showMessageDialog(null, \"We got error response\");\n } else {\n// backup();\n status(\"Seomething went wrong , we couldn't sent data to client\");\n }\n } catch (UnsupportedEncodingException ex) {\n Logger.getLogger(Dashboard.class.getName()).log(Level.SEVERE, null, ex);\n// backup();\n status(\"Error #1 : Seomething went wrong , we can't sent data to client\");\n } catch (ProtocolException ex) {\n Logger.getLogger(Dashboard.class.getName()).log(Level.SEVERE, null, ex);\n// backup();\n status(\"Error #2 : Seomething went wrong , we can't sent data to client\");\n } catch (IOException ex) {\n Logger.getLogger(Dashboard.class.getName()).log(Level.SEVERE, null, ex);\n backup();\n status(\"Error #3 : Seomething went wrong , we can't sent data to client\");\n }\n }\n\n }\n try {\n Thread.sleep(randomNumber());\n } catch (InterruptedException ex) {\n Logger.getLogger(Dashboard.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }\n };\n sd.start();\n\n // get projects name\n getProjects();\n setResizable(false);\n// takeScreenshot();\n trackerTimer();\n\n try {\n GlobalScreen.registerNativeHook();\n } catch (NativeHookException ex) {\n System.err.println(\"There was a problem registering the native hook.\");\n System.err.println(ex.getMessage());\n\n System.exit(1);\n }\n\n // Construct the example object.\n // Add the appropriate listeners.\n GlobalScreen.addNativeMouseListener(this);\n GlobalScreen.addNativeMouseMotionListener(this);\n GlobalScreen.addNativeKeyListener(this);\n\n }", "public GUI(GUIController controler){\n\t\t//Create the fame with specific features\n\t\ttry {\n\t\t\tUIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (InstantiationException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IllegalAccessException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (UnsupportedLookAndFeelException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\tthis.controler=controler;\n\t\tsetFrame(new JFrame(\"Network Topology\"));\n\t\t//getFrame().setPreferredSize(new Dimension(1200, 700));\n\t\tbuttons=new ArrayList<JButton>();\n\t\tcirclePanel=new CirclePanel();\n\t\tstratButtons= new ArrayList<JButton>();\n\t\t\n\t\tgetFrame().setResizable(true);\n\t\t}", "@Override\r\n public void initializeView(ViewInterface[] subViews) {\r\n setLayout(new GridBagLayout());\r\n setBackground(Color.decode(\"#747b83\"));\r\n GridBagConstraints gridBagConstraints = new GridBagConstraints();\r\n\r\n Border titledBorder = new TitledBorder(null, \"Server Settings\", TitledBorder.LEADING,\r\n TitledBorder.TOP, FONT, null);\r\n\r\n createIntervalLabel(gridBagConstraints);\r\n createIntervalInputTextField(gridBagConstraints);\r\n createAutoRepeatCheckBox(gridBagConstraints);\r\n createServerStartStopButton(gridBagConstraints);\r\n createSendButton(gridBagConstraints);\r\n createStatusIndicator(gridBagConstraints);\r\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jScrollPane1 = new javax.swing.JScrollPane();\n jTextArea1 = new javax.swing.JTextArea();\n jPanel1 = new javax.swing.JPanel();\n jLabel2 = new javax.swing.JLabel();\n serverNameField = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n IPField = new javax.swing.JTextField();\n jLabel4 = new javax.swing.JLabel();\n portField = new javax.swing.JTextField();\n connectButton = new javax.swing.JButton();\n\n jTextArea1.setColumns(20);\n jTextArea1.setRows(5);\n jScrollPane1.setViewportView(jTextArea1);\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setMinimumSize(new java.awt.Dimension(330, 167));\n\n jPanel1.setLayout(new java.awt.GridLayout(3, 2, 1, 1));\n\n jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel2.setText(\"Server Name:\");\n jPanel1.add(jLabel2);\n jPanel1.add(serverNameField);\n\n jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel3.setText(\"IP Address:\");\n jPanel1.add(jLabel3);\n jPanel1.add(IPField);\n\n jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel4.setText(\"Port:\");\n jPanel1.add(jLabel4);\n jPanel1.add(portField);\n\n getContentPane().add(jPanel1, java.awt.BorderLayout.CENTER);\n\n connectButton.setText(\"Connect\");\n connectButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n connectButtonActionPerformed(evt);\n }\n });\n getContentPane().add(connectButton, java.awt.BorderLayout.PAGE_END);\n\n pack();\n }", "public UI() {\r\n\t\tsetPreferredSize(new Dimension(1100, 720));\r\n\t\tsetLayout(new BorderLayout());\r\n\t\tadd(chatPanel(), BorderLayout.CENTER);\r\n\t\tadd(serverPanel(), BorderLayout.EAST);\r\n\t\taddListeners();\r\n\t}", "public RegistroClientesGUI(){\n initComponents();\n obtenerSedes();\n \n //No olvidar agregar esto para agregarle las animaciones\n this.setLocationRelativeTo(null);\n\n this.setTitle(\"Empleados\");\n this.setResizable(false);\n \n \n }", "private void initialize() {\r\n\t\tframe = new JFrame();\r\n\t\tframe.setBounds(100, 100, 736, 580);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\t\r\n\t\tJPanel panel = new JPanel();\r\n\t\tpanel.setBorder(new TitledBorder(null, \"Tablica p\\u0142atno\\u015Bci\", TitledBorder.LEADING, TitledBorder.TOP, null, null));\r\n\t\t\r\n\t\tJPanel panel_1 = new JPanel();\r\n\t\tpanel_1.setBorder(new TitledBorder(null, \"Parametry symulacji\", TitledBorder.LEADING, TitledBorder.TOP, null, null));\r\n\t\t\r\n\t\tJPanel panel_2 = new JPanel();\r\n\t\tpanel_2.setBorder(new TitledBorder(null, \"Rodzaj kom\\u00F3rek w symulacji\", TitledBorder.LEADING, TitledBorder.TOP, null, null));\r\n\t\t\r\n\t\tCAPanel = new JPanel();\r\n\t\tCAPanel.setBorder(new TitledBorder(null, \"Kom\\u00F3rki CA\", TitledBorder.LEADING, TitledBorder.TOP, null, null));\r\n\t\t\r\n\t\tLApanel = new JPanel();\r\n\t\tLApanel.setBorder(new TitledBorder(null, \"Kom\\u00F3rki LA\", TitledBorder.LEADING, TitledBorder.TOP, null, null));\r\n\t\t\r\n\t\tbtnRozpocznijSymulacje = new JButton(\"Symulacja\");\r\n\t\tbtnRozpocznijSymulacje.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\t\r\n\t\t\t\tSettings settings= new Settings();\r\n\t\t\t\t\t\r\n\t\t\t\tif(rdbtnKomrkiLaiCA.isSelected())\r\n\t\t\t\t\tsettings.agentType=typeOfAgent.CAnLA;\r\n\t\t\t\telse if (rdbtnTylkoKomrkiLa.isSelected())\r\n\t\t\t\t\tsettings.agentType=typeOfAgent.LA;\r\n\t\t\t\telse if (rdbtnTylkoKomrkiCa.isSelected())\r\n\t\t\t\t\tsettings.agentType=typeOfAgent.CA;\r\n\t\t\t\t\r\n\t\t\t\tif (rdbtnGotWspDoch.isSelected())\r\n\t\t\t\t\tsettings.probOfPayoffSharing=(double)spinnergot_wspol_doch.getValue();\r\n\t\t\t\telse \r\n\t\t\t\t\tsettings.probOfPayoffSharing=0;\r\n\t\t\t\t\r\n\t\t\t\tif(rbtnkConst.isSelected())\r\n\t\t\t\t\tsettings.isKConst=true;\r\n\t\t\t\telse\r\n\t\t\t\t\tsettings.isKConst=false;\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif (!rdbtnZiarno.isSelected())\r\n\t\t\t\t\tsettings.seed=new Random().nextInt();\r\n\t\t\t\telse \r\n\t\t\t\t\tsettings.seed=(int)spinnerZiarno.getValue();\r\n\t\t\t\ttry \r\n\t\t\t\t{\r\n\t\t\t\t\tsettings.numberOfRows=(int)spinnerLiczbaWireszy.getValue();\r\n\t\t\t\t\tsettings.numberOfColumns=(int) spinnerLiczbaKolumn.getValue();\r\n\t\t\t\t\tsettings.radiusOfNeighbor=(int)spinnerRSasiedztwa.getValue();\r\n\t\t\t\t\tsettings.qChanges=(int)spinnerQ.getValue();\r\n\t\t\t\t\tsettings.numberOfFrames=(int)spinnerIloscKrokow.getValue();\r\n\t\t\t\t\tsettings.probOfUnhabitedCell=(double)spinnerp_niezam.getValue();\r\n\t\t\t\t\tsettings.probOfInitCState=(double)spinnerp_init_C.getValue();\r\n\t\t\t\t\tsettings.numberOfExperiments=(int)spinnerIloscExperymentow.getValue();\r\n\t\t\t\t\tsettings.pDSettings= \r\n\t\t\t\t\t\t\tnew PrisonerDilema((double)spinnerR.getValue(),\r\n\t\t\t\t\t\t\t\t\t(double)spinnerS.getValue(), \r\n\t\t\t\t\t\t\t\t\t(double)spinnerT.getValue(), \r\n\t\t\t\t\t\t\t\t\t(double)spinnerP.getValue());\r\n\t\t\t\t\tsettings.probOfAgentCA=(double)SpinnerpTypAgCA.getValue();\r\n\t\t\t\t\tsettings.historyLength=(int)spinnerHistoria.getValue();\r\n\t\t\t\t\tsettings.epsilon=(double)spinnerEpsilon.getValue();\r\n\t\t\t\t\tsettings.mutation= \r\n\t\t\t\t\t\t\tnew Mutation((double)spinnerMutStrateg.getValue(), \r\n\t\t\t\t\t\t\t\t\t(double)spinnerMutPc.getValue(), \r\n\t\t\t\t\t\t\t\t\t(double)spinnerMutationHistoria.getValue(), \r\n\t\t\t\t\t\t\t\t\t(double)SpinnerMutationEpsilon.getValue(), \r\n\t\t\t\t\t\t\t\t\t(double)spinnerMutC1.getValue(), \r\n\t\t\t\t\t\t\t\t\t(int)spinnerMutationc2.getValue(), \r\n\t\t\t\t\t\t\t\t\t(double)spinnerMutationc3.getValue());\r\n\t\t\t\t\tsettings.probOfPcStrategy=(double)spinnerStrategPc.getValue();\r\n\t\t\t\t\tsettings.probOfAllCStrategy=(double)spinnerStrategAllC.getValue();\r\n\t\t\t\t\tsettings.probOfAllDStrategy=(double)SpinnerStrategAllD.getValue();\r\n\t\t\t\t\tsettings.probOfKDStrategy=(double)spinnerStrategkD.getValue();\r\n\t\t\t\t\tsettings.kMax=(int)spinnerKMAxx.getValue();\r\n\t\t\t\t\tsettings.valueOfPc=(double)spinnerPc.getValue();\r\n\t\t\t\t\tsettings.isQselected=(boolean)rdbtnQ.isSelected();\r\n\t\t\t\t\tsettings.isDebugSelected=(boolean) rdbtnDebug.isSelected();\r\n\t\t\t\t\tsettings.deltaPc=(double)spinnerDeltaPC.getValue();\r\n\t\t\t\t\tsettings.isLA1=(boolean) rdbtnLa1.isSelected();\r\n\t\t\t\t\tsettings.isLA2=(boolean) rdbtnLa2.isSelected();\r\n\t\t\t\t\tsettings.isLA3=(boolean) rdbtnLa3.isSelected();\r\n\t\t\t\t\t\r\n\t\t\t\t\talgo= new Algorithm(settings);\r\n\t\t\t\t\talgo.Calculate();\r\n\t\t\t\t\talgo.createWindow();\r\n\t\t\t\t\r\n\t\t\t\t} catch (IOException e) \r\n\t\t\t\t{\r\n\t\t\t\t\te.printStackTrace();\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\r\n\t\trdbtnDebug = new JRadioButton(\"debug\");\r\n\t\trdbtnDebug.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t}\r\n\t\t});\r\n\t\tGroupLayout groupLayout = new GroupLayout(frame.getContentPane());\r\n\t\tgroupLayout.setHorizontalGroup(\r\n\t\t\tgroupLayout.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t.addGroup(groupLayout.createSequentialGroup()\r\n\t\t\t\t\t.addContainerGap()\r\n\t\t\t\t\t.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t\t\t.addComponent(panel_1, GroupLayout.DEFAULT_SIZE, 266, Short.MAX_VALUE)\r\n\t\t\t\t\t\t.addComponent(panel, GroupLayout.PREFERRED_SIZE, 266, Short.MAX_VALUE))\r\n\t\t\t\t\t.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t\t\t.addGroup(groupLayout.createSequentialGroup()\r\n\t\t\t\t\t\t\t.addGap(24)\r\n\t\t\t\t\t\t\t.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t\t\t\t\t.addGroup(groupLayout.createSequentialGroup()\r\n\t\t\t\t\t\t\t\t\t.addGap(10)\r\n\t\t\t\t\t\t\t\t\t.addComponent(btnRozpocznijSymulacje, GroupLayout.PREFERRED_SIZE, 97, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t\t\t\t\t.addComponent(rdbtnDebug, GroupLayout.DEFAULT_SIZE, 78, Short.MAX_VALUE))\r\n\t\t\t\t\t\t\t\t.addComponent(LApanel, 0, 0, Short.MAX_VALUE)))\r\n\t\t\t\t\t\t.addGroup(groupLayout.createSequentialGroup()\r\n\t\t\t\t\t\t\t.addGap(28)\r\n\t\t\t\t\t\t\t.addComponent(panel_2, GroupLayout.PREFERRED_SIZE, 183, GroupLayout.PREFERRED_SIZE)))\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t.addComponent(CAPanel, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t.addContainerGap())\r\n\t\t);\r\n\t\tgroupLayout.setVerticalGroup(\r\n\t\t\tgroupLayout.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t.addGroup(groupLayout.createSequentialGroup()\r\n\t\t\t\t\t.addContainerGap()\r\n\t\t\t\t\t.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t\t\t.addComponent(CAPanel, GroupLayout.DEFAULT_SIZE, 478, Short.MAX_VALUE)\r\n\t\t\t\t\t\t.addGroup(groupLayout.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t\t.addGroup(groupLayout.createSequentialGroup()\r\n\t\t\t\t\t\t\t\t.addComponent(panel_1, GroupLayout.PREFERRED_SIZE, 329, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 35, Short.MAX_VALUE)\r\n\t\t\t\t\t\t\t\t.addComponent(panel, GroupLayout.PREFERRED_SIZE, 114, GroupLayout.PREFERRED_SIZE))\r\n\t\t\t\t\t\t\t.addGroup(groupLayout.createSequentialGroup()\r\n\t\t\t\t\t\t\t\t.addComponent(panel_2, GroupLayout.PREFERRED_SIZE, 180, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t\t\t.addGap(1)\r\n\t\t\t\t\t\t\t\t.addComponent(LApanel, GroupLayout.PREFERRED_SIZE, 255, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n\t\t\t\t\t\t\t\t.addGroup(groupLayout.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t\t\t\t.addComponent(btnRozpocznijSymulacje, GroupLayout.PREFERRED_SIZE, 35, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t\t\t\t.addComponent(rdbtnDebug)))))\r\n\t\t\t\t\t.addGap(42))\r\n\t\t);\r\n\t\tGridBagLayout gbl_panel = new GridBagLayout();\r\n\t\tgbl_panel.columnWidths = new int[]{0, 0, 67, 0, 0, 0};\r\n\t\tgbl_panel.rowHeights = new int[]{0, 37, 41, 0};\r\n\t\tgbl_panel.columnWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};\r\n\t\tgbl_panel.rowWeights = new double[]{0.0, 0.0, 0.0, Double.MIN_VALUE};\r\n\t\tpanel.setLayout(gbl_panel);\r\n\t\t\r\n\t\tJLabel lblNewLabel_1 = new JLabel(\"C\");\r\n\t\tGridBagConstraints gbc_lblNewLabel_1 = new GridBagConstraints();\r\n\t\tgbc_lblNewLabel_1.anchor = GridBagConstraints.WEST;\r\n\t\tgbc_lblNewLabel_1.insets = new Insets(0, 0, 5, 5);\r\n\t\tgbc_lblNewLabel_1.gridx = 2;\r\n\t\tgbc_lblNewLabel_1.gridy = 0;\r\n\t\tpanel.add(lblNewLabel_1, gbc_lblNewLabel_1);\r\n\t\t\r\n\t\tJLabel lblD = new JLabel(\"D\");\r\n\t\tGridBagConstraints gbc_lblD = new GridBagConstraints();\r\n\t\tgbc_lblD.insets = new Insets(0, 0, 5, 0);\r\n\t\tgbc_lblD.gridx = 4;\r\n\t\tgbc_lblD.gridy = 0;\r\n\t\tpanel.add(lblD, gbc_lblD);\r\n\t\t\r\n\t\tJLabel lblC = new JLabel(\"C\");\r\n\t\tGridBagConstraints gbc_lblC = new GridBagConstraints();\r\n\t\tgbc_lblC.insets = new Insets(0, 0, 5, 5);\r\n\t\tgbc_lblC.gridx = 0;\r\n\t\tgbc_lblC.gridy = 1;\r\n\t\tpanel.add(lblC, gbc_lblC);\r\n\t\t\r\n\t\tJLabel lblR = new JLabel(\"R():\");\r\n\t\tGridBagConstraints gbc_lblR = new GridBagConstraints();\r\n\t\tgbc_lblR.insets = new Insets(0, 0, 5, 5);\r\n\t\tgbc_lblR.gridx = 1;\r\n\t\tgbc_lblR.gridy = 1;\r\n\t\tpanel.add(lblR, gbc_lblR);\r\n\t\t\r\n\t\tspinnerR = new JSpinner();\r\n\t\tGridBagConstraints gbc_spinnerR = new GridBagConstraints();\r\n\t\tgbc_spinnerR.anchor = GridBagConstraints.WEST;\r\n\t\tgbc_spinnerR.insets = new Insets(0, 0, 5, 5);\r\n\t\tgbc_spinnerR.gridx = 2;\r\n\t\tgbc_spinnerR.gridy = 1;\r\n\t\tpanel.add(spinnerR, gbc_spinnerR);\r\n\t\tspinnerR.setModel(new SpinnerNumberModel(1.0,-99.99,99.99,0.01));\r\n\t\t\r\n\t\tJLabel lblS = new JLabel(\"S():\");\r\n\t\tGridBagConstraints gbc_lblS = new GridBagConstraints();\r\n\t\tgbc_lblS.insets = new Insets(0, 0, 5, 5);\r\n\t\tgbc_lblS.gridx = 3;\r\n\t\tgbc_lblS.gridy = 1;\r\n\t\tpanel.add(lblS, gbc_lblS);\r\n\t\t\r\n\t\tspinnerS = new JSpinner();\r\n\t\tspinnerS.setModel(new SpinnerNumberModel(0,-99.99,99.99,0.01));\r\n\t\tGridBagConstraints gbc_spinnerS = new GridBagConstraints();\r\n\t\tgbc_spinnerS.insets = new Insets(0, 0, 5, 0);\r\n\t\tgbc_spinnerS.gridx = 4;\r\n\t\tgbc_spinnerS.gridy = 1;\r\n\t\tpanel.add(spinnerS, gbc_spinnerS);\r\n\t\t\r\n\t\tJLabel lblD_1 = new JLabel(\"D\");\r\n\t\tGridBagConstraints gbc_lblD_1 = new GridBagConstraints();\r\n\t\tgbc_lblD_1.insets = new Insets(0, 0, 0, 5);\r\n\t\tgbc_lblD_1.gridx = 0;\r\n\t\tgbc_lblD_1.gridy = 2;\r\n\t\tpanel.add(lblD_1, gbc_lblD_1);\r\n\t\t\r\n\t\tJLabel lblT = new JLabel(\"T(b):\");\r\n\t\tGridBagConstraints gbc_lblT = new GridBagConstraints();\r\n\t\tgbc_lblT.insets = new Insets(0, 0, 0, 5);\r\n\t\tgbc_lblT.gridx = 1;\r\n\t\tgbc_lblT.gridy = 2;\r\n\t\tpanel.add(lblT, gbc_lblT);\r\n\t\t\r\n\t\tspinnerT = new JSpinner();\r\n\t\tGridBagConstraints gbc_spinnerT = new GridBagConstraints();\r\n\t\tgbc_spinnerT.anchor = GridBagConstraints.WEST;\r\n\t\tgbc_spinnerT.insets = new Insets(0, 0, 0, 5);\r\n\t\tgbc_spinnerT.gridx = 2;\r\n\t\tgbc_spinnerT.gridy = 2;\r\n\t\tpanel.add(spinnerT, gbc_spinnerT);\r\n\t\tspinnerT.setModel(new SpinnerNumberModel(1.4,-99.99,99.99,0.01));\r\n\t\t\r\n\t\tJLabel lblNewLabel = new JLabel(\"P():\");\r\n\t\tGridBagConstraints gbc_lblNewLabel = new GridBagConstraints();\r\n\t\tgbc_lblNewLabel.insets = new Insets(0, 0, 0, 5);\r\n\t\tgbc_lblNewLabel.gridx = 3;\r\n\t\tgbc_lblNewLabel.gridy = 2;\r\n\t\tpanel.add(lblNewLabel, gbc_lblNewLabel);\r\n\t\t\r\n\t\tspinnerP = new JSpinner();\r\n\t\tspinnerP.setModel(new SpinnerNumberModel(0,-99.99,99.99,0.01));\r\n\t\tGridBagConstraints gbc_spinnerP = new GridBagConstraints();\r\n\t\tgbc_spinnerP.gridx = 4;\r\n\t\tgbc_spinnerP.gridy = 2;\r\n\t\tpanel.add(spinnerP, gbc_spinnerP);\r\n\t\t\r\n\t\tspinnerHistoria = new JSpinner();\r\n\t\tspinnerHistoria.setEnabled(false);\r\n\t\tspinnerHistoria.setModel(new SpinnerNumberModel(new Integer(8), new Integer(1), null, new Integer(1)));\r\n\t\t\r\n\t\tJLabel lblHistoria = new JLabel(\"pamiec\");\r\n\t\t\r\n\t\tspinnerEpsilon = new JSpinner();\r\n\t\tspinnerEpsilon.setEnabled(false);\r\n\t\tspinnerEpsilon.setModel(new SpinnerNumberModel(0.001,0,1,0.001));\r\n\t\t\r\n\t\tJLabel lblEpsilon = new JLabel(\"epsilon:\");\r\n\t\t\r\n\t\tJPanel panel_6 = new JPanel();\r\n\t\tpanel_6.setBorder(new TitledBorder(UIManager.getBorder(\"TitledBorder.border\"), \"mutacja\", TitledBorder.LEADING, TitledBorder.TOP, null, new Color(0, 0, 0)));\r\n\t\tGroupLayout gl_LApanel = new GroupLayout(LApanel);\r\n\t\tgl_LApanel.setHorizontalGroup(\r\n\t\t\tgl_LApanel.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t.addGroup(Alignment.TRAILING, gl_LApanel.createSequentialGroup()\r\n\t\t\t\t\t.addContainerGap()\r\n\t\t\t\t\t.addGroup(gl_LApanel.createParallelGroup(Alignment.TRAILING)\r\n\t\t\t\t\t\t.addComponent(panel_6, Alignment.LEADING, GroupLayout.DEFAULT_SIZE, 170, Short.MAX_VALUE)\r\n\t\t\t\t\t\t.addGroup(gl_LApanel.createSequentialGroup()\r\n\t\t\t\t\t\t\t.addComponent(lblHistoria)\r\n\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.UNRELATED)\r\n\t\t\t\t\t\t\t.addComponent(spinnerHistoria, GroupLayout.PREFERRED_SIZE, 63, GroupLayout.PREFERRED_SIZE))\r\n\t\t\t\t\t\t.addGroup(gl_LApanel.createSequentialGroup()\r\n\t\t\t\t\t\t\t.addComponent(lblEpsilon)\r\n\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.UNRELATED)\r\n\t\t\t\t\t\t\t.addComponent(spinnerEpsilon, GroupLayout.PREFERRED_SIZE, 63, GroupLayout.PREFERRED_SIZE)))\r\n\t\t\t\t\t.addContainerGap())\r\n\t\t);\r\n\t\tgl_LApanel.setVerticalGroup(\r\n\t\t\tgl_LApanel.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t.addGroup(gl_LApanel.createSequentialGroup()\r\n\t\t\t\t\t.addContainerGap()\r\n\t\t\t\t\t.addGroup(gl_LApanel.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(spinnerHistoria, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(lblHistoria))\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t.addGroup(gl_LApanel.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(spinnerEpsilon, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(lblEpsilon))\r\n\t\t\t\t\t.addGap(18)\r\n\t\t\t\t\t.addComponent(panel_6, GroupLayout.DEFAULT_SIZE, 130, Short.MAX_VALUE)\r\n\t\t\t\t\t.addContainerGap())\r\n\t\t);\r\n\t\t\r\n\t\tspinnerMutationHistoria = new JSpinner();\r\n\t\tspinnerMutationHistoria.setEnabled(false);\r\n\t\tspinnerMutationHistoria.setModel(new SpinnerNumberModel(0, 0, 1, 0.01));\r\n\t\t\r\n\t\tJLabel lblHistoria_1 = new JLabel(\"historia:\");\r\n\t\t\r\n\t\tspinnerMutationc2 = new JSpinner();\r\n\t\tspinnerMutationc2.setEnabled(false);\r\n\t\tspinnerMutationc2.setModel(new SpinnerNumberModel(1, 1, 100, 1));\r\n\t\t\r\n\t\tJLabel lblC_2 = new JLabel(\"c2:\");\r\n\t\t\r\n\t\tSpinnerMutationEpsilon = new JSpinner();\r\n\t\tSpinnerMutationEpsilon.setEnabled(false);\r\n\t\tSpinnerMutationEpsilon.setModel(new SpinnerNumberModel(0, 0, 1, 0.01));\r\n\t\t\r\n\t\tspinnerMutationc3 = new JSpinner();\r\n\t\tspinnerMutationc3.setEnabled(false);\r\n\t\tspinnerMutationc3.setModel(new SpinnerNumberModel(0, 0, 1, 0.01));\r\n\t\t\r\n\t\tJLabel lblEpsilon_1 = new JLabel(\"epsilon:\");\r\n\t\t\r\n\t\tJLabel lblC_3 = new JLabel(\"c3:\");\r\n\t\tGroupLayout gl_panel_6 = new GroupLayout(panel_6);\r\n\t\tgl_panel_6.setHorizontalGroup(\r\n\t\t\tgl_panel_6.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t.addGroup(Alignment.TRAILING, gl_panel_6.createSequentialGroup()\r\n\t\t\t\t\t.addContainerGap(24, Short.MAX_VALUE)\r\n\t\t\t\t\t.addGroup(gl_panel_6.createParallelGroup(Alignment.TRAILING)\r\n\t\t\t\t\t\t.addComponent(lblHistoria_1)\r\n\t\t\t\t\t\t.addComponent(lblC_2)\r\n\t\t\t\t\t\t.addComponent(lblEpsilon_1)\r\n\t\t\t\t\t\t.addComponent(lblC_3))\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t.addGroup(gl_panel_6.createParallelGroup(Alignment.LEADING, false)\r\n\t\t\t\t\t\t.addComponent(spinnerMutationc3, Alignment.TRAILING)\r\n\t\t\t\t\t\t.addComponent(SpinnerMutationEpsilon, Alignment.TRAILING)\r\n\t\t\t\t\t\t.addComponent(spinnerMutationc2, Alignment.TRAILING)\r\n\t\t\t\t\t\t.addComponent(spinnerMutationHistoria, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 63, Short.MAX_VALUE))\r\n\t\t\t\t\t.addContainerGap())\r\n\t\t);\r\n\t\tgl_panel_6.setVerticalGroup(\r\n\t\t\tgl_panel_6.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t.addGroup(gl_panel_6.createSequentialGroup()\r\n\t\t\t\t\t.addGroup(gl_panel_6.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(spinnerMutationHistoria, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(lblHistoria_1))\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t.addGroup(gl_panel_6.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(spinnerMutationc2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(lblC_2))\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t.addGroup(gl_panel_6.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(SpinnerMutationEpsilon, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(lblEpsilon_1))\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t.addGroup(gl_panel_6.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(spinnerMutationc3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(lblC_3))\r\n\t\t\t\t\t.addContainerGap(43, Short.MAX_VALUE))\r\n\t\t);\r\n\t\tpanel_6.setLayout(gl_panel_6);\r\n\t\tLApanel.setLayout(gl_LApanel);\r\n\t\t\r\n\t\tspinnerStrategPc = new JSpinner();\r\n\t\tspinnerStrategPc.setModel(new SpinnerNumberModel(0.25, 0, 1, 0.01));\r\n\t\tspinnerStrategPc.addChangeListener(new ChangeListener() {\r\n\t\t\tpublic void stateChanged(ChangeEvent e) {\r\n\t\t\t\tdouble suma= (double)spinnerStrategAllC.getValue()+(double)SpinnerStrategAllD.getValue()+(double)spinnerStrategkD.getValue();\r\n\t\t\t\tif((suma+(double)spinnerStrategPc.getValue())>1)\r\n\t\t\t\t{\r\n\t\t\t\t\tspinnerStrategPc.setValue((double)1-suma);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJLabel label = new JLabel(\"strategia Pc:\");\r\n\t\t\r\n\t\tspinnerStrategAllC = new JSpinner();\r\n\t\tspinnerStrategAllC.setModel(new SpinnerNumberModel(0.25, 0, 1, 0.01));\r\n\t\tspinnerStrategAllC.addChangeListener(new ChangeListener() {\r\n\t\t\tpublic void stateChanged(ChangeEvent e) {\r\n\t\t\t\tdouble suma= (double)spinnerStrategPc.getValue()+(double)SpinnerStrategAllD.getValue()+(double)spinnerStrategkD.getValue();\r\n\t\t\t\tif((suma+(double)spinnerStrategAllC.getValue())>1)\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\tspinnerStrategAllC.setValue((double)1-suma);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tSpinnerStrategAllD = new JSpinner();\r\n\t\tSpinnerStrategAllD.setModel(new SpinnerNumberModel(0.25, 0, 1, 0.01));\r\n\t\tSpinnerStrategAllD.addChangeListener(new ChangeListener() {\r\n\t\t\tpublic void stateChanged(ChangeEvent e) {\r\n\t\t\t\tdouble suma= (double)spinnerStrategPc.getValue()+(double)spinnerStrategAllC.getValue()+(double)spinnerStrategkD.getValue();\r\n\t\t\t\tif((suma+(double)SpinnerStrategAllD.getValue())>1)\r\n\t\t\t\t{\r\n\t\t\t\t\tSpinnerStrategAllD.setValue((double)1-suma);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tspinnerStrategkD = new JSpinner();\r\n\t\tspinnerStrategkD.setModel(new SpinnerNumberModel(0.25, 0, 1, 0.01));\r\n\t\tspinnerStrategkD.addChangeListener(new ChangeListener() {\r\n\t\t\tpublic void stateChanged(ChangeEvent e) {\r\n\t\t\t\tdouble suma= (double)spinnerStrategPc.getValue()+(double)spinnerStrategAllC.getValue()+(double)SpinnerStrategAllD.getValue();\r\n\t\t\t\tif((suma+(double)spinnerStrategkD.getValue())>1)\r\n\t\t\t\t{\r\n\t\t\t\t\t\r\n\t\t\t\t\tspinnerStrategkD.setValue((double)1-suma);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJLabel lblStrategiaAllc = new JLabel(\"strategia AllC:\");\r\n\t\t\r\n\t\tJLabel lblStrategia = new JLabel(\"strategia AllD:\");\r\n\t\t\r\n\t\tJLabel lblStrategiaKd = new JLabel(\"strategia k-D:\");\r\n\t\t\r\n\t\trbtnkConst = new JRadioButton(\"k_const\");\r\n\t\t\r\n\t\tspinnerPc = new JSpinner();\r\n\t\tspinnerPc.setModel(new SpinnerNumberModel(0.5, 0, 1, 0.01));\r\n\t\t\r\n\t\tJLabel lblPWsppracy = new JLabel(\"p_C:\");\r\n\t\t\r\n\t\tspinnerKMAxx = new JSpinner();\r\n\t\tspinnerKMAxx.setModel(new SpinnerNumberModel(3, 0, 7, 1));\r\n\t\t\r\n\t\tJPanel panel_5 = new JPanel();\r\n\t\tpanel_5.setBorder(new TitledBorder(null, \"mutacja\", TitledBorder.LEADING, TitledBorder.TOP, null, null));\r\n\t\t\r\n\t\tJLabel deltaP_C = new JLabel(\"delta p_C:\");\r\n\t\t\r\n\t\tspinnerDeltaPC = new JSpinner(new SpinnerNumberModel(0, 0, 1, 0.01));\r\n\t\tGroupLayout gl_CAPanel = new GroupLayout(CAPanel);\r\n\t\tgl_CAPanel.setHorizontalGroup(\r\n\t\t\tgl_CAPanel.createParallelGroup(Alignment.TRAILING)\r\n\t\t\t\t.addGroup(gl_CAPanel.createSequentialGroup()\r\n\t\t\t\t\t.addContainerGap()\r\n\t\t\t\t\t.addGroup(gl_CAPanel.createParallelGroup(Alignment.TRAILING)\r\n\t\t\t\t\t\t.addComponent(panel_5, GroupLayout.DEFAULT_SIZE, 173, Short.MAX_VALUE)\r\n\t\t\t\t\t\t.addGroup(gl_CAPanel.createSequentialGroup()\r\n\t\t\t\t\t\t\t.addGroup(gl_CAPanel.createParallelGroup(Alignment.TRAILING, false)\r\n\t\t\t\t\t\t\t\t.addComponent(lblPWsppracy)\r\n\t\t\t\t\t\t\t\t.addComponent(rbtnkConst, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\r\n\t\t\t\t\t\t\t\t.addComponent(deltaP_C))\r\n\t\t\t\t\t\t\t.addGap(18)\r\n\t\t\t\t\t\t\t.addGroup(gl_CAPanel.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t\t\t\t\t.addComponent(spinnerDeltaPC, GroupLayout.PREFERRED_SIZE, 64, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t\t\t.addComponent(spinnerKMAxx, GroupLayout.PREFERRED_SIZE, 64, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t\t\t.addComponent(spinnerPc, GroupLayout.PREFERRED_SIZE, 64, GroupLayout.PREFERRED_SIZE)))\r\n\t\t\t\t\t\t.addGroup(gl_CAPanel.createSequentialGroup()\r\n\t\t\t\t\t\t\t.addGap(26)\r\n\t\t\t\t\t\t\t.addComponent(label, GroupLayout.PREFERRED_SIZE, 72, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.UNRELATED)\r\n\t\t\t\t\t\t\t.addComponent(spinnerStrategPc, GroupLayout.PREFERRED_SIZE, 63, GroupLayout.PREFERRED_SIZE))\r\n\t\t\t\t\t\t.addGroup(gl_CAPanel.createSequentialGroup()\r\n\t\t\t\t\t\t\t.addComponent(lblStrategiaAllc)\r\n\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.UNRELATED)\r\n\t\t\t\t\t\t\t.addComponent(spinnerStrategAllC, GroupLayout.PREFERRED_SIZE, 63, GroupLayout.PREFERRED_SIZE))\r\n\t\t\t\t\t\t.addGroup(gl_CAPanel.createSequentialGroup()\r\n\t\t\t\t\t\t\t.addComponent(lblStrategia)\r\n\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.UNRELATED)\r\n\t\t\t\t\t\t\t.addComponent(SpinnerStrategAllD, GroupLayout.PREFERRED_SIZE, 63, GroupLayout.PREFERRED_SIZE))\r\n\t\t\t\t\t\t.addGroup(gl_CAPanel.createSequentialGroup()\r\n\t\t\t\t\t\t\t.addComponent(lblStrategiaKd)\r\n\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.UNRELATED)\r\n\t\t\t\t\t\t\t.addComponent(spinnerStrategkD, GroupLayout.PREFERRED_SIZE, 63, GroupLayout.PREFERRED_SIZE)))\r\n\t\t\t\t\t.addContainerGap())\r\n\t\t);\r\n\t\tgl_CAPanel.setVerticalGroup(\r\n\t\t\tgl_CAPanel.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t.addGroup(gl_CAPanel.createSequentialGroup()\r\n\t\t\t\t\t.addContainerGap()\r\n\t\t\t\t\t.addGroup(gl_CAPanel.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(spinnerStrategPc, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(label))\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t.addGroup(gl_CAPanel.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(spinnerStrategAllC, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(lblStrategiaAllc))\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t.addGroup(gl_CAPanel.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(SpinnerStrategAllD, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(lblStrategia))\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t.addGroup(gl_CAPanel.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(spinnerStrategkD, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(lblStrategiaKd))\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t.addGroup(gl_CAPanel.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(spinnerKMAxx, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(rbtnkConst))\r\n\t\t\t\t\t.addGap(5)\r\n\t\t\t\t\t.addGroup(gl_CAPanel.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(lblPWsppracy)\r\n\t\t\t\t\t\t.addComponent(spinnerPc, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t.addGroup(gl_CAPanel.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(deltaP_C)\r\n\t\t\t\t\t\t.addComponent(spinnerDeltaPC, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 66, Short.MAX_VALUE)\r\n\t\t\t\t\t.addComponent(panel_5, GroupLayout.PREFERRED_SIZE, 156, GroupLayout.PREFERRED_SIZE))\r\n\t\t);\r\n\t\t\r\n\t\tspinnerMutStrateg = new JSpinner();\r\n\t\tspinnerMutStrateg.setModel(new SpinnerNumberModel(0,0,1,0.01));\r\n\t\t\r\n\t\tJLabel lblZmianaStrateg = new JLabel(\"strategia:\");\r\n\t\t\r\n\t\tspinnerMutPc = new JSpinner();\r\n\t\tspinnerMutPc.setModel(new SpinnerNumberModel(0,0,1,0.01));\r\n\t\t\r\n\t\tJLabel lblNewLabel_2 = new JLabel(\"parametr Pc:\");\r\n\t\t\r\n\t\tspinnerMutC1 = new JSpinner();\r\n\t\tspinnerMutC1.setModel(new SpinnerNumberModel(0.05,0,1,0.01));\r\n\t\t\r\n\t\tJLabel lblC_1 = new JLabel(\"c1:\");\r\n\t\tGroupLayout gl_panel_5 = new GroupLayout(panel_5);\r\n\t\tgl_panel_5.setHorizontalGroup(\r\n\t\t\tgl_panel_5.createParallelGroup(Alignment.TRAILING)\r\n\t\t\t\t.addGroup(gl_panel_5.createSequentialGroup()\r\n\t\t\t\t\t.addContainerGap(17, Short.MAX_VALUE)\r\n\t\t\t\t\t.addGroup(gl_panel_5.createParallelGroup(Alignment.TRAILING)\r\n\t\t\t\t\t\t.addComponent(lblZmianaStrateg)\r\n\t\t\t\t\t\t.addComponent(lblNewLabel_2)\r\n\t\t\t\t\t\t.addComponent(lblC_1))\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t.addGroup(gl_panel_5.createParallelGroup(Alignment.LEADING, false)\r\n\t\t\t\t\t\t.addComponent(spinnerMutC1, Alignment.TRAILING)\r\n\t\t\t\t\t\t.addComponent(spinnerMutPc)\r\n\t\t\t\t\t\t.addComponent(spinnerMutStrateg, GroupLayout.DEFAULT_SIZE, 57, Short.MAX_VALUE))\r\n\t\t\t\t\t.addContainerGap())\r\n\t\t);\r\n\t\tgl_panel_5.setVerticalGroup(\r\n\t\t\tgl_panel_5.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t.addGroup(gl_panel_5.createSequentialGroup()\r\n\t\t\t\t\t.addContainerGap()\r\n\t\t\t\t\t.addGroup(gl_panel_5.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(spinnerMutStrateg, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(lblZmianaStrateg))\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t.addGroup(gl_panel_5.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(spinnerMutPc, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(lblNewLabel_2))\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t.addGroup(gl_panel_5.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(spinnerMutC1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(lblC_1))\r\n\t\t\t\t\t.addContainerGap(26, Short.MAX_VALUE))\r\n\t\t);\r\n\t\tpanel_5.setLayout(gl_panel_5);\r\n\t\tCAPanel.setLayout(gl_CAPanel);\r\n\t\t\r\n\t\trdbtnTylkoKomrkiCa = new JRadioButton(\"Tylko Kom\\u00F3rki CA\");\r\n\t\trdbtnTylkoKomrkiCa.setSelected(true);\r\n\t\trdbtnTylkoKomrkiCa.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tif(rdbtnTylkoKomrkiCa.isSelected())\r\n\t\t\t\t{\r\n\t\t\t\t\tSpinnerpTypAgCA.setEnabled(false);\r\n\t\t\t\t\tLApanel.setEnabled(false);\r\n\t\t\t\t\tCAPanel.setEnabled(true);\r\n\t\t\t\t\tspinnerStrategPc.setEnabled(true);\r\n\t\t\t\t\tspinnerPc.setEnabled(true);\r\n\t\t\t\t\tspinnerStrategAllC.setEnabled(true);\r\n\t\t\t\t\tSpinnerStrategAllD.setEnabled(true);\r\n\t\t\t\t\tspinnerStrategkD.setEnabled(true);\r\n\t\t\t\t\tspinnerKMAxx.setEnabled(true);\r\n\t\t\t\t\trbtnkConst.setEnabled(true);\r\n\t\t\t\t\tspinnerMutStrateg.setEnabled(true);\r\n\t\t\t\t\tspinnerMutPc.setEnabled(true);\r\n\t\t\t\t\tspinnerMutC1.setEnabled(true);\r\n\t\t\t\t\tspinnerHistoria.setEnabled(false);\r\n\t\t\t\t\tspinnerEpsilon.setEnabled(false);\r\n\t\t\t\t\tspinnerMutationHistoria.setEnabled(false);\r\n\t\t\t\t\tspinnerMutationc2.setEnabled(false);\r\n\t\t\t\t\tSpinnerMutationEpsilon.setEnabled(false);\r\n\t\t\t\t\tspinnerMutationc3.setEnabled(false);\r\n\t\t\t\t\trdbtnLa1.setEnabled(false);\r\n\t\t\t\t\trdbtnLa2.setEnabled(false);\r\n\t\t\t\t\trdbtnLa3.setEnabled(false);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tLApanel.setEnabled(false);\r\n\t\t\t\t\tCAPanel.setEnabled(false);\r\n\t\t\t\t\tspinnerStrategPc.setEnabled(false);\r\n\t\t\t\t\tspinnerPc.setEnabled(false);\r\n\t\t\t\t\tspinnerStrategAllC.setEnabled(false);\r\n\t\t\t\t\tSpinnerStrategAllD.setEnabled(false);\r\n\t\t\t\t\tspinnerStrategkD.setEnabled(false);\r\n\t\t\t\t\tspinnerKMAxx.setEnabled(false);\r\n\t\t\t\t\trbtnkConst.setEnabled(false);\r\n\t\t\t\t\tspinnerMutStrateg.setEnabled(false);\r\n\t\t\t\t\tspinnerMutPc.setEnabled(false);\r\n\t\t\t\t\tspinnerMutC1.setEnabled(false);\r\n\t\t\t\t\tspinnerHistoria.setEnabled(false);\r\n\t\t\t\t\tspinnerEpsilon.setEnabled(false);\r\n\t\t\t\t\tspinnerMutationHistoria.setEnabled(false);\r\n\t\t\t\t\tspinnerMutationc2.setEnabled(false);\r\n\t\t\t\t\tSpinnerMutationEpsilon.setEnabled(false);\r\n\t\t\t\t\tspinnerMutationc3.setEnabled(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tbuttonGroup.add(rdbtnTylkoKomrkiCa);\r\n\t\t\r\n\t\trdbtnTylkoKomrkiLa = new JRadioButton(\"Tylko Kom\\u00F3rki LA\");\r\n\t\trdbtnTylkoKomrkiLa.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tif(rdbtnTylkoKomrkiLa.isSelected())\r\n\t\t\t\t{\r\n\t\t\t\t\tSpinnerpTypAgCA.setEnabled(false);\r\n\t\t\t\t\tLApanel.setEnabled(true);\r\n\t\t\t\t\tCAPanel.setEnabled(false);\r\n\t\t\t\t\tspinnerStrategPc.setEnabled(false);\r\n\t\t\t\t\tspinnerPc.setEnabled(false);\r\n\t\t\t\t\tspinnerStrategAllC.setEnabled(false);\r\n\t\t\t\t\tSpinnerStrategAllD.setEnabled(false);\r\n\t\t\t\t\tspinnerStrategkD.setEnabled(false);\r\n\t\t\t\t\tspinnerKMAxx.setEnabled(false);\r\n\t\t\t\t\trbtnkConst.setEnabled(false);\r\n\t\t\t\t\tspinnerMutStrateg.setEnabled(false);\r\n\t\t\t\t\tspinnerMutPc.setEnabled(false);\r\n\t\t\t\t\tspinnerMutC1.setEnabled(false);\r\n\t\t\t\t\tspinnerHistoria.setEnabled(true);\r\n\t\t\t\t\tspinnerEpsilon.setEnabled(true);\r\n\t\t\t\t\tspinnerMutationHistoria.setEnabled(true);\r\n\t\t\t\t\tspinnerMutationc2.setEnabled(true);\r\n\t\t\t\t\tSpinnerMutationEpsilon.setEnabled(true);\r\n\t\t\t\t\tspinnerMutationc3.setEnabled(true);\r\n\t\t\t\t\trdbtnLa1.setEnabled(true);\r\n\t\t\t\t\trdbtnLa2.setEnabled(true);\r\n\t\t\t\t\trdbtnLa3.setEnabled(true);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tLApanel.setEnabled(false);\r\n\t\t\t\t\tCAPanel.setEnabled(false);\r\n\t\t\t\t\tspinnerStrategPc.setEnabled(false);\r\n\t\t\t\t\tspinnerPc.setEnabled(false);\r\n\t\t\t\t\tspinnerStrategAllC.setEnabled(false);\r\n\t\t\t\t\tSpinnerStrategAllD.setEnabled(false);\r\n\t\t\t\t\tspinnerStrategkD.setEnabled(false);\r\n\t\t\t\t\tspinnerKMAxx.setEnabled(false);\r\n\t\t\t\t\trbtnkConst.setEnabled(false);\r\n\t\t\t\t\tspinnerMutStrateg.setEnabled(false);\r\n\t\t\t\t\tspinnerMutPc.setEnabled(false);\r\n\t\t\t\t\tspinnerMutC1.setEnabled(false);\r\n\t\t\t\t\tspinnerHistoria.setEnabled(false);\r\n\t\t\t\t\tspinnerEpsilon.setEnabled(false);\r\n\t\t\t\t\tspinnerMutationHistoria.setEnabled(false);\r\n\t\t\t\t\tspinnerMutationc2.setEnabled(false);\r\n\t\t\t\t\tSpinnerMutationEpsilon.setEnabled(false);\r\n\t\t\t\t\tspinnerMutationc3.setEnabled(false);\r\n\t\t\t\t\trdbtnLa1.setEnabled(false);\r\n\t\t\t\t\trdbtnLa2.setEnabled(false);\r\n\t\t\t\t\trdbtnLa3.setEnabled(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tbuttonGroup.add(rdbtnTylkoKomrkiLa);\r\n\t\t\r\n\t\trdbtnKomrkiLaiCA = new JRadioButton(\"Kom\\u00F3rki LA i CA\");\r\n\t\t\r\n\t\tbuttonGroup.add(rdbtnKomrkiLaiCA);\r\n\t\t\r\n\t\trdbtnKomrkiLaiCA.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tif (rdbtnKomrkiLaiCA.isSelected())\r\n\t\t\t\t{\r\n\t\t\t\t\tSpinnerpTypAgCA.setEnabled(true);\r\n\t\t\t\t\tCAPanel.setEnabled(true);\r\n\t\t\t\t\tspinnerStrategPc.setEnabled(true);\r\n\t\t\t\t\tspinnerPc.setEnabled(true);\r\n\t\t\t\t\tspinnerStrategAllC.setEnabled(true);\r\n\t\t\t\t\tSpinnerStrategAllD.setEnabled(true);\r\n\t\t\t\t\tspinnerStrategkD.setEnabled(true);\r\n\t\t\t\t\tspinnerKMAxx.setEnabled(true);\r\n\t\t\t\t\trbtnkConst.setEnabled(true);\r\n\t\t\t\t\tspinnerMutStrateg.setEnabled(true);\r\n\t\t\t\t\tspinnerMutPc.setEnabled(true);\r\n\t\t\t\t\tspinnerMutC1.setEnabled(true);\r\n\t\t\t\t\tLApanel.setEnabled(true);\r\n\t\t\t\t\tspinnerHistoria.setEnabled(true);\r\n\t\t\t\t\tspinnerEpsilon.setEnabled(true);\r\n\t\t\t\t\tspinnerMutationHistoria.setEnabled(true);\r\n\t\t\t\t\tspinnerMutationc2.setEnabled(true);\r\n\t\t\t\t\tSpinnerMutationEpsilon.setEnabled(true);\r\n\t\t\t\t\tspinnerMutationc3.setEnabled(true);\r\n\t\t\t\t\trdbtnLa1.setEnabled(true);\r\n\t\t\t\t\trdbtnLa2.setEnabled(true);\r\n\t\t\t\t\trdbtnLa3.setEnabled(true);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tSpinnerpTypAgCA.setEnabled(false);\r\n\t\t\t\t\tLApanel.setEnabled(false);\r\n\t\t\t\t\tCAPanel.setEnabled(false);\r\n\t\t\t\t\tspinnerStrategPc.setEnabled(false);\r\n\t\t\t\t\tspinnerPc.setEnabled(false);\r\n\t\t\t\t\tspinnerStrategAllC.setEnabled(false);\r\n\t\t\t\t\tSpinnerStrategAllD.setEnabled(false);\r\n\t\t\t\t\tspinnerStrategkD.setEnabled(false);\r\n\t\t\t\t\tspinnerKMAxx.setEnabled(false);\r\n\t\t\t\t\trbtnkConst.setEnabled(false);\r\n\t\t\t\t\tspinnerMutStrateg.setEnabled(false);\r\n\t\t\t\t\tspinnerMutPc.setEnabled(false);\r\n\t\t\t\t\tspinnerMutC1.setEnabled(false);\r\n\t\t\t\t\tspinnerHistoria.setEnabled(false);\r\n\t\t\t\t\tspinnerEpsilon.setEnabled(false);\r\n\t\t\t\t\tspinnerMutationHistoria.setEnabled(false);\r\n\t\t\t\t\tspinnerMutationc2.setEnabled(false);\r\n\t\t\t\t\tSpinnerMutationEpsilon.setEnabled(false);\r\n\t\t\t\t\tspinnerMutationc3.setEnabled(false);\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\r\n\t\t\t\r\n\t\tSpinnerpTypAgCA = new JSpinner();\r\n\t\tSpinnerpTypAgCA.setModel(new SpinnerNumberModel(0.5,0,1,0.01));\r\n\t\t\r\n\t\tJLabel lblTypAgentaCa = new JLabel(\"typ Agenta CA:\");\r\n\t\t\r\n\t\trdbtnLa1 = new JRadioButton(\"LA1\");\r\n\t\trdbtnLa1.setEnabled(false);\r\n\t\trdbtnLa1.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t}\r\n\t\t});\r\n\t\tbuttonGroup_1.add(rdbtnLa1);\r\n\t\t\r\n\t\trdbtnLa2 = new JRadioButton(\"LA2\");\r\n\t\trdbtnLa2.setEnabled(false);\r\n\t\trdbtnLa2.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t}\r\n\t\t});\r\n\t\tbuttonGroup_1.add(rdbtnLa2);\r\n\t\t\r\n\t\trdbtnLa3 = new JRadioButton(\"LA3\");\r\n\t\trdbtnLa3.setEnabled(false);\r\n\t\trdbtnLa3.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t}\r\n\t\t});\r\n\t\trdbtnLa3.setSelected(true);\r\n\t\tbuttonGroup_1.add(rdbtnLa3);\r\n\t\tGroupLayout gl_panel_2 = new GroupLayout(panel_2);\r\n\t\tgl_panel_2.setHorizontalGroup(\r\n\t\t\tgl_panel_2.createParallelGroup(Alignment.TRAILING)\r\n\t\t\t\t.addGroup(Alignment.LEADING, gl_panel_2.createSequentialGroup()\r\n\t\t\t\t\t.addContainerGap()\r\n\t\t\t\t\t.addGroup(gl_panel_2.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t\t\t.addComponent(rdbtnKomrkiLaiCA)\r\n\t\t\t\t\t\t.addComponent(rdbtnTylkoKomrkiCa)\r\n\t\t\t\t\t\t.addComponent(rdbtnTylkoKomrkiLa)\r\n\t\t\t\t\t\t.addGroup(gl_panel_2.createSequentialGroup()\r\n\t\t\t\t\t\t\t.addComponent(lblTypAgentaCa)\r\n\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t\t\t.addComponent(SpinnerpTypAgCA, GroupLayout.PREFERRED_SIZE, 63, GroupLayout.PREFERRED_SIZE))\r\n\t\t\t\t\t\t.addGroup(gl_panel_2.createSequentialGroup()\r\n\t\t\t\t\t\t\t.addGap(10)\r\n\t\t\t\t\t\t\t.addComponent(rdbtnLa1)\r\n\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t\t\t.addComponent(rdbtnLa2)\r\n\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t\t\t.addComponent(rdbtnLa3)))\r\n\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\r\n\t\t);\r\n\t\tgl_panel_2.setVerticalGroup(\r\n\t\t\tgl_panel_2.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t.addGroup(gl_panel_2.createSequentialGroup()\r\n\t\t\t\t\t.addContainerGap()\r\n\t\t\t\t\t.addComponent(rdbtnTylkoKomrkiCa)\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t.addComponent(rdbtnTylkoKomrkiLa)\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.UNRELATED)\r\n\t\t\t\t\t.addGroup(gl_panel_2.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(rdbtnLa1)\r\n\t\t\t\t\t\t.addComponent(rdbtnLa2)\r\n\t\t\t\t\t\t.addComponent(rdbtnLa3))\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.UNRELATED)\r\n\t\t\t\t\t.addComponent(rdbtnKomrkiLaiCA)\r\n\t\t\t\t\t.addGap(4)\r\n\t\t\t\t\t.addGroup(gl_panel_2.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(lblTypAgentaCa)\r\n\t\t\t\t\t\t.addComponent(SpinnerpTypAgCA, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\r\n\t\t\t\t\t.addContainerGap())\r\n\t\t);\r\n\t\tpanel_2.setLayout(gl_panel_2);\r\n\t\t\r\n\t\tJLabel lblLiczbaWierszy = new JLabel(\"liczba wierszy:\");\r\n\t\t\r\n\t\tspinnerLiczbaWireszy = new JSpinner();\r\n\t\tspinnerLiczbaWireszy.addChangeListener(new ChangeListener() {\r\n\t\t\tpublic void stateChanged(ChangeEvent arg0) {\r\n\t\t\t\tif (((Integer)spinnerLiczbaWireszy.getValue())==0 || ((Integer)spinnerLiczbaKolumn.getValue())==0)\r\n\t\t\t\t{\r\n\t\t\t\t\tspinnerRSasiedztwa.setEnabled(true);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\tspinnerRSasiedztwa.setEnabled(false);\r\n\t\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\tspinnerLiczbaWireszy.setModel(new SpinnerNumberModel(50, 0, 1000, 1));\r\n\t\t\r\n\t\tspinnerLiczbaKolumn = new JSpinner();\r\n\t\tspinnerLiczbaKolumn.addChangeListener(new ChangeListener() {\r\n\t\t\tpublic void stateChanged(ChangeEvent e) {\r\n\t\t\t\tif (((Integer)spinnerLiczbaKolumn.getValue())==0 || ((Integer)spinnerLiczbaWireszy.getValue())==0 )\r\n\t\t\t\t{\r\n\t\t\t\t\tspinnerRSasiedztwa.setEnabled(true);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\tspinnerRSasiedztwa.setEnabled(false);\r\n\t\t\t}\r\n\t\t});\r\n\t\tspinnerLiczbaKolumn.setModel(new SpinnerNumberModel(50, 0, 1000, 1));\r\n\t\t\r\n\t\tJLabel lblLiczbaKolumn = new JLabel(\"liczba kolumn:\");\r\n\t\t\r\n\t\tJLabel lblRozmiarSsiedztwa = new JLabel(\"r s\\u0105siedztwa:\");\r\n\t\t\r\n\t\tspinnerRSasiedztwa = new JSpinner();\r\n\t\tspinnerRSasiedztwa.setEnabled(false);\r\n\t\tspinnerRSasiedztwa.addChangeListener(new ChangeListener() {\r\n\t\t\tpublic void stateChanged(ChangeEvent e) {\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t});\r\n\t\tspinnerRSasiedztwa.setModel(new SpinnerNumberModel(new Integer(1), new Integer(1), null, new Integer(1)));\r\n\t\t\r\n\t\tspinnerp_niezam = new JSpinner();\r\n\t\tspinnerp_niezam.setModel(new SpinnerNumberModel(0, 0, 1, 0.01));\r\n\t\t\r\n\t\tJLabel lblPniezam = new JLabel(\"p_niezam:\");\r\n\t\t\r\n\t\tJLabel lblPinitc = new JLabel(\"p_init_C:\");\r\n\t\t\r\n\t\tspinnerp_init_C = new JSpinner();\r\n\t\tspinnerp_init_C.setModel(new SpinnerNumberModel(0.5,0,1,0.01));\r\n\t\t\r\n\t\tspinnergot_wspol_doch = new JSpinner();\r\n\t\tspinnergot_wspol_doch.setModel(new SpinnerNumberModel(0.1,0,1,0.01));\r\n\t\tspinnergot_wspol_doch.setEnabled(false);\r\n\t\t\r\n\t\trdbtnGotWspDoch = new JRadioButton(\"got. wspol. doch.\");\r\n\t\trdbtnGotWspDoch.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tif (rdbtnGotWspDoch.isSelected())\r\n\t\t\t\t\tspinnergot_wspol_doch.setEnabled(true);\r\n\t\t\t\telse\r\n\t\t\t\t\tspinnergot_wspol_doch.setEnabled(false);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tspinnerQ = new JSpinner();\r\n\t\tspinnerQ.setModel(new SpinnerNumberModel(new Integer(1), new Integer(1), null, new Integer(1)));\r\n\t\t\r\n\t\trdbtnZiarno = new JRadioButton(\"ziarno\");\r\n\t\trdbtnZiarno.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tif (rdbtnZiarno.isSelected())\r\n\t\t\t\t{\r\n\t\t\t\t\tspinnerZiarno.setEnabled(true);\r\n\t\t\t\t}\r\n\t\t\t\telse \r\n\t\t\t\t{\r\n\t\t\t\t\tspinnerZiarno.setEnabled(false);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tspinnerZiarno = new JSpinner();\r\n\t\tspinnerZiarno.setEnabled(false);\r\n\t\t\r\n\t\tspinnerIloscExperymentow = new JSpinner();\r\n\t\tspinnerIloscExperymentow.setModel(new SpinnerNumberModel(1, 1, 999, 1));\r\n\t\t\r\n\t\tJLabel lblIloEksperymentw = new JLabel(\"ilo\\u015B\\u0107 eksperyment\\u00F3w:\");\r\n\t\t\r\n\t\tspinnerIloscKrokow = new JSpinner();\r\n\t\tspinnerIloscKrokow.setModel(new SpinnerNumberModel(100, 1, 1000, 1));\r\n\t\t\r\n\t\tJLabel lblDlugoscRundy = new JLabel(\"ilosc krokow:\");\r\n\t\t\r\n\t\trdbtnQ = new JRadioButton(\"q\");\r\n\t\trdbtnQ.setSelected(true);\r\n\t\trdbtnQ.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tif (rdbtnQ.isSelected())\r\n\t\t\t\t{\r\n\t\t\t\t\tspinnerQ.setEnabled(true);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\tspinnerQ.setEnabled(false);\r\n\t\t\t}\r\n\t\t});\r\n\t\tGroupLayout gl_panel_1 = new GroupLayout(panel_1);\r\n\t\tgl_panel_1.setHorizontalGroup(\r\n\t\t\tgl_panel_1.createParallelGroup(Alignment.TRAILING)\r\n\t\t\t\t.addGroup(gl_panel_1.createSequentialGroup()\r\n\t\t\t\t\t.addContainerGap()\r\n\t\t\t\t\t.addGroup(gl_panel_1.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t\t\t.addGroup(gl_panel_1.createSequentialGroup()\r\n\t\t\t\t\t\t\t.addComponent(lblLiczbaWierszy)\r\n\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.UNRELATED)\r\n\t\t\t\t\t\t\t.addComponent(spinnerLiczbaWireszy, GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE))\r\n\t\t\t\t\t\t.addGroup(gl_panel_1.createSequentialGroup()\r\n\t\t\t\t\t\t\t.addGroup(gl_panel_1.createParallelGroup(Alignment.TRAILING)\r\n\t\t\t\t\t\t\t\t.addComponent(lblPinitc)\r\n\t\t\t\t\t\t\t\t.addComponent(lblPniezam, GroupLayout.PREFERRED_SIZE, 61, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t\t\t.addGroup(gl_panel_1.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t\t\t\t\t\t.addComponent(lblLiczbaKolumn, GroupLayout.PREFERRED_SIZE, 84, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t\t\t\t.addGroup(gl_panel_1.createSequentialGroup()\r\n\t\t\t\t\t\t\t\t\t\t.addGap(7)\r\n\t\t\t\t\t\t\t\t\t\t.addComponent(lblRozmiarSsiedztwa)))\r\n\t\t\t\t\t\t\t\t.addComponent(rdbtnQ))\r\n\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.UNRELATED)\r\n\t\t\t\t\t\t\t.addGroup(gl_panel_1.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t\t\t\t\t.addComponent(spinnerp_init_C, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE)\r\n\t\t\t\t\t\t\t\t.addComponent(spinnerp_niezam, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE)\r\n\t\t\t\t\t\t\t\t.addComponent(spinnerLiczbaKolumn, GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE)\r\n\t\t\t\t\t\t\t\t.addComponent(spinnerQ, GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE)\r\n\t\t\t\t\t\t\t\t.addComponent(spinnerRSasiedztwa, GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE)))\r\n\t\t\t\t\t\t.addGroup(gl_panel_1.createSequentialGroup()\r\n\t\t\t\t\t\t\t.addGroup(gl_panel_1.createParallelGroup(Alignment.TRAILING)\r\n\t\t\t\t\t\t\t\t.addGroup(gl_panel_1.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t\t\t\t\t\t.addComponent(rdbtnGotWspDoch)\r\n\t\t\t\t\t\t\t\t\t.addComponent(rdbtnZiarno))\r\n\t\t\t\t\t\t\t\t.addComponent(lblIloEksperymentw)\r\n\t\t\t\t\t\t\t\t.addComponent(lblDlugoscRundy))\r\n\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t\t\t.addGroup(gl_panel_1.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t\t\t\t\t.addComponent(spinnerZiarno, GroupLayout.DEFAULT_SIZE, 64, Short.MAX_VALUE)\r\n\t\t\t\t\t\t\t\t.addComponent(spinnergot_wspol_doch, GroupLayout.DEFAULT_SIZE, 64, Short.MAX_VALUE)\r\n\t\t\t\t\t\t\t\t.addComponent(spinnerIloscExperymentow, GroupLayout.DEFAULT_SIZE, 64, Short.MAX_VALUE)\r\n\t\t\t\t\t\t\t\t.addComponent(spinnerIloscKrokow, GroupLayout.PREFERRED_SIZE, 64, GroupLayout.PREFERRED_SIZE))))\r\n\t\t\t\t\t.addGap(40))\r\n\t\t);\r\n\t\tgl_panel_1.setVerticalGroup(\r\n\t\t\tgl_panel_1.createParallelGroup(Alignment.LEADING)\r\n\t\t\t\t.addGroup(gl_panel_1.createSequentialGroup()\r\n\t\t\t\t\t.addGap(16)\r\n\t\t\t\t\t.addGroup(gl_panel_1.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(lblLiczbaWierszy)\r\n\t\t\t\t\t\t.addComponent(spinnerLiczbaWireszy, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\r\n\t\t\t\t\t.addGap(4)\r\n\t\t\t\t\t.addGroup(gl_panel_1.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(spinnerLiczbaKolumn, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(lblLiczbaKolumn))\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t.addGroup(gl_panel_1.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(spinnerRSasiedztwa, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(lblRozmiarSsiedztwa))\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t.addGroup(gl_panel_1.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(spinnerQ, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(rdbtnQ))\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t.addGroup(gl_panel_1.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(spinnerp_niezam, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(lblPniezam))\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t.addGroup(gl_panel_1.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(spinnerp_init_C, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(lblPinitc))\r\n\t\t\t\t\t.addGap(10)\r\n\t\t\t\t\t.addGroup(gl_panel_1.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(spinnergot_wspol_doch, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(rdbtnGotWspDoch))\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t.addGroup(gl_panel_1.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(spinnerZiarno, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(rdbtnZiarno))\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t.addGroup(gl_panel_1.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(spinnerIloscExperymentow, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(lblIloEksperymentw))\r\n\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\r\n\t\t\t\t\t.addGroup(gl_panel_1.createParallelGroup(Alignment.BASELINE)\r\n\t\t\t\t\t\t.addComponent(spinnerIloscKrokow, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\r\n\t\t\t\t\t\t.addComponent(lblDlugoscRundy))\r\n\t\t\t\t\t.addGap(4))\r\n\t\t);\r\n\t\tpanel_1.setLayout(gl_panel_1);\r\n\t\t\r\n\t\tframe.getContentPane().setLayout(groupLayout);\r\n\t}", "private GUI()\n {\n makeGUI();\n }", "@SuppressWarnings({\"nullness\", \"initialization\"})\n public SimServerJPanel() {\n initComponents();\n try {\n this.inner = new SimServerInner(this, DefaultSchemaFiles.instance());\n } catch (Exception ex) {\n Logger.getLogger(SimServerJPanel.class.getName()).log(Level.SEVERE, \"\", ex);\n if (ex instanceof RuntimeException) {\n throw (RuntimeException) ex;\n } else {\n throw new RuntimeException(ex);\n }\n }\n SimRobotEnum defaultRobotType\n = DEFAULT_ROBOTTYPE;\n java.awt.EventQueue.invokeLater(() -> this.updatePanelsPrivate());\n// this.lengthUnitComboBox.setSelectedItem(LengthUnitEnumType.MILLIMETER);\n// for (SimRobotEnum srType : SimRobotEnum.values()) {\n// this.setRobotType(srType);\n// inner.setLengthUnit(LengthUnitEnumType.MILLIMETER);\n// }\n this.jComboBoxRobotType.setModel(new DefaultComboBoxModel<>(SimRobotEnum.values()));\n this.jComboBoxRobotType.setSelectedItem(defaultRobotType);\n this.setRobotType(defaultRobotType);\n\n String portPropertyString = System.getProperty(\"crcl4java.port\");\n if (null != portPropertyString) {\n inner.setPort(Integer.parseInt(portPropertyString));\n this.jTextFieldPort.setText(portPropertyString);\n } else {\n this.jTextFieldPort.setText(Integer.toString(inner.getPort()));\n }\n try {\n String imageLogDirProp = System.getProperty(\"crcl4java.simserver.imagelogdir\");\n File imageLogDir = null;\n if (imageLogDirProp != null && imageLogDirProp.length() > 0) {\n imageLogDir = new File(imageLogDirProp);\n if (!imageLogDir.exists()\n || !imageLogDir.isDirectory()\n || !imageLogDir.canWrite()) {\n Logger.getLogger(SimServerJPanel.class.getName()).log(Level.SEVERE, \"Can''t use tempDir from property temp.dir {0}\", imageLogDir);\n imageLogDir = null;\n }\n }\n if (null == imageLogDir) {\n File testTempFile = File.createTempFile(\"test\", \"suffix\");\n imageLogDir = testTempFile.getParentFile();\n Files.delete(testTempFile.toPath());\n }\n String imageLogDirPath = imageLogDir.getCanonicalPath();\n this.overHeadJPanel1.setImageLogDir(imageLogDirPath);\n this.sideViewJPanel1.setImageLogDir(imageLogDirPath);\n } catch (IOException ex) {\n Logger.getLogger(SimServerJPanel.class.getName()).log(Level.SEVERE, \"\", ex);\n }\n\n boolean logImages = LOG_IMAGES_DEFAULT;\n this.overHeadJPanel1.setLogImages(logImages);\n this.sideViewJPanel1.setLogImages(logImages);\n this.jCheckBoxTeleportToGoals.setSelected(inner.isTeleportToGoals());\n jCheckBoxMenuItemValidateXML.setSelected(inner.isValidateXMLSelected());\n this.jCheckBoxMenuItemLogImages.setSelected(logImages);\n }", "@Override\n public void setupLayout() {\n \n javax.swing.GroupLayout permTimePanelLayout = new javax.swing.GroupLayout(permTimePanel);\n permTimePanel.setLayout(permTimePanelLayout);\n permTimePanelLayout.setHorizontalGroup(\n permTimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(permTimePanelLayout.createSequentialGroup()\n .addContainerGap(28, Short.MAX_VALUE)\n .addGroup(permTimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(startLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 65, Short.MAX_VALUE)\n .addComponent(endLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(18, 18, 18)\n .addGroup(permTimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(startHourSpinner, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(hourLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(endHourSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(permTimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(startMinSpinner, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(endMinSpinner, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(minuteLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(32, Short.MAX_VALUE))\n );\n permTimePanelLayout.setVerticalGroup(\n permTimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(permTimePanelLayout.createSequentialGroup()\n .addGap(5, 5, 5)\n .addGroup(permTimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(hourLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(minuteLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(permTimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)\n .addGroup(permTimePanelLayout.createSequentialGroup()\n .addGroup(permTimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(startHourSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(startMinSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(permTimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(endHourSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(endMinSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGroup(permTimePanelLayout.createSequentialGroup()\n .addComponent(startLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(endLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(20, Short.MAX_VALUE))\n );\n \n javax.swing.GroupLayout schedulePanelLayout = new javax.swing.GroupLayout(schedulePanel);\n schedulePanel.setLayout(schedulePanelLayout);\n schedulePanelLayout.setHorizontalGroup(\n schedulePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(schedulePanelLayout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(schedulePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(freqLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(occurLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(schedulePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(freqCombo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(occurSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(schedulePanelLayout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(genButton)\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, schedulePanelLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(permTimePanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n schedulePanelLayout.setVerticalGroup(\n schedulePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(schedulePanelLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(permTimePanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(schedulePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(schedulePanelLayout.createSequentialGroup()\n .addGap(24, 24, 24)\n .addGroup(schedulePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(occurSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(occurLabel)))\n .addGroup(schedulePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(freqLabel)\n .addComponent(freqCombo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(genButton)\n .addGap(35, 35, 35))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(innerListPanel);\n innerListPanel.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap(27, Short.MAX_VALUE)\n .addComponent(checkInPane, javax.swing.GroupLayout.PREFERRED_SIZE, 162, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(schedulePanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(27, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(25, 25, 25)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(schedulePanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(checkInPane, javax.swing.GroupLayout.PREFERRED_SIZE, 291, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(39, Short.MAX_VALUE))\n );\n \n super.setupLayout();\n \n }", "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\tportTextField = new JTextField();\n\t\tportTextField.setBounds(10, 33, 86, 20);\n\t\tframe.getContentPane().add(portTextField);\n\t\tportTextField.setColumns(10);\n\t\t\n\t\tJLabel lblNumerPortu = new JLabel(\"Numer portu:\");\n\t\tlblNumerPortu.setBounds(10, 11, 86, 14);\n\t\tframe.getContentPane().add(lblNumerPortu);\n\t\t\n\t\tmaxClientsTextField = new JTextField();\n\t\tmaxClientsTextField.setBounds(10, 85, 86, 20);\n\t\tframe.getContentPane().add(maxClientsTextField);\n\t\tmaxClientsTextField.setColumns(10);\n\t\t\n\t\tJLabel lblMaksLiczbaClientow = new JLabel(\"Maks. liczba klientow:\");\n\t\tlblMaksLiczbaClientow.setBounds(10, 60, 127, 14);\n\t\tframe.getContentPane().add(lblMaksLiczbaClientow);\n\t\t\n\t\tconnectionsList = new JList<String> (new DefaultListModel<String>());\n\t\tconnectionsList.setBounds(213, 35, 157, 111);\n\t\tframe.getContentPane().add(connectionsList);\n\t\t\n\t\t\n\t\tJButton btnRozpocznijNasuchiwanie = new JButton(\"Rozpocznij nasluchiwanie\");\n\t\tbtnRozpocznijNasuchiwanie.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tint port_number = 1234;\n\t\t\t\tint max_clients = 108 ;\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\t// if correct args, sets port number, max clients.\n\t\t\t\t\tif(!maxClientsTextField.getText().equals(\"\")) max_clients = Integer.parseInt(maxClientsTextField.getText());\n\t\t\t\t\tif (!portTextField.getText().equals(\"\") ) port_number = Integer.parseInt(portTextField.getText());\n\t\t\t\t\t// New server socket\n\t\t\t\t\tsock = new ServerSocket(port_number);\n\t\t\t\t\tsock.setReceiveBufferSize(max_clients);\n\t\t\t\t\tmainThread = new WaitForClientsThread(sock, connectionsList);\n\t\t\t\t\tmainThread.start();\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tcatch(IndexOutOfBoundsException exc)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Enter correct port number!\");\n\t\t\t\t}\n\t\t\t\tcatch (IOException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\tSystem.out.println(\"Connection error.\");\n\t\t\t\t}\n\t\t\t\tcatch(NumberFormatException err)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"Wrong port number\");\n\t\t\t\t} \n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtnRozpocznijNasuchiwanie.setBounds(10, 203, 170, 20);\n\t\tframe.getContentPane().add(btnRozpocznijNasuchiwanie);\n\t\t\n\t\t\n\t\t\n\t\tJLabel lblCurrentlyConnected = new JLabel(\"Obecne polaczenia:\");\n\t\tlblCurrentlyConnected.setBounds(213, 11, 157, 14);\n\t\tframe.getContentPane().add(lblCurrentlyConnected);\n\t\t\n\t\tbtnZakonczNasluchiwanie = new JButton(\"Zakoncz nasluchiwanie\");\n\t\tbtnZakonczNasluchiwanie.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif(sock != null)\n\t\t\t\t{\n\t\t\t\t\ttry {\n\t\t\t\t\t\tsock.close();\n\t\t\t\t\t\tmainThread.interrupt();\n\t\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtnZakonczNasluchiwanie.setBounds(10, 234, 170, 17);\n\t\tframe.getContentPane().add(btnZakonczNasluchiwanie);\n\t\t\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 rid1 = new javax.swing.JRadioButton();\n rid2 = new javax.swing.JRadioButton();\n jLabel1 = new javax.swing.JLabel();\n sip = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n sport = new javax.swing.JTextField();\n jScrollPane1 = new javax.swing.JScrollPane();\n box = new javax.swing.JTextArea();\n inner = new javax.swing.JTextField();\n input = new javax.swing.JLabel();\n connect = new javax.swing.JButton();\n disconnect = new javax.swing.JButton();\n label = new javax.swing.JLabel();\n jButton1 = new javax.swing.JButton();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n buttonGroup1.add(rid1);\n rid1.setText(\"Server\");\n rid1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n rid1ActionPerformed(evt);\n }\n });\n\n buttonGroup1.add(rid2);\n rid2.setText(\"Client\");\n\n jLabel1.setText(\"Server IP:\");\n\n jLabel2.setText(\"Port:\");\n\n box.setColumns(20);\n box.setRows(5);\n jScrollPane1.setViewportView(box);\n\n input.setText(\"Input:\");\n\n connect.setText(\"Sign In\");\n connect.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n connectActionPerformed(evt);\n }\n });\n\n disconnect.setText(\"Sign Out\");\n disconnect.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n disconnectActionPerformed(evt);\n }\n });\n\n label.setText(\"Disconnected\");\n\n jButton1.setText(\"OK\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(30, 30, 30)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(connect)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(disconnect)\n .addGap(66, 66, 66))\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jButton1)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 57, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(sport, javax.swing.GroupLayout.PREFERRED_SIZE, 172, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(sip, javax.swing.GroupLayout.PREFERRED_SIZE, 172, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addComponent(rid1)\n .addGap(69, 69, 69)\n .addComponent(rid2))\n .addComponent(jScrollPane1)\n .addGroup(layout.createSequentialGroup()\n .addComponent(input, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(inner, javax.swing.GroupLayout.PREFERRED_SIZE, 190, javax.swing.GroupLayout.PREFERRED_SIZE))))\n .addContainerGap(43, Short.MAX_VALUE))))\n .addGroup(layout.createSequentialGroup()\n .addComponent(label, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(52, 52, 52)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(rid1)\n .addComponent(rid2))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(sip, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(sport, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 43, Short.MAX_VALUE)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(connect)\n .addComponent(disconnect))\n .addGap(18, 18, 18)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(input, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(inner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(33, 33, 33)\n .addComponent(label))\n .addGroup(layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(jButton1))))\n );\n\n pack();\n }", "private void initialize()\n\t{\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 800, 450);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(new BorderLayout(0, 0));\n\t\tframe.setTitle(\"EZ Backtrack\");\n\n\t\tmainPanel = new JPanel();\n\t\tframe.getContentPane().add(mainPanel, BorderLayout.CENTER);\n\t\tmainPanel.setLayout(new BorderLayout(0, 0));\n\n\t\thbResult = Box.createHorizontalBox();\n\t\tmainPanel.add(hbResult, BorderLayout.CENTER);\n\n\t\tpanelResult = new JPanel();\n\t\thbResult.add(panelResult);\n\t\tpanelResult.setLayout(new BorderLayout(0, 0));\n\n\t\thbResultSetting = Box.createHorizontalBox();\n\t\thbResultSetting.setPreferredSize(new Dimension(0, 30));\n\t\tpanelResult.add(hbResultSetting, BorderLayout.SOUTH);\n\n\t\tpanMainSetting = new JPanel();\n\t\thbResultSetting.add(panMainSetting);\n\t\tpanMainSetting.setLayout(new BorderLayout(0, 0));\n\n\t\tpanSeparatorTop = new JPanel();\n\t\tpanSeparatorTop.setPreferredSize(new Dimension(0, 20));\n\t\tpanMainSetting.add(panSeparatorTop, BorderLayout.NORTH);\n\t\tpanSeparatorTop.setLayout(new BorderLayout(0, 0));\n\n\t\tseparatorTop = new JSeparator();\n\t\tpanSeparatorTop.add(separatorTop, BorderLayout.SOUTH);\n\n\t\tpanelTimeExecution = new JPanel();\n\t\tpanSeparatorTop.add(panelTimeExecution, BorderLayout.WEST);\n\t\tpanelTimeExecution.setLayout(new BorderLayout(0, 0));\n\n\t\tlblTpsLoadFile = new JLabel(\"\");\n\t\tlblTpsLoadFile.setForeground(new Color(0, 0, 128));\n\t\tlblTpsLoadFile.setFont(new Font(\"Dialog\", Font.PLAIN, 12));\n\t\tlblTpsLoadFile.setPreferredSize(new Dimension(310, 15));\n\t\tpanelTimeExecution.add(lblTpsLoadFile, BorderLayout.WEST);\n\n\t\tlblTpsAlgo = new JLabel(\"\");\n\t\tlblTpsAlgo.setForeground(new Color(0, 0, 128));\n\t\tlblTpsAlgo.setFont(new Font(\"Dialog\", Font.PLAIN, 12));\n\t\tpanelTimeExecution.add(lblTpsAlgo, BorderLayout.CENTER);\n\n\t\tpanelSeparatorLow = new JPanel();\n\t\tpanelSeparatorLow.setPreferredSize(new Dimension(0, 10));\n\t\tpanMainSetting.add(panelSeparatorLow, BorderLayout.SOUTH);\n\t\tpanelSeparatorLow.setLayout(new BorderLayout(0, 0));\n\n\t\tseparatorLow = new JSeparator();\n\t\tpanelSeparatorLow.add(separatorLow, BorderLayout.SOUTH);\n\n\t\thbResultContainer = Box.createHorizontalBox();\n\t\tpanelResult.add(hbResultContainer, BorderLayout.CENTER);\n\n\t\tmainPanResult = new JPanel();\n\t\thbResultContainer.add(mainPanResult);\n\t\tmainPanResult.setLayout(new BorderLayout(0, 0));\n\n\t\tpanResultSetting = new JPanel();\n\t\tmainPanResult.add(panResultSetting, BorderLayout.SOUTH);\n\n\t\tpanShowResultContainer = new JPanel();\n\t\tmainPanResult.add(panShowResultContainer, BorderLayout.CENTER);\n\t\tpanShowResultContainer.setLayout(new BorderLayout(0, 0));\n\n\t\tpanSeparatorShow = new JPanel();\n\t\tpanSeparatorShow.setPreferredSize(new Dimension(9, 10));\n\t\tpanShowResultContainer.add(panSeparatorShow, BorderLayout.WEST);\n\t\tpanSeparatorShow.setLayout(new BorderLayout(0, 0));\n\n\t\tscrollPaneShowResult = new JScrollPane();\n\t\tpanShowResultContainer.add(scrollPaneShowResult, BorderLayout.CENTER);\n\n\t\ttextAreaShowResult = new JTextArea();\n\t\ttextAreaShowResult.setEditable(false);\n\t\tscrollPaneShowResult.setViewportView(textAreaShowResult);\n\n\t\tscrollPaneShowFile = new JScrollPane();\n\t\tscrollPaneShowFile.setPreferredSize(new Dimension(300, 3));\n\t\tmainPanResult.add(scrollPaneShowFile, BorderLayout.WEST);\n\n\t\ttextAreaShowFile = new JTextArea();\n\t\tscrollPaneShowFile.setViewportView(textAreaShowFile);\n\n\t\thbAction = Box.createHorizontalBox();\n\t\thbAction.setPreferredSize(new Dimension(0, 100));\n\t\tmainPanel.add(hbAction, BorderLayout.SOUTH);\n\n\t\tpanelAction = new JPanel();\n\t\thbAction.add(panelAction);\n\t\tpanelAction.setLayout(new BorderLayout(0, 0));\n\n\t\tvbButton = Box.createVerticalBox();\n\t\tvbButton.setPreferredSize(new Dimension(130, 0));\n\t\tpanelAction.add(vbButton, BorderLayout.EAST);\n\n\t\tpanelButton = new JPanel();\n\t\tvbButton.add(panelButton);\n\t\tpanelButton.setLayout(new BorderLayout(0, 0));\n\n\t\thbRun = Box.createHorizontalBox();\n\t\thbRun.setPreferredSize(new Dimension(0, 50));\n\t\tpanelButton.add(hbRun, BorderLayout.NORTH);\n\n\t\tpanelRun = new JPanel();\n\t\thbRun.add(panelRun);\n\t\tpanelRun.setLayout(new BorderLayout(0, 0));\n\n\t\thbTopSettingRun = Box.createHorizontalBox();\n\t\thbTopSettingRun.setPreferredSize(new Dimension(0, 15));\n\t\tpanelRun.add(hbTopSettingRun, BorderLayout.NORTH);\n\n\t\thbLowSettingRun = Box.createHorizontalBox();\n\t\thbLowSettingRun.setPreferredSize(new Dimension(0, 8));\n\t\tpanelRun.add(hbLowSettingRun, BorderLayout.SOUTH);\n\n\t\thbContainerRunBtn = Box.createHorizontalBox();\n\t\tpanelRun.add(hbContainerRunBtn, BorderLayout.CENTER);\n\n\t\tpanContainRunBtn = new JPanel();\n\t\tpanContainRunBtn.setMinimumSize(new Dimension(0, 0));\n\t\thbContainerRunBtn.add(panContainRunBtn);\n\t\tpanContainRunBtn.setLayout(new BorderLayout(0, 0));\n\n\t\tbtnRun = new JButton(\"Lancer\");\n\t\tbtnRun.addActionListener(new ActionListener()\n\t\t{\n\t\t\tpublic void actionPerformed(ActionEvent arg0)\n\t\t\t{\n\t\t\t\tAbstractSolver.nodeCpt = 0;\n\t\t\t\ttextAreaShowResult.setText(\"\");\n\t\t\t\tParser parserLunchAlgo = new Parser();\n\t\t\t\tSolverType svt = null;\n\t\t\t\tif (rdbtnForwardCheking.isSelected())\n\t\t\t\t{\n\t\t\t\t\tsvt = SolverType.FORWARDCHECKING;\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\tsvt = SolverType.TESTANDGENERATE;\n\t\t\t\t}\n\t\t\t\tAbstractSolver solver = parserLunchAlgo.load(textAreaShowFile.getText(), svt);\n\t\t\t\tHeuristic heuristic = Heuristic.DEFAULT;\n\n\t\t\t\tif (!(cbHeuristic.getSelectedItem() == null || \"\".equals(cbHeuristic.getSelectedItem())))\n\t\t\t\t{\n\t\t\t\t\theuristic = Heuristic.MINDOMAIN;\n\t\t\t\t}\n\n\t\t\t\tif (rdbtnAC1.isSelected())\n\t\t\t\t{\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tsolver.doArcConsistency();\n\t\t\t\t\t} catch (DomainBoundaryException e)\n\t\t\t\t\t{\n\t\t\t\t\t\ttextAreaShowResult.setText(e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tlong start = System.currentTimeMillis();\n\t\t\t\t\tsolver.launch(heuristic);\n\t\t\t\t\tlong end = System.currentTimeMillis();\n\t\t\t\t\tlblTpsAlgo.setText(\"\\nTemps d'execution de l'algorithme : \" + (end - start) + \"ms\");\n\t\t\t\t} catch (VariableValueException e)\n\t\t\t\t{\n\t\t\t\t\ttextAreaShowResult.setText(textAreaShowResult.getText() + \"\\n\\n\" + e.getMessage());\n\t\t\t\t}\n\t\t\t\ttextAreaShowResult.setText(solver.generateFinalOutput());\n\t\t\t}\n\t\t});\n\t\tpanContainRunBtn.add(btnRun, BorderLayout.CENTER);\n\n\t\tvbLeftSettingRun = Box.createVerticalBox();\n\t\tvbLeftSettingRun.setPreferredSize(new Dimension(10, 0));\n\t\tpanelRun.add(vbLeftSettingRun, BorderLayout.WEST);\n\n\t\tvbRightSettingRun = Box.createVerticalBox();\n\t\tvbRightSettingRun.setPreferredSize(new Dimension(10, 0));\n\t\tpanelRun.add(vbRightSettingRun, BorderLayout.EAST);\n\n\t\thbExit = Box.createHorizontalBox();\n\t\thbExit.setPreferredSize(new Dimension(0, 50));\n\t\tpanelButton.add(hbExit, BorderLayout.SOUTH);\n\n\t\tpanelExit = new JPanel();\n\t\thbExit.add(panelExit);\n\t\tpanelExit.setLayout(new BorderLayout(0, 0));\n\n\t\thbTopSettingExit = Box.createHorizontalBox();\n\t\thbTopSettingExit.setPreferredSize(new Dimension(8, 10));\n\t\tpanelExit.add(hbTopSettingExit, BorderLayout.NORTH);\n\n\t\thbLowSettingExit = Box.createHorizontalBox();\n\t\thbLowSettingExit.setPreferredSize(new Dimension(0, 15));\n\t\tpanelExit.add(hbLowSettingExit, BorderLayout.SOUTH);\n\n\t\thbContainerExitBtn = Box.createHorizontalBox();\n\t\tpanelExit.add(hbContainerExitBtn, BorderLayout.CENTER);\n\n\t\tpanContainExitBtn = new JPanel();\n\t\tpanContainExitBtn.setMinimumSize(new Dimension(0, 0));\n\t\thbContainerExitBtn.add(panContainExitBtn);\n\t\tpanContainExitBtn.setLayout(new BorderLayout(0, 0));\n\n\t\tbtnExit = new JButton(\"Quitter\");\n\t\tbtnExit.addActionListener(new ActionListener()\n\t\t{\n\t\t\tpublic void actionPerformed(ActionEvent arg0)\n\t\t\t{\n\t\t\t\tframe.dispose();\n\t\t\t}\n\t\t});\n\t\tpanContainExitBtn.add(btnExit, BorderLayout.CENTER);\n\n\t\tvbLeftSettingExit = Box.createVerticalBox();\n\t\tvbLeftSettingExit.setPreferredSize(new Dimension(10, 0));\n\t\tpanelExit.add(vbLeftSettingExit, BorderLayout.WEST);\n\n\t\tvbRightSettingExit = Box.createVerticalBox();\n\t\tvbRightSettingExit.setPreferredSize(new Dimension(10, 0));\n\t\tpanelExit.add(vbRightSettingExit, BorderLayout.EAST);\n\n\t\tvbChoice = Box.createVerticalBox();\n\t\tpanelAction.add(vbChoice, BorderLayout.CENTER);\n\n\t\tpanChoice = new JPanel();\n\t\tvbChoice.add(panChoice);\n\t\tpanChoice.setLayout(new BorderLayout(0, 0));\n\n\t\tvbChoiceLeftSetting = Box.createVerticalBox();\n\t\tvbChoiceLeftSetting.setPreferredSize(new Dimension(10, 0));\n\t\tpanChoice.add(vbChoiceLeftSetting, BorderLayout.WEST);\n\n\t\thbChoiceTopSetting = Box.createHorizontalBox();\n\t\thbChoiceTopSetting.setPreferredSize(new Dimension(0, 15));\n\t\tpanChoice.add(hbChoiceTopSetting, BorderLayout.NORTH);\n\n\t\thbChoiceLowSetting = Box.createHorizontalBox();\n\t\thbChoiceLowSetting.setPreferredSize(new Dimension(0, 15));\n\t\tpanChoice.add(hbChoiceLowSetting, BorderLayout.SOUTH);\n\n\t\thbChoiceContainer = Box.createHorizontalBox();\n\t\tpanChoice.add(hbChoiceContainer, BorderLayout.CENTER);\n\n\t\tpanChoiceElement = new JPanel();\n\t\thbChoiceContainer.add(panChoiceElement);\n\t\tpanChoiceElement.setLayout(new BorderLayout(0, 0));\n\n\t\tpanChoiceAlgo = new JPanel();\n\t\tpanChoiceAlgo.setPreferredSize(new Dimension(170, 10));\n\t\tpanChoiceElement.add(panChoiceAlgo, BorderLayout.WEST);\n\t\tpanChoiceAlgo.setLayout(new BorderLayout(0, 0));\n\n\t\thbTopChoiceAlgo = Box.createHorizontalBox();\n\t\thbTopChoiceAlgo.setPreferredSize(new Dimension(0, 25));\n\t\tpanChoiceAlgo.add(hbTopChoiceAlgo, BorderLayout.NORTH);\n\n\t\tpanAlgo = new JPanel();\n\t\thbTopChoiceAlgo.add(panAlgo);\n\t\tpanAlgo.setLayout(new BorderLayout(0, 0));\n\n\t\tlblAlgo = new JLabel(\"Algorithme\");\n\t\tpanAlgo.add(lblAlgo, BorderLayout.CENTER);\n\n\t\tpanAlgoLeftSetting = new JPanel();\n\t\tpanAlgoLeftSetting.setPreferredSize(new Dimension(35, 10));\n\t\tpanAlgo.add(panAlgoLeftSetting, BorderLayout.WEST);\n\n\t\tpanAlgoSeparator = new JPanel();\n\t\tpanAlgoSeparator.setPreferredSize(new Dimension(10, 2));\n\t\tpanAlgo.add(panAlgoSeparator, BorderLayout.SOUTH);\n\t\tpanAlgoSeparator.setLayout(new BorderLayout(0, 0));\n\n\t\tpanAlgoSeparatorLeftSetting = new JPanel();\n\t\tpanAlgoSeparatorLeftSetting.setPreferredSize(new Dimension(5, 0));\n\t\tpanAlgoSeparator.add(panAlgoSeparatorLeftSetting, BorderLayout.WEST);\n\n\t\tpanAlgoSeparatorRightSetting = new JPanel();\n\t\tpanAlgoSeparatorRightSetting.setPreferredSize(new Dimension(28, 0));\n\t\tpanAlgoSeparator.add(panAlgoSeparatorRightSetting, BorderLayout.EAST);\n\n\t\tseparatorAlgo = new JSeparator();\n\t\tpanAlgoSeparator.add(separatorAlgo, BorderLayout.CENTER);\n\n\t\thbLowChoiceAlgo = Box.createHorizontalBox();\n\t\tpanChoiceAlgo.add(hbLowChoiceAlgo, BorderLayout.CENTER);\n\n\t\tpanRdbChoiceAlgo = new JPanel();\n\t\thbLowChoiceAlgo.add(panRdbChoiceAlgo);\n\t\tpanRdbChoiceAlgo.setLayout(new BorderLayout(0, 0));\n\n\t\trdbtnForwardCheking = new JRadioButton(\"Forward Cheking\");\n\t\tbuttonGroupAlgo.add(rdbtnForwardCheking);\n\t\tpanRdbChoiceAlgo.add(rdbtnForwardCheking, BorderLayout.SOUTH);\n\n\t\trdbtnTestGenerate = new JRadioButton(\"Test & Generate\");\n\t\trdbtnTestGenerate.setSelected(true);\n\t\tbuttonGroupAlgo.add(rdbtnTestGenerate);\n\t\tpanRdbChoiceAlgo.add(rdbtnTestGenerate, BorderLayout.NORTH);\n\n\t\tpanChoiceHeuristicAndUpload = new JPanel();\n\t\tpanChoiceHeuristicAndUpload.setPreferredSize(new Dimension(330, 10));\n\t\tpanChoiceElement.add(panChoiceHeuristicAndUpload, BorderLayout.EAST);\n\t\tpanChoiceHeuristicAndUpload.setLayout(new BorderLayout(0, 0));\n\n\t\tpanChoiceHeuristic = new JPanel();\n\t\tpanChoiceHeuristic.setPreferredSize(new Dimension(150, 10));\n\t\tpanChoiceHeuristicAndUpload.add(panChoiceHeuristic, BorderLayout.WEST);\n\t\tpanChoiceHeuristic.setLayout(new BorderLayout(0, 0));\n\n\t\thbTopChoiceHeuristic = Box.createHorizontalBox();\n\t\thbTopChoiceHeuristic.setPreferredSize(new Dimension(0, 25));\n\t\tpanChoiceHeuristic.add(hbTopChoiceHeuristic, BorderLayout.NORTH);\n\n\t\tpanHeuristic = new JPanel();\n\t\thbTopChoiceHeuristic.add(panHeuristic);\n\t\tpanHeuristic.setLayout(new BorderLayout(0, 0));\n\n\t\tlblHeuristique = new JLabel(\"Heuristique\");\n\t\tpanHeuristic.add(lblHeuristique, BorderLayout.CENTER);\n\n\t\tpanHeristicLabelLeftSetting = new JPanel();\n\t\tpanHeristicLabelLeftSetting.setPreferredSize(new Dimension(35, 10));\n\t\tpanHeuristic.add(panHeristicLabelLeftSetting, BorderLayout.WEST);\n\n\t\tpanHeristicSeparatorContainer = new JPanel();\n\t\tpanHeristicSeparatorContainer.setPreferredSize(new Dimension(10, 2));\n\t\tpanHeuristic.add(panHeristicSeparatorContainer, BorderLayout.SOUTH);\n\t\tpanHeristicSeparatorContainer.setLayout(new BorderLayout(0, 0));\n\n\t\tpanHeristicSeparator = new JPanel();\n\t\tpanHeristicSeparatorContainer.add(panHeristicSeparator, BorderLayout.CENTER);\n\t\tpanHeristicSeparator.setLayout(new BorderLayout(0, 0));\n\n\t\tseparator = new JSeparator();\n\t\tpanHeristicSeparator.add(separator, BorderLayout.CENTER);\n\n\t\tpanHeuristicSeparatorLeftSetting = new JPanel();\n\t\tpanHeristicSeparatorContainer.add(panHeuristicSeparatorLeftSetting, BorderLayout.WEST);\n\n\t\thbLowChoiceHeuristic = Box.createHorizontalBox();\n\t\tpanChoiceHeuristic.add(hbLowChoiceHeuristic, BorderLayout.CENTER);\n\n\t\tpanContainerHeuristicList = new JPanel();\n\t\thbLowChoiceHeuristic.add(panContainerHeuristicList);\n\t\tpanContainerHeuristicList.setLayout(new BorderLayout(0, 0));\n\n\t\tpanHeuristicList = new JPanel();\n\t\tpanContainerHeuristicList.add(panHeuristicList, BorderLayout.CENTER);\n\t\tpanHeuristicList.setLayout(new BorderLayout(0, 0));\n\n\t\tcbHeuristic = new JComboBox<String>();\n\t\tcbHeuristic.setMinimumSize(new Dimension(25, 24));\n\t\tcbHeuristic.setPreferredSize(new Dimension(25, 24));\n\t\tcbHeuristic.addItem(\"\");\n\t\tcbHeuristic.addItem(\"Domaine minimum\");\n\t\tpanHeuristicList.add(cbHeuristic, BorderLayout.CENTER);\n\n\t\tpanHeuristicListTopSetting = new JPanel();\n\t\tpanHeuristicListTopSetting.setPreferredSize(new Dimension(10, 12));\n\t\tpanContainerHeuristicList.add(panHeuristicListTopSetting, BorderLayout.NORTH);\n\n\t\tpanHeuristicListLowSetting = new JPanel();\n\t\tpanHeuristicListLowSetting.setPreferredSize(new Dimension(10, 12));\n\t\tpanContainerHeuristicList.add(panHeuristicListLowSetting, BorderLayout.SOUTH);\n\n\t\tpanHeuristicListLeftSetting = new JPanel();\n\t\tpanContainerHeuristicList.add(panHeuristicListLeftSetting, BorderLayout.WEST);\n\n\t\tpanUpload = new JPanel();\n\t\tpanChoiceHeuristicAndUpload.add(panUpload, BorderLayout.CENTER);\n\t\tpanUpload.setLayout(new BorderLayout(0, 0));\n\n\t\tpanUploadFile = new JPanel();\n\t\tpanUploadFile.setPreferredSize(new Dimension(10, 25));\n\t\tpanUpload.add(panUploadFile, BorderLayout.NORTH);\n\t\tpanUploadFile.setLayout(new BorderLayout(0, 0));\n\n\t\tpanLabelFileLeftSetting = new JPanel();\n\t\tpanLabelFileLeftSetting.setPreferredSize(new Dimension(65, 10));\n\t\tpanUploadFile.add(panLabelFileLeftSetting, BorderLayout.WEST);\n\n\t\tpanUploadSeparatorContainer = new JPanel();\n\t\tpanUploadSeparatorContainer.setPreferredSize(new Dimension(10, 2));\n\t\tpanUploadFile.add(panUploadSeparatorContainer, BorderLayout.SOUTH);\n\t\tpanUploadSeparatorContainer.setLayout(new BorderLayout(0, 0));\n\n\t\tpanUploadSeparatorLeftSetting = new JPanel();\n\t\tpanUploadSeparatorLeftSetting.setPreferredSize(new Dimension(30, 10));\n\t\tpanUploadSeparatorContainer.add(panUploadSeparatorLeftSetting, BorderLayout.WEST);\n\n\t\tpanUploadSeparatorRightSetting = new JPanel();\n\t\tpanUploadSeparatorRightSetting.setPreferredSize(new Dimension(30, 10));\n\t\tpanUploadSeparatorContainer.add(panUploadSeparatorRightSetting, BorderLayout.EAST);\n\n\t\tpanUploadSeparator = new JPanel();\n\t\tpanUploadSeparatorContainer.add(panUploadSeparator, BorderLayout.CENTER);\n\t\tpanUploadSeparator.setLayout(new BorderLayout(0, 0));\n\n\t\tseparatorUpload = new JSeparator();\n\t\tpanUploadSeparator.add(separatorUpload, BorderLayout.CENTER);\n\n\t\tpanContainerLabelFile = new JPanel();\n\t\tpanUploadFile.add(panContainerLabelFile, BorderLayout.CENTER);\n\t\tpanContainerLabelFile.setLayout(new BorderLayout(0, 0));\n\n\t\tlblFichier = new JLabel(\"Fichier\");\n\t\tpanContainerLabelFile.add(lblFichier, BorderLayout.CENTER);\n\n\t\tpanContainerUpload = new JPanel();\n\t\tpanUpload.add(panContainerUpload, BorderLayout.CENTER);\n\t\tpanContainerUpload.setLayout(new BorderLayout(0, 0));\n\n\t\tpanBtnUploadContainer = new JPanel();\n\t\tpanBtnUploadContainer.setPreferredSize(new Dimension(10, 25));\n\t\tpanContainerUpload.add(panBtnUploadContainer, BorderLayout.CENTER);\n\t\tpanBtnUploadContainer.setLayout(new BorderLayout(0, 0));\n\n\t\tpanBtnUploadLeftSetting = new JPanel();\n\t\tpanBtnUploadLeftSetting.setPreferredSize(new Dimension(30, 10));\n\t\tpanBtnUploadContainer.add(panBtnUploadLeftSetting, BorderLayout.WEST);\n\n\t\tpanBtnUploadTopSetting = new JPanel();\n\t\tpanBtnUploadTopSetting.setPreferredSize(new Dimension(10, 4));\n\t\tpanBtnUploadContainer.add(panBtnUploadTopSetting, BorderLayout.NORTH);\n\n\t\tpanBtnUploadRightSetting = new JPanel();\n\t\tpanBtnUploadRightSetting.setPreferredSize(new Dimension(30, 10));\n\t\tpanBtnUploadContainer.add(panBtnUploadRightSetting, BorderLayout.EAST);\n\n\t\tpanBtnUpload = new JPanel();\n\t\tpanBtnUploadContainer.add(panBtnUpload, BorderLayout.CENTER);\n\t\tpanBtnUpload.setLayout(new BorderLayout(0, 0));\n\n\t\tbtnSearch = new JButton(\"Parcourir\");\n\t\tbtnSearch.addActionListener(new ActionListener()\n\t\t{\n\t\t\tpublic void actionPerformed(ActionEvent arg0)\n\t\t\t{\n\t\t\t\tJFileChooser chooser;\n\t\t\t\tchooser = new JFileChooser();\n\t\t\t\tchooser.setCurrentDirectory(new java.io.File(\".\"));\n\t\t\t\tchooser.setDialogTitle(\"Parcourir\");\n\t\t\t\tchooser.setAcceptAllFileFilterUsed(false);\n\t\t\t\tif (chooser.showOpenDialog(null) == JFileChooser.APPROVE_OPTION)\n\t\t\t\t{\n\t\t\t\t\tlong start = System.currentTimeMillis();\n\t\t\t\t\ttextAreaShowFile.setText(Parser.getFileContent(chooser.getSelectedFile().toString()));\n\t\t\t\t\tlong end = System.currentTimeMillis();\n\t\t\t\t\tlblTpsLoadFile.setText(\"\\nTemps de chargement du fichier : \" + (end - start) + \"ms\");\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tpanBtnUpload.add(btnSearch, BorderLayout.CENTER);\n\n\t\tpanBtnGenerate = new JPanel();\n\t\tpanBtnGenerate.setPreferredSize(new Dimension(10, 22));\n\t\tpanBtnUploadContainer.add(panBtnGenerate, BorderLayout.SOUTH);\n\t\tpanBtnGenerate.setLayout(new BorderLayout(0, 0));\n\n\t\tpanBtnGenerateLeftSettings = new JPanel();\n\t\tpanBtnGenerateLeftSettings.setPreferredSize(new Dimension(30, 10));\n\t\tpanBtnGenerate.add(panBtnGenerateLeftSettings, BorderLayout.WEST);\n\n\t\tpanBtnGenerateRightSetting = new JPanel();\n\t\tpanBtnGenerateRightSetting.setPreferredSize(new Dimension(30, 10));\n\t\tpanBtnGenerate.add(panBtnGenerateRightSetting, BorderLayout.EAST);\n\n\t\tpanBtnGenerateTopSetting = new JPanel();\n\t\tpanBtnGenerateTopSetting.setPreferredSize(new Dimension(10, 3));\n\t\tpanBtnGenerate.add(panBtnGenerateTopSetting, BorderLayout.NORTH);\n\n\t\tbtnGnrer = new JButton(\"Générer\");\n\t\tbtnGnrer.addActionListener(new ActionListener()\n\t\t{\n\t\t\tpublic void actionPerformed(ActionEvent arg0)\n\t\t\t{\n\n\t\t\t\tGenerateView generateFrame = new GenerateView();\n\t\t\t\tgenerateFrame.getFrame().addWindowListener(new WindowAdapter()\n\t\t\t\t{\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void windowDeactivated(WindowEvent e)\n\t\t\t\t\t{\n\t\t\t\t\t\tGenerator generator = new Generator(nbVariable, nbConstraint, minDomain, maxDomain);\n\t\t\t\t\t\ttextAreaShowFile.setText(generator.generate());\n\t\t\t\t\t\tframe.toFront();\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t}\n\t\t});\n\t\tpanBtnGenerate.add(btnGnrer, BorderLayout.CENTER);\n\n\t\tpanChoiceAc = new JPanel();\n\t\tpanChoiceAc.setPreferredSize(new Dimension(100, 10));\n\t\tpanChoiceElement.add(panChoiceAc, BorderLayout.CENTER);\n\t\tpanChoiceAc.setLayout(new BorderLayout(0, 0));\n\n\t\thbTopChoiceAc = Box.createHorizontalBox();\n\t\thbTopChoiceAc.setPreferredSize(new Dimension(0, 25));\n\t\tpanChoiceAc.add(hbTopChoiceAc, BorderLayout.NORTH);\n\n\t\tpanAc = new JPanel();\n\t\thbTopChoiceAc.add(panAc);\n\t\tpanAc.setLayout(new BorderLayout(0, 0));\n\n\t\tlblAc = new JLabel(\"Arc-consistency\");\n\t\tpanAc.add(lblAc, BorderLayout.CENTER);\n\n\t\tpanAcLeftSetting = new JPanel();\n\t\tpanAcLeftSetting.setPreferredSize(new Dimension(25, 10));\n\t\tpanAc.add(panAcLeftSetting, BorderLayout.WEST);\n\n\t\tpanAcSeparator = new JPanel();\n\t\tpanAcSeparator.setPreferredSize(new Dimension(10, 2));\n\t\tpanAc.add(panAcSeparator, BorderLayout.SOUTH);\n\t\tpanAcSeparator.setLayout(new BorderLayout(0, 0));\n\n\t\tpanAcSeparatorLeftSetting = new JPanel();\n\t\tpanAcSeparatorLeftSetting.setPreferredSize(new Dimension(15, 0));\n\t\tpanAcSeparator.add(panAcSeparatorLeftSetting, BorderLayout.WEST);\n\n\t\tpanAlcSeparatorRightSetting = new JPanel();\n\t\tpanAlcSeparatorRightSetting.setPreferredSize(new Dimension(20, 0));\n\t\tpanAcSeparator.add(panAlcSeparatorRightSetting, BorderLayout.EAST);\n\n\t\tseparatorAc = new JSeparator();\n\t\tseparatorAc.setMaximumSize(new Dimension(20, 20));\n\t\tpanAcSeparator.add(separatorAc, BorderLayout.CENTER);\n\n\t\thbLowChoiceAc = Box.createHorizontalBox();\n\t\tpanChoiceAc.add(hbLowChoiceAc, BorderLayout.CENTER);\n\n\t\tpanRdbChoiceAc = new JPanel();\n\t\thbLowChoiceAc.add(panRdbChoiceAc);\n\t\tpanRdbChoiceAc.setLayout(new BorderLayout(0, 0));\n\n\t\tpanAcRdbLeftSetting = new JPanel();\n\t\tpanAcRdbLeftSetting.setPreferredSize(new Dimension(11, 0));\n\t\tpanRdbChoiceAc.add(panAcRdbLeftSetting, BorderLayout.WEST);\n\n\t\tpanAcRdbContainer = new JPanel();\n\t\tpanRdbChoiceAc.add(panAcRdbContainer, BorderLayout.CENTER);\n\t\tpanAcRdbContainer.setLayout(new BorderLayout(0, 0));\n\n\t\trdbtnAucun = new JRadioButton(\"Aucun\");\n\t\trdbtnAucun.setSelected(true);\n\t\tbuttonGroupAc.add(rdbtnAucun);\n\t\tpanAcRdbContainer.add(rdbtnAucun, BorderLayout.NORTH);\n\n\t\trdbtnAC1 = new JRadioButton(\"AC 1\");\n\t\tbuttonGroupAc.add(rdbtnAC1);\n\t\tpanAcRdbContainer.add(rdbtnAC1, BorderLayout.SOUTH);\n\n\t\tmainPanTopSetting = new JPanel();\n\t\tmainPanel.add(mainPanTopSetting, BorderLayout.NORTH);\n\n\t\tmainPanRightSetting = new JPanel();\n\t\tmainPanRightSetting.setPreferredSize(new Dimension(10, 0));\n\t\tmainPanel.add(mainPanRightSetting, BorderLayout.WEST);\n\t\tmainPanRightSetting.setLayout(null);\n\n\t\tmainPanLeftSetting = new JPanel();\n\t\tmainPanel.add(mainPanLeftSetting, BorderLayout.EAST);\n\t}", "private ProgramGUI() {\n\t\tsetSize(FRAME_WIDTH, FRAME_HEIGHT);\n\t\tsetLocationRelativeTo(null);\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\n\t\tJPanel panel = new JPanel();\n\t\tpanel.setLayout(new GridLayout(1, 2));\n\t\tpanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 10));\n\t\tpanel.add(new JLabel(\"Enter Command: \"));\n\t\tcmd = new JTextField();\n\t\tpanel.add(cmd);\n\t\tadd(panel, BorderLayout.NORTH);\n\t\tJPanel button = new JPanel();\n\t\tJButton ok = new JButton(\"Confirm Command\");\n\t\tJButton logout = new JButton(\"Log Out\");\n\t\tok.addActionListener(new OKListener());\n\t\tlogout.addActionListener(new LogoutListener());\n\t\tbutton.add(ok);\n\t\tbutton.add(logout);\n\t\tadd(button, BorderLayout.SOUTH);\n\t\tsetVisible(true);\n\t\tif(isTillOpen) {\n\t\t\tsetTitle(\"Till Open\");\n\t\t}\n\t\telse {\n\t\t\tsetTitle(\"Till Closed\");\n\t\t}\n\t}", "public ViewInvoicesGUI() {\n initComponents();\n updateDatabase();\n this.setLocationRelativeTo(null);\n \n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n addressField = new javax.swing.JTextField();\n jLabel2 = new javax.swing.JLabel();\n uidField = new javax.swing.JTextField();\n jLabel3 = new javax.swing.JLabel();\n PasswordField = new javax.swing.JPasswordField();\n jButton1 = new javax.swing.JButton();\n msg = new javax.swing.JLabel();\n jProgressBar1 = new javax.swing.JProgressBar();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(\"ToxGui\"));\n\n jLabel1.setText(\"Proxy address\");\n\n jLabel2.setText(\"User ID\");\n\n jLabel3.setText(\"Password\");\n\n PasswordField.setText(\"jPasswordField1\");\n\n jButton1.setText(\"Connect\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n msg.setText(\"Click to connect\");\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(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addComponent(msg)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton1))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addComponent(jLabel2)\n .addComponent(jLabel3))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(addressField)\n .addComponent(uidField)\n .addComponent(PasswordField, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 133, Short.MAX_VALUE)))\n .addComponent(jProgressBar1, javax.swing.GroupLayout.DEFAULT_SIZE, 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 .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(addressField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel1))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(uidField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(PasswordField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel3)))\n .addComponent(jLabel2))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton1)\n .addComponent(msg))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jProgressBar1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n );\n\n try {\n String line = ReadWrite.Read(file);\n\n String dectext = Cripto.decrypt(line, \"ibm\");\n String[] sta = dectext.split(\";\");\n addressField.setText(sta[0]);\n uidField.setText(sta[1]);\n PasswordField.setText(sta[2]);\n } catch (GeneralSecurityException | IOException ex) {\n Logger.getLogger(ToxGui.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n pack();\n }", "public GUI()\r\n {\r\n this.setDefaultCloseOperation(EXIT_ON_CLOSE);\r\n this.setSize(WIDTH, HEIGHT);\r\n this.setLocation(300, 0);\r\n gui = this;\r\n listener = new buttonListener();\r\n\r\n // Sets up the timer\r\n time = new Timer();\r\n time.scheduleAtFixedRate(new TimerTask() {\r\n @Override\r\n public void run() {\r\n int t;\r\n t = setInterval();\r\n timeLabel.setText(\"Time: \" + t);\r\n }\r\n }, 1000,1000);\r\n // Creates the ScorePanel and adds it to the GUI\r\n CreateScorePanel();\r\n this.add(scorePanel, BorderLayout.NORTH);\r\n // Creates the GamePanel and adds it to the GUI\r\n gamePanel = new GamePanel(this);\r\n gamePanel.setBackground(new Color(87,141,72));\r\n this.add(gamePanel, BorderLayout.CENTER);\r\n this.setVisible(true);\r\n }", "public GraphicUI() {\n initComponents();\n jPanelAddr.setVisible(false);\n jButtonDBToAddr.setVisible(false);\n jFrameMap.setVisible(false);\n\n selectedFormat = 0;\n quickSearch = false;\n \ttextFieldDefaults = setFieldDefaults();\n \ttextFieldCurrents = setFieldDefaults();;\n\n }" ]
[ "0.65238494", "0.65042144", "0.6419864", "0.64000624", "0.63599426", "0.63364875", "0.6296948", "0.62819076", "0.62735516", "0.6246544", "0.6235637", "0.62351537", "0.623129", "0.6183027", "0.61206955", "0.6115551", "0.61042875", "0.6104246", "0.61023724", "0.60993326", "0.6096459", "0.6079894", "0.6079099", "0.6078405", "0.6059709", "0.60554105", "0.6033631", "0.60316384", "0.60281116", "0.6020664", "0.6014937", "0.60137546", "0.6007675", "0.60040367", "0.59972614", "0.5993085", "0.5982176", "0.5974936", "0.597013", "0.59695774", "0.5928744", "0.59258634", "0.5925776", "0.59191006", "0.59161454", "0.5913785", "0.5901652", "0.59009665", "0.5896945", "0.58968216", "0.589249", "0.58871126", "0.5880322", "0.5878839", "0.58780605", "0.5875319", "0.58735347", "0.5863645", "0.5862694", "0.5862565", "0.58503485", "0.5847353", "0.584318", "0.5817281", "0.5814515", "0.58089626", "0.58026373", "0.58014464", "0.57950777", "0.57800806", "0.5779696", "0.57713085", "0.5767422", "0.57632625", "0.57614017", "0.57564414", "0.5753756", "0.57509583", "0.5748746", "0.57397443", "0.5735013", "0.5732446", "0.57312477", "0.5726833", "0.5725159", "0.57245284", "0.5723445", "0.5721871", "0.57196677", "0.57173365", "0.5715328", "0.5713117", "0.5709952", "0.5707797", "0.57066095", "0.57050216", "0.5702221", "0.56988263", "0.56984234", "0.5697255" ]
0.596668
40
Initialize the variables class.
private void initilize() { dimXNet = project.getNoC().getNumRotX(); dimYNet = project.getNoC().getNumRotY(); addProperties(); addComponents(); setVisible(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void initVariables() {\n\t\t\r\n\t}", "protected void initVars() {}", "private void init() {\n\t\t\n\t\ttry{\t\t\t\n\t\t\tinfos = new HashMap<String, VariableInfo>();\n\t\t\t\n\t\t\tfor(String var : this.problem.getMyVars()){\n\t\t\t\t\n\t\t\t\tif(this.problem.getNbrNeighbors(var) != 0){ // an isolated variable doesn't need a CryptoScheme and therefore no VariableInfo either\n\t\t\t\t\t\n\t\t\t\t\tVariableInfo info = new VariableInfo(var);\n\t\t\t\t\tinfos.put(var, info);\n\t\t\t\t\t\n\t\t\t\t\tinfo.cs = cryptoConstr.newInstance(this.cryptoParameter);\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//initialize request counter for my own variables\n\t\t\trequestCount = new HashMap<String,Integer>(); \n\t\t\tfor(String var : this.problem.getMyVars()){\n\t\t\t\trequestCount.put(var, 0);\n\t\t\t}\n\t\t\t\n\t\t\tthis.started = true;\t\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\t\t\n\t}", "public TradeVariables() { /*gets default values*/ }", "private void initVars(){\n this.dice = new Dice();\n this.playing = true;\n this.currentPlayer = 0;\n this.turn = 0;\n this.xPlayers=new ArrayList<>(); \n this.players = new Player[4];\n this.diceRoller=true;\n this.xTokens=new ArrayList<>();\n this.winners=new ArrayList<>();\n this.computerPlayer= new Autoplay();\n this.gameResults = \"\";\n this.debug = false;\n }", "public Variables() {\n this.numCliente = 0;\n this.tiempoSalida = 999;\n }", "private void initValues() {\n \n }", "private void initFields() {\n\n tipPercent = 0.0;\n noPersons = 1;\n totalPay = 0.0;\n totalTip = 0.0;\n totalPerPerson = 0.0;\n\n }", "private void setUp() {\r\n\tvariables = new Vector();\r\n\tstatements = new Vector();\r\n\tconstraints = new Vector();\r\n\tvariableGenerator = new SimpleVariableGenerator(\"v_\");\r\n }", "private void initializeVariables() {\n\n //Acquisizione credeziali per il login\n editTextUsername = findViewById(R.id.username);\n editTextPassword = findViewById(R.id.password);\n\n //bottone per il login\n mLoginButton = findViewById(R.id.button_login);\n\n //Checkbox per ricordare le credenziali\n rememberMe = findViewById(R.id.remember);\n\n //Variabile per reimpostare la password\n forgotTextLink = findViewById(R.id.lost_password);\n\n //ProgressBar\n progressBar = findViewById(R.id.progress_view);\n }", "private void init() {\n cloudAmount = null;\n cloudGenus = null;\n cloudAltitude = null;\n cloudDescription = null;\n }", "public void initialize() {\n\n // Calculate the average unit price.\n calculateAvgUnitPrice() ;\n\n // Calculate the realized profit/loss for this stock\n calculateRealizedProfit() ;\n\n this.itdValueCache = ScripITDValueCache.getInstance() ;\n this.eodValueCache = ScripEODValueCache.getInstance() ;\n }", "private void initialize() {\n this.pm10Sensors = new ArrayList<>();\n this.tempSensors = new ArrayList<>();\n this.humidSensors = new ArrayList<>();\n }", "private void initializeVariable() {\n\n\t\tlearn = (Button) findViewById(R.id.learnButton);\n\t\tlearn.setOnClickListener(this);\n\t\tplay = (Button) findViewById(R.id.playButton);\n\t\tplay.setOnClickListener(this);\n\t\tmode = (Button) findViewById(R.id.b_mode);\n\t\tmode.setOnClickListener(this);\n\t\tmode.setText(Global.currentMode + \" MODE\");\n\t\tclassID_SD = \"com.example.northamericanwildlifesounds.SOUNDDISPLAY\";\n\t\tsetUpAnimalData();\n\t}", "private void initInstanceVars() {\n\t\tglobalSymTab = new Hashtable<String,ClassDecl>();\n\t\tcurrentClass = null;\n\t}", "protected void initialize() {\n\t\tthis.position = Point3D.ZERO;\n\t\t// reset subclasses properties if any\n\t\treset();\n\t}", "private void initializeVariables() {\n\t\tseekBar = (SeekBar) findViewById(R.id.seekBar1);\n\t\ttextView = (TextView) findViewById(R.id.finishText);\n\t\tspinner = (Spinner) findViewById(R.id.algorithm);\n\t\tsetSeekBarListener();\n\t\taddListenerOnAlgorithmSelection();\n\t}", "protected void initialize() {\n // Attribute Load\n this.attributeMap.clear();\n this.attributeMap.putAll(this.loadAttribute());\n // RuleUnique Load\n this.unique = this.loadRule();\n // Marker Load\n this.marker = this.loadMarker();\n // Reference Load\n this.reference = this.loadReference();\n }", "@Override\n protected void initialize() { \n\n \n SmartDashboard.putNumber(\"Side Velocity\", sideVelocity);\n SmartDashboard.putNumber(\"Belt velocity\", beltVelocity);\n\n }", "public void init() {\n \n }", "public void init() {\r\n resources = new Vector<ResourcesElement>();\r\n informations = new Vector<InformationElement>();\r\n output = null;\r\n spec = DEFAULT_SPEC;\r\n version = null;\r\n codeBase = null;\r\n href = null;\r\n allPermissions = false;\r\n j2eePermissions = false;\r\n isComponent = false;\r\n applicationDesc = null;\r\n appletDesc = null;\r\n installerDesc = null;\r\n }", "@Override\r\n\tpublic void init() { \r\n\t\t\r\n\t\tsession = -1;\r\n\t\t\r\n\t\tProgressDif = 0;\r\n\t\tnoisFact = 0;\r\n\t\tcompromiseFact = 0;\r\n\t\t\r\n\t\tcompromiseLearn = 20;\r\n\t\tprogressLearn = 10;\r\n\t\tnoisLearn = 0.2;\r\n\t\t\r\n\t\treservationPanic = 0.2;\r\n\t\tmyBids = new ArrayList<Pair<Bid,Double>>();\r\n\t\topponentBidsA = new Vector<ArrayList<Pair<Bid,Double>>>();\r\n\t\topponentBidsB = new Vector<ArrayList<Pair<Bid,Double>>>();\r\n\r\n\t\tdf = utilitySpace.getDiscountFactor();\r\n\t\tif (df==0) df = 1; \r\n\r\n\t\ttry {\r\n\t\t\tinitStates();\r\n\t\t} catch (Exception e) {\r\n \t\t\te.printStackTrace();\r\n\t\t}\t\t\r\n\t}", "protected void initialize() {\n \t\n }", "public void initialize()\n {\n }", "protected void InitValuables() {\n\t\tsuper.InitValuables();\n\t\t\n\t}", "private void initialize() {\n }", "protected void initialize() {\n this.locals = Common.calculateSegmentSize(Common.NUM_CORES);\n this.drvrs = Common.calculateSegmentSize(Common.NUM_CORES);\n reports = new ArrayList<>();\n }", "Variables createVariables();", "public void initialize() {\n // empty for now\n }", "public Variable(){\n name = \"\";\n initialValue = 0;\n }", "public void init() {\r\n\r\n\t}", "public static void initialisations() {\n\t\tit = 0;\r\n\t\tbc = 1;\r\n\r\n\t\t// pile des reprises pour compilation des branchements en avant\r\n\t\tpileRep = new TPileRep(); \r\n\t\t// programme objet = code Mapile de l'unite en cours de compilation\r\n\t\tpo = new ProgObjet();\r\n\t\t// COMPILATION SEPAREE: desripteur de l'unite en cours de compilation\r\n\t\tdesc = new Descripteur();\r\n\r\n\t\t// initialisation necessaire aux attributs lexicaux\r\n\t\tUtilLex.initialisation();\r\n\r\n\t\t// initialisation du type de l'expression courante\r\n\t\ttCour = NEUTRE;\r\n\r\n\t\t//Initialisation de la variable qui compte le nombre de param�tres de chaque proc�dure \r\n\t\tnbParamProc = 0;\r\n\r\n\t\t//Initialisation de la variable qui compte le nombre de variables d�clar�es\r\n\t\tnbVar++;\r\n\r\n\t\t//Initialisation vTmp\r\n\t\tvTmp = 0;\r\n\t\t\r\n\t\tdesc.setUnite(\"programme\");\r\n\t\t\r\n\t}", "public void initialize(){\n\t\t//TODO: put initialization code here\n\t\tsuper.initialize();\n\t\t\n\t}", "private void initVariables(){\n int counter = 1;\n for (int vCount = 0; vCount < vertexCount; vCount++){\n for (int pCount = 0; pCount < positionCount; pCount++){\n variables[vCount][pCount] = counter++;\n }\n }\n }", "private void initialize() {\n first = null;\n last = null;\n size = 0;\n dictionary = new Hashtable();\n }", "private void initiliaze() {\r\n\t\tthis.inputFile = cd.getInputFile();\r\n\t\tthis.flowcell = cd.getFlowcell();\r\n\t\tthis.totalNumberOfTicks = cd.getOptions().getTotalNumberOfTicks();\r\n\t\tthis.outputFile = cd.getOutputFile();\r\n\t\tthis.statistics = cd.getStatistic();\r\n\t}", "public GlobalVariable() {\n }", "protected void initialize() {\n\t\tright = left = throttle = turn = forward = 0;\n\t}", "public void initialize() {\r\n }", "public void init() {\n\t\t}", "private void initialize() {\n\t\t\n\t}", "private void initVariables() {\n ivBack.setVisibility(View.VISIBLE);\n tvTitle.setVisibility(View.VISIBLE);\n tvTitle.setText(getString(R.string.change_language));\n\n gifProgress.setImageResource(R.drawable.shopholic_loader);\n progressBar.setVisibility(View.GONE);\n String currentLang = AppSharedPreference.getInstance().getString(this, AppSharedPreference.PREF_KEY.CURRENT_LANGUAGE);\n setLanguage(currentLang);\n }", "private static void Initialize()\n\t{\n\t\tcurrentPC = 3996;\n\t\tcurrentFilePointer = 0;\n\t\tmemoryBlocks = new int[4000];\n\t\tregisterFile = new HashMap<String, Integer>();\n\t\tstages = new HashMap<String, Instruction>();\n\t\tlatches = new HashMap<String, Instruction>();\n\t\tspecialRegister = 0;\n\t\tisComplete = false;\n\t\tisValidSource = true;\n\t\tSystem.out.println(\"-----Initialization Completed------\");\n\t}", "public void initialize() {\n\n fechaDeLaVisita.set(LocalDate.now());\n\n if (medico.get() != null) {\n medico.get().clear();\n } else {\n medico.set(new Medico());\n }\n\n turnoVisita.set(\"\");\n visitaAcompanadaSN.set(false);\n lugarVisita.set(\"\");\n if (causa.get() != null) {\n causa.get().clear();\n } else {\n causa.set(new Causa());\n }\n\n if (promocion.get() != null) {\n promocion.get().clear();\n } else {\n promocion.set(new Promocion());\n }\n\n observacion.set(\"\");\n persistida.set(false);\n persistidoGraf.set(MaterialDesignIcon.SYNC_PROBLEM.graphic());\n\n fechaCreacion.set(LocalDateTime.now());\n\n }", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "public void init() {\n\n\t}", "public void init() {\n\n\t}", "public void init() {\n\n\t}", "private void initialize() {\n\t}", "private void init() {\n }", "private void initializeVariables() {\n\t\ttvTimeShow= (TextView) findViewById(R.id.tvTimeTracker);\r\n\t}", "private void initialize() {\n this.traitMap = new HashMap<T, ITrait<T>>();\n this.traitList = new ArrayList<ITrait<T>>();\n this.observers = Collections.synchronizedList(new ArrayList<IStatisticsObserver>());\n this.dimensionName = \"UNNAMED\";\n\n }", "protected void initialize() {\r\n }", "protected void initialize() {\r\n }", "public void initialize() {\n // TODO\n }", "public void initialise() {\n\t\tm_country_id = 0;\n\t\tm_country_name = \"\";\n\t\tm_error_string = \"\";\n\t}", "private void init() {\n\n\n\n }", "public void init()\n {\n this.tripDict = new HashMap<String, Set<Trip>>();\n this.routeDict = new HashMap<String, Double>();\n this.tripList = new LinkedList<Trip>();\n this.computeAllPaths();\n this.generateDictionaries();\n }", "public void initialize() {\n }", "private void init() {\n\n\t}", "protected void initialize() {}", "protected void initialize() {}", "public void initialize() {\n\t}", "public void initialize() {\n\t}", "protected void initialize() {\n\n\t}", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "protected void initialize() {\n }", "private void initialize()\r\n {\r\n this.workspace = null;\r\n this.currentUser = null;\r\n this.created = new Date();\r\n this.securityInfo = null;\r\n }", "public void init() {\n\t\n\t}", "protected void initialize() {\n\t\t\n\t}", "protected void initialize() {\n\t\t\n\t}", "protected void initialise() {\r\n loadDefaultConfig();\r\n loadCustomConfig();\r\n loadSystemConfig();\r\n if (LOG.isDebugEnabled()) {\r\n LOG.debug(\"--- Scope properties ---\");\r\n for (Iterator i = properties.keySet().iterator(); i.hasNext(); ) {\r\n String key = (String) i.next();\r\n Object value = properties.get(key);\r\n LOG.debug(key + \" = \" + value);\r\n }\r\n LOG.debug(\"------------------------\");\r\n }\r\n }", "protected void initialize()\r\n {\n }", "public void init(){\n \n }", "protected void initVars() {\n prefFile = \"./server.ini\";\n mimeFile = \"./mime.ini\";\n }", "public void init() {\n\t\t\n\t}", "private void initializeVariables() {\n rnd = new Random();\n\n pieceKind = rnd.nextInt() % 7;\n if(pieceKind < 0) pieceKind *= -1;\n pieceKind2 = rnd.nextInt() % 7;\n if(pieceKind2 < 0) pieceKind2 *= -1;\n\n piece = new Piece(pieceKind,this);\n newPiece();\n startedGame = true;\n\n for(i=0; i<276; i++) {\n modulo = i%12;\n if(modulo == 0 || modulo == 11 || i>251) {\n matrix[i] = 0; colMatrix[i] = true;\n } else {\n matrix[i] = -1; colMatrix[i] = false;\n }\n }\n\n for(i=0; i<5; i++) completeLines[i] = -1;\n for(i=0; i<4; i++) keybl.setMovTable(i, false);\n }", "protected void initialize()\n\t{\n\t}", "public void init(){\n\t\t//Makes the view\n\t\tsetUpView();\n\n\t\t//Make the controller. Links the action listeners to the view\n\t\tnew Controller(this);\n\t\t\n\t\t//Initilize the array list\n\t\tgameInput = new ArrayList<Integer>();\n\t\tuserInput = new ArrayList<Integer>();\n\t\thighScore = new HighScoreArrayList();\n\t}", "public void init() {\n this.properties = loadProperties(\"/project3.properties\");\n }", "public void init() {\n }", "public void init() {\n }" ]
[ "0.81841284", "0.8027036", "0.73510545", "0.7078012", "0.7066843", "0.69663316", "0.66642785", "0.6652517", "0.66436464", "0.66372794", "0.6618524", "0.6618156", "0.6588266", "0.6576474", "0.6531503", "0.65267175", "0.6514999", "0.6488994", "0.647876", "0.6476659", "0.64668524", "0.64522034", "0.6447084", "0.64464176", "0.6428045", "0.64185965", "0.6408024", "0.64031255", "0.6390038", "0.63875455", "0.638336", "0.6380768", "0.63736993", "0.6372515", "0.6361247", "0.6358127", "0.63579017", "0.63572204", "0.63420814", "0.634163", "0.633684", "0.6332605", "0.63296264", "0.63264686", "0.63108504", "0.63108504", "0.63108504", "0.63108504", "0.6309487", "0.6309487", "0.6309487", "0.63089013", "0.630511", "0.6300218", "0.6297143", "0.6296352", "0.6296352", "0.62952894", "0.6293656", "0.6286808", "0.62835604", "0.6279882", "0.62729573", "0.6267942", "0.6267942", "0.62651974", "0.62651974", "0.6249604", "0.624766", "0.624766", "0.624766", "0.624766", "0.624766", "0.624766", "0.624766", "0.624766", "0.624766", "0.624766", "0.624766", "0.624766", "0.624766", "0.624766", "0.624766", "0.624766", "0.624766", "0.624766", "0.62472796", "0.6243821", "0.6243686", "0.6243686", "0.62367547", "0.6228826", "0.6223275", "0.6222786", "0.62197524", "0.6207365", "0.6199035", "0.6194387", "0.6193632", "0.6193307", "0.6193307" ]
0.0
-1
add the interface properties.
private void addProperties() { getContentPane().setLayout(null); Dimension resolucao=Toolkit.getDefaultToolkit().getScreenSize(); setSize(370,177); setLocation((resolucao.width-260)/2,(resolucao.height-380)/2); setResizable(false); addWindowListener(new WindowAdapter(){public void windowClosing(WindowEvent e){dispose();}}); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void addProperty(IProperty property) {\n\t\t\n\t}", "public void addInterface(String interf) {\n m_classBuilder.addInterface(interf);\n }", "@Override\n public void addConfigurationProperties(Properties properties) {\n }", "@Override public void addImpliedProperties(UpodPropertySet ups)\n{\n}", "@Override\n\tpublic void addProperty(String name) {\n\t}", "public static void registerProps() throws API_Exception {\n\t\tProperties.registerProp( DOCKER_IMG_VERSION, Properties.STRING_TYPE, DOCKER_IMG_VERSION_DESC );\n\t\tProperties.registerProp( SAVE_CONTAINER_ON_EXIT, Properties.BOOLEAN_TYPE, SAVE_CONTAINER_ON_EXIT_DESC );\n\t\tProperties.registerProp( DOCKER_HUB_USER, Properties.STRING_TYPE, DOCKER_HUB_USER_DESC );\n\t}", "private void addProperties() {\n\t\tfor (PropertyGenerator pg : this.getPropertyGenerators()) {\n\t\t\tpg.generate();\n\t\t\tthis.enqueuePropertyTypeIfNeeded(pg);\n\t\t\tthis.addToSubBindingsIfNeeded(pg);\n\t\t}\n\t}", "public void setAddEventInterface( final IAddEvent _addInterface ) ;", "@Override\n protected void updateProperties() {\n }", "protected void addInterfaceTypePropertyDescriptor(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_InterfaceField_interfaceType_feature\"),\n\t\t\t\t getString(\"_UI_PropertyDescriptor_description\", \"_UI_InterfaceField_interfaceType_feature\", \"_UI_InterfaceField_type\"),\n\t\t\t\t WafPackage.Literals.INTERFACE_FIELD__INTERFACE_TYPE,\n\t\t\t\t true,\n\t\t\t\t false,\n\t\t\t\t false,\n\t\t\t\t ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,\n\t\t\t\t null,\n\t\t\t\t null));\n\t}", "public void buildInterfaceUsageInfo() {\n\t\twriter.writeInterfaceUsageInfo();\n\t}", "@Override\n public void updateProperties() {\n // unneeded\n }", "public void addImplements(String sInterface)\n {\n ensureLoaded();\n m_tblInterface.put(sInterface.replace('.', '/'), new ClassConstant(sInterface));\n setModified(true);\n }", "public void addProperties( Properties props )\n {\n if ( props != null )\n {\n for ( Enumeration<?> e = props.propertyNames(); e.hasMoreElements(); )\n {\n // This LDAP attr is stored as a name-value pair separated by a ':'.\n String key = ( String ) e.nextElement();\n String val = props.getProperty( key );\n addProperty( key, val );\n }\n }\n }", "protected void addInterfaceTypePropertyDescriptor(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_EntityAttribute_interfaceType_feature\"),\n\t\t\t\t getString(\"_UI_PropertyDescriptor_description\", \"_UI_EntityAttribute_interfaceType_feature\", \"_UI_EntityAttribute_type\"),\n\t\t\t\t PersistencePackage.Literals.ENTITY_ATTRIBUTE__INTERFACE_TYPE,\n\t\t\t\t true,\n\t\t\t\t false,\n\t\t\t\t false,\n\t\t\t\t ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,\n\t\t\t\t getString(\"_UI_InterfacePropertyCategory\"),\n\t\t\t\t null));\n\t}", "@Override\n\tprotected void registerProperties() {\n\t\tsuper.registerProperties();\n\t\tthis.registerProperty(Sender);\n\t\tthis.registerProperty(ToRecipients);\n\t\tthis.registerProperty(CcRecipients);\n\t\tthis.registerProperty(BccRecipients);\n\t\tthis.registerProperty(IsReadReceiptRequested);\n\t\tthis.registerProperty(IsDeliveryReceiptRequested);\n\t\tthis.registerProperty(ConversationIndex);\n\t\tthis.registerProperty(ConversationTopic);\n\t\tthis.registerProperty(From);\n\t\tthis.registerProperty(InternetMessageId);\n\t\tthis.registerProperty(IsRead);\n\t\tthis.registerProperty(IsResponseRequested);\n\t\tthis.registerProperty(References);\n\t\tthis.registerProperty(ReplyTo);\n\t\tthis.registerProperty(ReceivedBy);\n\t\tthis.registerProperty(ReceivedRepresenting);\n\t}", "public void setupProperties() {\n // left empty for subclass to override\n }", "@Override\n\tpublic void add() {\n\t\tSystem.out.println(\"This is an implemented interface\");\n\t}", "interface PropertyInfo {}", "private void setInterfaces() {\n\t\tif (interfaceNames == null) {\n\t\t\treturn;\n\t\t}\n\t\tif (interfaces != null) {\n\t\t\treturn;\n\t\t}\n\t\tinterfaces = new HashMap();\n\t\tfor (int i = 0; i < interfaceNames.length; i++) {\n\t\t\tBCClass _interface =\n\t\t\t\tJavaApplication.Application.getClass(interfaceNames[i]);\n\t\t\tinterfaces.put(interfaceNames[i], _interface);\n\t\t}\n\t}", "protected Item addExtensions(Item item) {\n // this can happen if the fields extension was used but properties were not included\n if (item.getProperties() == null) {\n return item;\n }\n\n Class propertiesClass = item.getProperties().getClass();\n if (cache.containsKey(propertiesClass)) {\n return item.stacExtensions(cache.get(propertiesClass));\n }\n\n Set<String> extensions = new HashSet<>();\n Class[] interfaces = propertiesClass.getInterfaces();\n for (Class clazz : interfaces) {\n try {\n Field prefixField = clazz.getDeclaredField(\"EXTENSION_PREFIX\");\n if (prefixField != null) {\n String prefix = (String) prefixField.get(item.getProperties());\n extensions.add(prefix);\n }\n } catch (Exception e) {\n // field doesn't exist, do nothing\n }\n }\n cache.put(propertiesClass, extensions);\n item.setStacExtensions(extensions);\n return item;\n }", "interface WithProperties {\n /**\n * Specifies the properties property: Properties of Cognitive Services account..\n *\n * @param properties Properties of Cognitive Services account.\n * @return the next definition stage.\n */\n Update withProperties(AccountProperties properties);\n }", "public void buildSubInterfacesInfo() {\n\t\twriter.writeSubInterfacesInfo();\n\t}", "public void buildImplementedInterfacesInfo() {\n\t\twriter.writeImplementedInterfacesInfo();\n\t}", "interface WithProperties {\n /**\n * Specifies properties.\n * @param properties the properties parameter value\n * @return the next definition stage\n */\n WithCreate withProperties(MoveCollectionProperties properties);\n }", "private void addProperties() {\n\n\t\t/**\n\t\t * Add fusion.conf = src/test/resource\n\t\t */\n\t\tif (isPropertyRequired(\"fusion.conf.dir\")) {\n\t\t\texpect(bundleContextMock.getProperty(\"fusion.conf.dir\")).andReturn(\n\t\t\t\t\t\"src/test/resources/\").anyTimes();\n\t\t}\n\t\t/**\n\t\t * set fusion.process.dir\n\t\t */\n\t\tif (isPropertyRequired(\"fusion.process.dir\")) {\n\t\t\texpect(bundleContextMock.getProperty(\"fusion.process.dir\"))\n\t\t\t\t\t.andReturn(\"src/test/resources/\").anyTimes();\n\t\t}\n\n\t\t/**\n\t\t * set fusion.process.temp\n\t\t */\n\t\tif (isPropertyRequired(\"fusion.process.temp.dir\")) {\n\t\t\texpect(bundleContextMock.getProperty(\"fusion.process.temp.dir\"))\n\t\t\t\t\t.andReturn(\"src/test/resources/\").anyTimes();\n\t\t}\n\n\t\t/**\n\t\t * set fusion.home\n\t\t */\n\t\tif (isPropertyRequired(\"fusion.home\")) {\n\t\t\texpect(bundleContextMock.getProperty(\"fusion.home\")).andReturn(\n\t\t\t\t\t\"src/test/resources/\").anyTimes();\n\t\t}\n\t}", "private void addIntfConfig() {\n Set<Interface> interfaces = Sets.newHashSet();\n\n Set<Interface> vlanOneSet = new HashSet<>();\n\n for (int i = 1; i <= LAST_CONF_DEVICE_INTF_VLAN_IP; i++) {\n ConnectPoint cp = new ConnectPoint(getDeviceId(i), P1);\n\n // Interface addresses for IPv4\n Ip4Prefix prefix1 = Ip4Prefix.valueOf(\"10.0.\" + (2 * i - 1) + \".0/24\");\n Ip4Address addr1 = Ip4Address.valueOf(\"10.0.\" + (2 * i - 1) + \".1\");\n Ip4Prefix prefix2 = Ip4Prefix.valueOf(\"10.0.\" + (2 * i) + \".0/24\");\n Ip4Address addr2 = Ip4Address.valueOf(\"10.0.\" + (2 * i) + \".1\");\n InterfaceIpAddress ia1 = new InterfaceIpAddress(addr1, prefix1);\n InterfaceIpAddress ia2 = new InterfaceIpAddress(addr2, prefix2);\n\n // Interface addresses for IPv6\n Ip6Prefix prefix3 = Ip6Prefix.valueOf((2 * i - 1) + \"000::0/64\");\n Ip6Address addr3 = Ip6Address.valueOf((2 * i - 1) + \"000::1\");\n Ip6Prefix prefix4 = Ip6Prefix.valueOf((2 * i) + \"000::0/64\");\n Ip6Address addr4 = Ip6Address.valueOf((2 * i) + \"000::2\");\n InterfaceIpAddress ia3 = new InterfaceIpAddress(addr3, prefix3);\n InterfaceIpAddress ia4 = new InterfaceIpAddress(addr4, prefix4);\n\n // Setting up interfaces\n Interface intf1 = new Interface(cp, Sets.newHashSet(ia1, ia3),\n MacAddress.valueOf(2 * i - 1),\n VlanId.vlanId((short) 1));\n Interface intf2 = new Interface(cp, Sets.newHashSet(ia2, ia4),\n MacAddress.valueOf(2 * i),\n VlanId.NONE);\n\n interfaces.add(intf1);\n interfaces.add(intf2);\n\n vlanOneSet.add(intf1);\n\n expect(interfaceService.getInterfacesByPort(cp))\n .andReturn(Sets.newHashSet(intf1, intf2)).anyTimes();\n }\n for (int i = LAST_CONF_DEVICE_INTF_VLAN_IP + 1; i <= LAST_CONF_DEVICE_INTF_VLAN; i++) {\n ConnectPoint cp = new ConnectPoint(getDeviceId(i), P1);\n Interface intf1 = new Interface(cp, null,\n MacAddress.NONE,\n VlanId.vlanId((short) 1));\n\n interfaces.add(intf1);\n vlanOneSet.add(intf1);\n\n expect(interfaceService.getInterfacesByPort(cp))\n .andReturn(Sets.newHashSet(intf1)).anyTimes();\n }\n expect(interfaceService.getInterfacesByVlan(VLAN1))\n .andReturn(vlanOneSet).anyTimes();\n expect(interfaceService.getInterfacesByVlan(VLAN10))\n .andReturn(Collections.emptySet()).anyTimes();\n expect(interfaceService.getInterfaces()).andReturn(interfaces).anyTimes();\n\n for (int i = LAST_CONF_DEVICE_INTF_VLAN + 1; i <= NUM_DEVICES; i++) {\n ConnectPoint cp = new ConnectPoint(getDeviceId(i),\n P1);\n expect(interfaceService.getInterfacesByPort(cp))\n .andReturn(Collections.emptySet()).anyTimes();\n }\n }", "public void initProperties() {\n propAssetClass = addProperty(AssetComponent.PROP_CLASS, \"MilitaryOrganization\");\n propAssetClass.setToolTip(PROP_CLASS_DESC);\n propUniqueID = addProperty(AssetComponent.PROP_UID, \"UTC/RTOrg\");\n propUniqueID.setToolTip(PROP_UID_DESC);\n propUnitName = addProperty(AssetComponent.PROP_UNITNAME, \"\");\n propUnitName.setToolTip(PROP_UNITNAME_DESC);\n propUIC = addProperty(PROP_UIC, \"\");\n propUIC.setToolTip(PROP_UIC_DESC);\n }", "public void add(int propID, int i, Object obj) throws SL_Exception\n {\n switch(propID)\n {\n default:\n super.add(propID, i, obj);\n }\n }", "public void addIfield(String i){\n\t\tifield.add(i);\n\t}", "public void afterPropertiesSet() throws Exception {\n\t\t System.out.println(\"Log Bean is going through init method using Interfaces.\");\n\t\t\n\t}", "@Override\r\n\tpublic void setProperties(Properties properties) \r\n\t{\n\t}", "@Override\r\n\tpublic void setProperties(Properties properties) {\n\t\t\r\n\t}", "@Override\n public void addOutputProperties(Map<String, Serializable> properties) {\n Log.w(TAG, \"Output properties is not supported.\");\n }", "void addOrReplaceProperty(Property prop, Collection<Property> properties);", "void addProperties(Map<String, Object> propertiesListInput) {\n for (Map.Entry<String, Object> e : propertiesListInput.entrySet()) {\n if (properties.getProperty(e.getKey()) == null) {\n properties.addProperty(e.getKey(), e.getValue());\n }\n }\n }", "void addPropertyListener(PropertyListener listener);", "public\tvoid\tsetAddedProperties(List<JsClass.Property> addedProperties) {\n\t\tthis.addedProperties = addedProperties;\n\t}", "public abstract void setProperties(Properties uprop);", "public void addProperty(String s, Object o) {\n }", "public void addProperty(String s, Object o) {\n }", "public void addProperty(SGFProperty property)\r\n\t{\r\n\t\t_propertyList.add(property);\r\n\t}", "@Override\r\n\tpublic void setProperty(Properties prop) {\n\t}", "public void addProperty(final IConfigDTO property) {\n \t\tAssert.paramNotNull(property, \"property\"); //$NON-NLS-1$\n \t\tif (property instanceof ComplexConfigDTO) {\n \t\t\taddComplexProperty((ComplexConfigDTO) property);\n \t\t} else if (property instanceof ConfigSetDTO) {\n \t\t\taddSetProperty((ConfigSetDTO) property);\n \t\t} else if (property instanceof ConfigListDTO) {\n \t\t\taddListProperty((ConfigListDTO) property);\n \t\t} else if (property instanceof ConfigMapDTO) {\n \t\t\taddMapProperty((ConfigMapDTO) property);\n \t\t} else if (property instanceof ConfigSimpleValueDTO) {\n \t\t\taddSimpleValueProperty((ConfigSimpleValueDTO) property);\n \t\t} else {\n \t\t\tthrow new IllegalArgumentException(\"Got unknown property: \" + property); //$NON-NLS-1$\n \t\t}\n \t}", "public final void add(final InterfacePersonne per) {\n\t\tSystem.out.println(this.personnel.contains(per));\n\t\tpersonnel.add(per);\n\t}", "public void setInlineProperties(final EntityProviderWriteProperties inlineProperties) {\n this.inlineProperties = inlineProperties;\n }", "public MicrocontrollerProperties(int is, int ss, int fs, int es, int np, int ni, CodeSegment.Factory csf, HashMap pa, RegisterLayout rl, HashMap inta) {\n ioreg_size = is;\n sram_size = ss;\n flash_size = fs;\n eeprom_size = es;\n num_pins = np;\n num_interrupts = ni;\n\n codeSegmentFactory = csf;\n\n ioreg_name = new String[is];\n interrupt_name = new String[ni];\n\n pinAssignments = pa;\n layout = rl;\n interruptAssignments = inta;\n\n initIORNames();\n initInterruptNames();\n }", "public void setProperties(Properties properties);", "public abstract void addPropertyChangeListener(IPropertyChangeListener listener);", "public Interfaces() {\r\n\t\tifaces = new HashMap<String, Interface>();\r\n\t}", "protected void addUserPropertiesAttribute() throws JspException\n\t{\n\t\tfinal RemoteUserPropertiesServiceTag parent = (RemoteUserPropertiesServiceTag) findAncestorWithClass(this, RemoteUserPropertiesServiceTag.class);\n\t\tif(parent == null)\n\t\t{\n\t\t\tthrow new JspTagException(\"UserPropertiesAttributeParameterTag must have a RemoteUserPropertiesServiceTag ancestor.\");\n\t\t}\n\t\t((RemoteUserPropertiesServiceTag) parent).addUserPropertiesAttribute(name, value);\n\t}", "public interface PropertyAccess extends FeatureCall\n{\n}", "public void buildSuperInterfacesInfo() {\n\t\twriter.writeSuperInterfacesInfo();\n\t}", "@ReactMethod\n public void registerSuperProperties(ReadableMap properties) {\n mixpanel.registerSuperProperties(this.readableMapToJson(properties));\n }", "public interface HasUiAttributes {\n}", "@Override\n\tpublic void generate() {\n\t\tJavaObject objectInterface = new JavaObject(interfaceType);\n\t\tif (hasFields() && getBean().get().isCompare()) {\n\t\t\tobjectInterface.addExtends(getComparableInterface());\n\t\t}\n\t\tif (bean.isExecutable()) {\n\t\t\tIJavaType type = resolve(IExecutableBean.class, bean.getReturnType());\n\t\t\tobjectInterface.addExtends(type);\n\t\t} else {\n\t\t\tIJavaType type = resolve(IBean.class);\n\t\t\tobjectInterface.addExtends(type);\n\t\t}\n\t\taddExtends(objectInterface);\n\t\tif (isImmutable()) {\n\t\t\tobjectInterface.addExtends(resolve(IImmutable.class));\n\t\t}\n\n\t\t// For each bean we generate a class\n\t\tJavaObject object = new JavaObject(classType);\n\t\tobject.addExtends(interfaceType);\n\t\taddExtends(object);\n\n\t\t// Add the fields, getters and setter methods\n\t\taddBlocks(object, objectInterface);\n\n\t\t// Done!\n\t\twrite(object);\n\t\twrite(objectInterface);\n\t}", "public InterfaceAbout() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\t}", "public void addElement(TLProperty element);", "@Override\r\n\tpublic void setProperties(Properties arg0) {\n\r\n\t}", "protected void addPropNames()\n{\n addPropNames(\"Visible\", \"X\", \"Y\", \"Width\", \"Height\", \"Roll\", \"ScaleX\", \"ScaleY\",\n \"Font\", \"TextColor\", \"FillColor\", \"StrokeColor\", \"URL\");\n}", "@Test(enabled = false)\n public void addPropertyInCompositionScreenTest() throws Exception {\n ResourceReqDetails vfMetaData = ElementFactory.getDefaultResourceByType(ResourceTypeEnum.VF, getUser());\n ResourceUIUtils.createVF(vfMetaData, getUser());\n\n ResourceGeneralPage.getLeftMenu().moveToCompositionScreen();\n\n CompositionPage.showPropertiesAndAttributesTab();\n List<PropertyTypeEnum> propertyList = Arrays.asList(PropertyTypeEnum.STRING, PropertyTypeEnum.INTEGER);\n int propertiesCount = CompositionPage.getProperties().size();\n for (PropertyTypeEnum prop : propertyList) {\n PropertiesUIUtils.addNewProperty(prop);\n }\n AssertJUnit.assertTrue(GeneralUIUtils.checkElementsCountInTable(propertiesCount + propertyList.size(), () -> CompositionPage.getProperties()));\n }", "@Override\n\tpublic void setProperties(Properties p) {\n\t\t\n\t}", "public com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface addNewImplementsInterface()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface target = null;\r\n target = (com.guidewire.datamodel.ImplementsInterfaceDocument.ImplementsInterface)get_store().add_element_user(IMPLEMENTSINTERFACE$10);\r\n return target;\r\n }\r\n }", "public static void setInterfaces(HashMap ínterfacehashmap) {\n\t\tDatabaseReading2JHotDraw3.interfacehashmapAlreadyImpl=ínterfacehashmap;\r\n\t\t\r\n\t}", "interface WithProperties {\n /**\n * Specifies the properties property: Properties of Cognitive Services account..\n *\n * @param properties Properties of Cognitive Services account.\n * @return the next definition stage.\n */\n WithCreate withProperties(AccountProperties properties);\n }", "void assignIDs(final BinaryPropertyListWriter out) {\n out.assignID(this);\n }", "public void addPropertyset(PropertySet ps) {\n propertySets.addElement(ps);\n }", "private void buildNetProperties() {\n\t\tint nofP, nofT, i;\n\t\tString s;\n\n\t\troot.add(netProperties);\n\t\tgetBasicNetProperty(woflan.InfoNofP, woflan.InfoPName, \"Places\",\n\t\t\t\tnetProperties);\n\t\tgetBasicNetProperty(woflan.InfoNofT, woflan.InfoTName, \"Transitions\",\n\t\t\t\tnetProperties);\n\t}", "private void populateInterfaceElements() {\n usernameTextView.setTypeface(Default.sourceSansProBold);\n userFullNameText.setTypeface(Default.sourceSansProLight);\n userFollowButton.setTypeface(Default.sourceSansProLight);\n\n setupUserProfilePicImageView();\n setupUsernameAndFullNameTextView();\n setupUserFollowButton();\n setupUserRelativeLayout();\n }", "public void addProperty(Property property)\r\n {\r\n m_values.add(property);\r\n }", "protected void addIana_propPropertyDescriptor(Object object) {\n\t\titemPropertyDescriptors\n\t\t\t\t.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),\n\t\t\t\t\t\tgetResourceLocator(), getString(\"_UI_tzpropOptional_iana_prop_feature\"),\n\t\t\t\t\t\tgetString(\"_UI_PropertyDescriptor_description\", \"_UI_tzpropOptional_iana_prop_feature\",\n\t\t\t\t\t\t\t\t\"_UI_tzpropOptional_type\"),\n\t\t\t\t\t\tICalPackage.Literals.TZPROP_OPTIONAL__IANA_PROP, true, false, false,\n\t\t\t\t\t\tItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));\n\t}", "private static HashMap<String, DefinedProperty> initDefinedProperties() {\n\t\tHashMap<String, DefinedProperty> newList = new HashMap<String, DefinedProperty>();\n\t\t// common properties\n\t\taddProperty(newList, \"name\", DefinedPropertyType.STRING, \"\", DefinedProperty.ANY, false, false);\n\t\taddProperty(newList, \"desc\", DefinedPropertyType.STRING, \"\", DefinedProperty.ANY, false, false);\n\t\t// implicit default properties\n\t\taddProperty(newList, \"donttest\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.ANY, false, false);\n\t\taddProperty(newList, \"dontcompare\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.ANY, false, false);\n\t\t// interface properties\n\t\taddProperty(newList, \"use_interface\", DefinedPropertyType.STRING, \"\", DefinedProperty.REGSET | DefinedProperty.REG |DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"use_new_interface\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.REGSET | DefinedProperty.REG |DefinedProperty.FIELD, false, false);\n\t\t// reg + regset properties\n\t\taddProperty(newList, \"js_superset_check\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.REGSET | DefinedProperty.REG, false, false);\n\t\taddProperty(newList, \"external\", DefinedPropertyType.SPECIAL, null, DefinedProperty.REGSET | DefinedProperty.REG, false, false);\n\t\taddProperty(newList, \"repcount\", DefinedPropertyType.NUMBER, \"1\", DefinedProperty.REGSET | DefinedProperty.REG, true, false); // hidden\n\t\t// regset only properties\n\t\taddProperty(newList, \"js_macro_name\", DefinedPropertyType.STRING, \"\", DefinedProperty.REGSET, false, false);\n\t\taddProperty(newList, \"js_macro_mode\", DefinedPropertyType.STRING, \"STANDARD\", DefinedProperty.REGSET, false, false);\n\t\taddProperty(newList, \"js_namespace\", DefinedPropertyType.STRING, \"\", DefinedProperty.REGSET, false, false);\n\t\taddProperty(newList, \"js_typedef_name\", DefinedPropertyType.STRING, \"\", DefinedProperty.REGSET, false, false);\n\t\taddProperty(newList, \"js_instance_name\", DefinedPropertyType.STRING, \"\", DefinedProperty.REGSET, false, false);\n\t\taddProperty(newList, \"js_instance_repeat\", DefinedPropertyType.NUMBER, \"1\", DefinedProperty.REGSET, false, false);\n\t\t// reg only properties\n\t\taddProperty(newList, \"category\", DefinedPropertyType.STRING, \"\", DefinedProperty.REG, false, false);\n\t\taddProperty(newList, \"js_attributes\", DefinedPropertyType.STRING, \"false\", DefinedProperty.REG, false, false);\n\t\taddProperty(newList, \"aliasedId\", DefinedPropertyType.STRING, \"false\", DefinedProperty.REG, true, false); // hidden\n\t\taddProperty(newList, \"regwidth\", DefinedPropertyType.NUMBER, \"32\", DefinedProperty.REG, false, false);\n\t\taddProperty(newList, \"uvmreg_is_mem\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.REG, false, false);\n\t\taddProperty(newList, \"cppmod_prune\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.REG, false, false);\n\t\taddProperty(newList, \"uvmreg_prune\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.REG, false, false);\n\t\t// signal properties\n\t\taddProperty(newList, \"cpuif_reset\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.SIGNAL, false, false);\n\t\taddProperty(newList, \"field_reset\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.SIGNAL, false, false);\n\t\taddProperty(newList, \"activehigh\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.SIGNAL, false, false);\n\t\taddProperty(newList, \"activelow\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.SIGNAL, false, false);\n\t\taddProperty(newList, \"signalwidth\", DefinedPropertyType.NUMBER, \"1\", DefinedProperty.SIGNAL, false, false);\n\t\t// fieldset only properties\n\t\taddProperty(newList, \"fieldstructwidth\", DefinedPropertyType.NUMBER, \"1\", DefinedProperty.FIELDSET, false, false);\n\t\t// field properties\n\t\taddProperty(newList, \"rset\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"rclr\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"woclr\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"woset\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"we\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"wel\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"swwe\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"swwel\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"hwset\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"hwclr\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"swmod\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"swacc\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"sticky\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"stickybit\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"intr\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"anded\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"ored\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"xored\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"counter\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"overflow\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"reset\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"fieldwidth\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"singlepulse\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"underflow\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"incr\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"decr\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"incrwidth\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"decrwidth\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"incrvalue\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"decrvalue\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"saturate\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"incrsaturate\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"decrsaturate\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"threshold\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"incrthreshold\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"decrthreshold\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"sw\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"hw\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"precedence\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"encode\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"resetsignal\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"mask\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"enable\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"haltmask\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"haltenable\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"halt\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"next\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"nextposedge\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"nextnegedge\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"maskintrbits\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false); \n\t\taddProperty(newList, \"satoutput\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"sub_category\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\taddProperty(newList, \"rtl_coverage\", DefinedPropertyType.BOOLEAN, \"false\", DefinedProperty.FIELD, false, false);\n\t\t\n\t\t// override allowed property set if input type is jspec\n\t\tif (Ordt.hasInputType(Ordt.InputType.JSPEC)) {\n\t\t\tputProperty(newList, \"sub_category\", DefinedPropertyType.STRING, \"\", DefinedProperty.REGSET | DefinedProperty.REG | DefinedProperty.FIELDSET | DefinedProperty.FIELD, false, false);\n\t\t\tputProperty(newList, \"category\", DefinedPropertyType.STRING, \"\", DefinedProperty.REGSET | DefinedProperty.REG, false, false);\n\t\t\tputProperty(newList, \"js_attributes\", DefinedPropertyType.STRING, \"\", DefinedProperty.REGSET | DefinedProperty.REG, false, false);\n\t\t\tputProperty(newList, \"regwidth\", DefinedPropertyType.NUMBER, \"32\", DefinedProperty.REGSET | DefinedProperty.REG, false, false);\n\t\t\tputProperty(newList, \"address\", DefinedPropertyType.NUMBER, null, DefinedProperty.REGSET | DefinedProperty.REG, false, false);\n\t\t\tputProperty(newList, \"arrayidx1\", DefinedPropertyType.NUMBER, null, DefinedProperty.REGSET | DefinedProperty.REG, true, false); // hidden\n\t\t\tputProperty(newList, \"addrinc\", DefinedPropertyType.NUMBER, null, DefinedProperty.REGSET | DefinedProperty.REG, true, false); // hidden\n\t\t}\t\t\n\n\t\treturn newList;\n\t}", "private void interfaceDeclaration(Modifier modify, Scope scope, String basename)\r\n {\r\n HashSet dummy = unresolved;\r\n ClassType x = new ClassType();\r\n x.modify = (x.modify & ~Keyword.CLASSSY.value) | Keyword.INTERFACESY.value;\r\n unresolved = x.unresolved;\r\n\r\n if (comment != null && comment.length() > 0)\r\n {\r\n x.comment = comment + '\\n';\r\n resetComment();\r\n }\r\n\r\n if (!scopeStack.contains(scope))\r\n scopeStack.add(scope);\r\n\r\n matchKeyword(Keyword.INTERFACESY);\r\n\r\n x.name = nextToken;\r\n\r\n //if (basename.compareTo(nextToken.string) != 0 && basename.length() > 0)\r\n // modify.access &= ~Keyword.PUBLICSY.value;\r\n\r\n modify.check(modify.interfaces | modify.access & (basename.compareToIgnoreCase(nextToken.string) != 0 && basename.length() > 0?~Keyword.PUBLICSY.value:-1));\r\n\r\n matchKeyword(Keyword.IDENTSY);\r\n\r\n declMember(scope, x);\r\n\r\n if (nextSymbol == Keyword.EXTENDSSY)\r\n {\r\n lookAhead();\r\n x.implement = typeList();\r\n }\r\n else\r\n x.implement = new ClassType[0];\r\n\r\n x.extend = new ClassType(\"Object\");//!!!!!!!!!!!!!!!!!!!\r\n x.scope = new Scope(scope, Scope.heap, x.name.string);\r\n\r\n if ((modify.cur & modify.constructors) == 0)\r\n modify.cur |= Keyword.PUBLICSY.value & modify.access;\r\n\r\n interfaceBody(modify, x);\r\n\r\n unresolved = dummy;\r\n writeList(x);\r\n }", "protected final void addPropNames(String ... theNames) { Collections.addAll(getPropertyNames(), theNames); }", "Properties modifyProperties(Properties properties);", "@Override\r\n\tpublic void interfaceMethod() {\n\t\tSystem.out.println(\"childClass - interfaceMethod\");\r\n\t\tSystem.out.println(\"Val of variable from interface: \" + DemoInterface.val );\r\n\t}", "public interface IPropertyMetadata\r\n{\r\n /**\r\n * This method gets the property metadata for this appender.\r\n *\r\n * @return The property metadata for this appender.\r\n */\r\n ArrayList<PropertyMetadata> getProperties();\r\n}", "interface Add {\n @InputDetail\n default void inputDetail() {\n or(mandatory(network().id()), mandatory(network().name()));\n optional(network().comment());\n optional(network().description());\n optional(network().ip().address());\n optional(network().ip().gateway());\n optional(network().ip().netmask());\n optional(network().mtu());\n optional(network().profileRequired());\n optional(network().stp());\n optional(network().vlan().id());\n optional(network().usages()[COLLECTION]);\n optional(network().externalProvider().id());\n optional(network().externalProviderPhysicalNetwork().id());\n optional(network().portIsolation());\n }\n @In @Out Network network();\n }", "void registerPart(Object part, Class<?>... implementedInterfaces);", "@Test\n\tpublic void addProperty() {\n\t\tXMLTagParser.addNewElement(\"Person\");\n\t\tXMLTagParser.editElement(\"Person\", \"residence\", \"milan\");\n\n\t\tXMLTagParser.editProperty(\"Person\", \"residence\", \"isRenting\", \"false\");\n\t\tassertEquals(XMLTagParser.getPropertyValueFromTag(\"Person\", \"residence\", \"isRenting\"), \"false\");\n\t\tXMLTagParser.editProperty(\"Person\", \"residence\", \"hasGarage\", \"true\");\n\t\tassertEquals(XMLTagParser.getPropertyValueFromTag(\"Person\", \"residence\", \"hasGarage\"), \"true\");\n\t}", "public void interfaceMethod() {\n\t\tSystem.out.println(\"overriden method from interface\");\t\t\r\n\t}", "@Override\n\n // <editor-fold defaultstate=\"collapsed\" desc=\" UML Marker \"> \n // #[regen=yes,id=DCE.E1700BD9-298C-DA86-4BFF-194B41A6CF5E]\n // </editor-fold> \n protected String getProperties() {\n\n return \"Size = \" + size + \", Index = \" + value;\n\n }", "@Override\n\tpublic void setProperties(Properties properties) {\n\t\tsuper.setProperties(properties);\n\t}", "public void addProperty(String key, String value);", "private void addAlmostAll(Hashtable props) {\n Enumeration e = props.keys();\n while (e.hasMoreElements()) {\n String key = e.nextElement().toString();\n if (\"basedir\".equals(key) || \"ant.file\".equals(key)) {\n // basedir and ant.file get special treatment in execute()\n continue;\n }\n \n String value = props.get(key).toString();\n // don't re-set user properties, avoid the warning message\n if (newProject.getProperty(key) == null) {\n // no user property\n newProject.setNewProperty(key, value);\n }\n }\n }", "private void populateInterfaceElements() {\n prismUserTextView.setTypeface(Default.sourceSansProBold);\n prismPostDateTextView.setTypeface(Default.sourceSansProLight);\n likesCountTextView.setTypeface(Default.sourceSansProLight);\n repostsCountTextView.setTypeface(Default.sourceSansProLight);\n\n setupPostUserUIElements();\n setupPostImageView();\n setupActionButtons();\n }", "public void setProperties(Properties properties) {\n this.properties=properties;\n }", "public void setProperties(Properties properties)\n {\n this.properties = properties;\n }", "private void setData() {\n populateInterfaceElements();\n }", "@Override\n public void addConfigurationProperties(Properties properties) {\n this.properties.putAll(properties);\n\n suppressDate = StringUtility.isTrue(properties.getProperty(PropertyRegistry.COMMENT_GENERATOR_SUPPRESS_DATE));\n\n suppressAllComments = StringUtility.isTrue(properties.getProperty(PropertyRegistry.COMMENT_GENERATOR_SUPPRESS_ALL_COMMENTS));\n\n }", "DefinedProperty graphAddProperty( int propertyKey, Object value );", "protected void addIcpPortPropertyDescriptor(Object object) {\n\t\titemPropertyDescriptors\n\t\t\t\t.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),\n\t\t\t\t\t\tgetResourceLocator(), getString(\"_UI_WebsphereServerTask_icpPort_feature\"),\n\t\t\t\t\t\tgetString(\"_UI_PropertyDescriptor_description\", \"_UI_WebsphereServerTask_icpPort_feature\",\n\t\t\t\t\t\t\t\t\"_UI_WebsphereServerTask_type\"),\n\t\t\t\t\t\tServerPackage.Literals.WEBSPHERE_SERVER_TASK__ICP_PORT, true, false, false,\n\t\t\t\t\t\tItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null));\n\t}", "public static void addInterfaces(Model model) throws MolgenisModelException\r\n\t{\r\n\t\tlogger.debug(\"add root entities for interfaces...\");\r\n\t\tfor (Entity entity : model.getEntities())\r\n\t\t{\r\n\t\t\t// Generate the interface if rootAncestor (so has subclasses) and\r\n\t\t\t// itself is not an interface...\r\n\t\t\tif (entity.isRootAncestor())\r\n\t\t\t{\r\n\t\t\t\tEntity rootAncestor = entity;\r\n\t\t\t\tif (!entity.isAbstract())\r\n\t\t\t\t{\r\n\r\n\t\t\t\t\t// generate a new interface\r\n\t\t\t\t\trootAncestor = new Entity(\"_\" + entity.getName() + \"Interface\", entity.getName(),\r\n\t\t\t\t\t\t\tmodel.getDatabase());\r\n\t\t\t\t\trootAncestor\r\n\t\t\t\t\t\t\t.setDescription(\"Identity map table for \"\r\n\t\t\t\t\t\t\t\t\t+ entity.getName()\r\n\t\t\t\t\t\t\t\t\t+ \" and all its subclasses. \"\r\n\t\t\t\t\t\t\t\t\t+ \"For each row that is added to \"\r\n\t\t\t\t\t\t\t\t\t+ entity.getName()\r\n\t\t\t\t\t\t\t\t\t+ \" or one of its subclasses, first a row must be added to this table to get a valid primary key value.\");\r\n\t\t\t\t\t// rootAncestor.setAbstract( true );\r\n\r\n\t\t\t\t\t// copy key fields to interface and unset auto key in child\r\n\t\t\t\t\tVector<Field> keyfields = entity.getKey(0).getFields();\r\n\t\t\t\t\tVector<String> keyfields_copy = new Vector<String>();\r\n\t\t\t\t\tfor (Field f : keyfields)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tField key_field = new Field(rootAncestor, f.getType(), f.getName(), f.getName(), f.isAuto(),\r\n\t\t\t\t\t\t\t\tf.isNillable(), f.isReadOnly(), f.getDefaultValue());\r\n\t\t\t\t\t\tkey_field.setDescription(\"Primary key field unique in \" + entity.getName()\r\n\t\t\t\t\t\t\t\t+ \" and its subclasses.\");\r\n\t\t\t\t\t\tif (key_field.getType() instanceof StringField) key_field.setVarCharLength(key_field\r\n\t\t\t\t\t\t\t\t.getVarCharLength());\r\n\t\t\t\t\t\trootAncestor.addField(key_field);\r\n\t\t\t\t\t\tkeyfields_copy.add(key_field.getName());\r\n\r\n\t\t\t\t\t\tif (f.isAuto())\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t// unset auto key in original, but\r\n\r\n\t\t\t\t\t\t\t// SOLVED BY TRIGGERS Field autoField =\r\n\t\t\t\t\t\t\t// entity.getField(f.getName());\r\n\t\t\t\t\t\t\t// SOLVED BY TRIGGERS autoField.setAuto(false);\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\trootAncestor.addKey(keyfields_copy, entity.getKey(0).isSubclass(), null);\r\n\r\n\t\t\t\t\tVector<String> parents = new Vector<String>();\r\n\t\t\t\t\tparents.add(rootAncestor.getName());\r\n\t\t\t\t\tentity.setParents(parents);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// add the type enum to the root element\r\n\t\t\t\tVector<Entity> subclasses = entity.getAllDescendants();\r\n\t\t\t\tVector<String> enumOptions = new Vector<String>();\r\n\t\t\t\tenumOptions.add(entity.getName());\r\n\t\t\t\tfor (Entity subclass : subclasses)\r\n\t\t\t\t{\r\n\t\t\t\t\tenumOptions.add(subclass.getName());\r\n\t\t\t\t}\r\n\t\t\t\tField type_field = new Field(rootAncestor, new EnumField(), Field.TYPE_FIELD, Field.TYPE_FIELD, true,\r\n\t\t\t\t\t\tfalse, false, null);\r\n\t\t\t\ttype_field.setDescription(\"Subtypes of \" + entity.getName() + \". Have to be set to allow searching\");\r\n\t\t\t\ttype_field.setEnumOptions(enumOptions);\r\n\t\t\t\ttype_field.setHidden(true);\r\n\t\t\t\trootAncestor.addField(0, type_field);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void addProperty(String name, PropertyObject data) {\n this.properties.put(name, data);\n }", "void addProperty(String index, Object value) {\n if (getProperty(index) == null) {\n properties.addProperty(index, value);\n }\n }", "@ReactMethod\n public void registerSuperPropertiesOnce(ReadableMap properties) {\n mixpanel.registerSuperPropertiesOnce(this.readableMapToJson(properties));\n }", "public static void addProperty(String[] attribs) {\n int mls = Integer.parseInt(attribs[2]); \n int zip = Integer.parseInt(attribs[7]);\n int numBedrooms = Integer.parseInt(attribs[8]);\n double numBathrooms = Double.parseDouble(attribs[9]);\n boolean isSold;\n if(attribs[10].toUpperCase().equals(\"Y\")) {\n isSold = true;\n } else {\n isSold = false;\n }\n double askingPrice = Double.parseDouble(attribs[11]);\n Property property = new Property(mls, attribs[3], attribs[4],\n attribs[5], attribs[6], zip, numBedrooms, numBathrooms, isSold,\n askingPrice);\n String added = propertyLogImpl.add(property) ? \"added\" : \"not added\";\n System.out.println(\"Property \" + added);\n }", "void addPropertyCB(int property) {\n properties_[property].logNum++;\n properties_[property].logTotal++;\n }", "final private void setupAttributes() {\r\n\t\tmAttributes.add(new com.org.multigear.mginterface.engine.Configuration.Attr(ATTR_BASE_DPI, DEFAULT_BASE_DPI));\r\n\t\tmAttributes.add(new com.org.multigear.mginterface.engine.Configuration.Attr(ATTR_BASE_DENSITY, DEFAULT_BASE_DENSITY));\r\n\t\tmAttributes.add(new com.org.multigear.mginterface.engine.Configuration.Attr(ATTR_BASE_SCREEN, DEFAULT_BASE_SCREEN));\r\n\t\tmAttributes.add(new com.org.multigear.mginterface.engine.Configuration.Attr(ATTR_PROPORTION_FROM, DEFAULT_PROPORTION_FROM));\r\n\t\tmAttributes.add(new com.org.multigear.mginterface.engine.Configuration.Attr(ATTR_PROPORTION_MODE, DEFAULT_PROPORTION_MODES));\r\n\t\tmAttributes.add(new com.org.multigear.mginterface.engine.Configuration.Attr(ATTR_BACKGROUND_COLOR, DEFAULT_BACKGROUND_COLOR));\r\n\t\tmAttributes.add(new com.org.multigear.mginterface.engine.Configuration.Attr(ATTR_CALIBRATE_DPI, DEFAULT_CALIBRATE_DPI));\r\n\t\tmAttributes.add(new com.org.multigear.mginterface.engine.Configuration.Attr(ATTR_RESTORER_NOTIFICATION, new Object()));\r\n\t}", "@BeforeTest\n\t\tpublic void propCalling() throws IOException\n\t\t{\n\t\t\t\n\t\t\tIntializingProperties();\n\t\t}", "public void initEventsAndProperties() {\r\n }" ]
[ "0.6650811", "0.61899376", "0.60733753", "0.6004574", "0.60013086", "0.5965772", "0.5950865", "0.58732146", "0.57373345", "0.56887084", "0.56581795", "0.56465465", "0.5624443", "0.5609929", "0.56069386", "0.5562379", "0.55613154", "0.5527865", "0.5449682", "0.5442558", "0.54336244", "0.53864926", "0.5373833", "0.5356887", "0.5337794", "0.53110075", "0.53030485", "0.52975154", "0.5293873", "0.52904665", "0.526678", "0.52492285", "0.5235852", "0.523279", "0.5232299", "0.522602", "0.5191193", "0.5169676", "0.5161999", "0.5158216", "0.5158216", "0.51397467", "0.5138301", "0.5135929", "0.5133335", "0.5103913", "0.51002663", "0.5095918", "0.5094868", "0.50891894", "0.5086331", "0.5082365", "0.5059731", "0.50500107", "0.5046969", "0.5046481", "0.50402933", "0.50360906", "0.5034202", "0.50147784", "0.5006421", "0.50012094", "0.49877867", "0.49712557", "0.49709895", "0.49577355", "0.4950064", "0.49440923", "0.49258018", "0.49252734", "0.49180117", "0.49079025", "0.4907055", "0.48791274", "0.48752904", "0.48732412", "0.48679584", "0.48648995", "0.4859574", "0.48556024", "0.48529607", "0.48451263", "0.4844126", "0.48407802", "0.4835909", "0.4829382", "0.48274767", "0.482595", "0.48235226", "0.48230717", "0.48198286", "0.48112378", "0.479532", "0.4795318", "0.47832006", "0.47811556", "0.4781118", "0.47807634", "0.4780001", "0.47791156", "0.47711828" ]
0.0
-1
add components to interface.
private void addComponents() { int x = 10; int y = 10; int stepY = 25; addFrequencyRouter(x,y); y = y + stepY; addFrequencyIpInput(x,y); y = y + stepY; addFrequencyIpOutput(x,y); y = y + stepY; addOk(x+80,y); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void addComponents();", "public void addComponents(Component... components);", "public void addComponents(final Component... components) {\r\n\t\t_hSplit.addComponents(components);\r\n\t}", "private void addComponents() {\n LOOGER.info(\"Get add Components Entry\");\n // Adding loadButton to first row.\n this.add(loadButton);\n\n // Adding fillButton to first row.\n this.add(fillButton);\n\n // Adding deleteButton to first row.\n this.add(deleteButton);\n LOOGER.info(\"add Components exit\");\n }", "private void addComponents() {\n\t\tadd(newGame);\n\t\tadd(nameLabel);\n\t\tadd(nameField);\n\t\tadd(addPlayer);\n\t\tadd(gameTextPane);\n\t\tadd(playGame);\t\n\t\tadd(takeTurn);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//v0.1.1 change\n\t}", "public void addComponents(){\n add(spelerIDLabel);\n add(typeLabel);\n add(codeLabel);\n add(heeftBetaaldLabel);\n\n add(spelerIDField);\n add(typeField);\n add(codeField);\n add(heeftBetaaldField);\n\n add(klaarButton);\n add(terugButton);\n\n }", "public void addComponent(Component c);", "void addComponent(Component component);", "public void addComponentsToContainer()\n {\n\t container.add(welcome);\n container.add(amountLabel);\n container.add(amountText);\n container.add(depositButton);\n }", "public void addComponents(){\r\n\r\n\t\t\tfor(int i=0; i < fieldNum ; i++){ \r\n\t\t\t\tadd(labels[i]);\r\n\t\t\t\tif(i==3){\r\n\t\t\t\t\tadd(fields[i]);\r\n\t\t\t\t\tfor(int k=1;k<ingredientFields.size();k++)\r\n\t\t\t\t\t\tadd(ingredientFields.get(k));\r\n\t\t\t\t}\r\n\t\t\t\telse \r\n\t\t\t\t\tadd(fields[i]);\r\n\t\t\t}\r\n\r\n\t\t}", "public void addComponentsToContainer() {\n container.add(userLabel);\n container.add(passwordLabel);\n container.add(userTextField);\n container.add(passwordField);\n container.add(loginButton);\n container.add(exitButton);\n\n }", "public void add(Component c){}", "private void addComponents() {\r\n\t\t// initialize properties and add.\r\n\t\tthis.add(initializeChatArea(), BorderLayout.CENTER);\r\n\t\tthis.add(initializeSubPanel(), BorderLayout.SOUTH);\r\n\t}", "public abstract void add(KitComponent component);", "private void addComponents()\n\t{\n\t\tPrinter currentPrinter;\n\t\tadd(m_ResultHeader);\n\t\tfor(int i = 2; i <= m_PrinterList.getNumberOfPrinters()+1; i++)\n\t\t{\n\t\t\t// Convert values to Strings\n\t\t\tcurrentPrinter = m_PrinterList.getPrinter(i-2);\n\t\t\tadd(new PrinterLabel(i,MenuWindow.FRAME_WIDTH , MenuWindow.FRAME_HEIGHT,\n\t\t\t\t\tcurrentPrinter.getPrinterName()+ \"\",\n\t\t\t\t\tcurrentPrinter.getVendor(),\n\t\t\t\t\tcurrentPrinter.getTension()+ \"\",\n\t\t\t\t\tcurrentPrinter.getCompression()+ \"\",\n\t\t\t\t\tcurrentPrinter.getImpact()+ \"\",\n\t\t\t\t\tcurrentPrinter.materialsString(),\n\t\t\t\t\tcurrentPrinter.getTolerance()+ \"\",\n\t\t\t\t\tcurrentPrinter.getFinish()+ \"\", true));\n\t\t}\n\t}", "@Override\npublic void add(VirtualContainer parent, VirtualComponent comp, int pos) {\n\t\n}", "@Override\npublic void add(VirtualComponent comp, int pos) {\n\t\n}", "private void addComponents() {\n //this.getContentPane().add(new ViewDeckComputer(), BorderLayout.NORTH);\n createTopPanel();\n createCentralPanel();\n createBottomPanel();\n }", "public void addComponent(Component component){\n components.add(component);\n }", "private void addComponents() {\n\t\tthis.add(btn_pause);\n\t\tthis.add(btn_continue);\n\t\tthis.add(btn_restart);\n\t\tthis.add(btn_rank);\n\t\tif(Config.user.getUsername().equals(\"root\")) {\n\t\t\tthis.add(btn_admin);\n\t\t}\n\t\n\t\t\n\t}", "public static void addComponents(){\n navBar.add(heading);\n navBar.add(logoutBtn);\n navBar.setLayout(new BorderLayout());\n panel.add(navBar);\n panel.add(industrys);\n panel.setLayout(new BorderLayout());\n }", "@Override\n public void addComponents()\n {\n // create the midi device label\n label = new JLabel(ResourceBundle.getString(\"dialog.goto.section.label.section\"));\n spinner = new JSpinner(new SpinnerNumberModel(section, 1, numSectionsInSong, 1));\n\n spinner.setToolTipText(ResourceBundle.getString(\"dialog.goto.section.tooltip.section\"));\n // disable keyboard editor in the spinner\n JFormattedTextField tf = ((JSpinner.DefaultEditor)spinner.getEditor()).getTextField();\n tf.setEditable(false);\n // the previous call sets the background to a disabled color (usually gray). to change this disabled color, reset the background color.\n tf.setBackground(Color.white);\n\n // set the layout manager\n JPanel controlsPanel = getControlsPanel();\n GroupLayout layout = new GroupLayout(controlsPanel);\n controlsPanel.setLayout(layout);\n controlsPanel.setBorder(BorderFactory.createTitledBorder(\"\"));\n\n layout.setHorizontalGroup(\n layout.createParallelGroup(GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(label)\n .addPreferredGap(LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(spinner, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE, GroupLayout.PREFERRED_SIZE)\n .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(GroupLayout.Alignment.BASELINE)\n .addComponent(label)\n .addComponent(spinner, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n .addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n // invoke the layout manager\n pack();\n }", "@Override\n\tpublic void add(Component comp) {\n\t\t_childComponents.add(comp);\n\t}", "private void addComponents(Container content){\r\n\r\n content.add(getRentPane());\r\n content.add(getSellPane());\r\n\r\n }", "protected void installComponents() {\n }", "public void addComponentsToPanel() {\n\t\tpanel.add(backBtn);\n\t\tpanel.add(forgotPassword);\n\t\tpanel.add(txtPass);\n\t\tpanel.add(txtSendEmail);\n\t\tpanel.add(remindMeBtn);\n\n\t\tpanel.add(backgroundLabel);\n\t}", "public void addComponents()\r\n\t{\n\t\tSteveTechFarming.fruit = new BlockFruit(SteveTechFarming.config.getBlockID(1202, \"Fruit\", null)).setBlockName(\"WiduX-SteveTech-Farm-Fruit\");\r\n\t\tSteveTechFarming.crops = new BlockCrops(SteveTechFarming.config.getBlockID(1203, \"Crops\", null)).setBlockName(\"WiduX-SteveTech-Farm-Crops\");\r\n\t\t\r\n\t\tSteveTechFarming.seeds = new ItemSeeds(SteveTechFarming.config.getItemID(11000, \"Seeds\", null)).setItemName(\"WiduX-SteveTech-Farm-Seeds\");\r\n\t\tSteveTechFarming.harvestedItems = new ItemHarvest(SteveTechFarming.config.getItemID(11002, \"Harvest\", null)).setItemName(\"WiduX-SteveTech-Farm-Harvest\");\r\n\t\tSteveTechFarming.creativeTools = new ItemCreativeTools(SteveTechFarming.config.getItemID(11001, \"Creative Tools\", null)).setItemName(\"WiduX-SteveTech-Farm-CTools\");\r\n\t\tSteveTechFarming.foods = new Item[EnumFood.getNumberFoods()];\r\n\t\tint firstFoodItemID = SteveTechFarming.config.getItemID(11003, \"Foods Array\", \"This is the first item ID in the list of foods. Item IDs used will start here, and use the next \" + EnumFood.getNumberFoods() + \" IDs. Make sure they are all available.\");\r\n\t\tfor(int idOffset = 0; idOffset < SteveTechFarming.foods.length; idOffset++)\r\n\t\t{\r\n\t\t\tEnumFood food = EnumFood.getFood(idOffset);\r\n\t\t\tSteveTechFarming.foods[idOffset] = new ItemSTFood(firstFoodItemID + idOffset, food).setItemName(\"WiduX-SteveTech-Farm-Foods-Food\" + idOffset);\r\n\t\t}\r\n\t}", "private void addComponents() {\n gbc.anchor = GridBagConstraints.EAST;\n addComponent(lblName, 0, 0, 1);\n addComponent(lblDay, 0, 1, 1);\n addComponent(lblMonth, 0, 2, 1);\n addComponent(lblTime, 0, 5, 1);\n addComponent(lblDuration, 0, 6, 1);\n gbc.anchor = GridBagConstraints.WEST;\n addComponent(txtName, 1, 0, 1);\n addComponent(cmbDay, 1, 1, 1);\n addComponent(cmbMonth, 1, 2, 1);\n addComponent(radSelectTime, 1, 3, 1);\n addComponent(radAutoTime, 1, 4, 1);\n addComponent(cmbTime, 1, 5, 1);\n addComponent(cmbDuration, 1, 6, 1);\n gbc.anchor = GridBagConstraints.CENTER;\n addComponent(btnSubmit, 0, 7, 2);\n }", "public void addControls() {\n }", "public void addComponent(String name, Component newComp);", "protected void installComponents() {\n\t}", "public RegisterComponents()\n\t{\n\t\tsetLayout(new BorderLayout(0, 20));\n\n\t\t/*\n\t\tdocumentation on gridBagConstraint: \n\t\thttps://docs.oracle.com/javase/tutorial/uiswing/layout/gridbag.html\n\t\t*/\n\n\t\t// following methos add the labels and textfields to the panel\n\n\t\tdispCompFirstName();\n\t\tdispCompLastName();\n\t\tdispCompRoomNo();\n\t\tdispCompPhone();\n\t\tdispCompStudentID();\n\t\tdispCompCreatePass();\n\t\tdispCompConfirmPass();\n\n\t\t// the textfield added from above methods are resized via method componentResized()\n\n\t\t// this listens for resize events\n\t\taddComponentListener(this);\n add(compPanel, \"North\");\n\t}", "private void addComponents() {\n\t\t\n\t\t// prima riga di lettere\n\t\tfor (int i = 0; i < 10; i++)\n\t\t\tadd(letterLabel(i));\n\t\t\t\n\t\t/* la scacchiera ha l'oringine 0,0 in basso a sinistra\n\t\t * mentre la griglia si riempie di elementi dall'alto\n\t\t * percio' il for delle x (j) cresce mentre popoliamo le celle (bottoni)\n\t\t * mentre il for delle y (i) decresce man mano che passiamo di riga in riga */\n\t\tfor (int i = 7; i >= 0; i--)\n\t\t\tfor (int j = 0; j < 10; j++) {\n\t\t\t\tif (j == 0 || j == 9)\n\t\t\t\t\tadd(numberLabel(i + 1));\n\t\t\t\telse\n\t\t\t\t\tadd(buttons[j - 1][i]);\n\t\t\t}\n\t\t\n\t\t// ultima riga (uguale alla prima)\n\t\tfor (int i = 0; i < 10; i++)\n\t\t\tadd(letterLabel(i));\n\t}", "protected void addComponents() {\n JPanel contentPanel = new JPanel();\n contentPanel.setLayout(new GridBagLayout());\n GridBagConstraints c = new GridBagConstraints();\n c.insets = new Insets(5, 5, 5, 5);\n\n addFront(contentPanel, c);\n addBack(contentPanel, c);\n addTag(contentPanel, c);\n\n addButtons(contentPanel, c);\n\n add(contentPanel);\n }", "public void addComponents(boolean isRefresh){\n\t\tif( isRefresh ){\n\t\t\tcontainer.remove( splitPane[1] );\n\t\t\tcontainer = new Container();\n\t\t}\n\n\t\tcontainer = getContentPane();\n\t\tcontainer.setLayout( new GridLayout(1, 2, 5, 5) );\n\n\t\tbuildControls();\n\n\t\tbuildInterface(0, true);\n\t\tbuildInterface(1, false);\n\n\t\tsplitPane[0] = new JSplitPane( JSplitPane.VERTICAL_SPLIT, true, cardPanel[0], cardPanel[1] );\n\t\tsplitPane[0].setDividerLocation(320);\n\t\tsplitPane[1] = new JSplitPane( JSplitPane.HORIZONTAL_SPLIT, true, playerPanel, splitPane[0] );\n\t\tsplitPane[1].setDividerLocation(200);\n\n\t\tfor(int i = 0; i < splitPane.length; i++){\n\t\t\tsplitPane[i].setOneTouchExpandable(true);\n\t\t}\n\n\t\tcontainer.add( splitPane[1] );\n\n\t\tif( isRefresh ){\n\t\t\tsetContentPane( container );\n\t\t\tvalidate();\n\t\t}\n\t}", "private void addComponentsToLayout() {\n//\t\tAdd the \"Add project\" button to the list\n\t\taddComponent(addProject);\n\t\t\n//\t\tIf the user don't have any projects, add the \"No projects\" label instead of the list\n\t\tif(projectRows.size() == 0){\n\t\t\taddComponent(new Label(T.get(\"LABEL_NO_PROJECTS_EXISTS\")));\n\t\t}\n//\t\tOtherwise add all project rows to the list\n\t\telse{\n\t\t\tfor (ProjectRow projectRow : projectRows) {\n\t\t\t\taddComponent(projectRow);\n\t\t\t}\n\t\t}\n\t\t\n\t\tmainView.selectProject();\n\t}", "private void addComponents(State s) {\n\t\t// Removes the components\n\t\tfor (Component c : this.getComponents())\n\t\t\tthis.remove(c);\n\n\t\t// Adds the components, when they are needed.\n\t\tif (s.equals(State.CLASS_COURSE_STUDENT_TASK)) {\n\t\t\tthis.add(lblSpacer1, BorderLayout.PAGE_START);\n\t\t\tthis.add(panelInfo, BorderLayout.LINE_START);\n\t\t\tthis.add(scroll, BorderLayout.CENTER);\n\t\t\tthis.add(pComment, BorderLayout.LINE_END);\n\t\t\tthis.add(lblSpacer7, BorderLayout.PAGE_END);\n\t\t} else if (s.equals(State.CLASS_COURSE_STUDENT)) {\n\t\t\tthis.add(lblSpacer1, BorderLayout.PAGE_START);\n\t\t\tthis.add(panelInfo, BorderLayout.LINE_START);\n\t\t\tthis.add(scroll, BorderLayout.CENTER);\n\t\t\tthis.add(lblSpacer5, BorderLayout.LINE_END);\n\t\t}\n\t}", "@Override\n\tpublic void add(Component component) {\n\t\tlist.add(component);\n\t}", "public void addContent(Component... components) {\n this.contentLayout.add(components);\n }", "private void iniciarComponentesInterface() {\n\t\tPanelchildren panelchildren = new Panelchildren();\r\n\t\tpanelchildren.setParent(this);\r\n\t\tlistBox = new Listbox();\r\n\t\tlistBox.setHeight(\"300px\");\r\n\t\tlistBox.setCheckmark(true);\r\n\t\tlistBox.setMultiple(false);\r\n\t\tlistBox.setParent(panelchildren);\r\n\t\tListhead listHead = new Listhead();\r\n\t\tlistHead.setParent(listBox);\r\n\t\tListheader listHeader = new Listheader(\"Projeto\");\r\n\t\tlistHeader.setParent(listHead);\r\n\r\n\t\t// Botões OK e Cancelar\r\n\t\tDiv div = new Div();\r\n\t\tdiv.setParent(panelchildren);\r\n\t\tdiv.setStyle(\"float: right;\");\r\n\t\tSeparator separator = new Separator();\r\n\t\tseparator.setParent(div);\r\n\t\tButton botaoOK = new Button(\"OK\");\r\n\t\tbotaoOK.addEventListener(\"onClick\", new EventListenerOK());\r\n\t\tbotaoOK.setWidth(\"100px\");\r\n\t\tbotaoOK.setStyle(\"margin-right: 5px\");\r\n\t\tbotaoOK.setParent(div);\r\n\t\tButton botaoCancelar = new Button(\"Cancelar\");\r\n\t\tbotaoCancelar.addEventListener(\"onClick\", new EventListenerCancelar());\r\n\t\tbotaoCancelar.setWidth(\"100px\");\r\n\t\tbotaoCancelar.setParent(div);\r\n\t}", "public void add(Component component) {\n\t\tcomponents.add(component);\n\t}", "public void addLayoutComponent(Component comp, Object constraints) {}", "private void createComponents() {\n\n add(createSetDataPanel(), BorderLayout.NORTH);\n add(createResourcesListAndButtonsPanel(), BorderLayout.CENTER);\n }", "private static void addComponent() throws Exception {\n\t\tList<Component> list_components = componentManager.showComponents();\n\t\tfor (Component components : list_components) {\n\t\t\tSystem.out.println(components);\n\t\t}\n\t\tInteger id = new Integer(0);\n\t\tboolean wrongtext = false;\n\t\tdo {\n\t\t\tSystem.out.println(\"Introduce the selected component's id\");\n\t\t\tdo {\n\t\t\t\ttry {\n\t\t\t\t\tid = Integer.parseInt(reader.readLine());\n\t\t\t\t\twrongtext = false;\n\t\t\t\t} catch (NumberFormatException ex) {\n\t\t\t\t\twrongtext = true;\n\t\t\t\t\tSystem.out.println(\"It's not a int, please enter a int.\");\n\t\t\t\t}\n\t\t\t} while (wrongtext);\n\t\t} while (componentManager.getComponent(id) == null);\n\t\tComponent toBeModified = componentManager.getComponent(id);\n\t\tSystem.out.println(toBeModified);\n\t\tint preexistingNumber = toBeModified.getNumberComponents();\n\t\tSystem.out.println(\"The number of components that are now avaiable are: \" + preexistingNumber);\n\t\t// System.out.println(\"Introduce the number of components you want to add: \");\n\t\tInteger numbercomponents = new Integer(0);\n\t\tboolean wrongtext1 = false;\n\t\tdo {\n\t\t\tSystem.out.println(\"Introduce the number of components you want to add: \");\n\t\t\ttry {\n\t\t\t\tnumbercomponents = Integer.parseInt(reader.readLine());\n\t\t\t\twrongtext1 = false;\n\t\t\t} catch (NumberFormatException ex) {\n\t\t\t\twrongtext1 = true;\n\t\t\t\tSystem.out.println(\"It's not a int, please enter a int.\");\n\t\t\t}\n\t\t} while (wrongtext1);\n\t\tint updatedNumber = preexistingNumber + numbercomponents;\n\t\t// Component updateComponent=new Component(updatedNumber);\n\t\ttoBeModified.setNumberComponents(updatedNumber);\n\t\tcomponentManager.update(toBeModified);\n\t}", "public interface IPanels {\n\n /**\n * Instantiate each component in the class\n */\n void instantiateComponents();\n\n /**\n * Add the components to the Panel in the correct order\n */\n void addComponents();\n}", "@Override\n\tpublic void addChild(IComponent c) {\n\t\tcomponents.add(c);\n\t}", "private void initComponent() {\n\t\taddGrid();\n\t\taddToolBars();\n\t}", "private void initComponents() {\n\t\t\n\t}", "private void initComponents() {\n\t\t\n\t}", "public void addComponent(String componentInterface, String target) {\n if (!_componentInterfaces.containsKey(componentInterface)) {\n _componentInterfaces.put(componentInterface, target);\n informListenersAboutChangedComponents();\n }\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "private void createUIComponents() {\n }", "public Pane add(Component ... comps) {\t\t\r\n\t\tfor(Component comp: comps) {\r\n\t\t\tcomponents.add(comp);\r\n\t\t\t\r\n\t\t\tif(comp instanceof ActionComponent) {\r\n\t\t\t\tactionComponents.add((ActionComponent) comp);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn this;\r\n\t}", "public abstract void addComponent(DrawingComponent component);", "@Override\n public void add(Component c) {\n children.add(c);\n }", "private void createUIComponents() {\n }", "private void agregarComponentes() {\n JButton botonEstudiante = new JButton(\"Estudiante\");\r\n JButton botonDocente = new JButton(\"Docente\");\r\n JButton botonEquipo = new JButton(\"Equipo\");\r\n\r\n botonEstudiante.addActionListener(new OyenteListaEstudiante(this));\r\n botonDocente.addActionListener(new OyenteListaDocente(this));\r\n botonEquipo.addActionListener(new OyenteListaEquipo(this));\r\n\r\n // crea objeto Box para manejar la colocación de areaConsulta y\r\n // botonEnviar en la GUI\r\n Box boxNorte = Box.createHorizontalBox();\r\n boxNorte.add(botonDocente);\r\n boxNorte.add(botonEstudiante);\r\n boxNorte.add(botonEquipo);\r\n\r\n // crea delegado de JTable para modeloTabla\r\n tablaDatosIngresdos = new JTable();\r\n add(boxNorte, BorderLayout.NORTH);\r\n\r\n add(new JScrollPane(tablaDatosIngresdos), BorderLayout.CENTER);\r\n\r\n }", "@Override\npublic void childComponentsAdditionStarted() {\n\t\n}", "private void initPluginComponents()\n {\n // Make sure that we don't miss any event.\n GuiActivator.getUIService().addPluginComponentListener(this);\n\n pluginPanelEast.setLayout(\n new BoxLayout(pluginPanelEast, BoxLayout.Y_AXIS));\n pluginPanelSouth.setLayout(\n new BoxLayout(pluginPanelSouth, BoxLayout.Y_AXIS));\n pluginPanelWest.setLayout(\n new BoxLayout(pluginPanelWest, BoxLayout.Y_AXIS));\n\n this.getContentPane().add(pluginPanelEast, BorderLayout.EAST);\n this.getContentPane().add(pluginPanelWest, BorderLayout.WEST);\n this.mainPanel.add(pluginPanelSouth, BorderLayout.SOUTH);\n\n // Search for plugin components registered through the OSGI bundle\n // context.\n Collection<ServiceReference<PluginComponentFactory>> serRefs;\n String osgiFilter\n = \"(|(\" + Container.CONTAINER_ID + \"=\"\n + Container.CONTAINER_CHAT_WINDOW.getID() + \")(\"\n + Container.CONTAINER_ID + \"=\"\n + Container.CONTAINER_CHAT_STATUS_BAR.getID() + \"))\";\n\n try\n {\n serRefs\n = GuiActivator.bundleContext.getServiceReferences(\n PluginComponentFactory.class,\n osgiFilter);\n }\n catch (InvalidSyntaxException ex)\n {\n serRefs = null;\n logger.error(\"Could not obtain plugin component reference.\", ex);\n }\n\n if ((serRefs != null) && !serRefs.isEmpty())\n {\n for (ServiceReference<PluginComponentFactory> serRef : serRefs)\n {\n PluginComponentFactory factory\n = GuiActivator.bundleContext.getService(serRef);\n Component comp\n = (Component)\n factory\n .getPluginComponentInstance(ChatWindow.this)\n .getComponent();\n\n // If this component has been already added, we have nothing\n // more to do here.\n if (comp.getParent() != null)\n return;\n\n Object borderLayoutConstraints\n = UIServiceImpl.getBorderLayoutConstraintsFromContainer(\n factory.getConstraints());\n\n addPluginComponent(\n comp,\n factory.getContainer(),\n borderLayoutConstraints);\n }\n }\n }", "public void manageComponent() {\n menu = new JMenuBar();\n mainbox = new JScrollPane();\n toolbox = new JPanel();\n paintBox = new JPanel();\n optionbox = new JPanel();\n statusbar = new JPanel();\n paintModule = new PaintModule();\n\n // component setting\n createToolBox(toolbox);\n createMenu(menu);\n createOptionBox(optionbox);\n createStatusBar(statusbar);\n this.setLayout(new BorderLayout());\n\n // add component to container\n paintBox.add(paintModule);\n mainbox.setViewportView(paintBox);\n\n\n this.add(menu, BorderLayout.NORTH);\n this.add(mainbox, BorderLayout.CENTER);\n this.add(toolbox, BorderLayout.WEST);\n this.add(optionbox, BorderLayout.EAST);\n this.add(statusbar, BorderLayout.SOUTH);\n\n }", "public void registerComponents() {\r\n awardAddDocumentForm = new AwardAddDocumentForm();\r\n ScreenFocusTraversalPolicy focusTraversalPolicy ;\r\n java.awt.Component components[] = {awardAddDocumentForm.cmbDocumentType,\r\n awardAddDocumentForm.txtDescription,\r\n awardAddDocumentForm.btnUpload,\r\n awardAddDocumentForm.btnOk,\r\n awardAddDocumentForm.btnCancel,\r\n awardAddDocumentForm.btnView};\r\n focusTraversalPolicy = new ScreenFocusTraversalPolicy(components);\r\n awardAddDocumentForm.setFocusTraversalPolicy(focusTraversalPolicy);\r\n awardAddDocumentForm.setFocusCycleRoot(true);\r\n awardAddDocumentForm.btnUpload.addActionListener(this);\r\n awardAddDocumentForm.btnCancel.addActionListener(this);\r\n awardAddDocumentForm.btnOk.addActionListener(this);\r\n awardAddDocumentForm.btnView.addActionListener(this);\r\n awardAddDocumentForm.cmbDocumentType.addActionListener(this);\r\n awardAddDocumentForm.txtDescription.setDocument(new LimitedPlainDocument(200));\r\n setEnableComponents();\r\n }", "public void addComponent(Component comp) {\n\t chatBox.add(comp);\n\t scrollPane.paintAll(getGraphics());\n\t scrollPane.getVerticalScrollBar().setValue(scrollPane.getVerticalScrollBar().getMaximum());\n\t repaint(); \n\t }", "@Override\r\n\t\t\tpublic void componentAdded(ContainerEvent arg0){}", "public void addLayoutComponent(Component comp, Object constraints) {\n\t\t\r\n\t}", "private void addComponentsToLayers() {\n JLayeredPane layer = getLayeredPane();\n layer.add(canvas, new Integer(1));\n layer.add(searchArea, new Integer(2));\n layer.add(searchButton, new Integer(2));\n layer.add(zoomInButton, new Integer(2));\n layer.add(zoomOutButton, new Integer(2));\n layer.add(fullscreenButton, new Integer(2));\n layer.add(showRoutePanelButton, new Integer(2));\n layer.add(routePanel, new Integer(2));\n layer.add(optionsButton, new Integer(2));\n layer.add(mapTypeButton, new Integer(2));\n layer.add(mapTypePanel, new Integer(2));\n layer.add(resultPane, new Integer(3));\n layer.add(resultStartPane, new Integer(3));\n layer.add(resultEndPane, new Integer(3));\n layer.add(iconPanel, new Integer(3));\n layer.add(optionsPanel, new Integer(2));\n layer.add(directionPane, new Integer(2));\n layer.add(closeDirectionList, new Integer(2));\n layer.add(travelTimePanel, new Integer(3));\n\n }", "public void addComponent(ComponentBase cdc) {\r\n// if (cdc instanceof ClassComponent) {\r\n// cdc = (ClassDiagramComponent) cdc;\r\n// }\r\n classDiagramComponents.add(cdc);\r\n }", "public void addLayoutComponent(String name, Component comp) {}", "public void addLayoutComponent(Component component, Object constraints) { }", "@Override\npublic void add(VirtualContainer parent, VirtualComponent comp,\n\t\tObjectAdapter childAdapter) {\n\t\n}", "@Override\r\n public void addLayoutComponent(String s, Component component) {\r\n\r\n }", "public void addComponent(Component c) {\n for (Component C : components) {\n if (c.getClass().equals(C.getClass())) {\n return;\n }\n }\n components.add(c);\n c.setObject(this);\n }", "private void addComponents(){\n GridBagConstraints constraints = new GridBagConstraints();\n constraints.anchor = GridBagConstraints.WEST;\n constraints.insets = new Insets(5, 5, 5, 5);\n constraints.fill = GridBagConstraints.BOTH;\n \n // Add components to the panel\n // Note>> the constraints are applied to both panels\n constraints.gridx = 0;\n constraints.gridy = 0; \n subPanel1.add(onDo1, constraints); // Add button to pane 1\n\n constraints.gridx = 1;\n subPanel1.add(onDo2, constraints); // Add button to pane 1\n \n constraints.gridx = 0;\n constraints.gridy = 1; \n subPanel1.add(onDo3, constraints); // Add button to pane 1\n subPanel2.add(l1, constraints); // Add button to pane 2\n \n constraints.gridx = 1;\n constraints.gridy = 1;\n subPanel1.add(onDo4, constraints); // Add button to pane 1\n \n\n // Set border for sub panel 1 \n subPanel1.setBorder(BorderFactory.createTitledBorder(\n BorderFactory.createEtchedBorder(), \"Events\"));\n \n // Set border for sub panel 2 \n subPanel2.setBorder(BorderFactory.createTitledBorder(\n BorderFactory.createEtchedBorder(), \"Debug\"));\n }", "private void addComponent(Container container,Component c,int x,int y,int width,int height)\n {\n c.setBounds(x,y,width,height);\n container.add(c);\n }", "private void createUIComponents() {\n editor = createEditor(project, document);\n splitter = new JBSplitter(0.4f);\n ((JBSplitter) splitter).setFirstComponent(editor.getComponent());\n// ((JBSplitter) splitter).setSecondComponent();\n }", "void instantiateComponents();", "void addPlugin(BaseComponentPlugin baseComponent);", "public void addToJPanel() {\r\n\t\tsave_objects.add(header);\r\n\t\tJLabel blank1 = new JLabel(\"\");\r\n\t\tsave_objects.add(blank1);\r\n\t\t\r\n\t\tsave_objects.add(title_lb);\r\n\t\tsave_objects.add(title);\r\n\t\t\r\n\t\tsave_objects.add(width_lb);\r\n\t\tsave_objects.add(width);\r\n\t\t\r\n\t\tsave_objects.add(height_lb);\r\n\t\tsave_objects.add(height);\r\n\t\t\r\n\t\tsave_objects.add(save);\r\n\t\tsave_objects.add(reset);\r\n\t\t\r\n\t\tsetAllFont();\r\n\t}", "private void addComponents(Container pane) {\n // Reset pane\n pane.removeAll();\n\n GridLayout mainLayout = new GridLayout(4,3);\n JPanel mainPanel = new JPanel();\n mainPanel.setLayout(mainLayout);\n\n // Setting up button sizes\n JButton b = new JButton(\"Filler button\");\n Dimension buttonSize = b.getPreferredSize();\n Dimension preferredSize = new Dimension(\n (int)(buttonSize.getWidth() * 7.5) + newGUI.maxGap,\n (int)(buttonSize.getHeight() * 3.5) + newGUI.maxGap * 2);\n mainPanel.setPreferredSize(preferredSize);\n\n // Add the main panel buttons\n mainPanel.add(commands);\n mainPanel.add(availableCommands);\n mainPanel.add(new JLabel());\n mainPanel.add(enterButton);\n\n pane.add(mainPanel, BorderLayout.NORTH);\n pane.add(new JSeparator(), BorderLayout.CENTER);\n }", "public void addLayoutComponent(String name, Component component) { }", "@Override\n\tpublic void addComponent(Component c) {\n\t\troot.addComponent(c);\n\t}", "public void addToJPanel() {\r\n\t\tedit_terrain.add(header);\r\n\t\tJLabel blank1 = new JLabel(\"\");\r\n\t\tedit_terrain.add(blank1);\r\n\t\t\r\n\t\tedit_terrain.add(add_terrain);\r\n\t\tJLabel blank2 = new JLabel(\"\");\r\n\t\tedit_terrain.add(blank2);\r\n\t\t\r\n\t\tedit_terrain.add(scale_lb);\r\n\t\tedit_terrain.add(scale);\r\n\t\t\r\n\t\tedit_terrain.add(shape_lb);\r\n\t\tedit_terrain.add(shape_cb);\r\n\t\t\r\n\t\tedit_terrain.add(material_lb);\r\n\t\tedit_terrain.add(material_cb);\r\n\t\t\r\n\t\tedit_terrain.add(colour_lb);\r\n\t\tedit_terrain.add(colour_cb);\r\n\t\t\r\n\t\tedit_terrain.add(position_x_lb);\r\n\t\tedit_terrain.add(position_x);\r\n\t\t\r\n\t\tedit_terrain.add(position_y_lb);\r\n\t\tedit_terrain.add(position_y);\r\n\t\t\r\n\t\tedit_terrain.add(apply_terrain);\r\n\t\tedit_terrain.add(reset_terrain);\r\n\t\t\r\n\t\tsetAllFont();\r\n\t}", "protected abstract Component addContent();", "private void buildComponents() {\r\n buildJMenuBar();\r\n setJMenuBar( gameBar );\r\n\r\n buildScorePanel();\r\n buildInfoPanel();\r\n\r\n getContentPane().add( scorePanel, \"North\" );\r\n getContentPane().add( infoPanel, \"South\" );\r\n }", "public void addPorts(){\n\t\t\n\t}" ]
[ "0.8110308", "0.76291", "0.7528954", "0.7423338", "0.73023736", "0.7270124", "0.71944183", "0.7136177", "0.707631", "0.7072569", "0.70177376", "0.69543636", "0.6924913", "0.69210726", "0.689107", "0.6870213", "0.6865313", "0.68324924", "0.67927223", "0.678168", "0.67276645", "0.66872597", "0.6652212", "0.6621212", "0.6621164", "0.66148096", "0.6597862", "0.6585599", "0.65741074", "0.6564711", "0.6556087", "0.64929265", "0.6421861", "0.6420252", "0.64033186", "0.6399696", "0.6375613", "0.6346921", "0.6344077", "0.63093364", "0.6297808", "0.6297257", "0.62856853", "0.62853634", "0.62558615", "0.6239259", "0.6223412", "0.6212436", "0.6212436", "0.62067795", "0.62009126", "0.62009126", "0.62009126", "0.62009126", "0.62009126", "0.62009126", "0.62009126", "0.62009126", "0.62009126", "0.62009126", "0.62009126", "0.62009126", "0.62009126", "0.62009126", "0.62009126", "0.62009126", "0.62009126", "0.62009126", "0.61989045", "0.61958677", "0.6186357", "0.61738664", "0.61694676", "0.6165658", "0.61579245", "0.61372364", "0.6087709", "0.6086967", "0.60846055", "0.60741615", "0.60688865", "0.6060108", "0.6047521", "0.604177", "0.60339904", "0.60295254", "0.6027429", "0.6026252", "0.60070086", "0.6002903", "0.5991689", "0.59792465", "0.5977003", "0.5974284", "0.59648407", "0.5960251", "0.5958306", "0.5925795", "0.5918459", "0.59038" ]
0.7077851
8
Execute an action associated to the selected event
public void actionPerformed(ActionEvent e) { if(e.getSource() == ok) { // Router Clock Clock c = new Clock(); String saidaf,saida,clock_unit; double clk; int total=0,x; saida = new String((String)routerclock.getSelectedItem()); int cont=0,inter=0; saidaf = new String(); /* Bloco que le o o label do clock */ while(saida.charAt(cont) != ' ') { saidaf = ""+saidaf+ saida.charAt(cont); cont++; } c.setLabelClockRouter(saidaf); //System.out.println("label_router : " + saidaf); saidaf=""; cont++; /* Bloco que le o clock do roteador */ while(saida.charAt(cont) != ' ') { saidaf = ""+saidaf+ saida.charAt(cont); cont++; } clk = Double.parseDouble(saidaf); // //System.out.println("clock_router : " + clk); cont++; saidaf=""; /* Bloco que le a unidade do clock do roteador */ while(cont < saida.length()) { saidaf = ""+saidaf+ saida.charAt(cont); cont++; } clock_unit = saidaf; // //System.out.println("clock_unit_router : " + clock_unit); c.setClockRouter(clk,clock_unit); c.setNumberRouter(r.getAddressX(),r.getAddressY()); // Ip Clock Input cont=0; saidaf=""; saida = new String((String)ipinputclock.getSelectedItem()); /* Bloco que le o o label do clock */ while(saida.charAt(cont) != ' ') { saidaf = ""+saidaf+ saida.charAt(cont); cont++; } c.setLabelClockIpInput(saidaf); //System.out.println("label_ip : " + saidaf); saidaf=""; cont++; /* Bloco que le o clock do roteador */ while(saida.charAt(cont) != ' ') { saidaf = ""+saidaf+ saida.charAt(cont); cont++; } clk = Double.parseDouble(saidaf); // //System.out.println("clock_ip : " + clk); cont++; saidaf=""; /* Bloco que le a unidade do clock do roteador */ while(cont < saida.length()) { saidaf = ""+saidaf+ saida.charAt(cont); cont++; } clock_unit = saidaf; // //System.out.println("clock_unit : " + clock_unit); c.setClockIpInput(clk,clock_unit); c.setNumberRouter(r.getAddressX(),r.getAddressY()); // Ip Clock Output cont=0; saidaf=""; saida = new String((String)ipoutputclock.getSelectedItem()); /* Bloco que le o o label do clock */ while(saida.charAt(cont) != ' ') { saidaf = ""+saidaf+ saida.charAt(cont); cont++; } c.setLabelClockIpOutput(saidaf); //System.out.println("label_ip : " + saidaf); saidaf=""; cont++; /* Bloco que le o clock do roteador */ while(saida.charAt(cont) != ' ') { saidaf = ""+saidaf+ saida.charAt(cont); cont++; } clk = Double.parseDouble(saidaf); // //System.out.println("clock_ip : " + clk); cont++; saidaf=""; /* Bloco que le a unidade do clock do roteador */ while(cont < saida.length()) { saidaf = ""+saidaf+ saida.charAt(cont); cont++; } clock_unit = saidaf; // //System.out.println("clock_unit : " + clock_unit); c.setClockIpOutput(clk,clock_unit); c.setNumberRouter(r.getAddressX(),r.getAddressY()); for(int i=0;i<project.getNoC().getNumRotX()*project.getNoC().getNumRotY();i++) { if(project.getNoC().getClock().get(i).getNumberRouter().equals(r.getAddress())) { project.getNoC().getClock().set(i,c); } } hermesg.getNoCPanel().setEnabled(true); super.dispose(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void actionPerformed(ActionEvent e) {\n String command = e.getActionCommand();\n \n if (command.equals(\"execute\")) {\n try {\n execute();\n } catch (PropertyVetoException pve) {}\n } else {\n if (Trace.isTracing(Trace.MASK_APPLICATION))\n {\n Trace.record(Trace.MASK_APPLICATION, BEANNAME, \"ActionEvent \" + e.toString());\n }\n }\n }", "public void executeAction( String actionInfo );", "public void selected(String action);", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\teventHandler.invoke(new HarvestSelectedEvent());\n\t\t}", "public void actionPerformed(ActionEvent e) {\n action.actionPerformed(e);\n }", "@Override\r\n\tpublic void performAction(Event e) {\n\r\n\t}", "public void toSelectingAction() {\n }", "@Override\n\tpublic void HandleEvent(int action) {\n\t\tsetActiveAction(action);\n\t\tSystem.out.println(\"action is :\" + action);\n\t\t\n\t}", "@Override\n\t\t\t\tpublic void handle(ActionEvent event) {\n\n\t\t\t\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n MenuItemCommand command = menuCommandHandler.getCommand(e.getActionCommand());\n if (command != null) {\n command.execute();\n return;\n }\n command = menuCommandHandler.getCommand(MenuItem.findMenuItem(e.getActionCommand()));\n if (command != null) command.execute();\n }", "@Override\n public void selectionChanged(SelectionChangedEvent event) {\n Iterator<String> iterator = selectionActions.iterator();\n while (iterator.hasNext()) {\n updateAction(iterator.next());\n }\n }", "public void action() {\n action.action();\n }", "void handleActionEvent(ActionEvent event);", "@Override\r\n\t\t\tpublic void handle(ActionEvent arg0) {\n\t\t\t}", "@Override\n\t\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t}", "@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t}", "@Override\n\tpublic void mouseClicked(MouseEvent arg0) {\n\t\tthis.model.doAction();\t\t\n\t}", "public void performAction() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n handleAction();\n }", "@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\n\t\t\t}", "@Override\r\n\tpublic void handle(ActionEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void execute(LiftEvent e) {\n\t\t\t\t\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void execute(LiftEvent e) {\n\t\t\t\t\r\n\t\t\t}", "public void actionPerformed(ActionEvent event) {\n this.actionPerformed(event);\n\n }", "public abstract void onAction();", "public void performAction();", "public String execute() {\n\t\ttry {\n\t\t\treturnMsg = MESSAGE_EVENT_ADDED;\n\t\t\tcheckEventClash();\n\t\t\tstoreEvent();\n\t\t\treturn returnMsg;\n\t\t} catch (IOException e) {\n\t\t\treturn MESSAGE_EVENT_ERROR;\n\t\t} finally {\n\t\t\tupdateView();\n\t\t\tMagical.setCurrentTab(\"events\");\n\t\t}\n\t}", "void invoke(T event);", "@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tSystem.out.print(\"Action: \" + e.getActionCommand() + \"\\n\");\n\t\t\t\t}", "public void trigger(Event event);", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tfireDetailEvent(new DetailEvent(this,'P'));\r\n\t\t\t}", "@Override\n\tpublic void execute() {\n\t\tempfaengerA.doAction1();\n\t\tempfaengerA.doAction2();\n\t\tempfaengerA.doAction3();\n\n\t}", "abstract public void performAction();", "public void actionPerformed(ActionEvent e) {\n\t\t\t\taddAction();\n\t\t\t}", "@Override\n\tpublic void action() {\n\t\tSystem.out.println(\"action now!\");\n\t}", "@Override\n public void run() {\n chosenActionUnit.run(getGame(), inputCommands);\n }", "public void handle(ActionEvent e) {\n\t\t\t\tCommandGroup cmd = new CommandGroup(getMe(), selection.getContents());\n\t\t\t\tcmd.execute();\n\t\t\t\tundoStack.addCommand(cmd);\n\t\t\t\tundoRedoChanged();\n\t\t\t\tboard.draw(canvas.getGraphicsContext2D());\n\t\t\t\t}", "@Override\n\tpublic void handle(ActionEvent event) {\n\n\t}", "public void act() \r\n {\r\n // Add your action code here.\r\n }", "public void act() \r\n {\r\n // Add your action code here.\r\n }", "public void actionPerformed( final ActionEvent pE ) \n {\n \n if(pE.getSource() == aEntryField){\n processCommand();\n }\n if(pE.getSource() == aButton1){\n this.aEngine.interpretCommand(\"look\");\n }\n if(pE.getSource() == aButton2){\n this.aEngine.interpretCommand(\"heal\");\n }\n if(pE.getSource() == aButton3){\n this.aEngine.interpretCommand(\"help\");\n }\n if(pE.getSource() == aButton4){\n this.aEngine.interpretCommand(\"quit\");\n }\n }", "@Override\n\t\t\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\t\tint eventSelection = eventOptions.getSelectionModel().getSelectedIndex();\n\t\t\t\t\t\tString description = new String(descriptionField.getText());\n\t\t\t\t\t\tdouble priceFactor = Double.parseDouble(priceFactorField.getText());\n\n\t\t\t\t\t\tif (eventSelection == 0) {\n\t\t\t\t\t\t\tConcert selection = new Concert(description, priceFactor);\n\t\t\t\t\t\t\tevents.add(selection);\n\t\t\t\t\t\t\tcounter++;\n\t\t\t\t\t\t\tmessage.setText(\"Concert event created.\\n\");\n\t\t\t\t\t\t} else if (eventSelection == 1) {\n\t\t\t\t\t\t\tPlay selection = new Play(description, priceFactor);\n\t\t\t\t\t\t\tevents.add(selection);\n\t\t\t\t\t\t\tcounter++;\n\t\t\t\t\t\t\tmessage.setText(\"Play event created.\\n\");\n\t\t\t\t\t\t} else if (eventSelection == 2) {\n\t\t\t\t\t\t\tMeeting selection = new Meeting(description, priceFactor);\n\t\t\t\t\t\t\tevents.add(selection);\n\t\t\t\t\t\t\tcounter++;\n\t\t\t\t\t\t\tmessage.setText(\"Meeting event created.\\n\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tmessage.setText(\"Please choose Concert, Play, or Meeting from the Event Options list.\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tprimaryStage.setTitle(\"Events\");\n\t\t\t\t\t\tprimaryStage.setScene(scene);\n\t\t\t\t\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tfireDetailEvent(new DetailEvent(this, 'R'));\r\n\t\t\t}", "public void actionPerformed( ActionEvent event )\n {\n \n }", "Answer perform(final String event);", "@Override\r\n protected void doActionDelegate(int actionId)\r\n {\n \r\n }", "private void handleSelect(MouseEvent event) {\n\t\tWidget widget = tree.getItem(new Point(event.x, event.y));\n\t\tif (!(widget instanceof TreeItem))\n\t\t\treturn;\n\t\tTreeItem item = (TreeItem) widget;\n\t\tObject o = item.getData();\n\t\tif (o == null)\n\t\t\treturn;\n\t\ttry {\n\t\t\tthis.action.handleAction(o);\n\t\t} catch (ApplicationException e) {\n\t\t\tGUI.getStatusBar().setErrorText(e.getMessage());\n\t\t}\n\t}", "public void actionPerformed(ActionEvent e)\n\t{\n\t\t//TODO: fill in method\n\t\t//taking note of e.getActionCommand()\n\t}", "public void selectionChanged(Action item);", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "public void act() \n {\n // Add your action code here.\n }", "@Override\n\tpublic void handle(ActionEvent event) {\n\t\t\n\t}", "public void doAction(){}", "public SoHandleEventAction getAction() { return eventAction; }", "public void actionPerformed(ActionEvent arg0) {\r\n\t\t\t}", "public void actionPerformed(ActionEvent arg0) {\n\t\t\t}", "public void actionPerformed(ActionEvent arg0) {\n\t\t\t}", "@Override public void handle(ActionEvent e)\n\t {\n\t }", "public abstract void executeActionButton();", "public void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\n\t\t\t}", "public void triggerEvent(Event event, BaseEntity command);", "public void selectionChanged(IAction action, ISelection selection) {\n }", "public void accept(ActionEvent event) {\r\n \tgetController().accept(event);\r\n }", "public void actionPerformed(ActionEvent event)\n\t{\n\t\tString command = event.getActionCommand();\n\n\t\tif (command.equals(Command.ACCEPT))\n\t\t\tonAccept();\n\n\t\telse if (command.equals(Command.CLOSE))\n\t\t\tonClose();\n\t}", "public void actionPerformed(ActionEvent e) {\n String command = e.getActionCommand();\n if (\"start\".equals(command)) {\n startWorld();\n } else if (\"next\".equals(command)) {\n nextWorld();\n } else if (\"previous\".equals(command)) {\n previousWorld();\n } else if (\"undo\".equals(command)) {\n undo();\n } else if (\"redo\".equals(command)) {\n redo();\n }\n }", "String getAction();", "String getAction();", "public void actionPerformed(ActionEvent e) {\r\n\t\t\t}", "public interface TriggerAction {\n\t\tpublic void click();\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tString ev = e.getActionCommand();\n\t\tif(ev.equals(\"Buscar Influyentes\")) {\n\t\t\tprincipal.buscarInfluyentes();\n\n\t\t}\n\t\telse if(ev.equals(\"Nivel De Alcance\")){\n\t\t\tprincipal.nivelDeAlcance();\n\t\t}\n\t\t\t\t\n\t\t\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tRun();\n\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t}", "public void actionPerformed(ActionEvent arg0) {\n\t\t\t\tSystem.out.println(\"156161\");\r\n\t\t\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tscore_click(e);\r\n\t\t\t}", "protected void dispatchEvent(AWTEvent event) {\n Object src = event.getSource();\n if (event instanceof ActiveEvent) {\n // This could become the sole method of dispatching in time.\n ((ActiveEvent)event).dispatch();\n } else if (src instanceof Component) {\n ((Component)src).dispatchEvent(event);\n } else if (src instanceof MenuComponent) {\n ((MenuComponent)src).dispatchEvent(event);\n } else {\n System.err.println(\"unable to dispatch event: \" + event);\n }\n }", "public void actionPerformed(ActionEvent arg0) {\n\t\t\t\ts.setTipusSoci((String)tipusCombo.getSelectedItem());\n\t\t\t\tmSoci.actualitzaSoci(s);\n\t\t\t}", "private void hookSingleClickAction() {\n\t\tthis.addSelectionChangedListener(new ISelectionChangedListener() {\n\t\t\tpublic void selectionChanged(SelectionChangedEvent event) {\n\t\t\t\tsingleClickAction.run();\n\t\t\t}\n\t\t});\n\t}", "public void actionPerformed(ActionEvent e) {\n\t\tadaptee.botonSalir_actionPerformed(e);\n\t}", "public void actionPerformed (ActionEvent e)\n\t\t\t\t\t{\n\t\t\t\t\talertChosen( row, col );\n\t\t\t\t\t}", "public void actionPerformed(ActionEvent event) {\n String command = event.getActionCommand();\n if (OK.equals(command)) {\n setResponse(new Integer(-1));\n } else {\n UnitType unitType = getSpecification().getUnitType(command);\n getController().trainUnitInEurope(unitType);\n initialize();\n }\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tstart_click(e);\r\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t}", "public void actionPerformed(ActionEvent ev)\r\n\t\t\t{\t\t\t\t\r\n\t\t\t\tviewJob();\t\t\t\t\r\n \t\t\t}", "@Override\n public void action() {\n }" ]
[ "0.71473014", "0.68913484", "0.6760697", "0.6717449", "0.6676978", "0.66656727", "0.6651873", "0.663388", "0.6629821", "0.6620106", "0.6614216", "0.6600685", "0.6598808", "0.6555304", "0.65447706", "0.65293396", "0.64744854", "0.64707816", "0.64678067", "0.6424664", "0.6424664", "0.63760626", "0.63657916", "0.63657916", "0.63594085", "0.6354003", "0.6341338", "0.63111734", "0.6310366", "0.63100314", "0.6277035", "0.6274776", "0.6272863", "0.62511533", "0.6239275", "0.6221231", "0.61954576", "0.6193985", "0.6189194", "0.61880547", "0.61880547", "0.6175415", "0.6163506", "0.6141574", "0.61358035", "0.6124716", "0.61212105", "0.6118482", "0.6118429", "0.6115753", "0.61125135", "0.61125135", "0.61125135", "0.61125135", "0.61125135", "0.61125135", "0.61125135", "0.61125135", "0.6111439", "0.6104832", "0.6104665", "0.61031884", "0.61031294", "0.61031294", "0.6102856", "0.6098079", "0.60962254", "0.60885626", "0.60885626", "0.6087408", "0.6058885", "0.6057631", "0.60567003", "0.60540277", "0.6051549", "0.6051549", "0.603872", "0.6037048", "0.6035919", "0.60283256", "0.60220915", "0.60199755", "0.6015226", "0.6013144", "0.6010602", "0.6010118", "0.600991", "0.6002413", "0.60014665", "0.6000774", "0.59992576", "0.5995953", "0.5995953", "0.5995953", "0.5995953", "0.5995953", "0.5995953", "0.5995953", "0.5995953", "0.5989556", "0.5988896" ]
0.0
-1
Creates a reader instance which takes input from standard input keyboard
public static void main(String[] args) { Scanner reader = new Scanner(System.in); System.out.print("Enter a number: "); // nextInt() reads the next integer from the keyboard int number = reader.nextInt(); // println() prints the following line to the output screen System.out.println("You entered: " + number); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public InputReader() {\n reader = new Scanner(System.in);\n }", "public MyInputStream()\n {\n in = new BufferedReader\n (new InputStreamReader(System.in));\n }", "protected String getInputFromConsole() throws IOException\n {\n BufferedReader consoleInput = new BufferedReader(new InputStreamReader(System.in));\n return consoleInput.readLine();\n }", "public String Get_Input()throws IOException{\r\n\t\tString input=\"\";\r\n\t\tInputStreamReader converter = new InputStreamReader(System.in);\r\n\t\tBufferedReader in = new BufferedReader(converter);\r\n\t\t\r\n\t\tinput = in.readLine();\r\n\t\t\r\n\t\treturn input;\r\n\t}", "OutputStream getStdin();", "public void read() {\n try {\n pw = new PrintWriter(System.out, true);\n br = new BufferedReader(new InputStreamReader(System.in));\n input = br.readLine();\n while (input != null) {\n CM.processCommand(input, pw, true);\n input = br.readLine();\n }\n } catch (IOException ioe) {\n pw.println(\"ERROR: Problem with reading user input.\");\n } finally {\n try {\n br.close();\n } catch (IOException ioe) {\n pw.println(\"ERROR: Buffer DNE\");\n }\n }\n }", "@Override\n\tpublic String read() \n\t{\n\t\tString res = \"\";\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tif (scan.hasNextLine())\n\t\t\tres = scan.nextLine();\n\t\t\n\t\treturn res;\n\t\t\n\n\t}", "String readInput() {\n Scanner scanner = new Scanner(System.in);\n return scanner.nextLine();\n }", "public static BufferedReader generateInputReader(String[] args) \n\t\t\tthrows IOException\n\t{\n\t\tif(args.length == 0)\n\t\t{\n\t\t\tInputStream stream = Main.class.getResourceAsStream(\"input.txt\");\n\t\t\treturn new BufferedReader(new InputStreamReader(stream));\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn new BufferedReader(new FileReader(args[0]));\n\t\t}\n\t}", "public static BufferedReader generateInputReader(String[] args) \n\t\t\tthrows IOException\n\t{\n\t\tif(args.length == 0)\n\t\t{\n\t\t\tInputStream stream = Main.class.getResourceAsStream(\"input.txt\");\n\t\t\treturn new BufferedReader(new InputStreamReader(stream));\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn new BufferedReader(new FileReader(args[0]));\n\t\t}\n\t}", "public RingFactoryTokenizer() {\n this(new BufferedReader(new InputStreamReader(System.in,Charset.forName(\"UTF8\"))));\n }", "public String getInput() throws IOException {\n\t\tSystem.out.print(\">> \");\n\t\treturn consoleIn.readLine();\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 static String readUserInput() {\n return in.nextLine();\n }", "public interface Input \n{\n\t/*\n\t * Use to initialise input\n\t */\n\tboolean initialise (String args);\n\t/*\n\t * Return a line or return null\n\t */\n\tString getLine ();\n\t\n}", "public static String readInput() {\r\n return SCANNER.nextLine();\r\n }", "public MyInput() {\r\n\t\tthis.scanner = new Scanner(System.in);\r\n\t}", "@Provides\r\n public DataInput provideInputReader() {\r\n DataInput input = null;\r\n final Reader inRdr = inReader;\r\n if ((inRdr != null) && (inputFormat != null)) {\r\n if (\"csv\".equalsIgnoreCase(inputFormat))\r\n input = new CSVDataInput(inRdr);\r\n else if (\"json\".equalsIgnoreCase(inputFormat))\r\n input = new JSONDataInput(inRdr);\r\n else\r\n throw new IllegalArgumentException(\"Input format \"\r\n + inputFormat + \" not supported.\"\r\n + \" Valid types are csv, json\");\r\n input.verboseOptions(verboseStream, verbose);\r\n }\r\n return input;\r\n }", "static String read ()\r\n \t{\r\n \t\tString sinput;\r\n \r\n \t\ttry\r\n \t\t{\r\n \t\t\tsinput = br.readLine();\r\n \t\t}\r\n \t\tcatch (IOException e)\r\n \t\t{\r\n \t\t\tErrorLog.addError(\"Input exception occured in command line interface!\");\r\n \t\t\treturn null; //Menu will exit when fed a null\r\n \t\t}\r\n \t\treturn sinput;\r\n \t}", "public TabbedLineReader openInput(File inFile) throws IOException {\n TabbedLineReader retVal;\n if (inFile == null) {\n log.info(\"Input will be taken from the standard input.\");\n retVal = new TabbedLineReader(System.in);\n } else if (! inFile.canRead())\n throw new FileNotFoundException(\"Input file \" + inFile + \" is not found or is unreadable.\");\n else {\n log.info(\"Input will be read from {}.\", inFile);\n retVal = new TabbedLineReader(inFile);\n }\n return retVal;\n }", "INPUT createINPUT();", "public CLI(String inputCommand)\r\n\t{\r\n\t\t//lvl = new Level();\r\n\t\tthis.inputCommand = inputCommand;\r\n\t\tin = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\r\n\t}", "public static void main(String[] args)\r\n\t\tthrows IOException\r\n\t{\n\t\tBufferedReader reader = new BufferedReader(\r\n\t\t\tnew InputStreamReader(System.in));\r\n\r\n\t\t// Reading data using readLine\r\n\t\tString name = reader.readLine();\r\n\r\n\t\t// Printing the read line\r\n\t\tSystem.out.println(name);\r\n\t}", "public void readUserInput(){\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n try {\n String input = reader.readLine();\n while (!userValidation.validateUserInput(input)){\n input = reader.readLine();\n }\n elevatorController.configureNumberOfElevators(input);\n\n } catch (\n IOException e) {\n logger.error(e);\n }\n\n }", "Input createInput();", "public static String readString() {\n BufferedReader br\n = new BufferedReader(new InputStreamReader(System.in), 1);\n\n // Declare and initialize the string\n String string = \" \";\n\n // Get the string from the keyboard\n try {\n string = br.readLine();\n\n } catch (IOException ex) {\n System.out.println(ex);\n }\n\n // Return the string obtained from the keyboard\n return string;\n }", "public static String le() throws IOException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String texto = reader.readLine();\n return texto;\n }", "private static void takeInput() throws IOException {\n\n System.out.println(\"Enter number 1\");\n BufferedReader br= new BufferedReader(new InputStreamReader(System.in));\n String number1=br.readLine();\n System.out.println(\"Enter number 2\");\n String number2=br.readLine();\n System.out.println(\"Operation\");\n String op=br.readLine();\n //WhiteHatHacker processes the input\n WhiteHatHacker hack=new WhiteHatHacker(number1,number2,op);\n hack.processInput();\n }", "public String readCommand() {\n sc = new Scanner(System.in);\n userInput = new TextField();\n return userInput.getText();\n }", "public abstract BasicInput createInput( boolean isSeq ) throws IOException;", "protected String readLine()\n { try { if (stdin!=null) return stdin.readLine(); } catch (IOException e) {}\n return null;\n }", "public static void main(String[] args) throws Exception {\n DataInputStream br = new DataInputStream(System.in);\n System.out.println(\"Enter the Name\");\n String str = br.readLine();\n System.out.println(\"Str value:\" + str);\n }", "public StreamReader() {}", "public static String readLine(String format, Object... args) throws IOException {\n\t\tif (System.console() != null) {\n\t\t\treturn System.console().readLine(format, args);\n\t\t}\n\t\tlogger.info(String.format(format, args));\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(\n\t\t\t\tSystem.in));\n\t\treturn reader.readLine();\n\t}", "private static Scanner determineInputSource(String[] args) throws FileNotFoundException{\n if (args.length > 0) {\n //Reading from file\n return new Scanner(new File(args[0]));\n }\n else {\n //Reading from standard Input\n return new Scanner(System.in);\n }\n }", "private String getClientInput() {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String input = null;\n try {\n input = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return input;\n }", "public Scanner(java.io.InputStream in) {\r\n this(new java.io.InputStreamReader(in));\r\n }", "public In(){\n\t\tscanner=new Scanner(new BufferedInputStream(System.in),CHARSET_NAME);\n\t\tscanner.useLocale(LOCALE);\n\t}", "public Console(Client client, Controller controller){\r\n\t\tsuper(client,controller);\r\n\t\tsc = new Scanner(System.in);\r\n\t\tnew Thread(new ReadInput()).start();\r\n\t}", "public String keyboardReadString() {\n BufferedReader myReader = new BufferedReader(new InputStreamReader(System.in));\n String stringItem = \"\";\n try {\n stringItem = myReader.readLine();\n } // try\n catch (IOException IOError) {\n System.out.println(\"Read Error in Termio.KeyboardReadString method\");\n } // catch\n return stringItem;\n }", "public String getInput(String message) throws IOException {\n\t\tSystem.out.print(\">> \"+message+\" \");\n\t\treturn consoleIn.readLine();\n\t}", "public Scanner(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public Scanner(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public static String getInput() {\n\t\tScanner inputReader = new Scanner(System.in);\n\t\tString userInput;\n\t\tuserInput = inputReader.nextLine();\n\t\treturn userInput;\n\t}", "Read createRead();", "public Tokenizer(Reader input) {\n this(input, false);\n }", "public void readInput()\n\t{\n\t\tString userInput;\n\t\tChoices choice;\n\t\t\n\t\tdo {\n\t\t\tlog.log(Level.INFO, \"Please give the inputs as:\\n\"\n\t\t\t\t\t+ \"ADDACCOUNT to add the account\\n\" \n\t\t\t\t\t+ \"DISPLAYALL to display all accounts\\n\"\n\t\t\t\t\t+ \"SEARCHBYACCOUNT to search by account\\n\"\n\t\t\t\t\t+ \"DEPOSIT to deposit into account\\n\"\n\t\t\t\t\t+ \"WITHDRAW to withdraw from the account\\n\"\n\t\t\t\t\t+ \"EXIT to end the application\"\n\t\t\t\t\t);\n userInput = scan.next();\n choice = Choices.valueOf(userInput);\n\n switch (choice) {\n case ADDACCOUNT : \taddAccount();\n \t\t\t\t\t\tbreak;\n \n case DISPLAYALL :\t\tdisplayAll();\n \t\t\t\t\t\tbreak;\n\n case SEARCHBYACCOUNT :\tsearchByAccount();\n \t\t\t\t\t\tbreak;\n \n case DEPOSIT :\t\t\tdepositAmount();\n \t\t\t\t\t\tbreak;\n \n case WITHDRAW :\t\t\twithDrawAmount();\n \t\t\t\t\t\tbreak;\n \n case EXIT:\t\t\t\tlog.log(Level.INFO, \"Application has ended successfully\");\n \t\t\t\t\t\tbreak;\n \n default: break;\n }\n } while(choice != Choices.EXIT);\n\t\t\n\t\tscan.close();\n\t}", "public CLI(BufferedReader in, Writer out) {\n\t\t_in = in;\n\t\t_out = out;\n\t}", "public File getStdin() {\n return mStdin;\n }", "public PasitoScanner(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "private static IIteratingChemObjectReader<IAtomContainer> getInputReader(\n ArgumentHandler argsH, IChemObjectBuilder builder) throws FileNotFoundException {\n DataFormat inputFormat = argsH.getInputFormat();\n IIteratingChemObjectReader<IAtomContainer> reader;\n String filepath = argsH.getInputFilepath();\n InputStream in = new FileInputStream(filepath);\n switch (inputFormat) {\n case SMILES: reader = new IteratingSMILESReader(in, builder); break;\n case SIGNATURE: reader = new IteratingSignatureReader(in, builder); break;\n case SDF: reader = new IteratingSDFReader(in, builder); break;\n case ACP: reader = new IteratingACPReader(in, builder); break;\n default: reader = null; error(\"Unrecognised format\"); break;\n }\n return reader;\n }", "public StreamReader(InputStream input) throws IOException {\r\n\t\tthis.setInput(input);\r\n\t}", "@Override\n public int read() throws IOException {\n int c;\n\n do {\n c = System.in.read();\n } while(c != -1 && (c == '\\n' || c == '\\r'));\n\n return c;\n }", "abstract public String readLine() throws TerminalException;", "public BufferedReader2(Reader in)\r\n\t{\r\n\t\tsuper(in);\r\n\t}", "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 }", "public Scanner(java.io.Reader in) {\n this.zzReader = in;\n }", "public Scanner(java.io.Reader in) {\n this.zzReader = in;\n }", "public static void main(String[] args) {\n\n\t\tInputStreamReader rd= new InputStreamReader(System.in);\n\t\ttry {\n\t\t\tSystem.out.println(\"enter a number\");\n\t\t\tint value=rd.read();\n\t\t\tSystem.out.println(\"you entered:-\"+(char)value);\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}", "Lexico(java.io.InputStream in) {\n this(new java.io.InputStreamReader(in));\n }", "public String readCommand() {\n Scanner sc = new Scanner(System.in);\n return sc.nextLine();\n }", "public InputReader(String csv){\n inputStream = new Scanner(csv);\n instantiate();\n assert(invariant());\n }", "public TemplexTokenMaker(java.io.InputStream in) {\r\n this(new java.io.InputStreamReader(in));\r\n }", "private void start() {\n Scanner scanner = new Scanner(System.in);\n \n // While there is input, read line and parse it.\n String input = scanner.nextLine();\n TokenList parsedTokens = readTokens(input);\n }", "public String getInputForName() {\n\t\twhile (true) {\n\t\t\ttry {\n\t\t\t\treturn bufferedReader.readLine();\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tSystem.err.println(e.getLocalizedMessage());\n\t\t\t}\n\t\t}\n\t}", "public static DecaLexer createLexerFromArgs(String[] args)\n throws IOException {\n Validate.isTrue(args.length <= 1, \"0 or 1 argument expected.\");\n DecaLexer lex;\n if (args.length == 1) {\n lex = new DecaLexer(CharStreams.fromFileName(args[0]));\n lex.setSource(new File(args[0]));\n } else {\n System.err.println(\"Reading from stdin ...\");\n lex = new DecaLexer(CharStreams.fromStream(System.in));\n }\n return lex;\n }", "public Scanner(java.io.Reader in) {\r\n this.zzReader = in;\r\n }", "public CLI()\r\n\t{\r\n\t\t//lvl = new Level();\r\n\t\tthis.inputCommand = \"\";\r\n\t\t//this.exitStr = exitStr;\r\n\t\tin = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\r\n\t}", "public void readInput()\n\t{\n\t\t//wrap input stream read input from user\n\t\tBufferedReader in = new BufferedReader( new InputStreamReader( System.in ));\n\t\t\n\t\t//prompt user for input\n\t\tSystem.out.println( \"Please enter a letter or type Quit to end.\");\n\t\t\n\t\ttry{\n\t\t\tString userGuess = in.readLine();\n\t\t\t\n\t\t\t//loop until the user types \"Quit\"\n\t\t\tdo{\n\t\t\t\t//invoke guessletter function with String input\n\t\t\t\thangmanGame.guessLetter(userGuess);\n\t\t\t\t//update currentGuessText\n\t\t\t\tcurrentGuessText = hangmanGame.getCurrentGuess();\n\t\t\t\t//trace out current guess\n\t\t\t\tSystem.out.println(\"Your current guess is: \" + currentGuessText);\n\t\t\t\t//update remainingStrikes\n\t\t\t\thangmanGame.numberOfRemainingStrikes();\n\t\t\t\t//trace out remaining number of strikes\n\t\t\t\tSystem.out.println(\"You currently have \" + hangmanGame);\n\t\t\t\t//invoke revealAnswer function to check over gameOver, gameWon, and getAnswer\n\t\t\t\trevealAnswer();\n\t\t\t}while ( userGuess != \"Quit\" );\n\t\t}\n\t\t//catch IOException ioe\n\t\tcatch (IOException ioe)\n\t\t{\n\t\t\t//tell exception to print its error log\n\t\t\tioe.printStackTrace();\n\t\t}\n\t}", "public JavaTokenMaker(java.io.InputStream in) {\n\t\tthis(new java.io.InputStreamReader(in));\n\t}", "public String onInputMessage(String userInput) throws QuitException{\n if (!userInput.equals(\"\"))\n System.out.println(userInput);\n\n //Enter data using BufferReader \n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); \n \n // Reading data using readLine\n String input; \n try {\n input = reader.readLine();\n } catch (IOException e) {\n return null;\n }\n if (input.equals(\"sortir\"))\n throw new QuitException();\n\n // Printing the read line \n return input;\n }", "private static String readInput(){\n\t\ttry {\n\t\t\tInput = br.readLine();\n\t\t\t}\n\t\tcatch (IOException ioe) {\n\t\t\tSystem.out.println(\"IO error trying to read your name!\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\treturn Input;\n\t}", "public String readInput() {\n\t\treturn null;\n\t}", "public static String GetInput() {\r\n\t\t// Scanner is created and a value is set for input\r\n\t\tScanner in = new Scanner(System.in);\r\n\t\tString input = in.nextLine();\r\n\t\treturn input;\r\n\r\n\t}", "private Scanner getInput(String name) {\n try {\n return new Scanner(new File(name));\n } catch (IOException excp) {\n throw error(\"could not open %s\", name);\n }\n }", "public static String acceptString() {\n\t\tString stringData = null;\r\n\t\tBufferedReader input = null;\r\n\t\ttry {\r\n\t\t\t// chaining the streams\r\n\t\t\tinput = new BufferedReader(new InputStreamReader(System.in));\r\n\r\n\t\t\t// reading data from the reader\r\n\t\t\tstringData = input.readLine();\r\n\t\t} catch (IOException ioException) {\r\n\t\t\tSystem.out.println(\"Error in accepting data.\");\r\n\t\t} finally {\r\n\t\t\tinput = null;\r\n\t\t}\r\n\t\treturn stringData;\r\n\t}", "String consoleInput();", "void readInput() {\n\t\ttry {\n\t\t\tBufferedReader input = new BufferedReader(new InputStreamReader(System.in));\n\t\t\t\n\t\t\tString line = input.readLine();\n\t\t\tString [] numbers = line.split(\" \");\n\n\t\t\tlenA = Integer.parseInt(numbers[0]);\n\t\t\tlenB = Integer.parseInt(numbers[1]); \n\n\t\t\twordA = input.readLine().toLowerCase(); \n\t\t\twordB = input.readLine().toLowerCase();\n\n\t\t\tg = Integer.parseInt(input.readLine());\n\n\t\t\tString key; \n\t\t\tString [] chars;\n\t\t\tpenaltyMap = new HashMap<String, Integer>();\n\n\t\t\tfor(int i=0;i<676;i++) {\n\t\t\t\tline = input.readLine();\n\t\t\t\tchars = line.split(\" \");\n\t\t\t\tkey = chars[0] + \" \" + chars[1];\n\t\t\t\tpenaltyMap.put(key, Integer.parseInt(chars[2]));\n\n\t\t\t}\n\n\t\t\tinput.close();\n\n\t\t} catch (IOException io) {\n\t\t\tio.printStackTrace();\n\t\t}\n\t}", "public void accept(){\n\t\ttry{\n\t\t\tBufferedReader fromConsole = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tString message;\n\t\t\twhile (true){\n\t\t\t\tmessage = fromConsole.readLine();\n\t\t\t\tthis.handleMessage(message);\n\t\t\t}\n\t\t} \n\t\tcatch (Exception exception){\n\t\t\tSystem.out.println\n\t\t\t(\"Unexpected error while reading from console!\");\n\t\t}\n\t}", "@Override\n public Reader getInputStreamReader() throws IOException {\n return new InputStreamReader(getInputStream());\n }", "public Reading1(BufferedReader in, PrintStream out) { // agrego al constructor conversation\n\t\tthis.in = in;\n\t\tthis.out = out;\n\t}", "public static String inputCommand() {\n String command;\n Scanner in = new Scanner(System.in);\n\n command = in.nextLine();\n\n return command;\n }", "public static String readLine(String message){\n Scanner in = new Scanner(System.in);\n System.out.print(message);\n return in.nextLine();\n }", "public static void Input(){\n try{\n prepareReader();\n String linea=\"\";\n while((linea = br.readLine()) != null){\n System.out.println(linea);\n }\n br.close();\n System.out.println(\"-------------------------------------------------\");\n }catch (Exception e){\n System.err.println(\"Error al leer del buffer\");\n }\n }", "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 readStringFromCmd() throws IOException {\r\n\t\tSystem.out.println(\"Enter your String:\");\r\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\r\n\t\tString string = null;\t\t\r\n\t\tstring = br.readLine();\r\n\t\treturn string;\r\n\t}", "public static String readString() {\n return in.nextLine();\n }", "private ConsoleScanner() {}", "public Skeleton() throws IOException {\n\t\tconsoleIn = new BufferedReader(new InputStreamReader(System.in));\n\t}", "public String readCommand() {\n String input = in.nextLine();\n while (input.trim().isEmpty()) {\n input = in.nextLine();\n }\n return input;\n }", "public static InputStream getInputStream(String[] args) throws FileNotFoundException {\r\n if (args.length > 0 && args[0].equals(\"-f\")) {\r\n return new FileInputStream(new File(args[1]));\r\n } else {\r\n return System.in;\r\n }\r\n }", "public static String getString() throws IOException {\r\n InputStreamReader isr = new InputStreamReader(System.in);\r\n BufferedReader br = new BufferedReader(isr);\r\n String s = br.readLine();\r\n return s;\r\n }", "public Lexico(java.io.Reader in) {\n this.zzReader = in;\n }", "public Lexico(java.io.Reader in) {\n this.zzReader = in;\n }", "public Ui() {\n this.scanner = new Scanner(System.in);\n }", "public Ui() {\n this.scanner = new Scanner(System.in);\n }", "public static void main(String[] args) throws IOException {\n\t\tInputStreamReader isr = new InputStreamReader(System.in);\n\t\tBufferedReader br = new BufferedReader(isr);\n\n\t\tSystem.out.println(\"Enter Your name Please\");\n\t\tString myName = br.readLine();\n\t\tSystem.out.println(\"Welcome \" + myName);\n\t\tSystem.out.println(\"Enter your age: \");\n\t\tint age = Integer.parseInt(br.readLine());\n\t\tSystem.out.println(\"Your age is \" + age);\n\n\t}", "public Analizador_Lexico(java.io.Reader in) {\n this.zzReader = in;\n }", "public String readLine() throws ShellIOException;", "private static String readLine() {\r\n String input=\"\";\r\n try {\r\n input = in.readLine();\r\n } catch (IOException e) {\r\n System.out.println(e.getMessage());\r\n }\r\n return input;\r\n }", "public String getUserInput() {\n\t\tString input;\n\t\tinput = this.console.next();\n\t\treturn input;\n\t}" ]
[ "0.74308187", "0.6844883", "0.67080444", "0.6546453", "0.6546097", "0.65342623", "0.6524131", "0.64588153", "0.64371544", "0.64371544", "0.63574016", "0.6327245", "0.63263494", "0.62647897", "0.6253431", "0.62340516", "0.6216287", "0.6197286", "0.61657983", "0.6095301", "0.6055158", "0.6048244", "0.6042469", "0.6033447", "0.60284334", "0.60253674", "0.60223097", "0.60162985", "0.6009087", "0.60090226", "0.60024214", "0.5993645", "0.5973503", "0.59601444", "0.5949482", "0.5948064", "0.5939096", "0.590269", "0.59007335", "0.5896835", "0.5887612", "0.58870655", "0.58870655", "0.5883239", "0.5854075", "0.58349603", "0.5805325", "0.5803387", "0.5794126", "0.57775563", "0.5770645", "0.5768708", "0.57609254", "0.57579", "0.56996363", "0.5699317", "0.5697598", "0.5697598", "0.56963795", "0.56929743", "0.5689182", "0.56875265", "0.56872433", "0.56812525", "0.5670824", "0.566429", "0.56552196", "0.5653869", "0.5644302", "0.5643399", "0.5643277", "0.56339186", "0.5629553", "0.5625956", "0.5625227", "0.561161", "0.55935675", "0.558854", "0.5583538", "0.558313", "0.5577375", "0.55655396", "0.55643183", "0.556194", "0.55520713", "0.55516285", "0.554268", "0.55318713", "0.5527891", "0.5516708", "0.551432", "0.5508391", "0.5504276", "0.5504276", "0.5500241", "0.5500241", "0.54911757", "0.5473792", "0.54712653", "0.54578024", "0.54529727" ]
0.0
-1
get the current hibernate session
@Override public List<Customer> getCustomers() { Session currentSession = sessionFactory.getCurrentSession(); // create a query Query<Customer> theQuery = currentSession.createQuery("from Customer order by lastName", Customer.class); // execute query and get result list List<Customer> customers = theQuery.getResultList(); return customers; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Session getCurrentSession() {\n return sessionFactory.getCurrentSession();\n }", "private Session getSession() {\n\t\treturn factory.getCurrentSession();\n\t}", "public Session getCurrentSession() {\r\n return sessionFactory.getCurrentSession();\r\n }", "public Session getSession() {\n\t\treturn sessionFactory.getCurrentSession();\r\n\t}", "public Session getSession(){\n\t\treturn sessionFactory.openSession();\n\t}", "public Session getCurrentSession() {\r\n return sessionFactory.getCurrentSession();\r\n }", "Session getCurrentSession();", "Session getCurrentSession();", "public Session getCurrentSession() {\r\n\t\treturn sessionFactory.getCurrentSession();\r\n\t}", "public /*static*/ Session getSession() {\n return sessionFactory.getCurrentSession();\n }", "protected Session getSession() {\n return sessionFactory.getCurrentSession();\n }", "private void getHibernateSession() {\n try {\n session = em.unwrap(Session.class)\n .getSessionFactory().openSession();\n\n } catch(Exception ex) {\n logger.error(\"Failed to invoke the getter to obtain the hibernate session \" + ex.getMessage());\n ex.printStackTrace();\n }\n\n if(session == null) {\n logger.error(\"Failed to find hibernate session from \" + em.toString());\n }\n }", "protected Session getCurrentSession()\n \t{\n \t\treturn this.sessionFactory.getCurrentSession();\n \t}", "Session getSession();", "Session getSession();", "public Session getSession();", "protected Session getCurrentSession() {\n\t\treturn sessionFactory.getCurrentSession();\n\t}", "protected Session getCurrentSession() {\n\t\treturn sessionFactory.getCurrentSession();\n\t}", "public Session getSession()\n {\n return session;\n }", "protected Session getSession() {\r\n if (session == null || !session.isOpen()) {\r\n LOG.debug(\"Session is null or not open...\");\r\n return HibernateUtil.getCurrentSession();\r\n }\r\n LOG.debug(\"Session is current...\");\r\n return session;\r\n }", "public Session getSession() {\n return session;\n }", "private Session fetchSession()\n\t{\n\t\t\tlog.info (\"******Fetching Hibernate Session\");\n\n\t\t\tSession session = HibernateFactory.currentSession();\n\n\t\t\treturn session;\n\t \n\t}", "public Session getSession() { return session; }", "public Session getSession() {\n return session;\n }", "public static Session getCurrentSession() {\n return sessionfactory.getCurrentSession();\n }", "protected final Session getSession() {\n return sessionTracker.getSession();\n }", "public static Session currentSession() {\n Session session = (Session) sessionThreadLocal.get();\n // Open a new Session, if this Thread has none yet\n try {\n if (session == null) {\n session = sessionFactory.openSession();\n sessionThreadLocal.set(session);\n }\n } catch (HibernateException e) {\n logger.error(\"Get current session error: \" + e.getMessage());\n }\n return session;\n }", "public Session getSession() {\n\t\tSession session = this.session;\r\n\t\tif (session == null) {\r\n\t\t\t// 2. altrimenti genera una nuova sessione utilizzando la factory (e.g. Spring MVC)\r\n\t\t\tsession = this.sessionFactory.getCurrentSession();\r\n\t\t}\r\n\t\treturn session;\r\n\t}", "private Session getHibernateSession() throws AuditException {\r\n return this.session;\r\n }", "public Session getSession() {\n\t\treturn session;\n\t}", "public Session getSession() {\n\t\treturn session;\n\t}", "public Session getSession() {\n\t\treturn session;\n\t}", "public AbstractSession getSession() {\n return session;\n }", "public static Session getSession() {\n return session;\n }", "@Override\n public Session getSession() throws HibernateException {\n Session session = threadLocal.get();\n\n if (session == null || !session.isOpen()) {\n session = (sessionFactory != null) ? sessionFactory.openSession()\n : null;\n threadLocal.set(session);\n }\n return session;\n }", "private Session openSession() {\n return sessionFactory.getCurrentSession();\n }", "protected Session getSession() {\n return sessionUtility.getSession();\n }", "public User getSession(){\n\t\treturn this.session;\n\t}", "protected Session getSession() { return session; }", "public static Session currentSession() throws HibernateException {\n Session s = (Session) threadLocal.get();\n\n if (s == null) {\n try {\n\t\t\t\tif (getInterceptor() != null) {\n\t\t\t\t\tlog.debug(\"Using Interceptor: \" + getInterceptor().getClass());\n\t\t\t\t\ts = sessionFactory.openSession(getInterceptor());\n\t\t\t\t} else {\n\t\t\t\t\ts = sessionFactory.openSession();\n\t\t\t\t}\n }\n catch (HibernateException he) {\n System.err.println(\"%%%% Error Creating SessionFactory %%%%\");\n throw new RuntimeException(he);\n }\n }\n return s;\n }", "public RDBMSSession getSession() {\r\n\t\treturn (RDBMSSession) session;\r\n\t}", "protected final Session getSession() {\n\t\treturn m_sess;\n\t}", "public Session session() {\n return session;\n }", "public Session getSession()\n\t{\n\t\treturn m_Session;\n\t}", "public Session getSession() {\n if (this.session == null) {\n this.logger.error(\"Sessão não iniciada.\");\n throw new IllegalStateException(\"A sessão não foi criada antes do uso do DAO\");\n }\n return this.session;\n }", "public Session openSession() {\r\n return sessionFactory.openSession();\r\n }", "@Override\n public Session getSession() throws SQLException {\n // If we don't yet have a live transaction, start a new one\n // NOTE: a Session cannot be used until a Transaction is started.\n if (!isTransActionAlive()) {\n sessionFactory.getCurrentSession().beginTransaction();\n configureDatabaseMode();\n }\n // Return the current Hibernate Session object (Hibernate will create one if it doesn't yet exist)\n return sessionFactory.getCurrentSession();\n }", "public static Session getSession() {\n if(sesh == null) {\n return sesh = sf.openSession();\n }\n\n return sesh;\n }", "public static Session openSession() {\n \treturn sessionFactory.openSession();\n }", "public Session getHibernateSession() throws EvolizerException {\n return getEvolizerSession().getHibernateSession();\n }", "DefaultSession getSession(String id);", "protected DatabaseSession getDbSession() {\n if(dbSession == null) {\n dbSession = getServerSession();\n }\n return dbSession;\n }", "public Session openSession() {\r\n\t\treturn sessionFactory.openSession();\r\n\t}", "public LocalSession session() { return session; }", "public static Session getCurrentSession() {\r\n //LOG.debug(MODULE + \"Get CurrentSession\");\r\n\r\n /* This code is to find who has called the method only for debugging and testing purpose.\r\n try {\r\n throw new Exception(\"Who called Me : \");\r\n } catch (Exception e) {\r\n //LOG.debug(\"I was called by \" + e.getStackTrace()[2].getClassName() + \".\" + e.getStackTrace()[2].getMethodName() + \"()!\");\r\n LOG.debug(\"I was called by : \", e);\r\n }\r\n */\r\n return openSession();\r\n //return sessionFactory.getCurrentSession();\r\n }", "public String getSession() {\n return session;\n }", "public jkt.hms.masters.business.MasSession getSession () {\n\t\treturn session;\n\t}", "public String getSession() {\n return this.session;\n }", "public Session getSafeSession()\n {\n beginSession(false);\n return session;\n }", "public static Session getSession() throws HException {\r\n\t\tSession s = (Session) threadSession.get();\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tif (s == null) {\r\n\t\t\t\tlog.debug(\"Opening new Session for this thread.\");\r\n\t\t\t\tif (getInterceptor() != null) {\r\n\t\t\t\t\t\r\n\t\t\t\t\ts = getSessionFactory().withOptions().interceptor(getInterceptor()).openSession();\r\n\t\t\t\t} else {\r\n\t\t\t\t\ts = getSessionFactory().openSession();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthreadSession.set(s);\r\n\t\t\t\tsetConnections(1);\r\n\t\t\t}\r\n\t\t} catch (HibernateException ex) {\r\n\t\t\tthrow new HException(ex);\r\n\t\t}\r\n\t\treturn s;\r\n\t}", "public static CustomSession get() {\r\n\t\treturn (CustomSession) Session.get();\r\n\t}", "public static Session currentSession() {\n \tif (sessionFactory == null) {\n \t\tinitialize();\n \t}\n \tif (singleSessionMode) {\n \t\tif (singleSession == null) {\n \t\t\tsingleSession = sessionFactory.openSession();\n \t\t}\n \t\treturn singleSession;\n \t} else {\n\t Session s = session.get();\n\t \n\t // Open a new Session, if this Thread has none yet\n\t if (s == null || !s.isOpen()) {\n\t s = sessionFactory.openSession();\n\t session.set(s);\n\t }\n\t return s;\n \t}\n }", "protected abstract SESSION getThisAsSession();", "public static Session getSession() {\n\n if (serverRunning.get() && !session.isClosed()) {\n return session;\n } else {\n if (session.isClosed()) {\n throw new IllegalStateException(\"Session is closed\");\n } else {\n throw new IllegalStateException(\"Cluster not running\");\n }\n }\n }", "public static Session currentSession(SessionFactory fac)\n throws HibernateException {\n Session s;\n\n if((s = (Session) _sessionRef.get()) == null) {\n s = fac.openSession();\n _sessionRef.set(s);\n }\n else{\n if(!s.isConnected())s.reconnect();\n }\n\n return s;\n }", "protected Session getSession() {\n\n return (Session) getExtraData().get(ProcessListener.EXTRA_DATA_SESSION);\n }", "public com.weizhu.proto.WeizhuProtos.Session getSession() {\n return session_;\n }", "public Session getSession() throws LeaseException {\n return getSession(true);\n }", "public IHTTPSession getSession() {\n\t\treturn session;\n\t}", "public PSUserSession getSession();", "private Session getSession() throws RepositoryException {\n return getRepository().loginAdministrative(null);\n }", "public com.weizhu.proto.WeizhuProtos.Session getSession() {\n if (sessionBuilder_ == null) {\n return session_;\n } else {\n return sessionBuilder_.getMessage();\n }\n }", "public Session createSession() {\n\t\treturn this.session;\n\t}", "public Session openSession() {\r\n //Interceptor interceptor= new Interceptor();\r\n //Session regresar = sessionFactory.withOptions().interceptor(interceptor).openSession();\r\n Session regresar = sessionFactory.openSession();\r\n //interceptor.setSession(regresar);\r\n return regresar;\r\n }", "DatabaseSession openSession();", "public SessionFactory getHibernateSessionFactory() {\n if (_hibernateTemplate == null) {\n return null;\n }\n return _hibernateTemplate.getSessionFactory();\n }", "public Session getSession() throws DAOException {\n // Injection fails for this non-managed class.\n DAOException ex = null;\n String pu = PERSISTENCE_UNIT;\n if(session == null || !em.isOpen()) {\n session = null;\n try {\n em = (EntityManager)new InitialContext().lookup(pu);\n } catch(Exception loopEx) {\n ex = new DAOException(loopEx);\n logger.error(\"Persistence unit JNDI name \" + pu + \" failed.\");\n }\n }\n\n getHibernateSession();\n if(ex != null) {\n ex.printStackTrace();\n }\n return session;\n }", "public static Session getCurrentSession() {\n if(currentSession != null){\n return currentSession;\n } else {\n createNewSession(new Point2D(300,300));\n return getCurrentSession();\n }\n }", "public SqlSessionFactory get();", "Object getNativeSession();", "public SessionService session() {\n return service;\n }", "public Session getSysSession() {\n\n sysSession.currentSchema =\n sysSession.database.schemaManager.getDefaultSchemaHsqlName();\n sysSession.isProcessingScript = false;\n sysSession.isProcessingLog = false;\n\n sysSession.setUser(sysSession.database.getUserManager().getSysUser());\n\n return sysSession;\n }", "public static synchronized Session getCurrentSession(Context context) {\n \tif (Session.currentSession == null) {\n Session.sessionFromCurrentSession(context);\n \t}\n\n \t\treturn Session.currentSession;\n }", "public org.openejb.config.ejb11.Session getSession() {\n return this._session;\n }", "synchronized Session getSession(long id) {\n return (Session) sessionMap.get(id);\n }", "public com.weizhu.proto.WeizhuProtos.SessionOrBuilder getSessionOrBuilder() {\n if (sessionBuilder_ != null) {\n return sessionBuilder_.getMessageOrBuilder();\n } else {\n return session_;\n }\n }", "public Object getObject() {\n\t\treturn this.sessionFactory;\n\t}", "@Override\r\n\tpublic HttpSession getSession()\r\n\t{\r\n\t\t// This method was implemented as a workaround to __CR3668__ and Vignette Support ticket __247976__.\r\n\t\t// The issue seems to be due to the fact that both local and remote portlets try to retrieve\r\n\t\t// the session object in the same request. Invoking getSession during local portlets\r\n\t\t// processing results in a new session being allocated. Unfortunately, as remote portlets\r\n\t\t// use non-WebLogic thread pool for rendering, WebLogic seems to get confused and associates\r\n\t\t// the session created during local portlet processing with the portal request.\r\n\t\t// As a result none of the information stored originally in the session can be found\r\n\t\t// and this results in errors.\r\n\t\t// To work around the issue we maintain a reference to original session (captured on the\r\n\t\t// first invocation of this method during the request) and return it any time this method\r\n\t\t// is called. This seems to prevent the issue.\r\n\t\t// In addition, to isolate SPF code from the session retrieval issue performed by Axis\r\n\t\t// handlers used during WSRP request processing (e.g. StickyHandler), we also store\r\n\t\t// a reference to the session as request attribute. Newly added com.hp.it.spf.wsrp.misc.Utils#retrieveSession\r\n\t\t// can then use the request attribute value instead of calling request.getSession()\r\n\t\t// which before this change resulted in new session being allocated and associated with\r\n\t\t// the portal request.\r\n\r\n\t\tif (mSession == null) {\r\n\t\t\tmSession = ((HttpServletRequest)getRequest()).getSession();\r\n\r\n\t\t\t// Store session in request attribute for com.hp.it.spf.wsrp.misc.Utils#retrieveSession\r\n\t\t\tgetRequest().setAttribute(ORIGINAL_SESSION, mSession);\r\n\t\t}\r\n\r\n\t\treturn mSession;\r\n\t}", "@Override\n\tpublic Session getSession() throws Exception {\n\t\treturn null;\n\t}", "public SessionFactory getSessionFactory()\n {\n return sessionFactory;\n }", "public String getSessionContext() {\n return this.SessionContext;\n }", "protected SessionFactory getSessionFactory() {\n\t\treturn this.sessionFactory;\n\t}", "AuthenticationSessionModel getAuthenticationSession();", "@Override\n\tpublic UtenteBase getSessionUser() {\n\t\tUtenteBase user = (UtenteBase) getThreadLocalRequest().getSession().getAttribute(\"user\");\n\t\treturn user;\n\t}", "public SESSION getCurrentSessionForTest() {\n return currentSession;\n }", "public static Map<SessionFactory, Session> getSession() {\n\t\tSessionFactory sf = new Configuration().configure(Constants.ONE_TO_MANY).addAnnotatedClass(Instructor.class)\n\t\t\t\t.addAnnotatedClass(InstructorDetail.class).addAnnotatedClass(Course.class).buildSessionFactory();\n\t\tSession s = sf.openSession();\n\n\t\tMap<SessionFactory, Session> tmp = new HashMap<SessionFactory, Session>();\n\t\ttmp.put(sf, s);\n\n\t\treturn tmp;\n\t}", "public SessionFactory getSessionFactory() {\r\n return sessionFactory;\r\n }", "public SessionFactory getSessionFactory() {\n return sessionFactory;\n }", "public IEvolizerSession getEvolizerSession() throws EvolizerException {\n // IEvolizerSession session = EvolizerSessionHandler.getHandler().getCurrentSession(fDbUrl);\n // return session;\n\n return fSession;\n }", "private static PersistenceSession getPersistenceSession() {\n return NakedObjectsContext.getPersistenceSession();\n }", "public synchronized Session getSession() throws JmsException {\n try {\n if (session == null) {\n Connection conToUse;\n if (connection == null) {\n if (sharedConnectionEnabled()) {\n conToUse = getSharedConnection();\n } else {\n connection = createConnection();\n connection.start();\n conToUse = connection;\n }\n } else {\n conToUse = connection;\n }\n session = createSession(conToUse);\n }\n return session;\n } catch (JMSException e) {\n throw convertJmsAccessException(e);\n }\n }" ]
[ "0.8397036", "0.838411", "0.83546054", "0.8334034", "0.829496", "0.82910323", "0.8247196", "0.8247196", "0.8163814", "0.81386876", "0.80909634", "0.8082804", "0.8076242", "0.8043501", "0.8043501", "0.80346507", "0.8012839", "0.8012839", "0.79940957", "0.7962831", "0.79547894", "0.79462767", "0.7930534", "0.7924179", "0.79018104", "0.788726", "0.7880795", "0.78677714", "0.7846502", "0.7845825", "0.7845825", "0.7845825", "0.78368247", "0.782787", "0.77977943", "0.779543", "0.77430826", "0.7742229", "0.7732178", "0.7725034", "0.77030164", "0.7695038", "0.769365", "0.7685234", "0.76195425", "0.7588695", "0.75603706", "0.7554229", "0.75500715", "0.75465554", "0.7501253", "0.7447091", "0.7427438", "0.73492634", "0.73367447", "0.7321801", "0.73007554", "0.7282776", "0.72721124", "0.7244593", "0.71752775", "0.7167433", "0.71609366", "0.7154641", "0.7138467", "0.7129131", "0.7091897", "0.70495594", "0.7031297", "0.70308805", "0.7028942", "0.6994723", "0.6979264", "0.6960857", "0.69529617", "0.6949492", "0.69216365", "0.69180626", "0.6912509", "0.6905987", "0.6896343", "0.6834431", "0.6832222", "0.681739", "0.6811309", "0.6810294", "0.67780244", "0.67650735", "0.675653", "0.6725898", "0.67237705", "0.6704734", "0.66841036", "0.66794807", "0.6657195", "0.6657012", "0.66433454", "0.6638818", "0.6634954", "0.6629948", "0.66221714" ]
0.0
-1
Moves the player, if possible, from one room to another This method performs the action of the command for Player in Game This abstract method from Command is contained in each command extension
public void action() { if (!hasSecondWord()) { // there is no second word // if there is no second word, we don't know where to go... System.out.println("Go where? Please be more specific"); return; } String direction = getSecondWord(); //second word found // Possible room Room nextRoom = player.getCurrentRoom().getExit(direction); if (nextRoom == null) { System.out.println("There is no door in that direction"); } else { if (!nextRoom.isLocked()) { enterRoom(nextRoom); } //unlock room should now be another action instead // else if (nextRoom.isUnlocked(null)) { // enterRoom(nextRoom); // } else { System.out.println("This door is locked!"); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void move() {\n resetUpdate();\n\n gameMessage.setSpace1(clientMessage.getSpace1());\n gameMessage.resetGameMessage();\n gameMessage.notify(gameMessage);\n\n\n if( liteGame.isWinner() ) endOfTheGame = true;\n }", "public void act() \n {\n moveTowardsPlayer(); \n }", "public abstract boolean doComputerMove(Player player);", "public void switchPlayer(){\n // Menukar giliran player dalam bermain\n Player temp = this.currentPlayer;\n this.currentPlayer = this.oppositePlayer;\n this.oppositePlayer = temp;\n }", "private void goRoom(Command command) \n {\n if(!command.hasSecondWord()) \n {\n // if there is no second word, we don't know where to go...\n System.out.println(\"Go where?\");\n return;\n }\n\n String direction = command.getSecondWord();\n\n // Try to leave current room.\n Room nextRoom = currentRoom.getExit(direction);\n\n if (nextRoom == null) {\n System.out.println(\"There is no door!\");\n }\n else {\n //remove energy from the player everytime he switches rooms\n p.energy -= 10;\n System.out.println(\"Energy: \" + p.energy);\n \n \n currentRoom = nextRoom;\n System.out.println(currentRoom.getLongDescription());\n \n }\n }", "public void movePlayer(String nomeArq, int px, int py) {\r\n if(Main.player1.Vez()) {\r\n if(nomeArq.equals(Main.PLAYER_LEFT)){\r\n \tMain.player1.MudaLado(true,false);\r\n }\r\n else {\r\n \tMain.player1.MudaLado(false,true);\r\n } \r\n pos = Main.player1.Position();\r\n int x = pos[0]+px;\r\n int y = pos[1];\r\n double t = 0.1;\r\n int OrigemY = y;\r\n double g=10;\r\n if(andar.BatidaFrente(x,y,Main.player1.Size()[0]+1,Main.player1.Size()[1]+1)==false) {\r\n \tMain.player1.NovaPosition(x,y); \r\n }\r\n Main.Fase.repinta(); \r\n while(andar.temChao(x,y,Main.player1.Size()[0]+1,Main.player1.Size()[1]+1)==false && andar.Paredao((int)x,(int)y,Main.player1.Size()[0],Main.player1.Size()[1])==false)\r\n {\r\n \tMain.player1.NovaPosition(x,y);\r\n \tMain.Fase.repinta(); \r\n y = (int)(OrigemY - (0-(g * (t*t))/2.0));\r\n t = t + 0.1; \r\n }\r\n Main.Fase.repinta(); \r\n }\r\n else {\r\n if(nomeArq.equals(Main.PLAYER_LEFT)) {\r\n \tMain.player2.MudaLado(true,false);\r\n }\r\n else {\r\n \tMain.player2.MudaLado(false,true);\r\n } \r\n pos = Main.player2.Position();\r\n int x = pos[0]+px;\r\n int y = pos[1];\r\n double t = 0;\r\n int OrigemY = y;\r\n double g=10;\r\n if(andar.BatidaFrente(x,y,Main.player2.Size()[0]+1,Main.player2.Size()[1]+1)==false) {\r\n \tMain.player2.NovaPosition(x,y); \r\n }\r\n Main.Fase.repinta(); \r\n while(andar.temChao(x,y,Main.player2.Size()[0]+1,Main.player2.Size()[1]+1)==false && andar.Paredao((int)x,(int)y,Main.player2.Size()[0]+1,Main.player2.Size()[1]+1)==false)\r\n {\r\n \tMain.player2.NovaPosition(x,y);\r\n \tMain.Fase.repinta(); \r\n y = (int)(OrigemY - (0-(g * (t*t))/2.0));\r\n t = t + 0.1; \r\n }\r\n }\r\n }", "public void performActions(){\n GameInformation gi = this.engine.getGameInformation();\n\n if(gi.getTeam() == 0)\n this.engine.performPlayerAction(\n new MoveAction(src, dst)\n );\n\n }", "private void goRoom(Command command) \n {\n if(!command.hasSecondWord()) {\n // if there is no second word, we don't know where to go...\n System.out.println(\"Go where?\");\n return;\n }\n\n String direction = command.getSecondWord();\n\n // Try to leave current room.\n Room nextRoom = currentRoom.getExit(direction);\n \n if (nextRoom == null) {\n System.out.println(\"That way is blocked!\");\n }\n else {\n lastRoom = currentRoom;\n multiLastRooms.push (lastRoom);\n currentRoom = nextRoom;\n timer = timer + 1;\n System.out.println(currentRoom.getLongDescription());\n }\n }", "public void goRoom(Command command) \n {\n if(!command.hasSecondWord()) {\n // if there is no second word, we don't know where to go...\n System.out.println(\"Go where?\");\n return;\n }\n\n String direction = command.getSecondWord();\n\n // Try to leave current room.\n Room nextRoom = currentRoom.getExit(direction);\n\n if (nextRoom == null) {\n System.out.println(\"There is no door!\\n\");\n }\n else {\n moveRooms.push(currentRoom);\n currentRoom = nextRoom;\n look();\n }\n }", "private void goRoom(Command command) \n {\n if(!command.hasSecondWord()) {\n // if there is no second word, we don't know where to go...\n Logger.Log(\"Where are you trying to go?\");\n return;\n }\n\n String direction = command.getSecondWord(); \n // Try to leave current room.\n Room nextRoom = currentRoom.getExit(direction);\n \n if (nextRoom == null) {\n Logger.Log(\"You walk repeatedly into a wall... Please try another direction\");\n }\n // If the portal is entered, call the random room method\n else {\n if (nextRoom.RoomID == 17){\n //System.out.println(\"????????\"); //An unusable string which may be implemented later\n Logger.Log(\"~*~*~PoRtAl~*~*~\");\n nextRoom = getRandomRoom();\n }\n \n currentRoom = nextRoom;\n Logger.Log(currentRoom.getShortDescription());\n } \n }", "public void toMoving() {\n notifyStartMoving(this.getCurrentTurn().getCurrentPlayer().getNickname());\n if (getCurrentTurn().getCurrentPlayer().isHasSpecialMove()) {\n notifyAskForEffect(currentTurn.getCurrentPlayer().getNickname());\n } else {\n notifyChooseWorker(this.getCurrentTurn().getCurrentPlayer().getNickname(), board);\n }\n }", "public void goRoom(Command command) \n {\n if(!command.hasSecondWord()) {\n // if there is no second word, we don't know where to go...\n System.out.println(\"Go where?\");\n return;\n }\n\n String direction = command.getSecondWord();\n\n // Try to leave current room.\n Room nextRoom = currentRoom.getExit(direction);\n\n if (nextRoom == null) {\n System.out.println(\"There is no door!\");\n }\n else {\n anteriorRoom.push(currentRoom);\n currentRoom = nextRoom;\n printLocationInfo();\n }\n }", "private void goRoom(Command command)//Method was given\n {\n if(!command.hasSecondWord())\n {\n // if there is no second word, we don't know where to go...\n System.out.println(\"Go where?\");\n return;\n }\n String direction = command.getSecondWord();\n if (direction.equals(\"back\"))\n {\n roomTemp = currentRoom;\n currentRoom = previousRoom;\n previousRoom = roomTemp;\n //roomTemp = null;\n System.out.println(currentRoom.longDescription());\n }\n else\n {\n // Try to leave current room.\n \n if (currentRoom.nextRoom(direction) == null)\n System.out.println(\"There is no door!\");\n else \n {\n Room nextRoom = currentRoom.nextRoom(direction);\n if (nextRoom.getLocked())\n {\n System.out.println(\"The door is locked!\");\n }\n else\n { \n previousRoom = currentRoom;\n currentRoom = nextRoom;\n System.out.println(currentRoom.longDescription());\n }\n }\n }\n }", "public Command run() {\n Worm enemyWormSpecial = getFirstWormInRangeSpecial();\n if (enemyWormSpecial != null) {\n if (gameState.myPlayer.worms[1].id == gameState.currentWormId) {\n if (gameState.myPlayer.worms[1].bananaBombs.count > 0) {\n return new BananaBombCommand(enemyWormSpecial.position.x, enemyWormSpecial.position.y);\n }\n }\n if (gameState.myPlayer.worms[2].snowballs.count > 0) {\n return new SnowballCommand(enemyWormSpecial.position.x, enemyWormSpecial.position.y);\n }\n }\n\n //PRIORITAS 2: NORMAL ATTACK (Shoot)\n Worm enemyWorm = getFirstWormInRange();\n if (enemyWorm != null) {\n Direction direction = resolveDirection(currentWorm.position, enemyWorm.position);\n return new ShootCommand(direction);\n }\n\n //PRIORITAS 3: MOVE (Karena sudah opsi serang tidak memungkinkan)\n\n //Ambil semua koordinat di cell Worm saat ini selain current cell\n List<Cell> surroundingBlocks = getSurroundingCells(currentWorm.position.x, currentWorm.position.y);\n \n\n //Kalau Worm saat ini adalah Commander, masuk ke algoritma move khusus Commander\n if(gameState.currentWormId == 1){\n\n //Commander akan memprioritaskan untuk bergerak menuju Technician (Worm yang memiliki Snowball)\n Worm technicianWorm = gameState.myPlayer.worms[2];\n\n\n //Mencari cell yang akan menghasilkan jarak terpendek menuju Worm tujuan\n Cell shortestCellToTechnician = getShortestPath(surroundingBlocks, technicianWorm.position.x, technicianWorm.position.y);\n \n //Commander akan bergerak mendekati Technician sampai dengan jarak dia dan Technician paling dekat adalah 3 satuan\n if (euclideanDistance(currentWorm.position.x, currentWorm.position.y, technicianWorm.position.x, technicianWorm.position.y) > 3) {\n if(shortestCellToTechnician.type == CellType.AIR) {\n return new MoveCommand(shortestCellToTechnician.x, shortestCellToTechnician.y);\n }else if (shortestCellToTechnician.type == CellType.DIRT) {\n return new DigCommand(shortestCellToTechnician.x, shortestCellToTechnician.y);\n }\n }\n\n //Apabila Commander dan Technician sudah berdekatan, maka Commander akan bergerak mencari musuh terdekat untuk melancarkan serangan\n int min = 10000000;\n Worm wormMusuhTerdekat = opponent.worms[0];\n for (Worm calonMusuh : opponent.worms) {\n if (euclideanDistance(currentWorm.position.x, currentWorm.position.y, calonMusuh.position.x, calonMusuh.position.y) < min) {\n min = euclideanDistance(currentWorm.position.x, currentWorm.position.y, calonMusuh.position.x, calonMusuh.position.y);\n wormMusuhTerdekat = calonMusuh;\n }\n }\n\n //Mencari cell yang paling dekat ke musuh yang sudah ditemukan\n Cell shortestCellToEnemy = getShortestPath(surroundingBlocks, wormMusuhTerdekat.position.x, wormMusuhTerdekat.position.y);\n if(shortestCellToEnemy.type == CellType.AIR) {\n return new MoveCommand(shortestCellToEnemy.x, shortestCellToEnemy.y);\n }else if (shortestCellToEnemy.type == CellType.DIRT) {\n return new DigCommand(shortestCellToEnemy.x, shortestCellToEnemy.y);\n }\n }\n\n //Command move untuk worm selain Commando. Worm selain commando akan mendekat menuju posisi worm Commando\n Worm commandoWorm = gameState.myPlayer.worms[0];\n \n //Selama Commando masih hidup, maka Worm lainnya akan mendekat menuju Commando\n if (commandoWorm.health > 0) {\n //Cell cellCommandoWorm = surroundingBlocks.get(0);\n\n //Mencari cell yang membuat jarak menuju Commando paling dekat\n Cell shortestCellToCommander = getShortestPath(surroundingBlocks, commandoWorm.position.x, commandoWorm.position.y);\n\n if(shortestCellToCommander.type == CellType.AIR) {\n return new MoveCommand(shortestCellToCommander.x, shortestCellToCommander.y);\n }else if (shortestCellToCommander.type == CellType.DIRT) {\n return new DigCommand(shortestCellToCommander.x, shortestCellToCommander.y);\n }\n }\n\n // PRIORITAS 4: Bergerak secara acak untuk memancing musuh mendekat\n int cellIdx = random.nextInt(surroundingBlocks.size());\n Cell block = surroundingBlocks.get(cellIdx);\n if (block.type == CellType.AIR) {\n return new MoveCommand(block.x, block.y);\n } else if (block.type == CellType.DIRT) {\n return new DigCommand(block.x, block.y);\n }\n // Kalau udah enggak bisa ngapa-ngapain.\n return new DoNothingCommand();\n \n }", "private void goDirection(Command command) {\n String direction = command.getFirstParameter();\n Room nextRoom = currentRoom.nextRoom(direction);\n\n // try to leave current room\n if (nextRoom == null) {\n System.out.println(\"There is no door!\");\n } else {\n currentRoom = nextRoom;\n }\n }", "private void goRoom(Command command) \n {\n if(!command.hasSecondWord()) {\n // if there is no second word, we don't know where to go...\n System.out.println(\"Go where?\");\n return;\n }\n \n \n \n String direction = command.getSecondWord();\n Room nextRoom = currentRoom.getExit(direction); \n \n if (nextRoom == null) \n {\n System.out.println(\"There is no door!\");\n }\n else \n {\n currentRoom = nextRoom;\n System.out.println(currentRoom.getLongDescription());\n printInfo();\n }\n \n }", "static void goRoom(Command command) throws InterruptedException {\n if (currentRoom == airport) {\n lockRoom(command);\n }\n if (!command.hasSecondWord()) {\n System.out.println(\"Go where?\");\n return;\n }\n\n String direction = command.getSecondWord();\n\n Room nextRoom = currentRoom.getExit(direction);\n player.setCurrentRoom(nextRoom);\n /* loop that when next room is equel to null it print a message that says \"there is no door\" \n but if nextRoom is not equel null set currentRoom to nextRoom and print the description of the new room*/\n if (nextRoom == null) {\n System.out.println(\"There is no path!\");\n } else {\n currentRoom = nextRoom;\n System.out.println(player.getCurrentRoom().getLongDescription());\n\n }\n\n forceDialog();\n }", "public abstract PlayerMove toPlayerMove(Player player, Match match);", "public void tryMove() {\n if(!currentPlayer.getHasPlayed()){\n if (!currentPlayer.isEmployed()) {\n String destStr = chooseNeighbor();\n\n currentPlayer.moveTo(destStr, getBoardSet(destStr));\n if(currentPlayer.getLocation().getFlipStage() == 0){\n currentPlayer.getLocation().flipSet();\n }\n refreshPlayerPanel();\n }\n else {\n view.showPopUp(currentPlayer.isComputer(), \"Since you are employed in a role, you cannot move but you can act or rehearse if you have not already\");\n }\n }\n else{ \n view.showPopUp(currentPlayer.isComputer(), \"You've already moved, rehearsed or acted this turn. Try a different command or click `end turn` to end turn your turn.\");\n }\n view.updateSidePanel(playerArray);\n }", "@Override\n\tpublic void executeMove(Player player, Board gameBoard, int turn, int startRow, int startCol, int endRow,\n\t\t\tint endCol) {\n\t\t\n\t}", "public void execute() {\r\n\t\tif(policy.moveByPolicy(level2d))\r\n\t\titem.move_up(level2d);\r\n\t\telse\r\n\t\t\tSystem.out.println(\"cant do the action\");\r\n\t\t\r\n\t}", "public void switchPlayer() {\r\n\t\tif (player == player1) {\r\n\t\t\tplayer = player2;\r\n\t\t} else {\r\n\t\t\tplayer = player1;\r\n\t\t}\r\n\t}", "public void move() {\n\t\tGrid<Actor> gr = getGrid();\n\t\tif (gr == null) {\n\t\t\treturn;\n\t\t}\n\t\tLocation loc = getLocation();\n\t\tLocation next = loc.getAdjacentLocation(getDirection());\n\t\t\n\t\tLocation next2 = next.getAdjacentLocation(getDirection());\n\t\tif (gr.isValid(next2)) {\n\t\t\tmoveTo(next2);\n\t\t} else {\n\t\t\tremoveSelfFromGrid();\n\t\t}\n\t}", "@Override\r\n\tpublic void executeCommand(String command,Object arg) {\t\r\n\r\n\t\tswitch(command) {\r\n\t\tcase \"UP\" : moveUP();\r\n\t\tbreak;\r\n\t\tcase \"DOWN\" : moveDOWN();\r\n\t\tbreak;\r\n\t\tcase \"RIGHT\" : moveRIGHT();\r\n\t\tbreak;\r\n\t\tcase \"LEFT\" : moveLEFT();\r\n\t\tbreak;\r\n\t\t// computer's turn\r\n\t\tdefault : String arr[] = command.split(\",\");\r\n\t\tSETslot(Integer.parseInt( arr[0] ), Integer.parseInt( arr[1] ), Integer.parseInt(arr[2]));\r\n\t\tbreak;\r\n\t\t\r\n\t\t}\r\n\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent e)\n\t\t{\n\t\t\tgame.makeMove(activePlayer, null);\n\t\t}", "GameState performMove(String guid, String username, int x, int y) throws GameStateException, GamePlayException;", "public abstract boolean attemptMove(Player currentPlayerObj, Coordinate move);", "@Override\r\n\tpublic void makeRandonMove() {\r\n\t\tif (randPlayer.getPlayerNumber() == game.getState().getTurn() && !game.getState().isFinished()) game.execute(randPlayer.requestAction(game.getState()));\r\n\t}", "public void chasePlayer() {\n refreshObstructionMatrix();\n Coordinate currPosition = new Coordinate(getX(), getY());\n Player player = this.dungeon.getPlayer();\n Coordinate playerPosition = new Coordinate(player.getX(), player.getY());\n\n if (currPosition.equals(playerPosition)) {\n // Debug.printC(\"Enemy has reached the player!\", Debug.RED);\n player.useItem(this);\n } else {\n this.pathToDest = pathFinder.getPathToDest(currPosition, playerPosition);\n if (!this.pathToDest.empty()) {\n Coordinate nextPosition = this.pathToDest.pop();\n // this.setCoordinate(nextPosition);\n if (getX() + 1 == nextPosition.x) {\n moveRight();\n } else if (getX() - 1 == nextPosition.x) {\n moveLeft();\n } else if (getY() + 1 == nextPosition.y) {\n moveDown();\n } else if (getY() - 1 == nextPosition.y) {\n moveUp();\n }\n }\n }\n }", "public void AskForMove();", "void killPlayerByPlayerMove()\n {\n movePlayerToCell(getMonsterCell());\n }", "public void goRoom(Command command) \n {\n if(!command.hasSecondWord()) {\n // if there is no second word, we don't know where to go...\n System.out.println(\"Go where?\");\n return;\n }\n\n String direction = command.getSecondWord();\n\n // Try to leave current room.\n Room nextRoom = null;\n \n for(Exit e : currentRoom.getListExits()) {\n String key = e.getDirection();\n Room exit = e.getRoom();\n \n if(direction.equals(key)){\n nextRoom = exit;\n break;\n }\n }\n \n if (nextRoom == null) {\n \n }\n else {\n currentRoom = nextRoom;\n printExits ();\n }\n }", "void playerMove(State state);", "protected void movePlayerToCell(Cell target)\n {\n theEngine.movePlayer(\n target.getX() - getThePlayer().getLocation().getX(),\n target.getY() - getThePlayer().getLocation().getY());\n }", "public void executeTurn(Game game){\n \tif (turn == 0) {\n \t\t\n \t\tSystem.out.println(game.getCurrentFloor().getFloorDesc());\n\t \tHELPER.insPressEnter();\n\t \tSystem.out.println(\"\\033[2J\");\n\t \tturn++;\n\t \n \t} \n\n // The room that the user is in.\n Room room = game.getCurrentRoom();\n Floor floor = game.getCurrentFloor();\n \n \n// Map.setVisibleRoom(game); //make the room that the is player in visible on the map\n \n if (!help && !map && !list) {\n \tSystem.out.println(Colors.GREEN + floor.getHint() + Colors.RESET);\n \tSystem.out.println(Colors.YELLOW + \"\\n ROOM #\" + room.getDescription()+\" FLOOR: #\" + floor.getFloorNum() + \"\\n\" + Colors.RESET);\n \tAsciiArt.makeArt(game);\n }\n else if (help) { //print what commands are available to the player\n \tSystem.out.println(\"\\n You are in room \" + room.getDescription());\n AsciiArt.getKeys();\n help = false; //set help back to false after executing once\n }\n else if (list) { //print what items the player has collected\n \tInventory.list();\n \tlist = false;\n }\n else if (map) { //print out the map of the rooms that the player has already been to\n \tMap.printMap();\n \tmap = false;\n }\n if (room.getItemInRoom() != null) { //if there is an item in the room\n \tif (room.getItemInRoom().getType().compareTo(\"Enemy\") != 0) { //if the item is NOT an enemy, say what it is\n \t\tSystem.out.println(Colors.CYAN + \"\\n << The \" + room.getItemInRoom().getType() + \" in this room is \" + room.getItemInRoom().getName() + \" >>\\n\" + Colors.RESET);\n \t}\n \telse { //if there IS an enemy in the room, attack the player\n \tif (((Enemy) room.getItemInRoom()).attack()) {\n \t\troom.setItemInRoom(null);\n \t}\n \telse {\n \t\tgame.setCurrentRoom(game.getCurrentFloor().getRooms()[4]);\n \t\troom = game.getCurrentRoom();\n \t\tSystem.out.println(Colors.RESET + \"Now you are back in room \" + room.getDescription() + \"\\n\" + Colors.CYAN);\n \t\tif (room.getItemInRoom() != null) {\n \t \t\tSystem.out.println(Colors.CYAN + \"\\n << The \" + room.getItemInRoom().getType() + \" in this room is \" + room.getItemInRoom().getName() + \" >>\\n\" + Colors.RESET);\n \t \t}\n \t}\n }\n }\n else System.out.println(Colors.YELLOW + \"\\n << There is nothing in this room >>\\n\" + Colors.RESET); //if there are no items in the room\n\n System.out.print(Colors.YELLOW + \" Enter command--> \" + Colors.RESET);\n\n String command = keyboard.nextLine().toLowerCase(); // user's command\n System.out.println(\"\\033[2J\");\n \n\n Room nextRoom = null; // the room we're moving to\n HashMap<String, Room> helper = room.getDirection();\n \n //Get access to list of all commands from CommandSetter class\n CommandSetter listOfCommands = new CommandSetter();\n HashMap<String,String> com = listOfCommands.getList();\n \n \n if (com.containsKey(command)){ \n \t\n \t\n\t \tswitch (com.get(command)) { //based on the command the player has typed, do that\n\t \t\t\n\t\t case \"north\": \n\t\t \t\tnextRoom = helper.get(\"north\");\n\t\t \t\tbreak;\n\t\t \n\t\t case \"south\": \n\t\t \t\tnextRoom = helper.get(\"south\");\n\t\t \t\tbreak;\n\t\t \n\t\t case \"west\": \n\t\t \tnextRoom = helper.get(\"west\");\n\t\t \t\tbreak;\n\t\t \n\t\t case \"east\": \n\t\t \t\tnextRoom = helper.get(\"east\");\n\t\t \t\tbreak;\n\t\t \n\t\t case \"quit\": \n\t\t \t\twinIndicator = false;\n\t\t \t\tnextRoom = room;\n\t\t \t\tgame.finishGame();\n\t\t \t\tbreak;\n\t\t \n\t\t case \"help\":\n\t\t \tnextRoom = new Room(\"Dont Move\");\n\t\t \thelp = true;\n\t\t break;\n\t\t \n\t\t case \"collect\":\n\t\t \tnextRoom = new Room(\"Dont Move\");\n\t\t \troom.pickUpItem();\n\t\t \tbreak;\n\t\t \t\n\t\t case \"list\":\n\t\t \tlist = true;\n\t\t \tnextRoom = new Room(\"Dont Move\");\n\t\t \tbreak;\n\t\t \t\n\t\t case \"map\":\n\t\t \tmap = true;\n\t\t \tnextRoom = new Room(\"Dont Move\");\n\t\t \tbreak;\n\t\t \t\n\t\t case \"open\":\n\t\t \troom.openChest();\n\t\t \n\t\t default:\n\t\t \tnextRoom = new Room(\"Dont Move\");\n\t \t}\n \n }else { //if the player types a command that is not available\n \tSystem.out.println(Colors.CYAN + \"\\n << I do not know how to do this command:\" + command + \" >>\\n\" + Colors.RESET);\n \tnextRoom = new Room(\"Dont Move\");\n }\n if (nextRoom == null) { //if there is no room in the direction they are trying to move\n System.out.println(Colors.CYAN + \"\\n << Oof! I ran into a wall. I cannot move in that direction. >>\\n\" + Colors.RESET);\n \t}\n else if (nextRoom.getDescription().compareTo(\"Dont Move\") != 0) {\n game.setCurrentRoom(nextRoom);\n }\n \n System.out.print(Colors.RESET);\n \n \n }", "@Override\n public void executeAction(Game game) {\n game.tryPlaceBomb(this.player.getId());\n game.tryDoMove(this.player.getId(), this.direction);\n }", "private void switchPlayer() {\n Player player;\n playerManager.switchPlayer();\n\n if(playerManager.getCurrentPlayer() == 1)\n player = playerManager.getPlayer(1);\n else if(playerManager.getCurrentPlayer() == 2)\n player = playerManager.getPlayer(2);\n else\n player = new Player(\"No Player exists\");\n\n updateLiveComment(\"Turn : \" + player.getName());\n }", "public void autoCommand(Piece p) {\r\n _playing = false;\r\n _players[p.ordinal()] = new MachinePlayer(p, this);\r\n }", "public void move(String direction);", "private String goRoom(Command command)//refactored\n {\n if(!command.hasSecondWord()) {\n // if there is no second word, we don't know where to go...\n return \"Go where?\";\n }\n\n String direction = command.getSecondWord();\n\n // Try to leave current room.\n Room nextRoom = currentRoom.getExit(direction);//new\n \n String result = \"\";\n if (nextRoom == null) {\n result += \"There is no door!\";\n }\n else {\n currentRoom = nextRoom;\n result += currentRoom.getDescription()+\"\\n\";//refactored\n \n result += \"Exits: \" + currentRoom.getExitString()+\"\\n\";//taken from class Room \n \n return result;\n }\n result += \"\\n\";\n\n return result;\n }", "public abstract void changePlayerAt(ShortPoint2D pos, Player player);", "void doAction(Player player);", "void userMoveRequested(int playerIndex);", "@Override\n\tpublic void interact(Entity obj) {\n\t\tif (!(obj instanceof Player)) return;\n\t\t\n\t\tPlayer player = (Player) obj;\n\t\t\n\t\tint playerX = player.getX();\n\t\tint playerY = player.getY();\n\t\t\n\t\tif (playerX == this.getX()) {\n\t\t\tif (playerY > this.getY()) this.moveUp();\n\t\t\telse {\n\t\t\t\tthis.moveDown();\n\t\t\t}\n\t\t} else if (playerY == this.getY()) {\n\t\t\tif (playerX > this.getX()) this.moveLeft();\n\t\t\telse {\n\t\t\t\tthis.moveRight();\n\t\t\t}\n\t\t}\t\t\n\t}", "public void autoMove() {\n selectAndMove(computerPlayer.selectToken(this));\n }", "public abstract void move( char direction );", "@Override\r\n\tpublic void makeMove(A action) {\r\n\t\tgame.execute(action);\r\n\t}", "private boolean movePlayer(String placeToMoveTo) {\n if (placeToMoveTo.equalsIgnoreCase(\"go\") || placeToMoveTo.equals(\"\")) {\n System.out.println(\"Go where?\");\n return false;\n }\n\n // Check to see if the player is trying to move through a valid Exit\n if (currentRoom.getExit1() != null && placeToMoveTo.equalsIgnoreCase(currentRoom.getExit1().getName())) {\n if (this.checkExit(currentRoom.getExit1())) {\n // Move the player and set the current room to the room that they have moved to\n currentRoom = currentRoom.getExit1().getDestination();\n return true;\n }\n } else if (currentRoom.getExit2() != null && placeToMoveTo.equalsIgnoreCase(currentRoom.getExit2().getName())) {\n if (this.checkExit(currentRoom.getExit2())) {\n // Move the player and set the current room to the room that they have moved to\n currentRoom = currentRoom.getExit2().getDestination();\n return true;\n }\n } else if (currentRoom.getExit3() != null && placeToMoveTo.equalsIgnoreCase(currentRoom.getExit3().getName())) {\n if (this.checkExit(currentRoom.getExit3())) {\n // Move the player and set the current room to the room that they have moved to\n currentRoom = currentRoom.getExit3().getDestination();\n return true;\n }\n } else if (currentRoom.getExit4() != null && placeToMoveTo.equalsIgnoreCase(currentRoom.getExit4().getName())) {\n if (this.checkExit(currentRoom.getExit4())) {\n // Move the player and set the current room to the room that they have moved to\n currentRoom = currentRoom.getExit4().getDestination();\n return true;\n }\n } else if (currentRoom.getSecretExit() != null && placeToMoveTo.equalsIgnoreCase(currentRoom.getSecretExit().getName())) {\n if (this.checkExit(currentRoom.getSecretExit())) {\n // Move the player and set the current room to the room that they have moved to\n currentRoom = currentRoom.getSecretExit().getDestination();\n return true;\n }\n } // They have not specified a valid exit\n else {\n System.out.println(\"It doesn't appear as though I can go there.\");\n return false;\n }\n\n return false;\n }", "public void execute(Player player) {\n\t\tRoom currentRoom = player.getAdventureGame().currentRoom();\n\t\tList <Direction>neibourgh = new ArrayList<Direction>();\n\t\tneibourgh.addAll(currentRoom.getNeighbours().keySet());\n\t\tSystem.out.println(player);\n\t\tdisplayList(\"Items :\\t\", currentRoom.getItemsList());\n\t\tdisplayList(\"Monsters :\", currentRoom.getMonstersList());\n\t\tdisplayList(\"Neighbours :\", neibourgh);\n\t\tSystem.out.println(\"--------------------------------------------\");\n\t}", "public synchronized void clientMove(CompassDirection direction, int playerID)\n\t\t\tthrows CommandException {\n\t\tassertPlayerExists(playerID);\n\n\t\tensureNoWinner();\n\t\tassertPlayersTurn(playerID);\n\t\tassertPlayerAP(playerID);\n\n\t\tfinal Player player = this.players.get(playerID);\n\n\t\t// Work out where the move would take the player\n\t\tfinal Location location = player.getLocation().atCompassDirection(\n\t\t\t\tdirection);\n\n\t\t// Ensure that the movement is within the bounds of the map and not\n\t\t// into a wall\n\t\tif (!this.map.insideMap(location)\n\t\t\t\t|| !this.map.getMapCell(location).isWalkable()) {\n\t\t\tthrow new CommandException(\"can't move into a wall\");\n\t\t}\n\n\t\tif (otherPlayerOnTile(location, playerID)) {\n\t\t\tthrow new CommandException(\"can't move into another player\");\n\t\t}\n\n\t\t// Costs one action point\n\t\tplayer.decrementAp();\n\n\t\t// Move the player\n\t\tplayer.setLocation(location);\n\n\t\tadvanceTurn(playerID);\n\t\treturn;\n\t}", "public boolean moveUnit(Position from, Position to);", "private void move()\r\n {\r\n int num = Game.random(4);\r\n String direction;\r\n if (num == 0)\r\n direction = \"north\";\r\n else if (num == 1)\r\n direction = \"east\";\r\n else if (num == 2)\r\n direction = \"south\";\r\n else //num == 3\r\n direction = \"west\";\r\n Room nextRoom = room.nextRoom(direction);\r\n if (nextRoom != null)\r\n {\r\n changeRoom(nextRoom);\r\n \r\n //Monster or Robot greets everyone was already in the room\r\n ArrayList<Person> peopleList = new ArrayList<Person>();\r\n \r\n peopleList = nextRoom.getPeople();\r\n peopleList.remove(name);\r\n \r\n String greetings =\"Hey \";\r\n for (int i=0; i<peopleList.size(); i++)\r\n \tgreetings += peopleList.get(i).getName() + \", \";\r\n\r\n if (!(peopleList.size()==0))\r\n \tsay(greetings);\r\n } \r\n \r\n }", "public void move(String command) {\n\t\tif(command==\"F\"){\n\t\t\tmoveForwards();\n\t\t}else if(command==\"T\"){\n\t\t\tturnClockwise();\n\t\t}\n\t}", "private PlayerAction moveStep(Node node, Hero hero, Room room) {\n\t\treturn null;\n\t}", "public void gameMoveCharacter(String username, String gameID, int destGridX, int destGridY)\r\n\t{\r\n\t\t// make sure we're not moving the current user's character again\r\n\t\tif(!basicAvatarData.getUsername().equals(username))\r\n\t\t{\r\n\t\t\t// check the game ID\r\n\t\t\tif(gameID.toLowerCase().equals(\"pirates\"))\r\n\t\t\t{\r\n\t\t\t\t// Pirates of the Caribbean\r\n\t\t\t\tgamePirates.moveShip(username, destGridX, destGridY);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void move(String direction) {\n \n }", "protected void execute() {\r\n \tmanipulator.moveElevator(speed);\r\n }", "public void act() \n {\n playerMovement();\n }", "@Override\n\tpublic void action(Player player) {\n\t\tfireMessageEvent(player.getPlayerId());\n\t\tplayer.setPosition(jail);\n\t\tplayer.setInJail(true);\n\t}", "public void moveToSelected() {\n if (selectionX != -1) {\n // This short circuits but if it's not multiplayer the second statement will do nothing\n if (map.moveEntity(map.getCurrentTurnHero(), selectionX, selectionY) && multiplayerGameManager\n .hookPlayerMove(selectionX, selectionY)) {\n map.updateVisibilityArray();\n visionChanged = true;\n // See if this hero has moved on a position that meets any movement objectives\n gameState.updateMovementGoal(selectionX, selectionY);\n }\n }\n\n if (map.getCurrentTurnHero().getActionPoints() < 2) {\n nextTurn();\n }\n }", "public void movePlayer(Direction d) {\n if(d == null){\n return;\n }\n if(this.model.board.checkMove(d)){\n this.model.board.move(d);\n }\n else if (this.model.board.checkPush(d)){\n this.model.board.push(d);\n }\n else if(this.model.board.checkCombine(d)){\n this.model.board.combine(d);\n }\n else {\n System.out.println(\"Cannot move \" + d);\n }\n this.window.updateGame(this.model.board);\n this.window.cPanel.moveLabel.setText(\"Moves : \" + this.model.board.moveCount);\n if(this.model.checkWin()){\n this.window.disableKeys();\n JOptionPane.showMessageDialog(null, \"You Won!\", \"NinjaSe\", JOptionPane.INFORMATION_MESSAGE);\n }\n }", "@Override\n public CommandResult execute(CommandSource src, CommandContext commandContext) throws CommandException {\n return CommandResult.success();\n\n /*if (src instanceof Player) {\n Player sender = (Player) src;\n if(!commandContext.hasAny(\"target\")) {\n src.sendMessage(Text.of(new Object[]{TextColors.RED, \"Invalid arguments\"}));\n return CommandResult.success();\n } else {\n User user = commandContext.<User>getOne(\"target\").get();\n if (user.isOnline()) {\n sender.sendMessage(Text.of(TextColors.RED, \"Player is online, Please use /teleport\"));\n } else {\n GameProfileManager gameProfileManager = Sponge.getGame().getServer().getGameProfileManager();\n Optional<UserStorageService> userStorage = Sponge.getServiceManager().provide(UserStorageService.class);\n UUID uuid = null;\n try {\n uuid = userStorage.get().getOrCreate(gameProfileManager.get(user.getName(), false).get()).getUniqueId();\n } catch (InterruptedException | ExecutionException e) {\n e.printStackTrace();\n }\n if (userStorage.isPresent()) {\n UserStorageService userStorage2 = userStorage.get();\n Optional<User> userOptional = userStorage2.get(uuid);\n if (userOptional.isPresent()) {\n User user2 = userOptional.get();\n double x = user2.getPlayer().get().getLocation().getX();\n double y = user2.getPlayer().get().getLocation().getY();\n double z = user2.getPlayer().get().getLocation().getZ();\n sender.sendMessage(Text.of(\"Loc: x:\", x, \" y:\", y, \" z:\", z));\n Vector3d vector = new Vector3d(x, y, z);\n sender.setLocation(sender.getLocation().setPosition(vector));\n } else {\n // error?\n }\n }\n }\n return CommandResult.success();\n }\n } else {\n src.sendMessage(Text.of(\"Only a player Can run this command!\"));\n return CommandResult.success();\n }*/\n }", "public abstract Position executeMovement(Position pos, Surface surface);", "private void switchPlayer(Player opponentPlayer, Match match) {\r\n if(opponentPlayer.getPlayerId().equals(match.getPlayer1().getPlayerId())){\r\n setCurrentPlayer(match, 1);\r\n } else if (opponentPlayer.getPlayerId().equals(match.getPlayer2().getPlayerId())){\r\n setCurrentPlayer(match, 2);\r\n } else {\r\n LOGGER.error(\"Player not found\");\r\n }\r\n }", "public void movePlayer(String direction) {\n if(playerAlive(curPlayerRow, curPlayerCol)){\n if(direction.equals(\"u\")&&(curPlayerRow-1)>=0){\n overwritePosition(curPlayerRow, curPlayerCol, (curPlayerRow-1), curPlayerCol);\n curPlayerRow -= 1;\n }else if(direction.equals(\"d\")&&(curPlayerRow+1)<=7){\n overwritePosition(curPlayerRow, curPlayerCol, (curPlayerRow+1), curPlayerCol);\n curPlayerRow += 1;\n }else if(direction.equals(\"l\")&&(curPlayerCol-1)>=0){\n overwritePosition(curPlayerRow, curPlayerCol, curPlayerRow, (curPlayerCol-1));\n curPlayerCol -= 1;\n }else if(direction.equals(\"r\")&&(curPlayerCol+1)<=9){\n overwritePosition(curPlayerRow, curPlayerCol, curPlayerRow, (curPlayerCol+1));\n curPlayerCol += 1;\n }\n }\n if(playerFoundTreasure(curPlayerRow, curPlayerCol)){\n playerWins();\n }\n adjustPlayerLifeLevel(curPlayerRow, curPlayerCol);\n int[] array = calcNewTrollCoordinates(curPlayerRow, curPlayerCol, curTrollRow, curTrollCol);\n if(curPlayerRow == curTrollRow && curPlayerCol == curTrollCol){\n gameBoard[curTrollRow][curTrollCol] = new TrollPiece();\n }else{\n int newTrollRow = array[0];\n int newTrollCol = array[1];\n overwritePosition(curTrollRow, curTrollCol, newTrollRow, newTrollCol);\n curTrollRow = newTrollRow;\n curTrollCol = newTrollCol;\n }\n }", "public void move();", "public void move();", "public void move(){\n\t\t\n\t}", "public boolean playMove(String input_command) {\n // This function will take a command, validates input and calls for a move for a\n // player\n // whoes turn is there.\n String[] inputs = input_command.split(\" \");\n String move = inputs[0];\n PlayerController playerController = getNextPlayer();\n this.playerControllerList.remove(playerController);\n System.out.println(\"\\nPlayer\" + playerController.getPlayerId() + \" choosed:\" + input_command + \" move\");\n System.out.println(\"Before playing move=>\" + getStateOfPlayer(playerController));\n System.out.println(\"Before playing move=> Board State:\" + getStateOfBoard());\n switch (move) {\n case \"STRIKE\":\n this.gameController.strikeMove(playerController);\n break;\n case \"MULTI_STRIKE\":\n // We should take one more input that is count of striked coins\n this.gameController.multiStrikeMove(playerController, Integer.parseInt(inputs[1]));\n break;\n case \"RED_STRIKE\":\n this.gameController.redStrikeMove(playerController);\n break;\n case \"NONE\":\n this.gameController.noneMove(playerController);\n break;\n case \"DEFUNCT_COIN\":\n if(inputs[1].equals(\"BLACK\")){\n this.gameController.defunctCoinMove(playerController, CoinType.BLACK);\n }else if(inputs[1].equals(\"RED\")){\n this.gameController.defunctCoinMove(playerController, CoinType.RED);\n }\n break;\n case \"STRIKER_STRIKE\":\n this.gameController.strikerStrikeMove(playerController);\n break;\n }\n this.playerControllerList.add(playerController);\n System.out.println(\"After playing move=> Board State:\" + getStateOfBoard());\n System.out.println(\"After playing move=>\" + getStateOfPlayer(playerController) + \"\\n\");\n changeTurn();\n PlayerController winner = calculateWinner();\n if (winner != null) {\n System.out.println(\"Winner is:Player\" + winner.getPlayerId() + \" having points:\" + winner.getPoints());\n return false;\n } else {\n if (this.gameController.isBoardEmpty() == true) {\n System.out.println(\"Match is draw\");\n return false;\n }\n }\n return true;\n }", "@Override\n \t\t\t\tpublic void doMove() {\n \n \t\t\t\t}", "boolean teleport(Player p1, Player p2, boolean change);", "@Override\r\n\tpublic void getPlayerAction() {\r\n\t\tif(!gameOver())\r\n\t\t\tcomputerTurn();\r\n\t}", "public void act() \n {\n \n move(1);\n \n Player2 player2 = new Player2();\n myWorld2 world = (myWorld2)getWorld();\n \n \n checkForDeath();\n }", "public void turnToPlay(Player opponent) {\n\n }", "public abstract void execute(Player p);", "private void playerMove(PlayerPiece playerPiece, String direction) {\n // Row will be -1 from player location with the same column value\n System.out.println(playerPiece + \" trying to move \" + direction + \".\");\n Tile playerLocation = playerPiece.getLocation();\n System.out.println(\"Player in: \" + playerLocation.getRow() + \" \" + playerLocation.getColumn());\n int newRow = playerLocation.getRow();\n int newColumn = playerLocation.getColumn();\n switch (direction) {\n case \"u\":\n newRow -= 1;\n break;\n case \"d\":\n newRow += 1;\n break;\n case \"l\":\n newColumn -= 1;\n break;\n case \"r\":\n newColumn += 1;\n break;\n }\n if (newRow >= 0 && newColumn >= 0 && newRow < this.board.getGrid().getRows() && newColumn < this.board.getGrid().getColumns()) {\n System.out.println(newRow + \" \" + newColumn);\n Tile newLocation = this.board.getGrid().getTile(newRow, newColumn);\n System.out.println(\"New Location:\" + newLocation);\n System.out.println(\"Cords: \" + newLocation.getRow() + \" \" + newLocation.getColumn());\n if (newLocation.isAvailable()) {\n playerLocation.removeOccupier();\n playerPiece.setLocation(newLocation);\n newLocation.setOccupier(playerPiece);\n System.out.println(\"Player moved to: \" + playerLocation.getRow() + \" \" + playerLocation.getColumn());\n this.board.getGrid().print();\n }\n }\n }", "@Override\n public void execute() {\n String nextPlayer = CModel.getInstance().getCurrGame().advancePlayerTurn();\n if(nextPlayer.equals(CModel.getInstance().getMyUser().getUserName())) {\n CModel.getInstance().setCurrGameState(new MyTurn());\n }\n else {\n //update the player stats\n CModel.getInstance().setCurrGameState(new NotMyTurn());\n }\n CModel.getInstance().updatePlayerStatsView();\n }", "private void setPlayerRoom(){\n player.setRoom(currentRoom);\n }", "@Override\r\n public void setupMove(double localTime) {\n if (mEntityMap.containsKey(mLocalCharId)) {\r\n Character localChar = (Character)mEntityMap.get(mLocalCharId);\r\n localChar.setController(Game.mCamera);\r\n ((Client)mEndPoint).sendUDP(localChar.getControl());\r\n\r\n ChatMessage chat = localChar.getChat();\r\n if (chat != null && chat.s != null) {\r\n System.err.println(\"Sending chat to server:\" + chat.s);\r\n ((Client)mEndPoint).sendTCP(chat);\r\n chat.s = null;\r\n }\r\n }\r\n\r\n // receive world state from server\r\n TransmitPair pair;\r\n for (;;) {\r\n pair = pollHard(localTime, 0);\r\n if (pair == null)\r\n break;\r\n\r\n if (pair.object instanceof StateMessage) {\r\n // Server updates client with state of all entities\r\n StateMessage state = (StateMessage) pair.object;\r\n applyEntityChanges(state.timestamp, state.data);\r\n\r\n // update clock correction based on packet timestamp, arrival time\r\n if (mClockCorrection == Double.MAX_VALUE) {\r\n mClockCorrection = state.timestamp - localTime;\r\n } else {\r\n mClockCorrection = Config.CORRECTION_WEIGHT * (state.timestamp - localTime)\r\n + (1 - Config.CORRECTION_WEIGHT) * mClockCorrection;\r\n }\r\n } else if (pair.object instanceof StartMessage) {\r\n // Server tells client which character the player controls\r\n mLocalCharId = ((StartMessage) pair.object).characterEntity;\r\n System.err.println(\"Client sees localid, \" + mLocalCharId);\r\n } else if (pair.object instanceof ChatMessage) {\r\n ChatMessage chat = (ChatMessage) pair.object;\r\n mChatDisplay.addChat(localTime, chat.s, Color.white);\r\n } else if (pair.object instanceof ChunkMessage) {\r\n ChunkMessage chunkMessage = (ChunkMessage) pair.object;\r\n ChunkModifier.client_putModified(chunkMessage);\r\n }\r\n }\r\n\r\n // move local char\r\n if (mEntityMap.containsKey(mLocalCharId)) {\r\n Character localChar = (Character)mEntityMap.get(mLocalCharId);\r\n localChar.setupMove(localTime);\r\n }\r\n }", "public void move() {\n if(Objects.nonNull(this.position)) {\n Position position = this.getPosition();\n Function<Position, Position> move = moveRobotInDirectionMap.get(position.getDirection());\n this.position = move.apply(position);\n }\n }", "public void act() \r\n {\r\n move();\r\n }", "public void makeMove(Location loc)\n {\n if (loc == null)\n removeSelfFromGrid();\n else\n {\n int newDirection = getLocation().getDirectionToward(loc);\n Location nextLocation = getLocation().getAdjacentLocation(newDirection);\n Actor otherActor = getGrid().get(nextLocation);\n if(otherActor != null)\n {\n if(otherActor instanceof AbstractPokemon)\n {\n AbstractPokemon otherPokemon = (AbstractPokemon) otherActor;\n battle(otherPokemon);\n }\n else\n {\n PokemonTrainer otherTrainer = (PokemonTrainer) otherActor;\n battleTrainer(otherTrainer);\n }\n }\n if(getGrid() != null)\n moveTo(loc);\n }\n }", "public abstract boolean changeMove();", "@Override\n\tpublic void excute() {\n\t\tmoveEvent.move(commandinfo.getValue() * 200);\n\t}", "public void movePlayer(PositionTracker tracker, int direction){\n\n\t //declare and initialize variables\n\t\tboolean moveIsValid = false;\n\t boolean doorIsUnlocked = false;\n\t \n\t switch(direction){//initiate switch statement, checking the value of direction\n\n\t //enter case 1\n\t case 1:\t//invoke the checkDoor method\n\t\t\t \tdoorIsUnlocked = this.checkDoor(tracker.getCurrentRoom().getDoor());\n\t\t\t \t\n\t\t\t \t//initiate if-else statement\n\t\t\t \tif(doorIsUnlocked == true) {\n\t\t\t \t\t\n\t\t\t \t\t//invoke the checkMove method\n\t\t\t\t \tmoveIsValid = this.checkMove(tracker, direction);\n\t\t\t \t\t\n\t\t\t \t\t//initiate if-else statement\n\t\t\t \t\tif(moveIsValid == true) {\n\t\t\t \t\t\t\n\t\t\t\t \t\tthis.makeMove(tracker, direction);//invoke the makeMove method\n\t\t\t\t \t\t\n\t\t\t\t \t\tthis.displayConfirmMove(direction);\n\t\t\t\t \t\t\n\t\t\t\t \t\ttracker.updateCurrentRoom();\n\t\t\t \t\t}\n\t\t\t\t \telse\n\t\t\t\t \t\tthis.displayNoRoomMsg();\n\t\t\t \t\t\n\t\t\t \t}else\n\t\t\t \t\tthis.displayLockedDoorMsg();\n\t\t\t \t\n\t \t\t\tbreak;//break from switch\n\n\t //enter case 2\n\t case 2:\t//invoke the checkMove method\n\t\t\t \tmoveIsValid = this.checkMove(tracker, direction);\n\t\t\t \t\n\t\t\t \tif(moveIsValid == true) {//initiate if-else statement\n\t\t\t \t\t\n\t\t\t \t\tthis.makeMove(tracker, direction);//invoke the makeMove method\n\t\t\t \t\t\n\t\t\t \t\tthis.displayConfirmMove(direction);\n\t\t\t \t\t\n\t\t\t \t\ttracker.updateCurrentRoom();\n\t\t\t \t\t\n\t\t\t \t}\n\t\t\t \telse\n\t\t\t \t\tthis.displayNoRoomMsg();\n\t\t\t \t\n\t \t\t\tbreak;//break from switch\n\n\t \t}//end switch \n\t }", "public void move() {\n\n if (_currentFloor == Floor.FIRST) {\n _directionOfTravel = DirectionOfTravel.UP;\n }\n if (_currentFloor == Floor.SEVENTH) {\n _directionOfTravel = DirectionOfTravel.DOWN;\n }\n\n\n if (_directionOfTravel == DirectionOfTravel.UP) {\n _currentFloor = _currentFloor.nextFloorUp();\n } else if (_directionOfTravel == DirectionOfTravel.DOWN) {\n _currentFloor = _currentFloor.nextFloorDown();\n }\n\n if(_currentFloor.hasDestinationRequests()){\n stop();\n } \n\n }", "public boolean doMoveRemote(Player player, Prisoner prisoner, int rowOrCol, int row, int col) throws IClientException, RemoteException;", "private void doMoveIfPossible() {\r\n if (selected != null) {\r\n if (picked != null) {\r\n if (picked.doMove(selected.getX(), selected.getY())) {\r\n client1.write(ClientMessages.Move, picked.getPositionInArray(), selected.getX(), selected.getY());\r\n client2.write(ClientMessages.Move, picked.getPositionInArray(), selected.getX(), selected.getY());\r\n }\r\n if (picked.doCapture(selected.getX(), selected.getY())) {\r\n client1.write(ClientMessages.Capture, picked.getPositionInArray(), selected.getX(), selected.getY());\r\n client2.write(ClientMessages.Capture, picked.getPositionInArray(), selected.getX(), selected.getY());\r\n }\r\n CastlingMove castl;\r\n if (picked.getClass() == King.class && ((King) picked).doCastling(castl = getCastlingMove())) {\r\n client1.write(ClientMessages.Castling, castl.getRook().getPositionInArray(), castl.getRookX(), selected.getX());\r\n client2.write(ClientMessages.Castling, castl.getRook().getPositionInArray(), castl.getRookX(), selected.getX());\r\n }\r\n }\r\n }\r\n }", "private void move() {\n\t\t\tangle += Math.PI/24;\n\t\n\t\t\tcow.locX = Math.sin(angle) * 2.5 + player.getLocation().getX();\n\t\t\tcow.locZ = Math.cos(angle) * 2.5 + player.getLocation().getZ();\n\t\t\t\n\t\t\tLocation loc = new Location(player.getWorld(), cow.locX, player.getLocation().getY() + 1.5, cow.locZ);\n\t\t\tloc.setDirection(player.getLocation().subtract(loc).toVector()); //Look at the player\n\t\t\t\n\t\t\tPacketHandler.teleportFakeEntity(player, cow.getId(), loc);\n\t\t}", "@Override\n\tdefault void onExecution(Player player, Position start, Position end) {\n\n\t\tForceMovement forceMovement = new ForceMovement(player.getPosition(),\n\t\t\t\tnew Position(player.getX(), player.getY() - 3, player.getHeight()), 12, 2, Direction.SOUTH);\n\t\tWorld.schedule(new ForceMovementTask(player, 0, forceMovement, new Animation(5043)) {\n\t\t\t@Override\n\t\t\tprotected void onCancel(boolean logout) {\n\t\t\t\tsuper.onCancel(logout);\n\t\t\t\tWorld.schedule(new Task(1) {\n\t\t\t\t\tint ticks = 0;\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void execute() {\n\t\t\t\t\t\tswitch (ticks++) {\n\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\tplayer.move(new Position(player.getX(), player.getY(), player.getHeight() + 1));\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\tplayer.move(end);\n\t\t\t\t\t\t\tcancel();\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}", "public void playCard(IPlayer owner){\n // Wont play card unless a player has it\n if(command == \"Move1\"){\n owner.Move(owner.getPlayerDir());\n }\n else if(command == \"Move2\"){\n for (Integer i=0; i < 2; i++) {\n owner.Move(owner.getPlayerDir());\n }\n }\n else if(command == \"Move3\"){\n for (Integer i=0; i < 3; i++) {\n owner.Move(owner.getPlayerDir());\n }\n }\n else if (command == \"MoveBack\"){\n owner.Move(dirCtrl.invertDirection(owner.getPlayerDir()));\n }\n else if(command == \"TurnRight\"){\n owner.Turn(TurnDirection.RIGHT);\n }\n else if(command == \"TurnLeft\"){\n owner.Turn(TurnDirection.LEFT);\n }\n else if(command == \"Turn180\"){\n owner.Turn(TurnDirection.BACKWARDS);\n }\n }", "@Override\n\tpublic ServerResponse executeCommand(ServerModelIntf model) { \t\t\n\t\treturn model.movePlayer(username, this.USER_VERIFICATION, dir);\n\t}", "public void setPlayer(Player newPlayer) {\n roomPlayer = newPlayer;\n }", "public void movePiece(Coordinate from, Coordinate to);", "private void spacePressed()\r\n {\r\n boolean moved = true;\r\n int currentPlayer = worldPanel.getCurrentPlayer();\r\n int currentUnit = worldPanel.getCurrentUnit();\r\n playerMoved(currentPlayer,currentUnit,moved);\r\n setMapPos();\r\n }", "private void autoCommand(String player) {\n try {\n Piece s = Piece.playerValueOf(player);\n _playing = false;\n _players[s.ordinal()] = new MachinePlayer(s, this);\n } catch (IllegalArgumentException excp) {\n error(\"unknown player: %s\", player);\n System.out.println();\n }\n }", "public abstract void move();", "public abstract void move();", "public abstract void move();", "public abstract void move();" ]
[ "0.6710881", "0.66559064", "0.662138", "0.6583274", "0.6578514", "0.6530007", "0.6512083", "0.6470967", "0.6444951", "0.6441976", "0.6433729", "0.6423612", "0.64228475", "0.64224553", "0.63640183", "0.63633835", "0.633946", "0.6311787", "0.6257096", "0.6232525", "0.62216365", "0.6210253", "0.62062466", "0.6202834", "0.61703855", "0.61646974", "0.61630774", "0.616138", "0.6106062", "0.60984296", "0.6097309", "0.6085458", "0.6071461", "0.60662127", "0.6063743", "0.6051993", "0.6038439", "0.60171795", "0.6012328", "0.59984314", "0.5996102", "0.59948295", "0.5989458", "0.5982538", "0.59817445", "0.5975588", "0.5966574", "0.5964769", "0.596441", "0.59638304", "0.596236", "0.5955029", "0.5954627", "0.59533113", "0.59531003", "0.5950154", "0.59425765", "0.5941758", "0.59285885", "0.592794", "0.59240514", "0.5921584", "0.5912944", "0.5905589", "0.58995706", "0.5897976", "0.5897976", "0.58958477", "0.58914506", "0.5889466", "0.5889045", "0.5886572", "0.58791584", "0.58704233", "0.5862441", "0.5856681", "0.5835513", "0.5834241", "0.5833929", "0.5833307", "0.5831133", "0.5830756", "0.5823298", "0.5822063", "0.5821195", "0.581922", "0.58173555", "0.5814283", "0.58140874", "0.5811121", "0.5808553", "0.5805726", "0.5795117", "0.5793923", "0.579268", "0.5787582", "0.5787217", "0.5787217", "0.5787217", "0.5787217" ]
0.6031041
37
Actions performed once player enters a room Checks to see if room isDark, if not the locationInfo is given.
private void enterRoom(Room newRoomEntered) { player.setCurrentRoom(newRoomEntered); if(player.getCurrentRoom().isDark()){//check to see if room is dark System.out.println("The room is pitchblack and you are unable to see anything"); System.out.println(); } else { System.out.println(player.getCurrentRoom().printLocationInfo()); System.out.println(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static void enter(Player player, Room room) {\n if (player.moveTo(room)) {\n System.out.println(\"You just entered \" + player.getLocation());\n }\n else {\n System.out.println(\"That way appears to be blocked.\");\n }\n }", "public abstract void onLand(Player player);", "public void lookAround() {\n\t\t\tdisplay(\"The room is full of gold!\");\n\t\t}", "@Override\n\tprotected void on_room_entered(String room_door_name) {\n\n\t}", "public abstract void enterRoom();", "static void look(Player player) {\n String stuff = player.getLocation().whatStuff();\n if (!stuff.equals(\"\")) {\n System.out.println(\"You see:\\n\" + stuff);\n }\n else {\n System.out.println(\"You see an empty room.\");\n }\n }", "@Override\n public void onLocationChanged(Location location) {\n for (Map.Entry<Marker, Integer> e : gameMarkers.entrySet()) {\n double distance = distFrom(\n location.getLatitude(),\n location.getLongitude(),\n e.getKey().getPosition().latitude,\n e.getKey().getPosition().longitude);\n\n if (distance < 25) {\n button.setVisibility(View.VISIBLE);\n standingOnGameId = e.getValue();\n break;\n } else {\n button.setVisibility(View.INVISIBLE);\n }\n }\n }", "public static void inspectRoom(Player player) {\n System.out.print(\"You see: \");\n player.getCurrentRoom().inspect();\n }", "public void updateInformation() {\r\n onFirstCycle = false;\r\n lastLocation = player.getLocation();\r\n preparedAppearance = false;\r\n }", "private void deathRoom()\n {\n if(currentRoom.equals(deathRoom4))\n {\n alive = false;\n }\n }", "void onEnoughLightAvailable() {\n //start eye tracking if it is not running already\n startEyeTracking();\n }", "private boolean checkM(){\n if(currentLocation.x == previousLocation.x && currentLocation.y == previousLocation.y) {\n return false;\n }\n // Is outside the border\n if(currentLocation.x < size || currentLocation.y < size || currentLocation.x > map.numRows - size || currentLocation.y > map.numCols - size) {\n return false;\n }\n // Is on the land\n double angle2 = 0;\n while (angle2 < 6.3) {\n if (map.getTerrainGrid()[currentLocation.x + (int) (size/2 * cos(angle2))][currentLocation.y + (int) (size/2 * sin(angle2))] == Colors.OCEAN) {\n return false;\n }\n angle2 += 0.3;\n }\n return true;\n }", "public void land() {\n Game currentGame = this.getGame();\n this.setHasBeenVisited(true);\n currentGame.setMode( Game.Mode.GAME_WON);\n\n }", "public void expLocation() {\n\t\tif (!death) {\t// Geht nicht wenn Tod!\n\t\t\t\n\t\t\t// Beschreibungen anzeigen und boolean explored auf wahr setzen, außer der Raum wurde bereits untersucht\n\t\t\tif (location[this.currentLocation].isExplored()) { Tuna.setMessage(\"Dieser Raum wurde bereits untersucht!\");\n\t\t\t} else {\n\t\t\t\tTuna.addText(location[this.currentLocation].getDescriptions().getExploreDescription());\n\t\t\t\tlocation[this.currentLocation].setExplored(true);\n\t\t\t}\n\t\t\t\n\t\t\t// Items an Stelle null im Item-Array des Standortes sichtbar machen\n\t\t\tif ((currentLocation > 0 && currentLocation < 7 && currentLocation != 2) || currentLocation == 20) {\n\t\t\t\tlocation[this.currentLocation].getItem(0).setVisible(true);\n\t\t\t\t/* Im Korridor (1) der Kaffeelöscherkasten\n\t\t\t\t * Im Konferenzraum (3) der Ventilationsschacht\n\t\t\t\t * In der Kammer der Leere (4) die Notiz\n\t\t\t\t * Im Ventilationsraum (5) die Notiz\n\t\t\t\t * In der Damentoilette (6) das Skillboook\n\t\t\t\t * Im Fahrstuhlschacht (20) die Kaffeetasse\n\t\t\t\t */\n\t\t\t}\n\t\t\t\n\t\t\t// Items an Stelle eins im Item-Array des Standortes sichtbar machen\n\t\t\tif (currentLocation == 9) {\n\t\t\t\tlocation[this.currentLocation].getItem(1).setVisible(true);\n\t\t\t}\n\t\t} else if (death) {\n\t\t\tTuna.setMessage(\"Du bist tot!\");\n\t\t}\n\t}", "static String enter(Player player, Room room) {\n if (player.moveTo(room)) {\n return \"-Charlie Bot: You have entered \" + player.getLocation();\n } else {\n return \"That way appears to be blocked.\";\n }\n }", "public void onLocationChange() {\n\t\tupdateWeather();\n\t\tgetLoaderManager().restartLoader(FORECAST_LOADER_ID, null, this);\n\t}", "public void updateScreen() {\r\n\t\tsuper.updateScreen();\r\n\r\n\t\tif (!this.mc.thePlayer.isEntityAlive() || this.mc.thePlayer.isDead) {\r\n\t\t\tthis.mc.thePlayer.closeScreen();\r\n\t\t}\r\n\t}", "@Override\n public void onLocationChanged( final Location location ) {\n if (location!=null) {\n // sore last location as member, in case it is needed somewhere (in e.g. your adjusted project)\n MainActivity.this.lastKnownLocaton = location;\n if ( MainActivity.this.architectView != null ) {\n // check if location has altitude at certain accuracy level & call right architect method (the one with altitude information)\n if ( location.hasAltitude() && location.hasAccuracy() && location.getAccuracy()<7) {\n MainActivity.this.architectView.setLocation( location.getLatitude(), location.getLongitude(), location.getAltitude(), location.getAccuracy() );\n } else {\n MainActivity.this.architectView.setLocation( location.getLatitude(), location.getLongitude(), location.hasAccuracy() ? location.getAccuracy() : 1000 );\n }\n }\n }\n }", "void opponentInRoom();", "public final void onExitAmbient() {\n if (org.xms.g.utils.GlobalEnvSetting.isHms()) {\n org.xms.g.utils.XmsLog.d(\"XMSRouter\", \"((com.huawei.hms.maps.MapView) this.getHInstance()).onExitAmbient()\");\n ((com.huawei.hms.maps.MapView) this.getHInstance()).onExitAmbient();\n } else {\n org.xms.g.utils.XmsLog.d(\"XMSRouter\", \"((com.google.android.gms.maps.MapView) this.getGInstance()).onExitAmbient()\");\n ((com.google.android.gms.maps.MapView) this.getGInstance()).onExitAmbient();\n }\n }", "public void guardUpdate(){\r\n\t\t//check if a enemy has been spotted\r\n\t\tif (checkSight()){\r\n\t\t\tseen = true;\r\n\t\t} if (seen) {\r\n\t\t\tcreature.setSpeed(1.5);\r\n\t\t\tchaseEnemy(seenEnemy, 5);\r\n\t\t\treturn; //if player has been spotted end method here\r\n\t\t}\r\n\t\t//if no enemy has been spotted\r\n\t\tcreature.setSpeed(1);\r\n\t\tif (creature.getCreature().equals(CreatureType.PGuard) || creature.getCreature().equals(CreatureType.SGuard)){ //Patrol Guards and Stationary Guards\r\n\t\t\tif (index > checkpoints.size()-1){\r\n\t\t\t\tindex = 0;\r\n\t\t\t}\r\n\t\t\tgoToLocation (checkpoints.get(index));\r\n\t\t} else if(creature.getCreature().equals(CreatureType.RGuard)){ //Roaming Guards\r\n\t\t\troamArea();\r\n\t\t} if (!checkCollision(x, y)) {\r\n\t\t\tgoToLocation(x, y);\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic void landOnSquare(Player player) {\n\t\tsuper.landOnSquare(player);\r\n\t}", "private boolean processInput() {\r\n\r\n\t\tif (keys.get(Keys.ROOM_ONE)) {\r\n\t\t\t// If there is a defined room\r\n\t\t\tif (world.getRooms().size >= 1) {\r\n\t\t\t\t// If current room is different then pressed key\r\n\t\t\t\tif (!world.getCurrentRoom().equals(world.getRooms().get(0))) {\r\n\t\t\t\t\t// If world has at least one trap\r\n\t\t\t\t\tif (world.getCurrentRoom().hasTraps()) {\r\n\t\t\t\t\t\t// If current trap is deactivated\r\n\t\t\t\t\t\tif (!world.getCurrentRoom().getCurrentTrap().isActive())\r\n\t\t\t\t\t\t\tworld.setCurrentRoom(0);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// else switch directly\r\n\t\t\t\t\t\tworld.setCurrentRoom(0);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (keys.get(Keys.ROOM_TWO)) {\r\n\t\t\t// If there are two defined room\r\n\t\t\tif (world.getRooms().size >= 2) {\r\n\t\t\t\t// If current room is different then pressed key\r\n\t\t\t\tif (!world.getCurrentRoom().equals(world.getRooms().get(1))) {\r\n\t\t\t\t\t// If world has at least one trap\r\n\t\t\t\t\tif (world.getCurrentRoom().hasTraps()) {\r\n\t\t\t\t\t\t// If current trap is deactivated\r\n\t\t\t\t\t\tif (!world.getCurrentRoom().getCurrentTrap().isActive())\r\n\t\t\t\t\t\t\tworld.setCurrentRoom(1);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// else switch directly\r\n\t\t\t\t\t\tworld.setCurrentRoom(1);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (keys.get(Keys.ROOM_THREE)) {\r\n\t\t\t// If there are two defined room\r\n\t\t\tif (world.getRooms().size >= 3) {\r\n\t\t\t\t// If current room is different then pressed key\r\n\t\t\t\tif (!world.getCurrentRoom().equals(world.getRooms().get(2))) {\r\n\t\t\t\t\t// If world has at least one trap\r\n\t\t\t\t\tif (world.getCurrentRoom().hasTraps()) {\r\n\t\t\t\t\t\t// If current trap is deactivated\r\n\t\t\t\t\t\tif (!world.getCurrentRoom().getCurrentTrap().isActive())\r\n\t\t\t\t\t\t\tworld.setCurrentRoom(2);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// else switch directly\r\n\t\t\t\t\t\tworld.setCurrentRoom(2);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (keys.get(Keys.TRAP_ONE)) {\r\n\t\t\t// If there is a defined room\r\n\t\t\tif (world.getCurrentRoom().getTraps().size >= 1) {\r\n\t\t\t\tif (!world.getCurrentRoom().getCurrentTrap().isActive()) {\r\n\t\t\t\t\tworld.getCurrentRoom().setCurrentTrap(0);\r\n\t\t\t\t\ttrapOneReleased();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (keys.get(Keys.TRAP_TWO)) {\r\n\t\t\t// If there is a defined room\r\n\t\t\tif (world.getCurrentRoom().getTraps().size >= 2) {\r\n\t\t\t\tif (!world.getCurrentRoom().getCurrentTrap().isActive()) {\r\n\t\t\t\t\tworld.getCurrentRoom().setCurrentTrap(1);\r\n\t\t\t\t\ttrapTwoReleased();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (keys.get(Keys.TRAP_THREE)) {\r\n\t\t\t// If there is a defined room\r\n\t\t\tif (world.getCurrentRoom().getTraps().size >= 3) {\r\n\t\t\t\tif (!world.getCurrentRoom().getCurrentTrap().isActive()) {\r\n\t\t\t\t\tworld.getCurrentRoom().setCurrentTrap(2);\r\n\t\t\t\t\ttrapThreeReleased();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (keys.get(Keys.TRAP_FINAL)) {\r\n\t\t\tworld.getPlayer().setState(Player.State.DEAD);\r\n\t\t\tworld.getPlayer().setDeathType(Player.DeathType.BLOODY);\r\n\t\t\t\r\n\t\t\ttrapFinalReleased();\r\n\t\t}\r\n\t\t\r\n\t\tif (world.getCurrentRoom().hasTraps()) {\r\n\t\t\tTrap trap = world.getCurrentRoom().getCurrentTrap();\r\n\t\t\tif (keys.get(Keys.TRAP_TOGGLE)) {\r\n\t\t\t\t// Trap activation and deactivation\r\n\t\t\t\tif (!trap.isActive()) {\r\n\t\t\t\t\ttrap.activate();\r\n\t\t\t\t\ttrapToggleReleased(); // To limit input triggering\r\n\t\t\t\t} else if (trap.isActive()) {\r\n\t\t\t\t\ttrap.deactivate();\r\n\t\t\t\t\ttrapToggleReleased(); // To limit input triggering\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (keys.get(Keys.TRAP_INCREASE)) {\r\n\t\t\t\tif (trap.isActive()) {\r\n\t\t\t\t\tif (trap instanceof FloodTrap) {\r\n\t\t\t\t\t\t((FloodTrap) trap).increaseWaterLevel();\r\n\t\t\t\t\t} else if (trap instanceof BloodTrap) {\r\n\t\t\t\t\t\t((BloodTrap) trap).increaseBloodLevel();\r\n\t\t\t\t\t} else if (trap instanceof GasTrap) {\r\n\t\t\t\t\t\t((GasTrap) trap).increaseGasLevel();\r\n\t\t\t\t\t} else if (trap instanceof FreezeTrap) {\r\n\t\t\t\t\t\t((FreezeTrap) trap).increaseFreezeLevel();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (trap instanceof ElectroTrap) {\r\n\t\t\t\t\t((ElectroTrap) trap).increase();\r\n\t\t\t\t} else if (trap instanceof SpikeTrap) {\r\n\t\t\t\t\t((SpikeTrap) trap).increase();\r\n\t\t\t\t}\r\n\r\n\t\t\t\ttrapIncreaseReleased();\r\n\t\t\t} else if (keys.get(Keys.TRAP_DECREASE)) {\r\n\t\t\t\tif (trap.isActive()) {\r\n\t\t\t\t\tif (trap instanceof FloodTrap) {\r\n\t\t\t\t\t\t((FloodTrap) trap).decreaseWaterLevel();\r\n\t\t\t\t\t} else if (trap instanceof BloodTrap) {\r\n\t\t\t\t\t\t((BloodTrap) trap).decreaseBloodLevel();\r\n\t\t\t\t\t} else if (trap instanceof GasTrap) {\r\n\t\t\t\t\t\t((GasTrap) trap).decreaseGasLevel();\r\n\t\t\t\t\t} else if (trap instanceof FreezeTrap) {\r\n\t\t\t\t\t\t((FreezeTrap) trap).decreaseFreezeLevel();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (trap instanceof ElectroTrap) {\r\n\t\t\t\t\t((ElectroTrap) trap).decrease();\r\n\t\t\t\t} else if (trap instanceof SpikeTrap) {\r\n\t\t\t\t\t((SpikeTrap) trap).decrease();\r\n\t\t\t\t}\r\n\t\t\t\ttrapDecreaseReleased();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "@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 void levelEightScreen() {\n timer.stop();\n gameModel.setState(\"Level 8\");\n currentScene = levelSetup.getLevelEight().getScene(levelEightInitialEntrance);\n currentBoard = levelSetup.getLevelEight().getBoard();\n currentLevelScreen = levelSetup.getLevelEight();\n levelEightInitialEntrance = (levelEightInitialEntrance ? false : false);\n moveCharacter(mainWindow, currentScene, hero, currentBoard);\n }", "public void onLobby(){\n\t\tif(Bukkit.getPluginManager().isPluginEnabled(\"MVdWPlaceholderAPI\")){\n\t\t\tPlaceholderAPI.registerPlaceholder(SimplePlugin.getPlugin(ArenaPlugin.class), \"build_battle_players\",\n\t\t\t\t\tplaceholderReplaceEvent -> {\n\t\t\t\t\t\tint players = getArena().getPlayers(ArenaJoinMode.PLAYING).size();\n\t\t\t\t\t\treturn Integer.toString(players);\n\t\t\t\t\t});\n\n\t\t\tPlaceholderAPI.registerPlaceholder(SimplePlugin.getPlugin(ArenaPlugin.class), \"build_battle_time\",\n\t\t\t\t\tplaceholderReplaceEvent -> Common.plural(arena.getStartCountdown().getTimeLeft(), \"second\"));\n\n\t\t}\n\t}", "private void goRoom(Command command) \n {\n if(!command.hasSecondWord()) {\n // if there is no second word, we don't know where to go...\n Logger.Log(\"Where are you trying to go?\");\n return;\n }\n\n String direction = command.getSecondWord(); \n // Try to leave current room.\n Room nextRoom = currentRoom.getExit(direction);\n \n if (nextRoom == null) {\n Logger.Log(\"You walk repeatedly into a wall... Please try another direction\");\n }\n // If the portal is entered, call the random room method\n else {\n if (nextRoom.RoomID == 17){\n //System.out.println(\"????????\"); //An unusable string which may be implemented later\n Logger.Log(\"~*~*~PoRtAl~*~*~\");\n nextRoom = getRandomRoom();\n }\n \n currentRoom = nextRoom;\n Logger.Log(currentRoom.getShortDescription());\n } \n }", "public final void onEnterAmbient(android.os.Bundle param0) {\n if (org.xms.g.utils.GlobalEnvSetting.isHms()) {\n org.xms.g.utils.XmsLog.d(\"XMSRouter\", \"((com.huawei.hms.maps.MapView) this.getHInstance()).onEnterAmbient(param0)\");\n ((com.huawei.hms.maps.MapView) this.getHInstance()).onEnterAmbient(param0);\n } else {\n org.xms.g.utils.XmsLog.d(\"XMSRouter\", \"((com.google.android.gms.maps.MapView) this.getGInstance()).onEnterAmbient(param0)\");\n ((com.google.android.gms.maps.MapView) this.getGInstance()).onEnterAmbient(param0);\n }\n }", "public void enterRoom(Room room) {\n currentRoom = room;\n }", "@Override\n public void onCameraIdle() {\n Location centerLocation = new Location(\"\");\n LatLng midLatLng = this.map.getCameraPosition().target;\n centerLocation.setLatitude(midLatLng.latitude);\n centerLocation.setLongitude(midLatLng.longitude);\n hitNeighboursApi(centerLocation);\n HomeActivity activity = (HomeActivity) getActivity();\n activity.setmRequestLocation(midLatLng);\n requestedLocation.setText(\"\"+centerLocation.getLatitude()+\",\"+centerLocation.getLongitude());\n\n }", "public void enter() {\n // get data from current level\n GameState gs = (GameState) getStateMachine().getStates().get(\"game\");\n currentLevel = gs.getCurrentLevel();\n\n // TODO: for testing\n currentLevel.getCurrentquardant().setCleared(true);\n currentLevel.getCurrentquardant().setVisited(true);\n\n // set layout and add different panels\n getGamePanel().setLayout(layout);\n getGamePanel().add(shopPanel, BorderLayout.PAGE_START);\n //getGamePanel().add(mapPanel, BorderLayout.CENTER);\n\n // play backgroundmusic and toggle sound\n SoundBoard.BACKGROUND.play();\n SoundBoard.ERROR.play();\n\n }", "@Override\n public void onLocationAvailability(LocationAvailability availability) {\n }", "@Override\n public boolean onPlayAtLocation(GameState gameState, Location location) {\n if(gameState.tileAtLocation(location) && !gameState.wallAtLocation(location)) {\n gameState.addWall(location);\n return true;\n }\n else return false;\n }", "public boolean isFinalRoom(){\n System.out.println(\"------------------------------------------ ->\"+((EnemyRoom) room).getType());\n return ((EnemyRoom) room).getType().equals(\"Boss\");\n }", "private void goRoom(Command command) \n {\n if(!command.hasSecondWord()) \n {\n // if there is no second word, we don't know where to go...\n System.out.println(\"Go where?\");\n return;\n }\n\n String direction = command.getSecondWord();\n\n // Try to leave current room.\n Room nextRoom = currentRoom.getExit(direction);\n\n if (nextRoom == null) {\n System.out.println(\"There is no door!\");\n }\n else {\n //remove energy from the player everytime he switches rooms\n p.energy -= 10;\n System.out.println(\"Energy: \" + p.energy);\n \n \n currentRoom = nextRoom;\n System.out.println(currentRoom.getLongDescription());\n \n }\n }", "private void updateLevelScreen(boolean update, Monster monster) {\n if (monster != null) {\n currentLevelScreen.updateScene(update, monster);\n } else {\n currentLevelScreen.updateScene(update);\n }\n currentBoard = currentLevelScreen.getBoard();\n moveCharacter(mainWindow, currentScene, hero, currentBoard);\n }", "void avengersTower() {\n location = \"avengersTower\";\n System.out.print(\"______________________________________________________________\\n\");\n System.out.println(\"\\n////// AVENGERS TOWER //////\");\n System.out.println(\"\\nYou are back at the Avengers Tower!\");\n System.out.println(\"You can see for miles around. This is you base and your location!\");\n\n System.out.print(\"\\nTry 'north', 'south', 'east', 'west'\\n\");\n String compassSelection = input.nextLine();\n\n //If statement to determine the location that the user will go to\n if (compassSelection.equals(\"north\")) {\n financialDistrict();\n } else if (compassSelection.equals(\"east\")) {\n timeSquare();\n } else if (compassSelection.equals(\"south\")) {\n centralPark();\n } else if (compassSelection.equals(\"west\")) {\n hellsKitchen();\n } else {\n System.out.println(\"Please enter a valid direction!\\n\");\n avengersTower();\n }\n }", "public void goRoom(Command command) \n {\n if(!command.hasSecondWord()) {\n // if there is no second word, we don't know where to go...\n System.out.println(\"Go where?\");\n return;\n }\n\n String direction = command.getSecondWord();\n\n // Try to leave current room.\n Room nextRoom = currentRoom.getExit(direction);\n\n if (nextRoom == null) {\n System.out.println(\"There is no door!\");\n }\n else {\n anteriorRoom.push(currentRoom);\n currentRoom = nextRoom;\n printLocationInfo();\n }\n }", "@Override\n\tpublic void onLocationChanged(Location loc)\n\t{\n\t}", "private void setUpMap() throws IOException {\n // Get last location which means current location\n lastKnownLocation = LocationServices.FusedLocationApi.getLastLocation(mGoogleApiClient);\n\n if (lastKnownLocation != null) {\n // shift view to current location\n LatLng latlng = new LatLng(lastKnownLocation.getLatitude(), lastKnownLocation.getLongitude());\n Geocoder geocoder = new Geocoder(this);\n adminArea = geocoder.getFromLocation(latlng.latitude, latlng.longitude, 1).get(0).getAdminArea();\n CameraUpdate update = CameraUpdateFactory.newLatLngZoom(latlng, 12);\n mMap.moveCamera(update);\n } else {\n Toast.makeText(this, \"Current Location is not Available\", Toast.LENGTH_SHORT).show();\n }\n }", "static void goRoom(Command command) throws InterruptedException {\n if (currentRoom == airport) {\n lockRoom(command);\n }\n if (!command.hasSecondWord()) {\n System.out.println(\"Go where?\");\n return;\n }\n\n String direction = command.getSecondWord();\n\n Room nextRoom = currentRoom.getExit(direction);\n player.setCurrentRoom(nextRoom);\n /* loop that when next room is equel to null it print a message that says \"there is no door\" \n but if nextRoom is not equel null set currentRoom to nextRoom and print the description of the new room*/\n if (nextRoom == null) {\n System.out.println(\"There is no path!\");\n } else {\n currentRoom = nextRoom;\n System.out.println(player.getCurrentRoom().getLongDescription());\n\n }\n\n forceDialog();\n }", "private void onEcologyConnected() {\n for (Room room : rooms.values()) {\n room.onEcologyConnected();\n }\n }", "private Location verifyLocation(Location location)\n {\n Block playerBlock = location.getBlock();\n World world = location.getWorld();\n\n if (rootC.getStringList(RootNode.WORLDS).contains(world.getName()))\n {\n // Only spawn monsters in normal world. End is crowded with endermen\n // and nether is too extreme anyway, add config later\n int lightLvl = location.getBlock().getLightFromSky();\n if (world.getEnvironment() == Environment.NORMAL\n && (location.getY() < rootC.getInt(RootNode.MORE_MONSTERS_MAX_Y) && lightLvl < 3))\n {\n // the playerBlock should always be air, but if the player stands\n // on a slab he actually is in the slab, checking a few blocks under because player could have jumped etc..\n if (playerBlock.getType().equals(Material.AIR))\n {\n for (int i = 0; i <= 3; i++)\n {\n playerBlock = location.getBlock().getRelative(BlockFace.DOWN, 1);\n\n if (playerBlock.getType().equals(Material.AIR))\n {\n location.subtract(0, 1, 0);\n playerBlock = location.getBlock();\n // the playerBlock is now the block where the monster\n // should spawn on, next up: verify block\n }\n else\n {\n break;\n }\n }\n }\n // no spawning on steps, stairs and transparent blocks\n if (playerBlock.getType().name().endsWith(\"STEP\") || playerBlock.getType().name().endsWith(\"STAIRS\")\n || playerBlock.getType().isTransparent() || !playerBlock.getType().isOccluding() || playerBlock.getType().equals(Material.AIR))\n {\n // don't spawn here\n return null;\n }\n\n if (quickVerify(location))\n return location;\n }\n\n }\n return null;\n }", "@Override\n public void onSensorChanged(SensorEvent event) {\n float distance = event.values[0];\n Log.e(\"xuawang\", \"d: \"+distance);\n if(distance > 5) {\n //far\n if(mIsDarkMode){\n darkScreen(false, getWindow());\n am.setMode(AudioManager.MODE_NORMAL);\n am.setSpeakerphoneOn(true);\n am.setBluetoothScoOn(false);\n }\n mIsDarkMode = false;\n } else {\n //close enough\n if(!mIsDarkMode){\n darkScreen(true, getWindow());\n am.setMode(AudioManager.MODE_IN_CALL);\n am.setSpeakerphoneOn(false);\n am.setBluetoothScoOn(true);\n }\n mIsDarkMode = true;\n }\n }", "@Override\n public void onLocationChanged(Location location) {\n Log.i(LOG_TAG, \"Location Change\");\n Location target = new Location(\"target\");\n String closePoint;\n int closestIndex = -1;// Default to none\n float minDistance = 1000; // Default to high value\n\n // Focus camera on initial location\n if (mapReady == true && initialCameraSet == true) {\n LatLng initialLocation = new LatLng(location.getLatitude(), location.getLongitude());\n gMap.moveCamera(CameraUpdateFactory.newLatLng(initialLocation));\n initialCameraSet = false; // Initial location already displayed\n }\n // Check if spot is close\n for (int i = 0; i < LocationsClass.spotsCoordinates.length; ++i) {\n target.setLatitude(LocationsClass.spotsCoordinates[i].latitude);\n target.setLongitude(LocationsClass.spotsCoordinates[i].longitude);\n if (location.distanceTo(target) < minDistance) {\n closestIndex = i; //Save closes index\n minDistance = location.distanceTo(target); // update minDistance\n }\n }\n\n if (minDistance < 200 && minDistance > 20) {\n Toast.makeText(getActivity(), \"Location: \" + LocationsClass.spotNames[closestIndex] +\n \" is within 200 meters!\\n\" + \"Go check it out!\", Toast.LENGTH_LONG).show();\n// pointsOfInterests.get(closestIndex).showInfoWindow();\n// gMap.getUiSettings().setMapToolbarEnabled(true);\n popNotification = true; // Allow notification to trigger when user reaches destination\n } else if (minDistance < 20) {\n if (closestIndex != currentUserLocation) {\n int locationId = getResources().getIdentifier(\"loc_\"+closestIndex, \"drawable\", getActivity().getPackageName());\n showArrivalNotification(locationId, LocationsClass.spotNames[closestIndex]);\n currentUserLocation = closestIndex; // Update user location\n }\n }\n\n if (hotspotIndex != -1) {\n pointsOfInterests.get(hotspotIndex).showInfoWindow();\n gMap.getUiSettings().setMapToolbarEnabled(true);\n }\n }", "public void onKeyEvent(String ke) {\n if (ke.equals(\"m\")) {\n ForbiddenIslandWorld f = new ForbiddenIslandWorld(1);\n this.count = 0;\n this.waterHeight = 0;\n this.type = f.type;\n this.board = f.board;\n this.player = f.player;\n this.player2 = f.player2;\n this.helicopterpieces = f.helicopterpieces;\n }\n else if (ke.equals(\"r\")) {\n ForbiddenIslandWorld f = new ForbiddenIslandWorld(2);\n this.count = 0;\n this.waterHeight = 0;\n this.type = f.type;\n this.board = f.board;\n this.player = f.player;\n this.player2 = f.player2;\n this.helicopterpieces = f.helicopterpieces;\n }\n else if (ke.equals(\"t\")) {\n ForbiddenIslandWorld f = new ForbiddenIslandWorld(3);\n this.count = 0;\n this.waterHeight = 0;\n this.type = f.type;\n this.board = f.board;\n this.player = f.player;\n this.player2 = f.player2;\n this.helicopterpieces = f.helicopterpieces;\n }\n if (this.canMoveTo(this.player.x, this.player.y)\n && this.canMoveTo(this.player2.x, this.player2.y)) {\n this.player.move(ke, this);\n this.player2.move2(ke, this);\n }\n collide();\n\n }", "public void onLocationChanged(Location location) {\n \n \t}", "@Override\n \t\t\tpublic void onLocationChanged(Location loc) {\n \t \n \t\t\t}", "@Override\n\t\t\t\tpublic void onLocationChanged(Location loc) {\n\n\t\t\t\t\t//If Wifi\n\t\t\t\t\tif (monitor.isNetworkConnected()\n\t\t\t\t\t\t\t&& monitor.networkType == ConnectivityManager.TYPE_WIFI) {\n\n\t\t\t\t\t\t@SuppressWarnings(\"deprecation\")\n\t\t\t\t\t\tString locationProviders = Settings.Secure.getString(\n\t\t\t\t\t\t\t\tcont.getContentResolver(),\n\t\t\t\t\t\t\t\tSettings.Secure.LOCATION_PROVIDERS_ALLOWED);\n\t\t\t\t\t\tif (locationProviders != null\n\t\t\t\t\t\t\t\t&& !locationProviders.equals(\"\")) {\n\t\t\t\t\t\t\t//Lock our location.\n\t\t\t\t\t\t\tmonitor.locationLocked = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t//If we have had a steady lock\n\t\t\t\t\tif (monitor.locationLocked && (counter >= 2 || first)) {\n\n\t\t\t\t\t\t//Swap \n\t\t\t\t\t\tDouble oldLat = self.member.lat;\n\t\t\t\t\t\tDouble oldLong = self.member.lon;\n\n\t\t\t\t\t\tself.member.lat = loc.getLatitude();\n\t\t\t\t\t\tself.member.lon = loc.getLongitude();\n\n\t\t\t\t\t\tif (self.member.pic == null) {\n\t\t\t\t\t\t\tself.member.pic = Images\n\t\t\t\t\t\t\t\t\t.paintMarkerBitmap(self.member);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tplaceMarker(self.member);\n\n\t\t\t\t\t\tLog.i(\"Position\", self.member.lat.toString() + \", \"\n\t\t\t\t\t\t\t\t+ self.member.lon.toString());\n\n\t\t\t\t\t\tGCMMessage.sendLocation(self.member.lat,\n\t\t\t\t\t\t\t\tself.member.lon);\n\n\t\t\t\t\t\tMembersFragment.stopSpinning();\n\n\t\t\t\t\t\t// gcmMessage.sendLocation(self.lat, self.lon);\n\n\t\t\t\t\t\tfloat[] results = new float[1];\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tLocation.distanceBetween(oldLat, oldLong,\n\t\t\t\t\t\t\t\t\tself.member.lat, self.member.lon, results);\n\n\t\t\t\t\t\t\tif (results[0] > 35 && wobble > -interval / 2) {\n\n\t\t\t\t\t\t\t} else if (results[0] <= 35\n\t\t\t\t\t\t\t\t\t&& wobble < interval / 2) {\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} catch (NullPointerException npe) {\n\t\t\t\t\t\t\tLog.i(\"Locater\", \"Got first location\");\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tgpsTimer.removeCallbacks(r);\n\n\t\t\t\t\t\tlocationClient.disconnect();\n\n\t\t\t\t\t\tmonitor.locationLocked = false;\n\n\t\t\t\t\t\tcounter = 0;\n\n\t\t\t\t\t\tfirst = false;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tcounter++;\n\t\t\t\t}", "public void onRoomLoad() {\n\n }", "private void setPlayerRoom(){\n player.setRoom(currentRoom);\n }", "private void goRoom(Command command) \n {\n if(!command.hasSecondWord()) {\n // if there is no second word, we don't know where to go...\n System.out.println(\"Go where?\");\n return;\n }\n \n \n \n String direction = command.getSecondWord();\n Room nextRoom = currentRoom.getExit(direction); \n \n if (nextRoom == null) \n {\n System.out.println(\"There is no door!\");\n }\n else \n {\n currentRoom = nextRoom;\n System.out.println(currentRoom.getLongDescription());\n printInfo();\n }\n \n }", "public void onLocationChanged(Location location) {\n }", "public boolean setTurnOnLocation() {\n boolean isTurn = checkTurnOnLocation();\n editor.putBoolean(Constans.KeyPreference.TURN_ON_LOCATION, !isTurn);\n editor.commit();\n return !isTurn;\n }", "@Override\n public void onCameraIdle() {\n double CameraLat = GMap.getCameraPosition().target.latitude;\n double CameraLong = GMap.getCameraPosition().target.longitude;\n if (CameraLat <= 13.647080 || CameraLat >= 13.655056) {\n GMap.animateCamera(CameraUpdateFactory.newLatLng(mapbounds.getCenter()));\n }\n if (CameraLong <= 100.490774 || CameraLong >= 100.497254) {\n GMap.animateCamera(CameraUpdateFactory.newLatLng(mapbounds.getCenter()));\n }\n\n }", "@Override\n public boolean activate() {\n //When will this activate?\n return Areas.FALADOR.contains(ctx.players.local().tile())\n && ctx.widgets.component(1371,0).visible()\n && !ctx.objects.select().name(\"Waterpump\").within(6.0).isEmpty();\n }", "@Override\n public void onLocationChanged(Location location) {\n //Log.i(TAG, \"New Location: \" + location.getLatitude() + \" \" + location.getLongitude());\n if (isDrawing) {\n //We are drawing so add a point and move the camera accordingly\n currentDrawing.addPoint(new LatLng(location.getLatitude(), location.getLongitude()), currentColor);\n LatLng userLocation = new LatLng(location.getLatitude(), location.getLongitude());\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(userLocation, 20));\n }\n }", "public boolean onGround() {\n return getLocation().getY() <= 0 || (interactingWithY != null && interactingWithY.getLocation().getY() + interactingWithY.size.height <= getLocation().getY());\n }", "@Override\n public void onLocationChanged(Location location) {\n }", "public void initialiseRoomTransition() {\n game.gameSnapshot.setAllUnlocked();\n roomTransition = true;\n }", "public void handleFoyerMove(String direction) {\n\t\t\n\t\tif(direction.equals(EAST))\n\t\t\tcurrentLocation = \"kitchen\";\n\t\telse\n\t\t\tSystem.out.println(\" cant get there from here... \");\n\t\t\n\t\t// presumably other options - ...\n\t\t\n\t\t\n\t}", "void checkMyLocationVisibility() {\n if (settings.getReturnToMyLocation() || presenter.isTracking())\n showMyLocation();\n }", "public void sleepCheck() {\n if (area() == null)\n stopActing();\n if (area().closed || area().closeRequested)\n stopActing();\n if (commander.player() == null || commander.player().area() != area()) {\n if (!area().getLabel().equals(\"TITLE\"))\n stopActing();\n } else {\n wakeCheck(commander.player().areaX(), commander.player().areaY());\n }\n }", "public void areaEffect(Player player){\n if(object.getProperties().containsKey(\"endLevel\")) {\n System.out.println(\"Fin du level\");\n setCategoryFilter(GameTest.DESTROYED_BIT);\n PlayScreen.setEndLevel();\n }\n\n if(object.getProperties().containsKey(\"startBossFight\")) {\n\n System.out.println(\"Start Boss Fight\");\n setCategoryFilter(GameTest.DESTROYED_BIT);\n\n TiledMapTileLayer.Cell cell = new TiledMapTileLayer.Cell();\n cell.setTile(tileSet.getTile(910));\n layer.setCell(99, 6, cell);\n cell.setTile(tileSet.getTile(910));\n layer.setCell(99, 7, cell);\n cell.setTile(tileSet.getTile(910));\n layer.setCell(99, 8, cell);\n cell.setTile(tileSet.getTile(910));\n layer.setCell(99, 9, cell);\n\n cell.setTile(tileSet.getTile(910));\n layer.setCell(100, 6, cell);\n cell.setTile(tileSet.getTile(910));\n layer.setCell(100, 7, cell);\n cell.setTile(tileSet.getTile(910));\n layer.setCell(100, 8, cell);\n cell.setTile(tileSet.getTile(910));\n layer.setCell(100, 9, cell);\n\n PlayScreen.cameraChangeBoss(true);\n setCategoryFilterFixture(GameTest.GROUND_BIT, PlayScreen.getFixtureStartBoss());\n\n }\n\n if(object.getProperties().containsKey(\"blueKnight\")) {\n System.out.println(\"Changement en bleu\");\n setCategoryFilter(GameTest.DESTROYED_BIT);\n getCell().setTile(null);\n PlayScreen.setColorKnight(\"blue\");\n }\n\n if(object.getProperties().containsKey(\"greyKnight\")) {\n System.out.println(\"Changement en gris\");\n setCategoryFilter(GameTest.DESTROYED_BIT);\n getCell().setTile(null);\n PlayScreen.setColorKnight(\"grey\");\n }\n\n if(object.getProperties().containsKey(\"redKnight\")) {\n System.out.println(\"Changement en rouge\");\n setCategoryFilter(GameTest.DESTROYED_BIT);\n getCell().setTile(null);\n PlayScreen.setColorKnight(\"red\");\n }\n\n }", "@Override\n public void onLocationUpdated(Location location) {\n fromPosition = new LatLng(location.getLatitude(), location.getLongitude());\n btn1.setVisibility(View.VISIBLE);\n moveCamera(new LatLng(location.getLatitude(), location.getLongitude()),\n DEFAULT_ZOOM, \"My Location\");\n }", "@Override\n public void onLocationChanged(Location loc)\n {\n \t\n \tint lat = (int) (loc.getLatitude() * 1E6);\n\t\t\tint lng = (int) (loc.getLongitude() * 1E6);\n\t\t\t point = new GeoPoint(lat, lng);\n\t\t\t \n\t\t\t /** remove the previous overlay so the another\n\t\t\t can be added **/\n\t\t\t itemizedOverlay.removeOverlay(0);\n\t\t\t \n\t\t\n\t\t\t //this follows the same steps in the OnCreate function at start up.\n\t\t\t // //Initialize a normal MapOVerlay item with new point.\n\t\t\t OverlayItem overlayitem = new OverlayItem(point, \"kiddda!\", \"sasri kal!\");\n\t\t \n\t\t itemizedOverlay.addOverlay(overlayitem);\n\t\t mapOverlays.add(itemizedOverlay);\n\t\t // move to new point.\n\t\t\tcontroller.animateTo(point); \n\t\t\t \n\t\n\t\t\t//debug message to say the location has been read.\n\t\t\tLog.i(\"Listener\", \"location read\");\n\t\t\t \n\t\t\n\n\t\t \n // String Text = \"My current location is: \" +\n\t\t\tLog.i(\"service check\",\" Latitude = \" + loc.getLatitude() +\n \" Longitude = \" + loc.getLongitude());\n \n // Toast.makeText( getApplicationContext(), Text, Toast.LENGTH_LONG).show();\n \n }", "public void onLocationChanged(Location location) {\n \t \n \t }", "public void action() \n {\n if (!hasSecondWord()) { // there is no second word\n // if there is no second word, we don't know where to go...\n System.out.println(\"Go where? Please be more specific\");\n return; \n } \n String direction = getSecondWord(); //second word found\n\n // Possible room\n Room nextRoom = player.getCurrentRoom().getExit(direction);\n\n if (nextRoom == null) {\n System.out.println(\"There is no door in that direction\");\n }\n else {\n if (!nextRoom.isLocked()) {\n enterRoom(nextRoom);\n }\n //unlock room should now be another action instead\n // else if (nextRoom.isUnlocked(null)) {\n // enterRoom(nextRoom);\n // }\n else {\n System.out.println(\"This door is locked!\");\n }\n } \n }", "@Override\n public void handleLocationChange(Location newLocation) {\n super.handleLocationChange(newLocation);\n MainActivity mainActivity = (MainActivity) getActivity();\n mainActivity.getGeofenceMonitor().handleLocationChange(newLocation);\n setCamera();\n if(mainActivity.getGeofenceMonitor().currentLocation != null) {\n if(debugMode) {\n TextView txt_lat = (TextView) view.findViewById(R.id.txt_lat);\n TextView txt_long = (TextView) view.findViewById(R.id.txt_long);\n txt_lat.setVisibility(View.VISIBLE);\n txt_long.setVisibility(View.VISIBLE);\n txt_lat.setText(\"Latitude: \" + mainActivity.getGeofenceMonitor().currentLocation.getLatitude());\n txt_long.setText(\"Longitude: \" + mainActivity.getGeofenceMonitor().currentLocation.getLongitude());\n }\n setUpMapIfNeeded();\n }\n }", "@Override\n public void onLocationChanged(final Location location) {\n // Lay vi tri hien tai cua minh\n myLocation = new LatLng(location.getLatitude(), location.getLongitude());\n if (firstLocation == true) {\n // Neu day la lan dau co thong tin vi tri thi chuyen camera ve vi tri nay\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(myLocation, 15));\n firstLocation = false;\n }\n // Gui vi tri cua minh len server\n String myLocationMessage = String.format(\"{\\\"COMMAND\\\":\\\"MEMBER_CURRENT_LOCATION\\\", \\\"LATITUDE\\\": \\\"%s\\\", \\\"LONGITUDE\\\": \\\"%s\\\"}\", myLocation.latitude, myLocation.longitude);\n OnlineManager.getInstance().sendMessage(myLocationMessage);\n // Refresh danh sach timesheet\n if (tourTimesheetAdapter != null) {\n tourTimesheetAdapter.notifyDataSetChanged();\n }\n }", "private void enterRoom(Room room)\r\n \t{\r\n \t\tif(room.isFull())\r\n \t\t\treturn; // Cannot enter the room\r\n \t\tVector2i pos = room.addCharacter(this, true);\r\n \t\tif(pos == null)\r\n \t\t\treturn; // Cannot enter the room (but should not occur here)\r\n \t\tif(currentRoom != null)\r\n \t\t{\r\n \t\t\t// Quit the last room\r\n \t\t\troom.removeCharacter(this);\r\n \t\t}\r\n \t\tcurrentRoom = room;\r\n \t\tx = pos.x;\r\n \t\ty = pos.y;\r\n \t\t// Debug\r\n \t\tLog.debug(name + \" entered in the \\\"\" + room.getType().name + \"\\\"\");\r\n \t}", "@Override\n\tpublic void onLocationChanged(Location arg0) {\n\n\t}", "@Override\n\tpublic void onLocationChanged(Location arg0) {\n\n\t}", "public Room(String color) {\n\t\tthis.wall = color;\n\t\tthis.floor =\"\";\n\t\tthis.windows=0;\n\t}", "public void changeLocation(int newLocation) {\t\t\t\t\t\t\t\t\t\t\t\t// Methode zum Raum wechseln. Übergeben wird der neue Standort\n\t\tif(!battle && !death) {\n\t\t\tboolean positionChange = false;\n\t\t\tthis.lockerQuestion = false;\t\t\t \t\t\t\t\t\t\t\t\t\t\t// Abbruch des Minievents\n\t\t\t\n\t\t\tswitch (newLocation) {\n\n\t\t\t// Büro\n\t\t\tcase 0:\n\t\t\t\tif (currentLocation == 1 || currentLocation == 0 || beam) {\n\t\t\t\t\tif (currentLocation == 0) { Tuna.setMessage(\"Du bist schon in deinem Büro!\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpositionChange = true;\t\t\t\t\t\t\t// Positionswechsel ist möglich\n\t\t\t\t\t\tthis.lastLocation = this.currentLocation;\t\t// Location setzen\n\t\t\t\t\t\tthis.currentLocation = 0;\n\t\t\t\t\t\t\n\t\t\t\t\t\tTuna.setText(\"Du gehst in dein Büro.\");\t\t\t// Text zurück setzen mit Hinweis der aktuellen Position\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tTuna.setMessage(\"Du hast noch keine Beamfunktion!\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\n\t\t\t// Korridor\n\t\t\tcase 1:\n\t\t\t\tif (currentLocation == 0 || currentLocation == 1 || currentLocation == 2 || currentLocation == 3 || currentLocation == 6 || currentLocation == 7 || currentLocation == 8\n\t\t\t\t\t\t|| currentLocation == 9 || currentLocation == 10 || beam) {\n\t\t\t\t\tif (currentLocation == 1) { Tuna.setMessage(\"Du bist schon im Korridor!\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpositionChange = true;\t\t\t\t\t\t\t// Positionswechsel ist möglich\n\t\t\t\t\t\tthis.lastLocation = this.currentLocation;\t\t// Locations setzen\n\t\t\t\t\t\tthis.currentLocation = 1;\n\t\t\t\t\t\t\n\t\t\t\t\t\tTuna.setText(\"Du gehst in den Korridor.\");\t\t// Text zurück setzen mit Hinweis der aktuellen Position\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tTuna.setMessage(\"Du hast noch keine Beamfunktion!\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\n\t\t\t// Tödlicher Kaffeeraum\n\t\t\tcase 2:\n\t\t\t\tif (currentLocation == 1 || currentLocation == 2 || currentLocation == 3 || currentLocation == 4 || beam) {\n\t\t\t\t\tif (currentLocation == 2) { Tuna.setMessage(\"Du bist schon im Kafferaum!\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpositionChange = true;\t\t\t\t\t\t\t// Positionswechsel ist möglich\n\t\t\t\t\t\tthis.lastLocation = this.currentLocation;\t\t// Locations setzen\n\t\t\t\t\t\tthis.currentLocation = 2;\n\t\t\t\t\t\t\n\t\t\t\t\t\tTuna.setText(\"Du gehst in den Kaffeeraum.\");\t\t// Text zurück setzen mit Hinweis der aktuellen Position\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tTuna.setMessage(\"Du hast noch keine Beamfunktion!\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\n\t\t\t// Konferenzraum\n\t\t\tcase 3:\n\t\t\t\tif (currentLocation == 1 || currentLocation == 2 || currentLocation == 3 || currentLocation == 4 || currentLocation == 5 || beam) {\n\t\t\t\t\tif (currentLocation == 3) { Tuna.setMessage(\"Du bist schon im Konferenzraum!\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpositionChange = true;\t\t\t\t\t\t\t// Positionswechsel ist möglich\n\t\t\t\t\t\tthis.lastLocation = this.currentLocation;\t\t// Locations setzen\n\t\t\t\t\t\tthis.currentLocation = 3;\n\t\t\t\t\t\t\n\t\t\t\t\t\tTuna.setText(\"Du gehst in den Konferenzraum.\");\t\t// Text zurück setzen mit Hinweis der aktuellen Position\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tTuna.setMessage(\"Du hast noch keine Beamfunktion!\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\n\t\t\t// Kammer der Leere\n\t\t\tcase 4:\n\t\t\t\tif (location[4].isVisible()) {\n\t\t\t\t\tif (currentLocation == 2 || currentLocation == 4 || beam) {\n\t\t\t\t\t\tif (currentLocation == 4) { Tuna.setMessage(\"Du bist schon in der Kammer der Leere!\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tpositionChange = true;\t\t\t\t\t\t\t// Positionswechsel ist möglich\n\t\t\t\t\t\t\tthis.lastLocation = this.currentLocation;\t\t// Locations setzen\n\t\t\t\t\t\t\tthis.currentLocation = 4;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tTuna.setText(\"Du gehst in die Kammer der Leere.\");\t\t// Text zurück setzen mit Hinweis der aktuellen Position\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tTuna.setMessage(\"Du hast noch keine Beamfunktion!\");\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tbeep();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\n\t\t\t// Ventilationsraum\n\t\t\tcase 5:\n\t\t\t\tif (location[5].isVisible()) {\n\t\t\t\t\tif (currentLocation == 3 || currentLocation == 5 || beam) {\n\t\t\t\t\t\tif (currentLocation == 5) { Tuna.setMessage(\"Du bist schon im Ventilationsraum!\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tpositionChange = true;\t\t\t\t\t\t\t// Positionswechsel ist möglich\n\t\t\t\t\t\t\tthis.lastLocation = this.currentLocation;\t\t// Locations setzen\n\t\t\t\t\t\t\tthis.currentLocation = 5;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tTuna.setText(\"Du gehst in den Ventilationsraum.\");\t\t// Text zurück setzen mit Hinweis der aktuellen Position\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tTuna.setMessage(\"Du hast noch keine Beamfunktion!\");\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tbeep();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\n\t\t\t// Damen Toiletten\n\t\t\tcase 6:\n\t\t\t\tif (currentLocation == 1 || currentLocation == 6 || beam) {\n\t\t\t\t\tif (currentLocation == 6) { Tuna.setMessage(\"Du bist schon in der Damentoilette!\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpositionChange = true;\t\t\t\t\t\t\t// Positionswechsel ist möglich\n\t\t\t\t\t\tthis.lastLocation = this.currentLocation;\t\t// Locations setzen\n\t\t\t\t\t\tthis.currentLocation = 6;\n\t\t\t\t\t\t\n\t\t\t\t\t\tTuna.setText(\"Du gehst in die Damentoilette.\");\t\t// Text zurück setzen mit Hinweis der aktuellen Position\n\t\t\t\t\t\tlocation[6].getDescriptions().setDefaultDescription(\"Dies ist die Damentoilette.\"\n\t\t\t\t\t\t\t\t+ \"\\nDu fragst dich, ob du einen bestimmten Grund hast, hier zu sein, oder einfach die Tür verwechselt hast.\");\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tTuna.setMessage(\"Du hast noch keine Beamfunktion!\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\n\t\t\t// Herren Toiletten\n\t\t\tcase 7:\n\t\t\t\tif (currentLocation == 1 || currentLocation == 7 || beam) {\n\t\t\t\t\tif (currentLocation == 7) { Tuna.setMessage(\"Du bist schon in der Herrentoilette!\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpositionChange = true;\t\t\t\t\t\t\t// Positionswechsel ist möglich\n\t\t\t\t\t\tthis.lastLocation = this.currentLocation;\t\t// Locations setzen\n\t\t\t\t\t\tthis.currentLocation = 7;\n\t\t\t\t\t\t\n\t\t\t\t\t\tTuna.setText(\"Du gehst in die Herrentoilette.\");\t\t// Text zurück setzen mit Hinweis der aktuellen Position\n\t\t\t\t\t}\n\t\n\t\t\t\t} else {\n\t\t\t\t\tTuna.setMessage(\"Du hast noch keine Beamfunktion!\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\n\t\t\t// Schulleiterzimmer\n\t\t\tcase 8:\n\t\t\t\tif (currentLocation == 1 || currentLocation == 8 || beam) {\n\t\t\t\t\tif (currentLocation == 8) { Tuna.setMessage(\"Du bist schon im Schulleiterzimmer!\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpositionChange = true;\t\t\t\t\t\t\t// Positionswechsel ist möglich\n\t\t\t\t\t\tthis.lastLocation = this.currentLocation;\t\t// Locations setzen\n\t\t\t\t\t\tthis.currentLocation = 8;\n\t\t\t\t\t\t\n\t\t\t\t\t\tTuna.setText(\"Du gehst in das Schulleiterzimmer.\");\t\t// Text zurück setzen mit Hinweis der aktuellen Position\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tTuna.setMessage(\"Du hast noch keine Beamfunktion!\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\n\t\t\t// Fahrstuhl\n\t\t\tcase 9:\n\t\t\t\tif (currentLocation == 1 || currentLocation == 9 || beam) {\n\t\t\t\t\tif (currentLocation == 9) { Tuna.setMessage(\"Du bist schon im Fahrstuhl!\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpositionChange = true;\t\t\t\t\t\t\t// Positionswechsel ist möglich\n\t\t\t\t\t\tthis.lastLocation = this.currentLocation;\t\t// Locations setzen\n\t\t\t\t\t\tthis.currentLocation = 9;\n\t\t\t\t\t\t\n\t\t\t\t\t\tTuna.setText(\"Du gehst in den Fahrstuhl.\");\t\t// Text zurück setzen mit Hinweis der aktuellen Position\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tTuna.setMessage(\"Du hast noch keine Beamfunktion!\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Treppenhaus\n\t\t\tcase 10:\n\t\t\t\tif (currentLocation == 1 || currentLocation == 10 || currentLocation == 11 || beam) {\n\t\t\t\t\tif (currentLocation == 10) { Tuna.setMessage(\"Du bist schon im Treppenhaus!\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpositionChange = true;\t\t\t\t\t\t\t// Positionswechsel ist möglich\n\t\t\t\t\t\tthis.lastLocation = this.currentLocation;\t\t// Locations setzen\n\t\t\t\t\t\tthis.currentLocation = 10;\n\t\t\t\t\t\t\n\t\t\t\t\t\tTuna.setText(\"Du gehst in das Treppenhaus.\");\t\t// Text zurück setzen mit Hinweis der aktuellen Position\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tTuna.setMessage(\"Du hast noch keine Beamfunktion!\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t// Korridor Etage 1\n\t\t\tcase 11:\n\t\t\t\tif (location[11].isVisible()) {\n\t\t\t\t\tif (currentLocation == 10 || currentLocation == 11 || currentLocation == 12 || currentLocation == 13 || currentLocation == 14 || currentLocation == 15 || currentLocation == 16 || currentLocation == 17 || currentLocation == 18 || currentLocation == 19 || beam) {\n\t\t\t\t\t\tif (currentLocation == 11) { Tuna.setMessage(\"Du bist schon im Korridor der 1 Etage!\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tpositionChange = true;\t\t\t\t\t\t\t// Positionswechsel ist möglich\n\t\t\t\t\t\t\tthis.lastLocation = this.currentLocation;\t\t// Locations setzen\n\t\t\t\t\t\t\tthis.currentLocation = 11;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tTuna.setText(\"Du gehst in den Korridor.\");\t\t// Text zurück setzen mit Hinweis der aktuellen Position\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tTuna.setMessage(\"Du hast noch keine Beamfunktion!\");\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tTuna.setText(\"Du bist am Feuer gestorben. Kaffee wäre spannender gewesen!\"\n\t\t\t\t\t\t\t+ \"\\n\\n\\n<respawn>, um von vorne anzufangen!\");\n\t\t\t\t\tdeath = true;\n\t\t\t\t\tif (amountNotes != 0) {\n\t\t\t\t\t\tTuna.addText(\"\\n\\nDa du bereits Notizen eingesammelt hast, die jetzt verbrannt sind, solltest du das Spiel neu starten [restart].\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Hörsaal 1\n\t\t\tcase 12:\n\t\t\t\tif ((currentLocation == 11 || currentLocation == 12 || beam) && location[11].isVisible()) { // Wichtig, dass man bei vorhanden sein des Feuers sich nicht schon in die untere Etage beamen kann, auch für die nächsten Fälle\n\t\t\t\t\tif (currentLocation == 12) { Tuna.setMessage(\"Du bist schon in Hörsaal 1!\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpositionChange = true;\t\t\t\t\t\t\t// Positionswechsel ist möglich\n\t\t\t\t\t\tthis.lastLocation = this.currentLocation;\n\t\t\t\t\t\tthis.currentLocation = 12;\n\t\t\t\t\t\t\n\t\t\t\t\t\tTuna.setText(\"Du gehst in den Hörsal 1\");\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} else if (location[11].isVisible()) {\n\t\t\t\t\tTuna.setMessage(\"Du hast noch keine Beamfunktion!\");\n\t\t\t\t} else if (!location[11].isVisible()) {\t\t\t\t\t// Meldung, wenn das Feuer noch nicht gelöscht wurde\n\t\t\t\t\tTuna.setMessage(\"Nene, so nicht!\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Spindraum\n\t\t\tcase 13:\n\t\t\t\tif ((currentLocation == 11 || currentLocation == 13 || beam) && location[11].isVisible()) {\n\t\t\t\t\tif (currentLocation == 13) { Tuna.setMessage(\"Du bist schon im Spindraum!\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpositionChange = true;\t\t\t\t\t\t\t// Positionswechsel ist möglich\n\t\t\t\t\t\tthis.lastLocation = this.currentLocation;\t\t// Locations setzen\n\t\t\t\t\t\tthis.currentLocation = 13;\n\t\t\t\t\t\t\n\t\t\t\t\t\tTuna.setText(\"Du gehst in den Spindraum.\");\t\t// Text zurück setzen mit Hinweis der aktuellen Position\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} else if (location[11].isVisible()) {\n\t\t\t\t\tTuna.setMessage(\"Du hast noch keine Beamfunktion!\");\n\t\t\t\t} else if (!location[11].isVisible()) {\t\t\t\t\t// Meldung, wenn das Feuer noch nicht gelöscht wurde\n\t\t\t\t\tTuna.setMessage(\"Nene, so nicht!\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\n\t\t\t// Abstellraum\n\t\t\tcase 14:\n\t\t\t\tif ((currentLocation == 11 || currentLocation == 14 || beam) && location[11].isVisible()) {\n\t\t\t\t\tif (currentLocation == 14) { Tuna.setMessage(\"Du bist schon im Abstellraum!\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpositionChange = true;\t\t\t\t\t\t\t// Positionswechsel ist möglich\n\t\t\t\t\t\tthis.lastLocation = this.currentLocation;\t\t// Locations setzen\n\t\t\t\t\t\tthis.currentLocation = 14;\n\t\t\t\t\t\t\n\t\t\t\t\t\tTuna.setText(\"Du gehst in den Abstellraum.\");\t\t// Text zurück setzen mit Hinweis der aktuellen Position\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} else if (location[11].isVisible()) {\n\t\t\t\t\tTuna.setMessage(\"Du hast noch keine Beamfunktion!\");\n\t\t\t\t} else if (!location[11].isVisible()) {\t\t\t\t\t// Meldung, wenn das Feuer noch nicht gelöscht wurde\n\t\t\t\t\tTuna.setMessage(\"Nene, so nicht!\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Hörsaal 2\n\t\t\tcase 15:\n\t\t\t\tif ((currentLocation == 11 || currentLocation == 15 || beam) && location[11].isVisible()) {\n\t\t\t\t\tif (currentLocation == 15) { Tuna.setMessage(\"Du bist schon in Hörsaal 2!\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpositionChange = true;\t\t\t\t\t\t\t// Positionswechsel ist möglich\n\t\t\t\t\t\tthis.lastLocation = this.currentLocation;\n\t\t\t\t\t\tthis.currentLocation = 15;\n\t\t\t\t\t\t\n\t\t\t\t\t\tTuna.setText(\"Du gehst in den Hörsal 2\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} else if (location[11].isVisible()) {\n\t\t\t\t\tTuna.setMessage(\"Du hast noch keine Beamfunktion!\");\n\t\t\t\t} else if (!location[11].isVisible()) {\t\t\t\t\t// Meldung, wenn das Feuer noch nicht gelöscht wurde\n\t\t\t\t\tTuna.setMessage(\"Nene, so nicht!\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Hörsaal 3\n\t\t\tcase 16:\n\t\t\t\tif ((currentLocation == 11 || currentLocation == 16 || beam) && location[11].isVisible()) {\n\t\t\t\t\tif (currentLocation == 16) { Tuna.setMessage(\"Du bist schon in Hörsaal 3!\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpositionChange = true;\t\t\t\t\t\t\t// Positionswechsel ist möglich\n\t\t\t\t\t\tthis.lastLocation = this.currentLocation;\n\t\t\t\t\t\tthis.currentLocation = 16;\n\t\t\t\t\t\t\n\t\t\t\t\t\tTuna.setText(\"Du gehst in den Hörsal 3\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} else if (location[11].isVisible()) {\n\t\t\t\t\tTuna.setMessage(\"Du hast noch keine Beamfunktion!\");\n\t\t\t\t} else if (!location[11].isVisible()) {\t\t\t\t\t// Meldung, wenn das Feuer noch nicht gelöscht wurde\n\t\t\t\t\tTuna.setMessage(\"Nene, so nicht!\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Hörsaal 4\n\t\t\tcase 17:\n\t\t\t\tif ((currentLocation == 11 || currentLocation == 17 || beam) && location[11].isVisible()) {\n\t\t\t\t\tif (currentLocation == 17) { Tuna.setMessage(\"Du bist schon in Hörsaal 4!\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpositionChange = true;\t\t\t\t\t\t\t// Positionswechsel ist möglich\n\t\t\t\t\t\tthis.lastLocation = this.currentLocation;\n\t\t\t\t\t\tthis.currentLocation = 17;\n\t\t\t\t\t\t\n\t\t\t\t\t\tTuna.setText(\"Du gehst in den Hörsal 4\");\n\t\t\t\t\t}\n\t\t\t\t} else if (location[11].isVisible()) {\n\t\t\t\t\tTuna.setMessage(\"Du hast noch keine Beamfunktion!\");\n\t\t\t\t} else if (!location[11].isVisible()) {\t\t\t\t\t// Meldung, wenn das Feuer noch nicht gelöscht wurde\n\t\t\t\t\tTuna.setMessage(\"Nene, so nicht!\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Damentoilette Etage 1\n\t\t\tcase 18:\n\t\t\t\tif ((currentLocation == 11 || currentLocation == 18 || beam) && location[11].isVisible()) {\n\t\t\t\t\tif (currentLocation == 18) { Tuna.setMessage(\"Du bist schon in der Damentoilette!\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpositionChange = true;\t\t\t\t\t\t\t// Positionswechsel ist möglich\n\t\t\t\t\t\tthis.lastLocation = this.currentLocation;\t\t// Locations setzen\n\t\t\t\t\t\tthis.currentLocation = 18;\n\t\t\t\t\t\t\n\t\t\t\t\t\tTuna.setText(\"Du gehst in die Damentoilette.\");\t\t// Text zurück setzen mit Hinweis der aktuellen Position\n\t\t\t\t\t}\n\t\t\t\t} else if (location[11].isVisible()) {\n\t\t\t\t\tTuna.setMessage(\"Du hast noch keine Beamfunktion!\");\n\t\t\t\t} else if (!location[11].isVisible()) {\t\t\t\t\t// Meldung, wenn das Feuer noch nicht gelöscht wurde\n\t\t\t\t\tTuna.setMessage(\"Nene, so nicht!\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t \n\t\t\t// Herrentoilette Etage 1\n\t\t\tcase 19:\n\t\t\t\tif ((currentLocation == 11 || currentLocation == 19 || beam) && location[11].isVisible()) {\n\t\t\t\t\tif (currentLocation == 19) { Tuna.setMessage(\"Du bist schon in der Herrentoilette!\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tpositionChange = true;\t\t\t\t\t\t\t// Positionswechsel ist möglich\n\t\t\t\t\t\tthis.lastLocation = this.currentLocation;\t\t// Locations setzen\n\t\t\t\t\t\tthis.currentLocation = 19;\n\t\t\t\t\t\t\n\t\t\t\t\t\tTuna.setText(\"Du gehst in die Herrentoilette.\");\t\t// Text zurück setzen mit Hinweis der aktuellen Position\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} else if (location[11].isVisible()) {\n\t\t\t\t\tTuna.setMessage(\"Du hast noch keine Beamfunktion!\");\n\t\t\t\t} else if (!location[11].isVisible()) {\t\t\t\t\t// Meldung, wenn das Feuer noch nicht gelöscht wurde\n\t\t\t\t\tTuna.setMessage(\"Nene, so nicht!\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t// Fahrstuhlschacht\n\t\t\tcase 20:\n\t\t\t\tif (location[20].isVisible()) {\n\t\t\t\t\tif (currentLocation == 9 || currentLocation == 20 || beam) {\n\t\t\t\t\t\tif (currentLocation == 20) { Tuna.setMessage(\"Du bist schon im Fahrstuhlschacht!\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tpositionChange = true;\t\t\t\t\t\t\t// Positionswechsel ist möglich\n\t\t\t\t\t\t\tthis.lastLocation = this.currentLocation;\t\t// Locations setzen\n\t\t\t\t\t\t\tthis.currentLocation = 20;\n\t\t\t\t\t\t\tTuna.setText(\"Du kletterst den Gullideckel runter, obwohl, eigentlich fällst du eher. Du kriegst es auch irgendwie hin, den Gullideckel über dir wieder zuzuschieben.\");\n\t\t\t\t\t\t\tlocation[20].setVisible(false);\t\t\t\t\t// Der Raum soll nicht wieder begehbar sein\n\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\tTuna.setMessage(\"Du hast noch keine Beamfunktion!\");\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tbeep();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t// Wenn der Positionswechsel auf wahr (also möglich) gesetzt wurde soll folgendes gemacht\n\t\t\tif (positionChange) {\n\t\t\t\t// Ausgänge setzen\n\t\t\t\tTuna.setExitsContent(location[newLocation].getExits());\n\t\t\t\t\n\t\t\t\t// Beschreibungen\n\t\t\t\tif (!battle) {\n\t\t\t\t\tif (location[currentLocation].isExplored()) {\n\t\t\t\t\t\tTuna.addText(location[currentLocation].getDescriptions().getAlreadyExploredDescription());\n\t\t\t\t\t} else {\n\t\t\t\t\t\tTuna.addText(location[currentLocation].getDescriptions().getDefaultDescription());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t} else if (battle) {\n\t\t\tTuna.setMessage(\"Du befindest dich im Kampf!\");\n\t\t} else if (death) {\n\t\t\tTuna.setMessage(\"Du bist tot!\");\n\t\t}\n\t}", "@Override\n\tpublic void updateLocation(String roomLocation, String sideLocation) {\n\t\tthis.room = roomLocation;\n\t\tthis.side = sideLocation;\n\t}", "private void goRoom(Command command) \n {\n if(!command.hasSecondWord()) {\n // if there is no second word, we don't know where to go...\n System.out.println(\"Go where?\");\n return;\n }\n\n String direction = command.getSecondWord();\n\n // Try to leave current room.\n Room nextRoom = currentRoom.getExit(direction);\n \n if (nextRoom == null) {\n System.out.println(\"That way is blocked!\");\n }\n else {\n lastRoom = currentRoom;\n multiLastRooms.push (lastRoom);\n currentRoom = nextRoom;\n timer = timer + 1;\n System.out.println(currentRoom.getLongDescription());\n }\n }", "private void moveUpdate(int room, boolean isLast) {\r\n\t\tcurrentPlayer.setCurrentRoom(room);\r\n\t\t// Adjust coords of piece\r\n\t\tcurrentPlayer.getPiece().setX(GlobalVars.playerCoordsPerRoom[room][0]+GlobalVars.playersOffset[currentPlayer.getNumber()][0]);\r\n\t\tcurrentPlayer.getPiece().setY(GlobalVars.playerCoordsPerRoom[room][1]+GlobalVars.playersOffset[currentPlayer.getNumber()][1]);\r\n\t\t\r\n\t\t// Crystal Cave Effect\r\n\t\tif (Utils.isCave(room)) {\r\n\t\t\tcurrentPlayer.setStoppedInCave(true);\r\n\t\t}\r\n\t\t\r\n\t\trewardPlayer(room);\r\n\t\t\r\n\t\tif (isLast) {\r\n\t\t\tupdateInfo(currentPlayer, false);\r\n\t\t\tupdatePlayArea(currentPlayer, false);\r\n\t\t\tupdateMarketAndTreasures(false);\r\n\t\t\tupdateEvents(false);\r\n\t\t\ttry {\r\n\t\t\t\tupdateBoard();\r\n\t\t\t} catch (FileNotFoundException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Check if player escaped with artifact\r\n\t\tif (room == 0 && currentPlayer.has(\"Artifact\")) {\r\n\t\t\t// Discard all cards on escaping\r\n\t\t\tcurrentPlayer.discardAllCardsNotPlayed();\r\n\t\t\t\r\n\t\t\tcurrentPlayer.setFree(true);\r\n\t\t\t// 39 is first stage of end sequence\r\n\t\t\tif (firstEscapee == null && playerCount > 1) {\r\n\t\t\t\t// Used for checking if just escaped\r\n\t\t\t\t//currentPlayer.setCurrentRoom(39);\r\n\t\t\t\tcurrentPlayer.getPiece().setX(GlobalVars.playerCoordsPerRoom[39][0]);\r\n\t\t\t\tcurrentPlayer.getPiece().setY(GlobalVars.playerCoordsPerRoom[39][1]);\r\n\t\t\t\tfirstEscapee = currentPlayer;\r\n\t\t\t\taddEvent(\"``\"+currentName+\"`` escaped the dungeon\",true);\r\n\t\t\t}\r\n\t\t\taddHistory(\"ESCAPED\");\r\n\t\t\tif (!checkIfGameIsOver()) {\r\n\t\t\t\tendTurn();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void mapMode() {\n\t\ttheTrainer.setUp(false);\n\t\ttheTrainer.setDown(false);\n\t\ttheTrainer.setLeft(false);\n\t\ttheTrainer.setRight(false);\n\n\t\tinBattle = false;\n\t\tred = green = blue = 255;\n\t\tthis.requestFocus();\n\t}", "public boolean isSpawnable(Location loc) {\n Block block = loc.getBlock();\n Block under = loc.getBlock().getRelative(BlockFace.DOWN);\n Block above = loc.getBlock().getRelative(BlockFace.UP);\n if (block.getType().equals(Material.AIR) && !under.getType().equals(Material.AIR) && above.getType().equals(Material.AIR)) {\n if (block.getLightLevel() <= plugin.CONFIG.SPAWNING_LIGHT) {\n return true;\n }\n }\n return false;\n }", "@Override\n\t\tpublic void onLocationChanged(Location location) {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void onLocationChanged(Location location) {\n\t\t\t\n\t\t}", "public abstract void onLocationFound(@NonNull Location location);", "private void revealAround() {\n if (xTile - 1 >= 0 && !References.GetMainTileActorMap()[xTile - 1][yTile].isRevealed()) {\n References.GetMainTileActorMap()[xTile - 1][yTile].setRevealed(true);\n\n if (References.GetMainTileActorMap()[xTile - 1][yTile].itContainsMonster()) {\n References.GetMonsterActorMap()[xTile - 1][yTile].setRevealed(true);\n }\n }\n if (yTile - 1 >= 0 && !References.GetMainTileActorMap()[xTile][yTile - 1].isRevealed()) {\n References.GetMainTileActorMap()[xTile][yTile - 1].setRevealed(true);\n\n if (References.GetMainTileActorMap()[xTile][yTile - 1].itContainsMonster()) {\n References.GetMonsterActorMap()[xTile][yTile - 1].setRevealed(true);\n }\n }\n if (xTile + 1 < Parameters.NUM_X_TILES && !References.GetMainTileActorMap()[xTile + 1][yTile].isRevealed()) {\n References.GetMainTileActorMap()[xTile + 1][yTile].setRevealed(true);\n\n if (References.GetMainTileActorMap()[xTile + 1][yTile].itContainsMonster()) {\n References.GetMonsterActorMap()[xTile + 1][yTile].setRevealed(true);\n }\n }\n if (yTile + 1 < Parameters.NUM_Y_TILES && !References.GetMainTileActorMap()[xTile][yTile + 1].isRevealed()) {\n References.GetMainTileActorMap()[xTile][yTile + 1].setRevealed(true);\n\n if (References.GetMainTileActorMap()[xTile][yTile + 1].itContainsMonster()) {\n References.GetMonsterActorMap()[xTile][yTile + 1].setRevealed(true);\n }\n }\n }", "@Override\n public void onLocationChanged(MapWidget v, Location location) {\n }", "static private void npcPath() {\n\n if (Time.secondsPassed % 45 == 44) {\n Random picker = new Random();\n while (true) {\n if (josephSchnitzel.getCurrentRoom().equals(mountain)) {\n String[] newRoomString = {\"south\"};\n int index = picker.nextInt(newRoomString.length);\n Room next = josephSchnitzel.getCurrentRoom().getExit(newRoomString[index]);\n josephSchnitzel.setCurrentRoom(next);\n break;\n }\n\n if (josephSchnitzel.getCurrentRoom().equals(beach)) {\n String[] newRoomString = {\"north\"};\n int indexOfNewRoomString = picker.nextInt(newRoomString.length);\n Room nextRoom = josephSchnitzel.getCurrentRoom().getExit(newRoomString[indexOfNewRoomString]);\n josephSchnitzel.setCurrentRoom(nextRoom);\n break;\n }\n\n if (josephSchnitzel.getCurrentRoom().equals(jungle)) {\n String[] newRoomString = {\"north\", \"south\"};\n int indexOfNewRoomString = picker.nextInt(newRoomString.length);\n Room nextRoom = josephSchnitzel.getCurrentRoom().getExit(newRoomString[indexOfNewRoomString]);\n josephSchnitzel.setCurrentRoom(nextRoom);\n break;\n }\n }\n }\n }", "public void onLivingUpdate() {\n if (!this.onGround && this.motionY < 0.0D)\n this.motionY *= 0.6D;\n\n\n if (this.ticksExisted % 20 == 0 && this.getHealth() != this.getMaxHealth() && this.getHealth() >= 1)\n this.setHealth(this.getHealth() + 1);\n\n if (worldObj.isRemote) {\n if (this.isSitting())\n worldObj.spawnParticle(EnumParticleTypes.REDSTONE, posX, posY + 1.5, posZ, 0, 0, 0);\n }\n\n if (worldObj.isRemote) {\n MoWitchAndWizard.proxy.spawnParticles(\"air_normal\", this);\n }\n\n super.onLivingUpdate();\n }", "private boolean gameOver() {\r\n\t\treturn (lifeBar == null || mehran == null);\r\n\t}", "@Override\n public void onEntityUpdate() {\n if (!(world.provider instanceof WorldProviderLimbo || world.provider instanceof WorldProviderDungeonPocket)) {\n setDead();\n super.onEntityUpdate();\n return;\n }\n\n super.onEntityUpdate();\n\n // Check for players and update aggro levels even if there are no players in range\n EntityPlayer player = world.getClosestPlayerToEntity(this, MAX_AGGRO_RANGE);\n boolean visibility = player != null && player.canEntityBeSeen(this);\n updateAggroLevel(player, visibility);\n\n // Change orientation and face a player if one is in range\n if (player != null) {\n facePlayer(player);\n if (!world.isRemote && isDangerous()) {\n // Play sounds on the server side, if the player isn't in Limbo.\n // Limbo is excluded to avoid drowning out its background music.\n // Also, since it's a large open area with many Monoliths, some\n // of the sounds that would usually play for a moment would\n // keep playing constantly and would get very annoying.\n playSounds(player.getPosition());\n }\n\n if (visibility) {\n // Only spawn particles on the client side and outside Limbo\n if (world.isRemote && isDangerous()) {\n spawnParticles(player);\n }\n\n // Teleport the target player if various conditions are met\n if (aggro >= MAX_AGGRO && !world.isRemote && ModConfig.monoliths.monolithTeleportation && !player.isCreative() && isDangerous()) {\n aggro = 0;\n Location destination = WorldProviderLimbo.getLimboSkySpawn(player);\n TeleportUtils.teleport(player, destination, 0, 0);\n player.world.playSound(null, player.getPosition(), ModSounds.CRACK, SoundCategory.HOSTILE, 13, 1);\n }\n }\n }\n }", "public void onLivingUpdate()\n {\n if (this.worldObj.isDaytime() && !this.worldObj.isRemote && !this.isChild())\n {\n float var1 = this.getBrightness(100.0F);\n\n if (var1 > 0.5F && this.rand.nextFloat() * 30.0F < (var1 - 0.4F) * 2.0F && this.worldObj.canBlockSeeTheSky(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ)))\n {\n boolean var2 = true;\n ItemStack var3 = this.getEquipmentInSlot(4);\n\n if (var3 != null)\n {\n if (var3.isItemStackDamageable())\n {\n var3.setItemDamage(var3.getItemDamageForDisplay() + this.rand.nextInt(2));\n\n if (var3.getItemDamageForDisplay() >= var3.getMaxDamage())\n {\n this.renderBrokenItemStack(var3);\n this.setCurrentItemOrArmor(4, (ItemStack)null);\n }\n }\n\n var2 = false;\n }\n\n if (var2)\n {\n this.setFire(-99);\n }\n }\n }\n\n super.onLivingUpdate();\n }", "@Override\n\tpublic void onSpawn()\n\t{\n\t\tsetIsNoRndWalk(true);\n\t\tsuper.onSpawn();\n\n\t\t// check the region where this mob is, do not activate the AI if region is inactive.\n\t\tL2WorldRegion region = WorldManager.getInstance().getRegion(getX(), getY());\n\t\tif(region != null && !region.isActive())\n\t\t{\n\t\t\tgetAI().stopAITask();\n\t\t}\n\t}", "private static void lockRoom(Command command) {\n if (command.getCommandWord().name().equalsIgnoreCase(CommandWord.GO.toString())) {\n if (inventory.getInventory().containsKey(\"Boardingpass\") == false) {\n System.out.println(\"You have no boardingpass, please return when you do!!!\");\n }\n }\n\n if (inventory.getInventory().containsKey(\"Boardingpass\") && !hasBoardingpass) {\n hasBoardingpass = true;\n airport.setExit(\"west\", beach);\n System.out.println(airport.getExitString());\n }\n }", "@Override\n public void onLocationChanged(Location location) {\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n Toast.makeText(this, \"Map is Ready\", Toast.LENGTH_SHORT).show();\n Log.d(TAG, \"onMapReady: map is ready\");\n mMap = googleMap;\n SharedPreferences settings = getSharedPreferences(\"home_settings\", 0);\n boolean darkModeUi_value = settings.getBoolean(\"ui_settings\", false);\n if (darkModeUi_value) {\n// RelativeLayout rel=(RelativeLayout)findViewById(R.id.relLayout1);\n// rel.setBackgroundResource(R.drawable.custom_border3);\n ImageView img =(ImageView)findViewById(R.id.ic_gps);\n img.setImageResource(R.drawable.ic_gps_teal);\n mMap.setMapStyle(MapStyleOptions.loadRawResourceStyle(this, R.raw.map_in_night));\n }\n\n // statusCheck();\n if (mLocationPermissionsGranted) {\n LocationManager manager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);\n// if (manager.isProviderEnabled(LocationManager.GPS_PROVIDER)) {\n // Toast.makeText(this, \"gps check \" + gpscheck, Toast.LENGTH_SHORT).show();\n //statusCheck();\n// LocationManager manager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);\n\n if (!manager.isProviderEnabled(LocationManager.GPS_PROVIDER)) {\n // Toast.makeText(this, \"Enable gps\", Toast.LENGTH_SHORT).show();\n buildAlertMessageNoGps();\n\n } else {\n\n getDeviceLocation();\n }\n\n\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 return;\n }\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n init();\n // }\n }\n\n }", "private void automaticModeChecks(){\n // turn on lights if underground\n if (this.isUnderground()){ this.selectedTrain.setLights(1);}\n // set heat\n if (this.selectedTrain.getTemp() <= 40.0){this.selectedTrain.setThermostat(60.0);}\n else if (this.selectedTrain.getTemp() >= 80){ this.selectedTrain.setThermostat(50.0);}\n }", "@Override\n public void onLocationChanged(@NonNull Location location) {\n }", "public void act() \n {\n World myWorld = getWorld();\n \n Mapa mapa = (Mapa)myWorld;\n \n EnergiaMedicZ vidaMZ = mapa.getEnergiaMedicZ();\n \n EnergiaGuerriZ vidaGZ = mapa.getEnergiaGuerriZ();\n \n EnergiaConstrucZ vidaCZ = mapa.getEnergiaConstrucZ();\n \n GasZerg gasZ = mapa.getGasZerg();\n \n CristalZerg cristalZ = mapa.getCristalZerg();\n \n BunkerZerg bunkerZ = mapa.getBunkerZerg();\n \n Mina1 mina1 = mapa.getMina1();\n Mina2 mina2 = mapa.getMina2();\n Mina3 mina3 = mapa.getMina3();\n \n \n //movimiento del personaje\n if(Greenfoot.isKeyDown(\"b\")){\n if(Greenfoot.isKeyDown(\"d\")){\n if(getX()<1000){\n setLocation(getX()+1,getY());\n }\n }\n if(Greenfoot.isKeyDown(\"a\")){\n if(getX()<1000){\n setLocation(getX()-1,getY());\n }\n }\n if(Greenfoot.isKeyDown(\"w\")){\n if(getY()<600){\n setLocation(getX(),getY()-1);\n }\n }\n if(Greenfoot.isKeyDown(\"s\")){\n if(getY()<600){\n setLocation(getX(),getY()+1);}\n }\n }\n else if(Greenfoot.isKeyDown(\"z\")){\n if(Greenfoot.isKeyDown(\"d\")){\n if(getX()<1000){\n setLocation(getX()+1,getY());\n }\n }\n if(Greenfoot.isKeyDown(\"a\")){\n if(getX()<1000){\n setLocation(getX()-1,getY());\n }\n }\n if(Greenfoot.isKeyDown(\"w\")){\n if(getY()<600){\n setLocation(getX(),getY()-1);\n }\n }\n if(Greenfoot.isKeyDown(\"s\")){\n if(getY()<600){\n setLocation(getX(),getY()+1);}\n }}\n //encuentro con objeto\n \n if(isTouching(Arbol.class) && Greenfoot.isKeyDown(\"d\"))\n {\n setLocation(getX()-1,getY());\n }\n if(isTouching(Arbol.class) && Greenfoot.isKeyDown(\"a\"))\n {\n setLocation(getX()+1,getY());\n }\n if(isTouching(Arbol.class) && Greenfoot.isKeyDown(\"w\"))\n {\n setLocation(getX(),getY()+1);\n }\n if(isTouching(Arbol.class) && Greenfoot.isKeyDown(\"s\"))\n {\n setLocation(getX(),getY()-1);\n }\n \n \n //probabilida de daño al enemigo\n \n if(isTouching(MedicTerran.class) && Greenfoot.getRandomNumber(100)==3)\n {\n \n vidaCZ.removervidaCZ();\n \n }\n \n if(isTouching(ConstructorTerran.class) && (Greenfoot.getRandomNumber(100)==3 ||\n Greenfoot.getRandomNumber(100)==2||Greenfoot.getRandomNumber(100)==1))\n {\n \n vidaCZ.removervidaCZ();\n \n }\n if(isTouching(GuerreroTerran.class) && (Greenfoot.getRandomNumber(100)==3||\n Greenfoot.getRandomNumber(100)==2||Greenfoot.getRandomNumber(100)==1||Greenfoot.getRandomNumber(100)==4||Greenfoot.getRandomNumber(100)==5))\n {\n \n vidaCZ.removervidaCZ();\n \n }\n \n \n \n //encuentro con Bunker\n \n \n if(isTouching(BunkerMedicoZ.class)&& Greenfoot.isKeyDown(\"d\"))\n {\n setLocation(getX()-1,getY());\n }\n \n if(isTouching(BunkerMedicoZ.class)&& Greenfoot.isKeyDown(\"a\"))\n {\n setLocation(getX()+1,getY());\n }\n \n if(isTouching(BunkerMedicoZ.class)&& Greenfoot.isKeyDown(\"w\"))\n {\n setLocation(getX(),getY()+1);\n }\n \n if(isTouching(BunkerMedicoZ.class)&& Greenfoot.isKeyDown(\"s\"))\n \n {\n setLocation(getX(),getY()-1);\n }\n \n //AccionesUnicas\n \n if(isTouching(YacimientoDeGas.class) && gasZ.gasZ < 100)\n {\n \n gasZ.addGasZ();\n \n }\n \n \n if(isTouching(Mina1.class) && cristalZ.cristalZ < 20) {\n \n cristalZ.addCristalZ();\n mina1.removemina1();\n \n }\n \n if(isTouching(Mina2.class) && cristalZ.cristalZ < 20) {\n \n cristalZ.addCristalZ();\n mina2.removemina2();\n \n }\n \n if(isTouching(Mina3.class) && cristalZ.cristalZ < 20) {\n \n cristalZ.addCristalZ();\n mina3.removemina3();\n \n }\n \n \n if(isTouching(DepositoZ.class) && gasZ.gasZ > 4 && bunkerZ.bunkerZ() < 400){\n \n gasZ.removeGasZ();\n bunkerZ.addbunkerZ();\n }\n \n if(isTouching(DepositoZ.class) && cristalZ.cristalZ() > 0 && bunkerZ.bunkerZ() < 400 ){\n \n cristalZ.removeCristalZ();\n bunkerZ.addbunkerZ();\n }\n \n //determinar si la vida llega a 0\n \n if( vidaCZ.vidaCZ <= 0 )\n {\n \n getWorld().removeObjects(getWorld().getObjects(EnergiaConstrucZ.class)); \n \n getWorld().removeObjects(getWorld().getObjects(ConstructorZerg.class));\n \n EnergiaZerg energiaZ = mapa.getEnergiaZerg(); \n \n energiaZ.removenergiaCZ();\n }\n \n if( mina1.mina1() == 0 ){\n \n getWorld().removeObjects(getWorld().getObjects(Mina1.class)); \n \n getWorld().removeObjects(getWorld().getObjects(Cristal1.class));\n \n }\n \n if( mina2.mina2() == 0 ){\n \n getWorld().removeObjects(getWorld().getObjects(Mina2.class)); \n \n getWorld().removeObjects(getWorld().getObjects(Cristal2.class));\n \n }\n \n if( mina3.mina3() == 0 ){\n \n getWorld().removeObjects(getWorld().getObjects(Mina3.class)); \n \n getWorld().removeObjects(getWorld().getObjects(Cristal3.class));\n \n }\n \n \n}", "static private void inspectRoom() {\n ArrayList items = itemLocation.getItems(currentRoom);\n Item seeItem;\n String itemList = \"\";\n for (int i = 0; i < items.size(); i++) {\n\n seeItem = (Item) items.get(i);\n itemList += seeItem.getName();\n if (i < items.size() - 1) {\n itemList = itemList + \", \";\n }\n }\n System.out.println(itemList);\n int currentNPCsInRoom = 0;\n\n if (BSChristiansen.getCurrentRoom() == currentRoom) {\n System.out.println(\"There seems to be someone resting in the leaves\");\n currentNPCsInRoom++;\n }\n\n if (mysteriousCrab.getCurrentRoom() == currentRoom) {\n System.out.println(\"You sense somebody in the cave\");\n currentNPCsInRoom++;\n }\n\n if (josephSchnitzel.getCurrentRoom() == currentRoom) {\n System.out.println(\"There is an intense smell, somebody seems to be near!\");\n currentNPCsInRoom++;\n }\n if (currentNPCsInRoom == 0) {\n System.out.println(\"You are alone in the room\");\n }\n }", "private void userDidLeave() {\n DeviceSingleton deviceSingleton = DeviceSingleton.getInstance();\n deviceSingleton.setImInARoom(false);\n deviceSingleton.setJoinedChat(false);\n\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putBoolean(\"savedJoinedChat\", false);\n editor.commit();\n Intent intent2 = new Intent(ShowMapActivity.this, LoginActivity.class);\n startActivity(intent2);\n// break;\n\n }", "@EventHandler\n public void thunderChange(ThunderChangeEvent event) {\n if (event.isCancelled()) {\n return;\n }\n MultiverseWorld world = this.plugin.getMVWorldManager().getMVWorld(event.getWorld().getName());\n if (world != null) {\n // If it's going to start raining and we have weather disabled\n event.setCancelled((event.toThunderState() && !world.isWeatherEnabled()));\n }\n }" ]
[ "0.54722655", "0.54149866", "0.5367598", "0.5362816", "0.5274758", "0.52023405", "0.5150897", "0.5098817", "0.5089663", "0.50815654", "0.5073581", "0.5065766", "0.50547683", "0.5045185", "0.502564", "0.4994937", "0.49795112", "0.49671194", "0.49535602", "0.49534446", "0.49519542", "0.4947013", "0.49339628", "0.4931481", "0.49059004", "0.49024624", "0.48948956", "0.486529", "0.48565993", "0.48519382", "0.48436552", "0.4841206", "0.48343343", "0.48336983", "0.4833656", "0.48278508", "0.48218772", "0.48198235", "0.48072717", "0.47968948", "0.47932485", "0.47871372", "0.47815076", "0.47762364", "0.47748122", "0.4774424", "0.47732833", "0.4751582", "0.47503096", "0.47433224", "0.47430775", "0.4737892", "0.4736813", "0.47367725", "0.4736078", "0.473439", "0.47318983", "0.4729819", "0.47272065", "0.47267765", "0.47246295", "0.4720847", "0.47189206", "0.47180364", "0.47156674", "0.47152552", "0.47100496", "0.47046956", "0.4700959", "0.46929565", "0.46819907", "0.46733734", "0.46733734", "0.4662333", "0.46535775", "0.4652936", "0.46519908", "0.46499696", "0.46469", "0.46455643", "0.46451035", "0.46451035", "0.46434554", "0.46344087", "0.46339998", "0.46330872", "0.46315902", "0.46274742", "0.46252993", "0.46230978", "0.46213165", "0.46198747", "0.46193656", "0.46180212", "0.4616528", "0.46126026", "0.46125513", "0.46125415", "0.46091062", "0.4606425" ]
0.6866914
0
Store a new JavaClass instance into this Repository.
@Override public void storeClass(final JavaClass clazz) { loadedClasses.put(clazz.getClassName(), new SoftReference<>(clazz)); clazz.setRepository(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void xsetJavaClass(org.apache.xmlbeans.XmlNMTOKEN javaClass)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlNMTOKEN target = null;\r\n target = (org.apache.xmlbeans.XmlNMTOKEN)get_store().find_attribute_user(JAVACLASS$24);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.XmlNMTOKEN)get_store().add_attribute_user(JAVACLASS$24);\r\n }\r\n target.set(javaClass);\r\n }\r\n }", "public void addClass(Class c) { // adding a single class\n\t\tSQLiteDatabase db = this.getWritableDatabase();\n\n\t\tContentValues values = new ContentValues();\n\t\tvalues.put(KEY_ID, c.getID());\n\t\tvalues.put(KEY_TAKENIN, c.getTakenIn());\n\n\t\t/*\n\t\t * values.put(KEY_ID, 1234567890); values.put(KEY_MAJORN, \"123\");\n\t\t * values.put(KEY_CLASSN, \"123\"); values.put(KEY_TITLE, \"123\");\n\t\t * values.put(KEY_UNITS, 123); values.put(KEY_DESCRIPTION, \"123\");\n\t\t * values.put(KEY_FALL, 1); values.put(KEY_SPRING, 0);\n\t\t */\n\t\t// Inserting Row\n\t\tdb.insert(TABLE_USERCLASSES, null, values);\n\t\tdb.close(); // Closing database connection\n\t}", "public AnnotatedTypeBuilder<X> setJavaClass(Class<X> javaClass) {\n\t\tthis.javaClass = javaClass;\n\t\treturn this;\n\t}", "protected void setJavaClass(Class type) {\n this._class = type;\n }", "public boolean addClass(String cls) {\n\t\tContentValues newClass = new ContentValues();\n\t\tnewClass.put(DbContract.Classes.ATTRIBUTE_NAME, cls);\n\t\t\n\t\ttry {\n\t\t\ttheDb.insertOrThrow(DbContract.Classes.TABLE_NAME, null, newClass);\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(e.toString());\n\t\t\treturn false;\n\t\t}\n\t\t//Successful (supposedly)\n\t\tSystem.out.println(cls + \" added to Class table.\");\n\t\treturn true;\n\t}", "public void setJavaClass(java.lang.String javaClass)\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_attribute_user(JAVACLASS$24);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(JAVACLASS$24);\r\n }\r\n target.setStringValue(javaClass);\r\n }\r\n }", "public RepositoryImpl(final Class<?> entityClass) {\n this.entityClass = entityClass;\n this.entityClassName = this.entityClass.getSimpleName();\n this.entityTableName = this.entityClass.getAnnotation(Table.class).name();\n repositoryInstances.put(entityClass, this);\n }", "public Object getPersistedObject(Class myClass) {\n return this.queryDatabaseMasterSingle(myClass);\n }", "public void setClass_(String newValue);", "protected ModelType newJavaType(Class clazz) {\n\t\treturn new JavaType(clazz);\n\t}", "public void setObjectClass(final Class<? extends DBObject> aClass) {\n setObjectFactory(objectFactory.update(aClass));\n }", "void savePriorityClass(@NotNull PriorityClass priorityClass) throws DuplicatePriorityClassNameException;", "@Override\n\tpublic <T> void insertOne(T entityClass) throws Exception {\n\t\t\n\t}", "private Class<T> getPersistentClass() {\n return this.persistentClass;\n }", "private static void updatePersistClasses(GlobalProperty newValue) {\n\t\t// erase current values\n\t\tclassNamesToPersistIds = new HashSet<String>();\n\t\tclassesToPersistIds = new HashSet<Class>();\n\t\t\n\t\t// add all new values\n\t\tif (newValue != null && !StringUtils.isBlank(newValue.getPropertyValue())) {\n\t\t\tfor (String className : newValue.getPropertyValue().split(\",\")) {\n\t\t\t\tclassName = className.trim();\n\t\t\t\tclassNamesToPersistIds.add(className);\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tClass c = Context.loadClass(className);\n\t\t\t\t\tclassesToPersistIds.add(c);\n\t\t\t\t}\n\t\t\t\tcatch(Exception e) {\n\t\t\t\t\tlog.debug(\"Unable to load class \" + className, e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}", "void setClassType(String classType);", "public void setValueClass(Class<? extends Type> valueClass) {\n this.valueClass = valueClass;\n }", "private JavaType(Class<?> clazz) {\n this.clazz = clazz;\n }", "@Override\n public void persist() {\n }", "public static void addNewClass(Class c, int userId)\n\t{\n\t\tString classCode = c.getClassCode();\n\t\tString className = c.getClassName();\n\t\tString sql = \"INSERT INTO Class (classCode, className, instructorID) \"\n\t\t\t\t+ \"VALUES (?, ?, ?)\";\n\t\ttry(Connection conn = DriverManager.getConnection(db, user, pwd);\n\t\t\t\tPreparedStatement ps = conn.prepareStatement(sql);)\n\t\t{\n\t\t\tps.setString(1, classCode);\n\t\t\tps.setString(2, className);\n\t\t\tps.setInt(3, userId);\n\t\t\tps.executeUpdate();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public Class getJavaClass() {\n return _class;\n }", "public void setInternalClass(final String path, final Class<? extends DBObject> aClass) {\n setObjectFactory(objectFactory.update(aClass, asList(path.split(\"\\\\.\"))));\n }", "public void setDataType(Class newclass) {\n datatype=newclass;\n }", "@Override\n\tpublic Variable store(Variable variable) {\n\t\treturn variableJpaRepository.save(variable);\n\t}", "@Override\n\tpublic void addClasse(Classe m) {\n\t\tclasseRepo.save(m);\n\t}", "public Class<T> getPersistentClass()\n {\n return _persistentClass;\n }", "public void save(Object instance);", "public void persistPrijava(DelegateExecution delegateExecution) {\n PrijavaEntity prijavaEntity = new PrijavaEntity();\n\n // Get all process variables\n Map<String, Object> variables = delegateExecution.getVariables();\n\n // Set order attributes\n prijavaEntity.setStudent((String) variables.get(\"student\"));\n prijavaEntity.setIndeks((String) variables.get(\"indeks\"));\n prijavaEntity.setIspit((String) variables.get(\"ispit\"));\n\n // Persist order instance and flush. After the flush the\n // id of the order instance is set.\n entityManager.persist(prijavaEntity);\n entityManager.flush();\n\n // Remove no longer needed process variables\n delegateExecution.removeVariables(variables.keySet());\n\n // Add newly created order id as process variable\n delegateExecution.setVariable(\"prijavaId\", prijavaEntity.getId());\n }", "public void setDataClass(Class<?> clazz) {\n\t\t\n\t}", "public interface ClassContainer {\n\n void addLoadableClass(String className, byte[] classData);\n}", "@Override\r\n\tpublic void persist() {\n\t}", "public JavaType(Class c)\n {\n underlyingClass = c;\n\n // Work out the basic java type based on the underlying class.\n setBasicType(underlyingClass);\n }", "@Override\n\tpublic void updateClasse(Classe m) {\n\t\tclasseRepo.save(m);\n\t}", "ClassInstanceCreationExpression getClass_();", "public boolean save(New object);", "@Override\n\tpublic void addClazz(Clazz clazz) {\n\t\tclazzDao.addClazz(clazz);\n\t}", "Type persistir(Type type);", "public static JavaType createForClass(Class<?> clazz) {\n return new JavaType(clazz);\n }", "public void setClassData(RPGClass classData) {\n this.classData = classData;\n }", "@Override\n\tpublic void updateClazz(Clazz clazz) {\n\t\tclazzDao.updateClazz(clazz);\n\t}", "public void save(){\r\n\t\tmanager.save(this);\r\n\t}", "@Override\n\tpublic void save(TBasUnitClass tem) {\n\t\ttBasUnitClassRepository.save(tem);\n\t}", "@Override\n\tpublic int saveObject(Evaluate entity) {\n\t\treturn evaluateMapper.saveObject(entity)\n\t\t\t\t;\n\t}", "public void save() {\r\n try {\r\n FileOutputStream fos = new FileOutputStream(REPO_STATE_FILE_NAME);\r\n fos.write(CodecUtils.toJson(this).getBytes());\r\n fos.close();\r\n } catch (Exception e) {\r\n Logging.logError(e);\r\n }\r\n }", "public void xsetClassCode(com.walgreens.rxit.ch.cda.EntityClass classCode)\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.walgreens.rxit.ch.cda.EntityClass target = null;\n target = (com.walgreens.rxit.ch.cda.EntityClass)get_store().find_attribute_user(CLASSCODE$30);\n if (target == null)\n {\n target = (com.walgreens.rxit.ch.cda.EntityClass)get_store().add_attribute_user(CLASSCODE$30);\n }\n target.set(classCode);\n }\n }", "@Override\n\tpublic TypeDocument save(TypeDocument typeDocument) {\n\t\treturn typeDocumentRepository.save(typeDocument);\n\t}", "@Override\n\tpublic void save() {\n\t\t\n\t}", "@Override\n\tpublic void save() {\n\t\t\n\t}", "private void addClassAnnotation(List<Iannotation> annotations, String packageName, String className) {\n\n FileSavedAnnotClass annotClass;\n\n for (Iannotation item: annotations) {\n\n if (item.isChangen()) {\n\n if (item.isParam()) {\n\n annotClass = new FileSavedAnnotClass(packageName, className, item.getName(), item.getValue());\n } else {\n \n annotClass = new FileSavedAnnotClass(packageName, className, item.getName(), null);\n }\n\n saveAnnotaion.add(annotClass);\n }\n }\n }", "@Override\n public JavaClass loadClass(final Class<?> clazz) throws ClassNotFoundException {\n final String className = clazz.getName();\n final JavaClass repositoryClass = findClass(className);\n if (repositoryClass != null) {\n return repositoryClass;\n }\n String name = className;\n final int i = name.lastIndexOf('.');\n if (i > 0) {\n name = name.substring(i + 1);\n }\n JavaClass cls = null;\n try (InputStream clsStream = clazz.getResourceAsStream(name + \".class\")) {\n return cls = loadClass(clsStream, className);\n } catch (final IOException e) {\n return cls;\n }\n\n }", "public <T> Registry registerPojo(Class<T> clazz, int id);", "Object convertJavaValueToDBValue(Object value, Class<?> javaType);", "@Override\n public int save(T entity) {\n return mapper.insert(entity);\n }", "public Object VisitClass(ASTClass asclass) {\n ResetOffsets();\n \n if (typeEnv.find(asclass.name()) != null) {\n CompError.message(asclass.line(), \"Cannot have classes with the same name.\");\n return IntegerType.instance();\n }\n \n VariableEnvironment variables = new VariableEnvironment();\n ASTInstanceVariableDefs variabledefs = asclass.variabledefs();\n Type type;\n if (variabledefs != null) {\n variabledefs.Accept(this);\n //Go through each variable definition and insert it into class's \n //variable environment\n ASTInstanceVariableDef vardef;\n for (int i = 0; i < variabledefs.size(); i++) {\n vardef = variabledefs.elementAt(i);\n type = CheckType(vardef.type(), vardef.arraydimension(), vardef.line());\n //If there is a variable def of same name already in the class's variable enviro,\n //give an error\n if (variables.find(vardef.name()) != null) {\n CompError.message(vardef.line(), \"Cannot have 2 instance variables\"\n + \"of the same name within the same class.\");\n return IntegerType.instance();\n }\n variables.insert(vardef.name(), new VariableEntry(type, IncrementOffset()));\n }\n }\n ClassType classType = new ClassType(variables);\n //Create new Type entry for class\n typeEnv.insert(asclass.name(), classType);\n //functionEnv.insert(asclass.name(), new FunctionEntry(classType, new Vector<Type>()));\n return classType;\n }", "public void setClassId(Long ClassId) {\n this.ClassId = ClassId;\n }", "public void addClass(String classId) {\n\t\t\r\n\t}", "public Class<X> getJavaClass() {\n\t\treturn javaClass;\n\t}", "public interface AssetClassDatastore {\r\n\r\n\t/**\r\n\t * Creates Asset Class in the Datastore \r\n\t * @param assetClass_ Asset Class to be Created \r\n\t * @return Name of Asset Class\r\n\t */\r\n\tpublic String createAssetClass(AssetClass assetClass_);\r\n\t\r\n\t/**\r\n\t * Finds Asset Class by Name \r\n\t * @param name_ Name \r\n\t * @return Asset Class\r\n\t */\r\n\tpublic AssetClass findAssetClassByName(String name_);\r\n\t\r\n\t/**\r\n\t * Finds All Asset Classes\r\n\t * @param cursorString_ Cursor String for continuing a Paged Query or Null for a new Paged Query\r\n\t * @param maxNumberOfAssetClassesOnPage_ Max Number of Asset Classes on a Page \r\n\t * @return Paged Asset Class List\r\n\t */\r\n\tpublic PagedAssetClassList findAllAssetClassesFromCursor(String cursorString_, int maxNumberOfAssetClassesOnPage_);\r\n\t\r\n\t/**\r\n\t * Finds All Top-Level Asset Classes (that have no Parent)\r\n\t * @param cursorString_ Cursor String for continuing a Paged Query or Null for a new Paged Query\r\n\t * @param maxNumberOfAssetClassesOnPage_ Max Number of Asset Classes on a Page \r\n\t * @return Paged Asset Class List\r\n\t */\r\n\tpublic PagedAssetClassList findAllTopLevelAssetClassesFromCursor(String cursorString_, int maxNumberOfAssetClassesOnPage_);\r\n\t\r\n\t\r\n\t/**\r\n\t * Finds Asset Classes by Parent\r\n\t * @param parentAssetClassName_ Name of the Parent Asset Class \r\n\t * @param cursorString_ Cursor String for continuing a Paged Query or Null for a new Paged Query\r\n\t * @param maxNumberOfAssetClassesOnPage_ Max Number of Asset Classes on a Page \r\n\t * @return Paged Asset Class List\r\n\t */\r\n\tpublic PagedAssetClassList findAssetClassesFromCursorByParent(String parentAssetClassName_, String cursorString_, int maxNumberOfAssetClassesOnPage_);\r\n\t\r\n\t/**\r\n\t * Deletes Asset Class by Name \r\n\t * @param name_ Name of Asset Class to be Deleted\r\n\t */\r\n\tpublic void deleteAssetClass(String name_);\r\n\r\n\t/**\r\n\t * Explicitly updates Asset Class in the Datastore with instance provided \r\n\t * @param changedAssetClassModel_ Asset Class to be updated \r\n\t * @return the updated object \r\n\t */\r\n\tpublic AssetClass updateAssetClass(AssetClass changedAssetClassModel_);\r\n}", "org.landxml.schema.landXML11.ClassificationDocument.Classification addNewClassification();", "@Override\r\n\tpublic Grade save(Grade grade) {\r\n\t\treturn gradeRepository.save(grade);\r\n\t}", "@Override\n public void save() {\n \n }", "void store(InstanceProperties props) {\n props.putString(PROPERTY_NAME, name);\n props.putString(PROPERTY_HOST, host);\n props.putInt(PROPERTY_PORT, port);\n props.putString(PROPERTY_LOCAL_SERVER_ROOT,\n getLocalServer() != null\n ? getLocalServer().getServerRoot() : null);\n props.putString(PROPERTY_LOCAL_SERVER_HOME,\n getLocalServer() != null\n ? getLocalServer().getServerHome() : null);\n LOG.log(Level.FINER,\n \"Stored GlassFishCloudInstance({0}, {1}, {2})\",\n new Object[]{name, host, port});\n storeListeners.fireChange();\n\n }", "public void save() throws IOException {\n File f = new File(\"data/pages/\" + pageName + \".class\");\n if (!f.exists()) {\n if (!f.getParentFile().exists()) {\n if (f.getParentFile().mkdirs()) {\n f.createNewFile();\n }\n }\n }\n FileOutputStream fos = new FileOutputStream(f);\n ObjectOutputStream oos = new ObjectOutputStream(fos);\n oos.writeObject(this);\n oos.flush();\n oos.close();\n }", "public ExtraJaxbClassModel setClazz(Class<?> clazz);", "@Override\n public void save() {\n\n }", "@Override\n\tpublic Empresa store(Empresa empresa) {\n\t\treturn empresaJpaRepository.save(empresa);\n\t}", "@Override\r\n public Object fromBinaryJava(byte[] bytes, Class<?> clazz) {\r\n return JSON.parseObject(bytes, clazz);\r\n }", "public void addClassItem(WjrClassItem classItem) {\r\n checkNotNull(classItem, \"The classItem parameter is null.\");\r\n\r\n String className = classItem.getClassName();\r\n checkState(\r\n !classItems.containsKey(className),\r\n \"The %s has already existed.\",\r\n className);\r\n\r\n classItems.put(className, classItem);\r\n }", "public abstract boolean store();", "@Override\n public void save()\n {\n \n }", "@Override\n\tpublic void save(Word word) {\n\t\twordRepository.save(word);\n\t}", "public Class<?> getJavaClass() {\n return clazz;\n }", "public boolean executeInsertIntoDB(final Class myClass,\n final InputStream is,\n final Boolean appendToObject) {\n if (is == null || myClass == null) {\n return false;\n }\n if (!isValidWrite(myClass)) {\n return false;\n }\n Realm realm = DatabaseUtilities.buildRealm(realmConfiguration);\n try {\n realm.executeTransaction(new Realm.Transaction() {\n @Override\n public void execute(Realm realm) {\n if (MiscUtilities.isBooleanNullTrueFalse(appendToObject)) {\n try {\n realm.createOrUpdateObjectFromJson(myClass, is);\n } catch (IOException e) {\n L.m(\"IOException. Error reading file\");\n e.printStackTrace();\n }\n } else {\n try {\n realm.createObjectFromJson(myClass, is);\n } catch (IOException e) {\n L.m(\"IOException. Error reading file\");\n e.printStackTrace();\n }\n }\n }\n });\n realm.close();\n return true;\n\n } catch (IllegalArgumentException e1) {\n e1.printStackTrace();\n L.m(\"A RealmObject with no PrimaryKey cannot be updated. Does \" + myClass.getName() +\n \"have a @PrimaryKey designation over something?\");\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try {\n if(!realm.isClosed()) {\n realm.close();\n }\n } catch (Exception e) {\n }\n }\n return false;\n }", "public synchronized void defineClass(String fullClassName, byte[] bytes)\r\n {\r\n try\r\n {\r\n defineClass(fullClassName, bytes, 0, bytes.length);\r\n }\r\n finally\r\n {\r\n }\r\n }", "public IRubyObject setClassVar(String name, IRubyObject value) {\n RubyModule module = this;\n do {\n if (module.hasClassVariable(name)) {\n return module.storeClassVariable(name, value);\n }\n } while ((module = module.getSuperClass()) != null);\n \n return storeClassVariable(name, value);\n }", "public boolean executeInsertIntoDB(final Class myClass,\n final String jsonString,\n final Boolean appendToObject) {\n if (jsonString == null || myClass == null) {\n return false;\n }\n if (!isValidWrite(myClass)) {\n return false;\n }\n Realm realm = DatabaseUtilities.buildRealm(this.realmConfiguration);\n try {\n realm.executeTransaction(new Realm.Transaction() {\n @Override\n public void execute(Realm realm) {\n if (MiscUtilities.isBooleanNullTrueFalse(appendToObject)) {\n realm.createOrUpdateObjectFromJson(myClass, jsonString);\n } else {\n realm.createObjectFromJson(myClass, jsonString);\n }\n }\n });\n realm.close();\n return true;\n } catch (IllegalArgumentException e1) {\n e1.printStackTrace();\n L.m(\"A RealmObject with no PrimaryKey cannot be updated. Does \" + myClass.getName() +\n \"have a @PrimaryKey designation over something?\");\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try {\n if(!realm.isClosed()) {\n realm.close();\n }\n } catch (Exception e) {\n }\n }\n return false;\n }", "public Data storeData(String repository,byte[] data){\n Data result = null;\n\n //Check if the repository exists\n if(!storage.containsKey(repository)){\n //Create it if it doesn't\n storage.put(repository,new HashMap<>());\n }\n\n //Create the counter for the new object\n String id = String.valueOf(idCounter++);\n\n //Create the Object that will store the data\n result = new Data(id,data);\n\n //Get the repository and store\n storage.get(repository).put(id,result);\n\n return result;\n }", "public void insert(HighScore highScore){\n repository.insert(highScore);\n }", "void saveStorage(StorageEntity storage);", "@Override\n\tpublic void outAClass(AClass node) {\n\t\tcreateConstructor();\n\t\tString directory = this.fileName.substring(0,\n\t\t\t\tthis.fileName.lastIndexOf(File.separatorChar));\n\t\ttry{\n\t\t\tcg.getJavaClass().dump( directory +\"/\" + node.getType().getText() + \".class\");\n\t\t}catch (IOException e ){\n\t\t\tErrorList.add(node,\"Could not save file : \" + e.getMessage() , fileName); \n\t\t}\n\t\tcurrentClass = null; \n\t}", "void setClassOfService(ClassOfService serviceClass);", "protected void addClass ( Class<? extends Object> c ) {\n if ( log.isDebugEnabled() ) {\n log.debug(\"Adding class: \" + c.getName()); //$NON-NLS-1$\n }\n synchronized ( this.dynamicEntityClasses ) {\n this.dynamicEntityClasses.add(c);\n }\n\n }", "public DefinedClass(final String className, final byte[] bytes) {\n this.className = className;\n this.bytes = bytes;\n }", "@Override\n public Class<E> getPersistentClass() {\n return entityClass;\n }", "@Override\n public void save(JavaStudyClub javaStudyClub) {\n entityManager.persist(javaStudyClub);\n }", "@Override\n public Class<PgClassRecord> getRecordType() {\n return PgClassRecord.class;\n }", "public void saveJpmProductSaleNew(JpmProductSaleNew jpmProductSaleNew);", "public final Long save() {\n\t\tid = Ollie.save(this);\n\t\tOllie.putEntity(this);\n\t\tnotifyChange();\n\t\treturn id;\n\t}", "void storeTraining(Training training);", "@Override\r\n\tpublic void save() {\n\r\n\t\ts.save();\r\n\r\n\t}", "public HasID put(@SuppressWarnings(\"rawtypes\") Class type, HasID value);", "public void setClass(UmlClass c) {\n\t\tlogicalClass = c;\n\t}", "public Car saveCar(Car car) {\r\n return repository.save(car);\r\n }", "public void setEntityClass(final Class<T> entityClass)\n\t{\n\t\tthis.entityClass = entityClass;\n\t}", "public void save() {\t\n\t\n\t\n\t}", "public void setClassId(Integer classId) {\n this.classId = classId;\n }", "public void setClassId(Integer classId) {\r\n this.classId = classId;\r\n }", "public void save();", "public void save();", "public void save();" ]
[ "0.5540583", "0.5440507", "0.5373568", "0.5334273", "0.5213051", "0.5175371", "0.5152612", "0.5133079", "0.5096263", "0.5019781", "0.4957583", "0.4899467", "0.48508787", "0.48234954", "0.48226088", "0.4810686", "0.47966823", "0.4793967", "0.47812063", "0.47684368", "0.4767443", "0.47551957", "0.4754444", "0.47434923", "0.47381097", "0.47335964", "0.47188953", "0.4703819", "0.46899086", "0.46550554", "0.46471584", "0.4637872", "0.46277583", "0.4605781", "0.45938414", "0.45810843", "0.45613784", "0.4545707", "0.4544909", "0.45349625", "0.45185316", "0.4517824", "0.45172286", "0.45134878", "0.45123369", "0.4512194", "0.4508769", "0.4508769", "0.4500689", "0.44962022", "0.4490928", "0.44899237", "0.4485823", "0.4476728", "0.44686824", "0.4466999", "0.44562307", "0.44558296", "0.44546372", "0.4445088", "0.4444398", "0.442053", "0.44169408", "0.4395718", "0.43912974", "0.43871468", "0.43865663", "0.43861493", "0.43825948", "0.438219", "0.43808043", "0.43807536", "0.4380264", "0.43753418", "0.43693745", "0.43668994", "0.43653157", "0.43645132", "0.43466896", "0.43445006", "0.43421507", "0.4339659", "0.4334921", "0.43320912", "0.4330052", "0.43294296", "0.43288615", "0.43270403", "0.43226162", "0.43157443", "0.43156824", "0.43130654", "0.43125853", "0.43006316", "0.4298685", "0.4293759", "0.4293368", "0.4292081", "0.4292081", "0.4292081" ]
0.69368434
0
Remove class from repository
@Override public void removeClass(final JavaClass clazz) { loadedClasses.remove(clazz.getClassName()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void remove(Class<?> entity, Object paramObject);", "void removeClass(final String name);", "@Override\n public void removeFromDb() {\n }", "boolean removeClass(String name);", "void deleteRepository(URL repositoryUrl);", "@Test\n public void testRemove() {\n System.out.println(\"remove\");\n Repositorio repo = new RepositorioImpl();\n Persona persona = new Persona();\n persona.setNombre(\"Ismael\");\n persona.setApellido(\"González\");\n persona.setNumeroDocumento(\"4475199\");\n repo.crear(persona);\n \n Persona personaAEliminar = (Persona) repo.buscar(persona.getId());\n assertNotNull(personaAEliminar);\n \n //eliminacion\n repo.eliminar(personaAEliminar);\n Persona personaEliminada = (Persona) repo.buscar(persona.getId());\n assertNull(personaEliminada);\n }", "@Override\r\n\tprotected void cleanFactoryAfterClass(RepositoryFactory factory)\r\n\t{\n\t\tfactory.dropRepository(Employee.class);\r\n\t}", "public void cleanUpRepository()\r\n {\r\n\t\t// delete the repository\r\n\t\trepositoryService.deleteRepository(repository);\r\n\t\t\r\n\t\t// delete the file server\r\n\t\tfileServerService.deleteFileServer(fileServer);\r\n }", "@Override\n\tpublic void del(String id) {\n\t\ttBasUnitClassRepository.delete(id);\n\t}", "public void deleteClass(String classId) {\n\t\t\r\n\t}", "protected void remove() {\n injectors.remove();\n }", "@Override\n\tpublic <T> void drop(Class<T> entityClass) throws Exception {\n\t\t\n\t}", "public void removeClass(String className) \n\t{\n\t\tstoreViewState();\n\t\tproject.removeClass(className);\n\t\tcheckStatus();\n\t}", "void removeComponent(Class<? extends Component> componentClass);", "public void deleteClass(String label);", "@Override\n\tpublic void deleteClasse(String id) {\n\t\tclasseRepo.deleteById(id);\n\t}", "public void removeByClassName(java.lang.String className)\n\t\tthrows com.liferay.portal.kernel.exception.SystemException;", "public void deleteDir() throws Exception\n{\n if(_repo!=null) _repo.close(); _repo = null;\n _gdir.delete();\n _gdir.setProp(GitDir.class.getName(), null);\n}", "@Override\n public void shutDown() throws RepositoryException\n {\n }", "void removeTag(TRepo repo, String tagName);", "public void resetRepository() {\n repository.clear();\n addDirectories( directory );\n }", "public void removeAuxClass(IJavaClassFile auxClassToRemove);", "void removeInjection() throws Exception;", "@Override\n\tpublic void remove(Object entity) {\n\t\t\n\t}", "public void remove () {}", "@Override\n public void remove() {\n }", "public void removeArtifact(ArtifactModel artifact);", "protected void removeClass ( Class<? extends Object> c ) {\n if ( log.isDebugEnabled() ) {\n log.debug(\"Removing class: \" + c.getName()); //$NON-NLS-1$\n }\n synchronized ( this.dynamicEntityClasses ) {\n this.dynamicEntityClasses.remove(c);\n }\n }", "void removeBranch(TRepo repo, String branchName);", "public void remove(){\n }", "@Override\n\t\tpublic void remove() {\n\t\t\t\n\t\t}", "@Override\n\t\tpublic void remove() {\n\t\t\t\n\t\t}", "public boolean dePersistObject(final Class myClass) {\n return this.deleteFromMasterDB(myClass);\n }", "public void unsetJavaClass()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_attribute(JAVACLASS$24);\r\n }\r\n }", "public void remove() {\n\n }", "abstract protected void removeEntity(Entity entity);", "public void remove();", "public void remove();", "public void remove();", "public void remove();", "public void remove();", "@Override\n\t\t\t\tpublic void remove() {\n\t\t\t\t\t\n\t\t\t\t}", "public abstract RepositoryOperation getRemoveOperation(URI[] repoLocations);", "@Test\r\n public void testRemover() throws Exception {\r\n tx.begin();\r\n Categoria categoria = new Categoria(\"Teste remover categoria\");\r\n dao.persiste(categoria);\r\n tx.commit();\r\n em.refresh(categoria);\r\n tx.begin();\r\n dao.remover(categoria);\r\n tx.commit();\r\n assertFalse(\"O objeto ainda persiste\", em.contains(categoria));\r\n }", "<T extends Component> Optional<T> removeComponent(Class<T> type);", "public void deleteAssetClass(String name_);", "public void removed() {\n }", "@Override\n\tpublic void remove(Estado es) {\n\t\tEntityManager em = this.emf.createEntityManager();\n\t\ttry {\n\t\t\tem.remove(em.find(Libro.class, es.getId()));\n\t\t} catch (Exception e) {\n\t\t\t\n\t\t} finally {\n\t\t\tem.close();\n\t\t}\n\t}", "@Test\n\tpublic void testRemoval() {\n\t\tLong id = RedisQuery.nextUniqueId();\n\t\tEntityTest et = new EntityTest(id, \"EntityTestToRemove\");\n\t\tif (RedisQuery.save(et, id)) {\n\t\t\t// Remove the entity\n\t\t\tRedisQuery.remove(et, id);\n\t\t} else {\n\t\t\tthrow new AssertionError(\"Unable to create entity to remove\");\n\t\t}\n\t}", "@Override\n public void remove() {\n }", "public void remove() {\n ((com.guidewire.pl.domain.persistence.core.KeyableBeanPublicMethods)__getDelegateManager().getImplementation(\"com.guidewire.pl.domain.persistence.core.KeyableBeanPublicMethods\")).remove();\n }", "public void remove() {\n ((com.guidewire.pl.domain.persistence.core.KeyableBeanPublicMethods)__getDelegateManager().getImplementation(\"com.guidewire.pl.domain.persistence.core.KeyableBeanPublicMethods\")).remove();\n }", "public void remove() {\n ((com.guidewire.pl.domain.persistence.core.KeyableBeanPublicMethods)__getDelegateManager().getImplementation(\"com.guidewire.pl.domain.persistence.core.KeyableBeanPublicMethods\")).remove();\n }", "public void remove() {\n ((com.guidewire.pl.domain.persistence.core.KeyableBeanPublicMethods)__getDelegateManager().getImplementation(\"com.guidewire.pl.domain.persistence.core.KeyableBeanPublicMethods\")).remove();\n }", "public void remove() {\n ((com.guidewire.pl.domain.persistence.core.KeyableBeanPublicMethods)__getDelegateManager().getImplementation(\"com.guidewire.pl.domain.persistence.core.KeyableBeanPublicMethods\")).remove();\n }", "public void remove() {\n ((com.guidewire.pl.domain.persistence.core.KeyableBeanPublicMethods)__getDelegateManager().getImplementation(\"com.guidewire.pl.domain.persistence.core.KeyableBeanPublicMethods\")).remove();\n }", "public void removeRepository(Repository repository) {\r\n\r\n\t\trepositories.remove(repository.getId());\t\t\r\n\t}", "public void remove() {\r\n //\r\n }", "public void deleteByName(String name){\r\n repository.deleteByName(name);\r\n }", "void removeAll(String check) throws RepositoryException;", "@Override\n\tpublic void removeEntity(T t) {\n\t\tgetSession().delete(t);\n\t}", "public final void remove () {\r\n }", "@Override\r\n\tpublic void remove() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void remove() {\n\t\t\r\n\t}", "public RemoteLibrary removeLibrary(String path);", "public static void removeSearchBase(Project project){\n searchBase.remove(project);\n // 223003 - memory leaked project instance \n fileNameSearchBase.remove(project); // prevent leak\n }", "@Override\n\tpublic void remove(Long id) {\n\t\tproductRepository.delete(id);\n\t}", "public void removeObject(Class clazz, Serializable id) {\n getHibernateTemplate().delete(getObject(clazz, id));\n this.flush();\n }", "Object remove();", "@Override\n\tpublic void remove() { }", "private void deleteRepository() {\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tint opt = JOptionPane.showConfirmDialog(this, \"Delete entire Repository (all change sets) at \"+ repURLFld.getText()+\" ?\", \"Delete All\", JOptionPane.YES_NO_OPTION);\r\n\t\t\tif (opt == JOptionPane.NO_OPTION) return;\r\n\t\t\t\r\n\t\t\t// delete repository header\r\n\t\t\tif (repHeaderLoc!=null) {\r\n\t\t\t\tclient.delete(this.repHeaderLoc);\r\n\t\t\t\tSystem.out.println(\"Deleted Repository Header at \" + repHeaderLoc);\r\n\t\t\t}\r\n\t\t\telse System.out.println(\"URL location of Repository Header not known\");\r\n\t\t\t\r\n\t\t\t// delete all commits at Version Controlled Repository\r\n\t\t\tfor (int ctr=1; ctr<=this.headVersionNumber; ctr++) {\r\n\t\t\t\tURL loc = null;\r\n\t\t\t\tif (versionNodes[ctr]!=null) {\r\n\t\t\t\t\tloc = versionNodes[ctr].location;\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tURI versionURI = new URI(this.repositoryURI.toString()+\"#\"+String.valueOf(ctr));\r\n\t\t\t\t\tSet versionSet = client.findAnnotations(versionURI);\r\n\t\t\t\t\tloc = ((Description) versionSet.iterator().next()).getLocation();\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tclient.delete(loc);\r\n\t\t\t\tSystem.out.println(\"Deleted Version at \"+loc);\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\t\tcatch (Exception ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t}", "void removeIndexForRepository(long repositoryId);", "public void testRemove() throws SQLException, ClassNotFoundException {\r\n\t\t// create an instance to be test\r\n\t\tDate d = Date.valueOf(\"2017-01-01\");\r\n\t\tService ser = new Service(\"employee\", 1, \"variation\", \"note\", d, d, 1, 1);\r\n\t\tmodelDS.insert(ser); \r\n\t\tint id = -1;\r\n\t\tLinkedList<Service> list = modelDS.findAll();\r\n\t\tfor (Service a : list) {\r\n\t\t\tif (a.equals(ser))\r\n\t\t\t\tid = a.getId();\r\n\t\t}\r\n\t\t\r\n\t\tService service = modelDS.findByKey(id);\r\n\t\tmodelDS.remove(service.getId()); // method to test\r\n\r\n\t\t// database extrapolation\r\n\t\tPreparedStatement ps = connection.prepareStatement(\"SELECT count(*) FROM \" + TABLE_NAME + \" WHERE id = ?\");\r\n\t\tps.setInt(1, id);\r\n\t\tResultSet rs = ps.executeQuery();\r\n\t\tint expected = 0;\r\n\t\tif (rs.next())\r\n\t\t\texpected = rs.getInt(1);\r\n\t\tassertEquals(expected, 0);\r\n\t}", "private boolean deleteFromMasterDB(final Class myClass) {\n return this.deleteFromMasterDB(myClass, null);\n }", "public abstract void remove(BEAN bean);", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "@Override\n\tpublic void remove() {\n\t\t\n\t}", "public void entityRemoved() {}", "void remove(Student entity);", "public void done(Class<?> cls) {\n inProcess.remove(cls);\n }", "public void remove() {\n\t}", "public void remove() {\n\t}", "@Override\n\tpublic void excluir() {\n\t\t\n\t}", "@Override\n\tpublic void remove(Post entity) {\n\t\t\n\t}", "@Override\r\n\tpublic void DeletePackage(PackageJour pj) {\n\t\tem.remove(em.contains(pj) ? pj : em.merge(pj));\r\n\t}", "public void remove() {\n\t }", "public void remove() {\n\t }", "public void remove() {\n\t }", "@Override\r\n\t\tpublic void remove() {\r\n\t\t\t// YOU DO NOT NEED TO WRITE THIS\r\n\t\t}", "public void unsetClassCode()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(CLASSCODE$30);\n }\n }", "@Override\r\n\t\tpublic void remove() {\n\r\n\t\t}", "public <T extends Component> T removeComponent(Class<T> componentType);", "public <T extends DbObject> void remove(Class<T> tClass, int id, EntityManager em, boolean closeConnection) throws Exception\n\t{\n\t\tif(id==0)\n\t\t\treturn;\n\t\t\n\t\tEntityTransaction et = em.getTransaction();\n\t\t\n\t\ttry \n\t\t{\n\t\t\tet.begin();\n\t\t\t\n\t\t\tem.remove( em.find( tClass, id) );\n\t\t\t\n\t\t\tet.commit();\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\t\n\t\t\tet.rollback();\n\t\t\tthrow e;\n\t\t\t\n\t\t} finally {\n\t\t\tif(closeConnection)\n\t\t\t\tem.close();\n\t\t}\n\t}", "public void removeByObject()\r\n\t{\n\t}" ]
[ "0.66936475", "0.6563551", "0.6431668", "0.62847763", "0.6219511", "0.61955726", "0.6134763", "0.6085767", "0.60728353", "0.60047615", "0.5959503", "0.5940043", "0.5875885", "0.5875537", "0.5863742", "0.5829367", "0.57211566", "0.57126826", "0.5698784", "0.5694819", "0.5692729", "0.569122", "0.56789076", "0.56756383", "0.56713814", "0.5653379", "0.56444883", "0.5642652", "0.5637233", "0.56362045", "0.5636111", "0.5636111", "0.5625523", "0.5622181", "0.56058025", "0.56052625", "0.56039435", "0.56039435", "0.56039435", "0.56039435", "0.56039435", "0.5597078", "0.55957234", "0.5589771", "0.5584629", "0.55825937", "0.5578523", "0.5567494", "0.55540246", "0.5541721", "0.5536747", "0.5536747", "0.5536747", "0.55340356", "0.55340356", "0.55340356", "0.5532899", "0.55269337", "0.55241305", "0.5509421", "0.55069786", "0.55057865", "0.5504091", "0.5504091", "0.5502204", "0.54937625", "0.54933953", "0.54923904", "0.54841244", "0.54818285", "0.5472749", "0.5464739", "0.5459935", "0.545498", "0.54485935", "0.5441624", "0.5441624", "0.5441624", "0.5441624", "0.5441624", "0.5441624", "0.5441624", "0.5441624", "0.5428621", "0.5423858", "0.5422183", "0.54211515", "0.54211515", "0.5417189", "0.5413672", "0.54132956", "0.5406701", "0.5406701", "0.5406701", "0.54017925", "0.54003346", "0.5398102", "0.5391366", "0.53837323", "0.5382666" ]
0.61414355
6
Find an already defined (cached) JavaClass object by name.
@Override public JavaClass findClass(final String className) { final SoftReference<JavaClass> ref = loadedClasses.get(className); if (ref == null) { return null; } return ref.get(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Class findClass(String name) {\n Class c = ( Class ) cache.get( name ) ;\n\n if ( c != null ) {\n return c ;\n }\n\n // Break the name into path names\n String p = parseClassName( name ) ;\n File path = null ;\n\n // Search the current user defined class path.\n for (int i=0;i<paths.size();i++) {\n String pathName = paths.elementAt(i) + p ;\n path = new File( pathName ) ;\n if ( path.exists() && path.isFile() )\n break ;\n else\n path = null ;\n }\n\n if ( path == null )\n return null ;\n\n byte[] b = loadClassData( path);\n\n // Process this class by creating a new \"stub\". Give it\n // a different name to distinguish it from any existing\n // class of the same name.\n ByteArrayInputStream bs = new ByteArrayInputStream( b ) ;\n DataInputStream ds = new DataInputStream( bs ) ;\n ClassObject classObject = new ClassObject() ;\n try {\n classObject.read( ds ) ;\n }\n catch ( IOException e ) {\n return null ;\n }\n\n return defineClass(name, b, 0, b.length);\n }", "protected Class< ? extends Object > findClass( String name ) throws ClassNotFoundException {\n\t\tfinal Class< ? extends Object > c = load_classes.get( name );\n\t\tif ( c == null ) throw new ClassNotFoundException();\n\t\treturn c;\n\t}", "private Class<?> findInternalClass(String name){\n Class<?> clazz = null;\n for (int i = 0; i < urls.length; i++) {\n String root = urls[i].getPath();\n clazz = realFindClass(root,name);\n if(clazz != null)\n break;\n }\n if(clazz != null) {\n classes.put(name,clazz);\n return clazz;\n }\n return null;\n }", "IArenaClass getClass(final String name);", "public RubyClass getClass(String name) {\n return objectClass.getClass(name);\n }", "public FindResult findClass(String className);", "public Class<?> lookupClass(String name) throws ClassNotFoundException {\n return getClass().getClassLoader().loadClass(name);\n }", "public Class<?> findClass(String name) throws ClassNotFoundException\n\t{\n\t\ttry\n\t\t{\n\t\t\tLOCK.lock();\n\t\t\tint i = name.lastIndexOf('.');\n\t\t\tif (i >= 0)\n\t\t\t{\n\t\t\t\tString pkgName = name.substring(0, i);\n\t\t\t\tPackage pkg = getPackage(pkgName);\n\t\t\t\tif (pkg == null)\n\t\t\t\t{\n\t\t\t\t\tdefinePackage(pkgName, null, null, null, null, null, null, null);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (debugEnabled) log.debug(\"looking up definition for resource [\" + name + \"]\");\n\t\t\tbyte[] b = null;\n\t\t\tString resName = name.replace('.', '/') + \".class\";\n\t\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\t\tmap.put(\"name\", resName);\n\t\t\tJPPFResourceWrapper resource = loadResourceData(map, false);\n\t\t\tif (resource == null) throw new ClassNotFoundException(\"could not find reosurce \" + name);\n\t\t\tb = resource.getDefinition();\n\t\t\tif ((b == null) || (b.length == 0))\n\t\t\t{\n\t\t\t\tif (debugEnabled) log.debug(\"definition for resource [\" + name + \"] not found\");\n\t\t\t\tthrow new ClassNotFoundException(\"Could not load class '\" + name + \"'\");\n\t\t\t}\n\t\t\tif (debugEnabled) log.debug(\"found definition for resource [\" + name + \", definitionLength=\" + b.length + \"]\");\n\t\t\treturn defineClass(name, b, 0, b.length);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tLOCK.unlock();\n\t\t}\n\t}", "@Override\n\tprotected Class<?> findClass(String name) throws ClassNotFoundException {\n\t\tFile file = new File(getSimpleName(name) + \".class\");\n FileInputStream fis = null;\n Class<?> clazz = null;\n try {\n fis = new FileInputStream(file);\n int content = 0;\n int i = 0;\n byte[] data = new byte[fis.available()];\n while ((content = fis.read()) != -1) {\n // convert to char and display it\n data[i] = (byte) content;\n i++;\n }\n clazz = defineClass(name, data, 0, data.length);\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n if (fis != null)\n fis.close();\n } catch (IOException ex) {\n \t\tex.printStackTrace();\n \t}\n }\n return clazz;\n\t}", "public AssetClass findAssetClassByName(String name_);", "protected Class findClass(final String name)\n\t\tthrows ClassNotFoundException\n\t{\n\t\t/* Protect the namespace */\n\t\tif (name.startsWith(\"java.\") ||\n\t\t\tname.startsWith(\"org.postgresql.pljava\"))\n\t\t{\n\t\t\tthrow new ClassNotFoundException(name); \n\t\t}\n\n\t\t/* Look to see if we have already loaded the class */\n\t\tClass c = findLoadedClass(name);\n\t\tif (c != null)\n\t\t\treturn c;\n\n\t\t/* Check for the class within our jar */\n\t\tString path = name.replace('.', '/').concat(\".class\");\n\t\tbyte[] entryImg = (byte[]) m_entries.get(path);\n\t\t\n\t\t/* If not found, raise an exception */\n\t\tif (entryImg == null)\n\t\t\tthrow new ClassNotFoundException(name);\n\n\t\t/* create a package for the class */\n\t\tdefinePackage(name);\n\n\t\t/* otherwise convert the image to a class and return it */\n\t\treturn defineClass(name, entryImg, 0, entryImg.length);\n\t}", "Object find(String name);", "public <T extends Base> T findByName(Class<T> T, String name)\n\t\t\tthrows IOException, ClassNotFoundException {\n\t\tT result = null;\n\t\tfor (T t : list(T)) {\n\t\t\tif (t.getName().equals(name)) {\n\t\t\t\tresult = t;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "@Override\n protected Class \n findClass\n (\n String cname\n ) \n throws ClassNotFoundException\n {\n byte bs[] = pContents.get(cname);\n if(bs == null) \n throw new ClassNotFoundException\n\t(\"Unable to find class (\" + cname + \")!\");\n\n return defineClass(cname, bs, 0, bs.length);\n }", "private static Class<?> tryName(String name) throws ClassNotFoundException {\n return Class.forName(name);\r\n }", "private Obj myFindForClass(String name, DesignatorIdent desIdent) {\n \tObj rez = findInMyScope(name); // provera da li je lokalna promenljiva trenutne funkcije\r\n \tif(rez!= Tab.noObj) {\r\n \t\treturn rez;\r\n \t}\r\n \t\r\n \tStruct classStruct = null;\r\n \tif(currentClass != null) {\r\n \t\tclassStruct = currentClass;\r\n \t}\r\n \telse {\r\n \t\tclassStruct = currentAbsClass;\r\n \t}\r\n \t\r\n \tObj resultObj = null;\r\n \tSymbolDataStructure members = Tab.currentScope().getOuter().getLocals(); // nisu dodati u classStruct, ali se nalaze u scope, vec su sig svi navedeni\r\n \t\r\n \twhile (classStruct != null) { // u sebi ga trazis ...ako si ga nasao pristupas preko implicitnog this!\r\n \t\tif (members != null) {\r\n \t\t\tresultObj = members.searchKey(name);\r\n \t\t\tif (resultObj != null) break;\r\n \t\t}\r\n \t\t\r\n \t\tclassStruct = classStruct.getElemType();\r\n \t\tif (classStruct != null) {\r\n \t\t\tmembers = classStruct.getMembersTable();\r\n \t\t}\r\n \t}\r\n \t\r\n \tif (resultObj != null) {\r\n \t\tStruct trenutna = null;\r\n \t\tif (currentClass != null)\r\n \t\t\ttrenutna = currentClass;\r\n \t\tif (currentAbsClass != null)\r\n \t\t\ttrenutna = currentAbsClass;\r\n// \t\tif (trenutna == null) // dal je moguce? ---> jeste u main-u npr ---> ovde nece moci jel sig zovem iz klase...\r\n// \t\t\treturn;\r\n \t\t// znaci polje sam klase \"klasa\" ; zovem se sa . nesto...sig sam polje ili metoda klase\r\n \t\tif (resultObj.getKind() == Obj.Fld || resultObj.getKind() == Obj.Meth) { \r\n \t\t\tif (resultObj.getFpPos() == 1 || resultObj.getFpPos() == -9) { // public\r\n \t\t\t\tif (resultObj.getKind() == Obj.Meth) {\r\n \t \t\t\treport_info(\"Detektovan poziv metoda unutrasnje klase: \" + desIdent.getName() + \" na liniji \" + desIdent.getLine(), desIdent);\r\n \t \t\t\tcallFunctionClassField = 1;\r\n \t \t\t}\r\n \t\t\t\treturn resultObj;\r\n \t\t\t}\r\n \t\t\t\r\n \t\t\tif (resultObj.getFpPos() == 2 || resultObj.getFpPos() == -8) { // protected\r\n \t\t\t\tif (resultObj.getKind() == Obj.Meth) {\r\n \t \t\t\treport_info(\"Detektovan poziv metoda unutrasnje klase: \" + desIdent.getName() + \" na liniji \" + desIdent.getLine(), desIdent);\r\n \t \t\t\tcallFunctionClassField = 1;\r\n \t \t\t}\r\n \t\t\t\treturn resultObj;\r\n \t\t\t}\r\n \t\t\t\r\n \t\t\tif (resultObj.getFpPos() == 3 || resultObj.getFpPos() == -7) { // private\r\n \t\t\t\tif (trenutna != classStruct) {\r\n \t\t\t\t\treport_error(\"Greska na liniji \" + desIdent.getLine()+ \" : polju \"+desIdent.getName()+\" se ne sme pristupati na ovom mestu, private je!\", null);\r\n \t\t\t\t}\r\n \t\t\t\telse {\r\n \t\t\t\t\tif (resultObj.getKind() == Obj.Meth) {\r\n \t\t \t\t\treport_info(\"Detektovan poziv metoda unutrasnje klase: \" + desIdent.getName() + \" na liniji \" + desIdent.getLine(), desIdent);\r\n \t\t \t\t\tcallFunctionClassField = 1;\r\n \t\t \t\t\treturn resultObj;\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\r\n// \t\tif (resultObj.getKind() == Obj.Meth) {\r\n// \t\t\treport_info(\"Detektovan poziv metoda unutrasnje klase: \" + desIdent.getName() + \" na liniji \" + desIdent.getLine(), desIdent);\r\n// \t\t\tcallFunctionClassField = 1;\r\n// \t\t}\r\n \t\treturn resultObj;\r\n \t}\r\n \t\r\n \tObj meth = Tab.find(name); // ako je global...\r\n \tif (meth.getKind() == Obj.Meth) {\r\n \t\treport_info(\"Detektovan poziv globalne f-je: \" + desIdent.getName() + \" na liniji \" + desIdent.getLine(), desIdent);\r\n\t\t\tcallFunctionClassField = 0;\r\n \t}\r\n \t\r\n \treturn meth;\r\n\t}", "private SymObject find(String name) {\n SymObject object = table.find(name);\n if (object == SymbolTable.OBJECT_NONE) {\n error(name + \" can't be resolved to a name\");\n }\n\n return object;\n }", "@Override\n public ClassInfo findClass(String fqcn) {\n if (classLookup == null) {\n buildClassLookupMap();\n }\n return classLookup.get(fqcn);\n }", "public static ClassObj findClass(@NonNull Snapshot snapshot, String name) {\n return snapshot.findClass(name);\n }", "public PrimClass resolveClass(String name) {\n return findPrimClass(importFor(name));\n }", "public ClassDefinition getClassByJavaClassName(String cn){\n \treturn(classesByJavaClass.get(cn));\n }", "public ClassPair findClassAndStub( String name ) {\n\n\n return null ;\n }", "protected Class<?> findClass(String paramString) throws ClassNotFoundException {\n/* 343 */ if (!paramString.startsWith(\"sun.reflect.misc.\")) {\n/* 344 */ throw new ClassNotFoundException(paramString);\n/* */ }\n/* 346 */ String str = paramString.replace('.', '/').concat(\".class\");\n/* 347 */ URL uRL = getResource(str);\n/* 348 */ if (uRL != null) {\n/* */ try {\n/* 350 */ return defineClass(paramString, uRL);\n/* 351 */ } catch (IOException iOException) {\n/* 352 */ throw new ClassNotFoundException(paramString, iOException);\n/* */ } \n/* */ }\n/* 355 */ throw new ClassNotFoundException(paramString);\n/* */ }", "public static FastClass getFastClass(String name)\n throws ClassNotFoundException {\n synchronized (classCache) {\n FastClass fc = classCache.get(name);\n if (fc == null) {\n fc = FastClass.create(\n SerializationCache.class.getClassLoader(),\n Class.forName(name));\n classCache.put(name, fc);\n }\n return fc;\n }\n\n }", "public CacheEntry searchWithCache(String name) {\n CacheEntry entry = cacheHit(name);\n \n if (entry != null) return entry;\n \n // we grab serial number first; the worst that will happen is we cache a later\n // update with an earlier serial number, which would just flush anyway\n Object token = getCacheToken();\n DynamicMethod method = searchMethodInner(name);\n \n return method != null ? addToCache(name, method, token) : addToCache(name, UndefinedMethod.getInstance(), token);\n }", "public boolean existsClass(String name)\r\n\t{\r\n\t\treturn obtainOntClass(name) != null;\r\n\t}", "private boolean findClassInComponents(String name) {\n // we need to search the components of the path to see if we can find the\n // class we want.\n final String classname = name.replace('.', '/') + \".class\";\n final String[] list = classpath.list();\n boolean found = false;\n int i = 0;\n while (i < list.length && found == false) {\n final File pathComponent = (File)project.resolveFile(list[i]);\n found = this.contains(pathComponent, classname);\n i++;\n }\n return found;\n }", "public synchronized Class<?> loadJPPFClass(String name) throws ClassNotFoundException\n\t{\n\t\ttry\n\t\t{\n\t\t\tif (debugEnabled) log.debug(\"looking up resource [\" + name + \"]\");\n\t\t\tClass<?> c = findLoadedClass(name);\n\t\t\tif (c != null)\n\t\t\t{\n\t\t\t\tClassLoader cl = c.getClassLoader();\n\t\t\t\tif (debugEnabled) log.debug(\"classloader = \" + cl);\n\t\t\t}\n\t\t\t/*\n\t\t\tif (c == null)\n\t\t\t{\n\t\t\t\tClassLoader parent = getParent();\n\t\t\t\tif (parent instanceof AbstractJPPFClassLoader) c = ((AbstractJPPFClassLoader) parent).findLoadedClass(name);\n\t\t\t}\n\t\t\t*/\n\t\t\tif (c == null)\n\t\t\t{\n\t\t\t\tif (debugEnabled) log.debug(\"resource [\" + name + \"] not already loaded\");\n\t\t\t\tc = findClass(name);\n\t\t\t}\n\t\t\tif (debugEnabled) log.debug(\"definition for resource [\" + name + \"] : \" + c);\n\t\t\treturn c;\n\t\t}\n\t\tcatch(NoClassDefFoundError e)\n\t\t{\n\t\t\tthrow e;\n\t\t}\n\t}", "public ClassItem SearchClass(String className) {\n\t\tfor(ClassItem classitem : classItem)\n\t\t{\n\t\t\tif(classitem.name==className)\n\t\t\t\treturn classitem;\n\t\t}\n\t\treturn null;\n\t}", "public <T> T get(String name, Class<T> javaclass) {\n return null;\n }", "NamedClass createNamedClass();", "public static Class classForName(String nameClass)\n\t\t{\n\t\t\tClass classObject=null;\n\t\t\ttry {\n\t\t\tclassObject = Class.forName(\"com.spring.entity.\"+nameClass);\n\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t\treturn classObject;\n\t\t}", "public abstract T findByName(String name) ;", "public static Class<?> getPrimitiveClass(String name) {\n Method method = null;\n try {\n method = Class.class.getDeclaredMethod(\"getPrimitiveClass\", String.class);\n } catch (NoSuchMethodException e) {\n throw new RuntimeException(e);\n }\n method.setAccessible(true);\n Class<?> clazz = null;\n try {\n clazz = (Class<?>) method.invoke(null, name);\n } catch (IllegalAccessException | InvocationTargetException e) {\n throw new RuntimeException(e);\n }\n return clazz;\n }", "@Deprecated\n public RubyClass fastGetClass(String internedName) {\n return getClass(internedName);\n }", "@Override\n public Class<?> findClass(String className) throws ClassNotFoundException {\n try {\n return super.findClass(className);\n } catch (ClassNotFoundException e) {\n if (fallbackClassLoader != null) {\n Throwable prob = null;\n try {\n return classForName(className, true, fallbackClassLoader);\n } catch (Exception e1) {\n prob = ClassUtil.getRootCause(e1);\n throw new ClassNotFoundException(prob.getMessage(), prob);\n }\n }\n throw e;\n }\n }", "public DynamicMethod searchMethod(String name) {\n return searchWithCache(name).method;\n }", "private Class<?> loadClass(String className) {\n try {\n return Class.forName(className);\n } catch (ClassNotFoundException ignore) {\n return null;\n }\n }", "public FileObject findResource(String name) {\n Enumeration en = getFileSystems ();\n while (en.hasMoreElements ()) {\n FileSystem fs = (FileSystem)en.nextElement ();\n FileObject fo = fs.findResource(name);\n if (fo != null) {\n // object found\n return fo;\n }\n }\n return null;\n }", "public RubyClass defineOrGetClassUnder(String name, RubyClass superClazz) {\n // This method is intended only for defining new classes in Ruby code,\n // so it uses the allocator of the specified superclass or default to\n // the Object allocator. It should NOT be used to define classes that require a native allocator.\n \n Ruby runtime = getRuntime();\n IRubyObject classObj = getConstantAt(name);\n RubyClass clazz;\n \n if (classObj != null) {\n if (!(classObj instanceof RubyClass)) throw runtime.newTypeError(name + \" is not a class\");\n clazz = (RubyClass)classObj;\n \n if (superClazz != null) {\n RubyClass tmp = clazz.getSuperClass();\n while (tmp != null && tmp.isIncluded()) tmp = tmp.getSuperClass(); // need to skip IncludedModuleWrappers\n if (tmp != null) tmp = tmp.getRealClass();\n if (tmp != superClazz) throw runtime.newTypeError(\"superclass mismatch for class \" + name);\n // superClazz = null;\n }\n \n if (runtime.getSafeLevel() >= 4) throw runtime.newTypeError(\"extending class prohibited\");\n } else if (classProviders != null && (clazz = searchProvidersForClass(name, superClazz)) != null) {\n // reopen a java class\n } else {\n if (superClazz == null) superClazz = runtime.getObject();\n clazz = RubyClass.newClass(runtime, superClazz, name, superClazz.getAllocator(), this, true);\n }\n \n return clazz;\n }", "public DmcNamedObjectIF findNamedObject(String name){\n\t\tthrow(new IllegalStateException(\"The SchemaManager is designed to work with ambiguous naming. Use DmcObject.resolveReferences(DmcNameResolverWithClashSupportIF, DmcNameClashResolverIF)\\n\\n\" + DebugInfo.getCurrentStack()));\n }", "public ClassDefinition isClass(String name) throws DmcNameClashException, DmcValueException {\n \treturn(classDefinitions.getDefinition(name));\n// return((ClassDefinition)classDefs.get(getDefName(name)));\n }", "public static void loadClass(String name) {\n\n }", "public PrimObject resolveObject(String name) {\n return findObject(importFor(name));\n }", "public static Class findClass(Object object, String simpleName) {\n \t\tClass clazz = object.getClass();\n \t\tdo {\n \t\t\tClass result = findClass(clazz, simpleName);\n \t\t\tif (result!=null)\n \t\t\t\treturn result;\n \t\t\tclazz = clazz.getSuperclass();\n \t\t}\n \t\twhile (clazz!=null);\n \t\ttry {\n \t\t\t// last resort: try the UI plugin, this is where the Messages class is defined\n \t\t\tBundle b = OSGIUtils.getDefault().getBundle(\"org.eclipse.bpmn2.modeler.ui\"); //$NON-NLS-1$\n \t\t\tclazz = b.loadClass(\"org.eclipse.bpmn2.modeler.ui.Messages\"); //$NON-NLS-1$\n \t\t\tClass result = findClass(clazz, simpleName);\n \t\t\tif (result!=null)\n \t\t\t\treturn result;\n \t\t} catch (Exception e) {\n \t\t}\n \t\treturn null;\n \t}", "public <T> T lookup(Class<T> clazz);", "public interface ClassesByNameProvider {\n\n List<ReferenceType> get(String s);\n\n static ClassesByNameProvider createCache(List<ReferenceType> allTypes) {\n return new Cache(allTypes);\n }\n\n /**\n * Caching implementation for name based class provider.\n */\n final class Cache implements ClassesByNameProvider {\n\n private final ConcurrentHashMap<String, ReferenceType> myCache;\n\n public Cache(List<ReferenceType> classes) {\n myCache = new ConcurrentHashMap<>();\n classes.forEach(t -> myCache.put(t.signature(), t));\n }\n\n @Override\n public List<ReferenceType> get(String s) {\n String signature = VirtualMachineProxyImpl.JNITypeParserReflect.typeNameToSignature(s);\n if (signature != null) {\n return (List<ReferenceType>) myCache.get(signature);\n }\n return Collections.emptyList();\n }\n }\n}", "public static <T> T findByClass(Context ctx, Class<T> klass) throws NamingException {\n\t\tif(jndiClassCache.containsKey(klass)) {\n\t\t\treturn klass.cast(jndiClassCache.get(klass));\n\t\t}\n\t\tNamingEnumeration<NameClassPair> ne = ctx.list(\"\");\n\t\tif (ne.hasMoreElements()) {\n\t\t\twhile (ne.hasMoreElements()) {\n\t\t\t\ttry {\n\t\t\t\t\tNameClassPair ncp = (NameClassPair) ne.nextElement();\n\t\t\t\t\tObject el = ctx.lookup(ncp.getName());\n\t\t\t\t\tif(klass.isAssignableFrom(el.getClass())) {\n\t\t\t\t\t\tjndiClassCache.put(klass, el);\n\t\t\t\t\t\treturn klass.cast(el);\n\t\t\t\t\t} else if (el instanceof Context) {\n\t\t\t\t\t\tObject o = findByClass((Context) el, klass);\n\t\t\t\t\t\tif (o != null)\n\t\t\t\t\t\t\treturn klass.cast(o);\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public static Path findItemInCache( final String name, final Configuration conf) throws IOException {\r\n\t\tif (name==null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tPath result = null;\r\n\t\tresult = findClassPathFile(name,conf);\r\n\t\tif (result!=null) {\r\n\t\t\treturn result;\r\n\t\t}\r\n\t\tresult = findNonClassPathFile(name,conf);\r\n\t\tif (result!=null) {\r\n\t\t\treturn result;\r\n\t\t}\r\n\t\tresult = findClassPathArchive(name,conf);\r\n\t\tif (result!=null) {\r\n\t\t\treturn result;\r\n\t\t}\r\n\t\tresult = findNonClassPathArchive(name,conf);\r\n\t\tif (result!=null) {\r\n\t\t\treturn result;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public static Class<?> lenientClassForName(String className) throws ClassNotFoundException {\n try {\n return loadClass(className);\n } catch (ClassNotFoundException ignored) {\n // try replacing the last dot with a $, in case that helps\n // example: tutorial.Tutorial.Benchmark1 becomes tutorial.Tutorial$Benchmark1\n // amusingly, the $ character means three different things in this one line alone\n String newName = className.replaceFirst(\"\\\\.([^.]+)$\", \"\\\\$$1\");\n return loadClass(newName);\n }\n }", "@Override\n public Named find(String name) throws SemanticException {\n try {\n return head.find(name);\n }\n catch (NoClassException e) {\n return tail.find(name);\n }\n }", "public static IInterfaceDefinition searchType(String unresolvedTypeName,\n\t\t\tEnvironment env)\n\t{\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.isTreeNode(cd))\n\t\t\t{\n\t\t\t\tif (env.classToType.get(cd) == ClassType.Token\n\t\t\t\t\t\t&& checkName(cd, unresolvedTypeName, true, env))// c.rawName.equals(unresolvedTypeName))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Lookup in all root productions\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.isTreeNode(cd))\n\t\t\t{\n\t\t\t\tif (env.classToType.get(cd) == ClassType.Production\n\t\t\t\t\t\t&& checkName(cd, unresolvedTypeName, true, env))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Lookup in all sub productions\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.isTreeNode(cd))\n\t\t\t{\n\t\t\t\tif (env.classToType.get(cd) == ClassType.SubProduction\n\t\t\t\t\t\t&& checkName(cd, unresolvedTypeName, true, env))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Lookup in all alternatives\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.isTreeNode(cd))\n\t\t\t{\n\t\t\t\tif (env.classToType.get(cd) == ClassType.Alternative\n\t\t\t\t\t\t&& checkName(cd, unresolvedTypeName, true, env))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Lookup for all raw names no matter the type\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.isTreeNode(cd))\n\t\t\t{\n\t\t\t\tif (checkName(cd, unresolvedTypeName, true, env))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Lookup in all with not raw name\n\t\tfor (IClassDefinition cd : env.getClasses())\n\t\t{\n\t\t\tif (env.classToType.get(cd) == ClassType.Custom)\n\t\t\t{\n\t\t\t\tif (checkName(cd, unresolvedTypeName, false, env))\n\t\t\t\t{\n\t\t\t\t\treturn cd;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (IClassDefinition c : env.getClasses())\n\t\t{\n\t\t\tif (c.getName().equals(unresolvedTypeName))\n\t\t\t{\n\t\t\t\treturn c;\n\t\t\t}\n\t\t}\n\n\t\tfor (IClassDefinition c : env.getClasses())\n\t\t{\n\t\t\tif (c.getName().getTag().equals(unresolvedTypeName))\n\t\t\t{\n\t\t\t\treturn c;\n\t\t\t}\n\t\t}\n\n\t\tfor (IInterfaceDefinition i : env.getInterfaces())\n\t\t{\n\t\t\tif (i.getName().getName().equals(unresolvedTypeName))\n\t\t\t\treturn i;\n\t\t}\n\n\t\treturn null;// \"%\" + type;\n\n\t}", "default Optional<ClassElement> getClassElement(String name) {\n return Optional.empty();\n }", "public static Constant construct(String name){\n Constant retVal = cache.get(name);\n if (retVal == null) {\n retVal = new Constant(name);\n cache.put(name, retVal);\n }\n return retVal;\n }", "private DocumentType findByName(String name, boolean caseSensitive) {\n \tif (name == null) {\n \t\treturn null;\n \t}\n return documentTypeDAO.findByName(name, caseSensitive);\n }", "public static Path findClassPathFile( final String name, final Configuration conf) {\r\n\t\tif (name==null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tPath []files = DistributedCache.getFileClassPaths(conf);\r\n\t\tif (files==null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tfor( Path file : files) {\r\n\t\t\tif (name.equals(file.getName())) {\r\n\t\t\t\treturn file;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "private Class m16122a(String str) {\n try {\n return Class.forName(str);\n } catch (ClassNotFoundException unused) {\n return null;\n }\n }", "@Override\n public <T extends ParsedComponent> Optional<T> find(String exactName, Class<T> clazz) {\n\n if (exactName.equals(name) && clazz.equals(this.getClass())) {\n //noinspection unchecked\n return Optional.of((T) this);\n }\n\n return findInChildren(exactName, clazz);\n }", "public IMapping getClassMapping(String name) {\n\n // check for class mapping defined at this level\n IMapping def = getMappingAtLevel(name);\n if (def == null && m_context != null) {\n\n // try finding definition at higher level\n def = m_context.getClassMapping(name);\n \n }\n return def;\n }", "public T lookup( String name )\r\n {\r\n T result = null;\r\n \r\n for( HashMap<String,T> table : tables )\r\n {\r\n result = table.get( name );\r\n if( result!=null ) break;\r\n }\r\n \r\n return result;\r\n }", "public static Class<?> classForName(String className) throws ClassNotFoundException {\r\n Class<?> loaded = null;\r\n try {\r\n loaded = Thread.currentThread().getContextClassLoader().loadClass(className);\r\n } catch (ClassNotFoundException ex) {\r\n // retry using standard classloader\r\n loaded = DiagnoseUtil.class.getClassLoader().loadClass(className);\r\n }\r\n return loaded;\r\n }", "<T extends ModelEntity> T safeFindOrCreate( Class<T> clazz, String name );", "private Object retrieveObject(String name)\r\n {\r\n Object retVal = null;\r\n\r\n // retrieve the object that the weak reference refers to, if any\r\n WeakReference ref = (WeakReference) nameObjects.get(name);\r\n if (ref != null)\r\n {\r\n retVal = ref.get();\r\n }\r\n \r\n return retVal;\r\n }", "@Nullable\n PriorityClass findPriorityClassByName(@NotNull String priorityClassName);", "public T get(String name) {\n for (int i = maps.size() - 1; i >= 0; i--) {\n HashMap<String, T> scope = maps.get(i);\n T t = scope.get(name);\n if (t != null) return t; // Found it!\n }\n return null; // Not found\n }", "public synchronized Class<?> loadClass(String name, boolean resolve)\n throws ClassNotFoundException {\n Class c = findLoadedClass(name);\n if (c == null) {\n try {\n //Second, find my classes next\n if (name.startsWith(\"com.cyc.cycjava.cycl\")) {\n c = classNameToClassMap.get(name);\n if (c != null) {\n if (resolve) {\n resolveClass(c);\n }\n return c;\n }\n c = findClass(name);\n } else {\n throw new ClassNotFoundException(name);\n }\n } catch (ClassNotFoundException e) {\n //Finaly, only if not already loaded and not my class then load from default\n c = super.loadClass(name, false);\n }\n }\n if (c == null) {\n throw new ClassNotFoundException(name);\n }\n if (resolve) {\n resolveClass(c);\n }\n return c;\n }", "@Override\n public Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException {\n synchronized (getClassLoadingLock(name)){\n //First, check if the class has already been loaded\n Class<?> c = findLoadedClass(name);\n if(c == null){\n long t0 = System.nanoTime();\n try {\n //invoke findClass in this class\n c = findClass(name);\n }catch(ClassNotFoundException e){\n // ClassNotFoundException thrown if class not found\n }\n if(c == null){\n return super.loadClass(name, resolve);\n }\n //For compatibility with higher versions > java 1.8.0_141\n// sun.misc.PerfCounter.getFindClasses().addElapsedTimeFrom(t0);\n// sun.misc.PerfCounter.getFindClasses().increment();\n }\n if(resolve){\n resolveClass(c);\n }\n return c;\n }\n }", "public void loadClass(String name) throws InstantiationException, IllegalAccessException, ClassNotFoundException{\n\t\tSystem.out.println(\"Class object address \" + InspectClassLoader.class.hashCode());\n\t\tObject obj = getClass().getClassLoader().loadClass(\"InsideJVM.InspectClassLoader\").newInstance();\n\t\tSystem.out.println(\"Same class object: \" + (obj.getClass() == InspectClassLoader.class));\n\t\t\n\t\t// Class<?> object's class is ???\n\t\tClass<?> s = getClass().getClassLoader().loadClass(\"InsideJVM.InspectClassLoader\");\n\t\tSystem.out.println(s.getClass()); // output: java.land.Class\n\t\t\n\t\tSystem.out.println(\"class loader hashcode \" + getClass().getClassLoader().hashCode());\n\t}", "public Collection find(String name) {\n return getHibernateTemplate().find(\n \"from ClassItem blah where blah.className = ?\", name);\n }", "public static Object lookupBean(String name) {\n BeanManager manager = lookupBeanManager();\n Set<Bean<?>> beans = manager.getBeans(name);\n if (beans != null && !beans.isEmpty()) {\n Bean<?> bean = beans.iterator().next();\n CreationalContext<?> context = manager.createCreationalContext(bean);\n return manager.getReference(bean, Object.class, context);\n }\n return null;\n }", "public IRubyObject getConstantFrom(String name) {\n return fastGetConstantFrom(name.intern());\n }", "public ClassFile getClassFile(String name) throws IOException {\n if (name.indexOf('.') > 0) {\n int i = name.lastIndexOf('.');\n String pathname = name.replace('.', File.separatorChar) + \".class\";\n if (baseFileName.equals(pathname) ||\n baseFileName.equals(pathname.substring(0, i) + \"$\" +\n pathname.substring(i+1, pathname.length()))) {\n return readClassFile(path);\n }\n } else {\n if (baseFileName.equals(name.replace('/', File.separatorChar) + \".class\")) {\n return readClassFile(path);\n }\n }\n return null;\n }", "Car findByName(String name);", "private Class<?> getClassFromHistoryEntry(final String clazz) {\n try {\n return Class.forName(clazz);\n } catch (ClassNotFoundException cnfe) {\n // I know this can't happen\n }\n \n return null;\n }", "private MyClassInfo findClass(List<MyClassInfo> cl, long cursor) {\n\t\tfor (MyClassInfo c : cl) {\n\t\t\tif (cursor > c.getStartPosition() && cursor < c.getEndPosition()) {\n\t\t\t\tList<MyClassInfo> nodes = c.getClassNodes();\n\t\t\t\tMyClassInfo c2 = findClass(nodes, cursor);\n\t\t\t\tif (c2 != null) {\n\t\t\t\t\treturn c2;\n\t\t\t\t} else {\n\t\t\t\t\treturn c;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "protected Class getAClass (String className) throws ClassNotFoundException {\n int dot_index = className.lastIndexOf(\".\");\n if (dot_index == -1) { // native class or string\n if (className.equals (\"String\"))\n return String.class;\n else if (className.equals (\"int\"))\n return int.class;\n\t\t\telse if (className.equals (\"long\"))\n return long.class;\n else if (className.equals (\"boolean\"))\n return boolean.class;\n else if (className.equals (\"char\"))\n\t\t\t\treturn char.class;\n else if (className.equals (\"double\"))\n return double.class;\n else if (className.equals (\"Date\") || className.equals (\"Timestamp\"))\n return Class.forName(\"java.sql.Timestamp\");\n else // try native classes\n return Class.forName(\"java.lang.\" + className);\n }\n else { //use class loader\n return Class.forName(className);\n }\n }", "Tag findByName(String name);", "private static RegistryImpl findRegistryImpl(String classname) \n throws ContentHandlerException\n {\n synchronized (mutex) {\n RegistryImpl impl = \n RegistryImpl.getRegistryImpl(classname, classSecurityToken);\n // Make sure there is a Registry; \n if (impl.getRegistry() == null) {\n impl.setRegistry(new Registry(impl));\n }\n return impl;\n }\n }", "public static Type findType(String name) {\n if (MZTabUtils.isEmpty(name)) {\n throw new IllegalArgumentException(\"Modification type name should not be empty!\");\n }\n\n Type type;\n try {\n type = Type.valueOf(name.trim().toUpperCase());\n } catch (IllegalArgumentException e) {\n type = null;\n }\n\n return type;\n }", "public static NetConnection find(String name){\n\t\tncdb.init();\n\t\tNetConnection nc = ncdb.find(name);\n\t\tncdb.close();\n\t\treturn((nc == null)?null:nc);\n\t}", "public final CompositeType findCompositeType(String name)\n {\n\tfor(int i=0; i<allTypes.size(); i++) {\n\t if(allTypes.elementAt(i) instanceof CompositeType) {\n\t\tCompositeType ctype = (CompositeType) allTypes.elementAt(i);\n\t\tif(ctype.getName().equals(name)) {\n\t\t return ctype;\n\t\t}\n\t }\n\t}\n\treturn null;\n }", "private TreeObject find(String name, int type) {\n\t return widgetRoots[type - 1].find(name);\n\t}", "public static Class<?> name2Class(String name) throws ClassNotFoundException\n\t{\n\t\treturn name2Class(ClassHelper.getClassLoader(), name);\n\t}", "private Class<?> getNMSClass(String name) {\n\t\tString version = Bukkit.getServer().getClass().getPackage().getName().split(\"\\\\.\")[3];\n\t\ttry {\n\t\t\treturn Class.forName(\"net.minecraft.server.\" + version + \".\" + name);\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "String getInstanceOfClass();", "@SuppressWarnings(\"rawtypes\")\n \tpublic static Class getCraftBukkitClass(final String className) {\n \t\tif (craftbukkitPackage == null) {\n \t\t\tcraftbukkitPackage = new CachedPackage(getCraftBukkitPackage());\n \t\t}\n \t\treturn craftbukkitPackage.getPackageClass(className);\n \t}", "@Override\n\tpublic DmcObject findUniqueObject(DmcObjectName name) {\n\t\treturn null;\n\t}", "public static Object java_class(Env env,\n String className)\n {\n try {\n JavaClassDef def = env.getJavaClassDefinition(className);\n\n if (def == null) {\n env.warning(L.l(\"could not find Java class {0}\", className));\n return null;\n }\n\n return new JavaValue(env, def.getType(), def);\n } catch (Throwable e) {\n log.log(Level.FINE, e.getMessage(), e);\n env.warning(e);\n\n return null;\n }\n }", "public static PacketType lookup(String className){\n\t\tfor(PacketType type : packetLookup)\n\t\t\tif(type.getClassName().equals(className)) return type;\n\n\t\tthrow new IllegalArgumentException(\"Couldn't find packet with Name='\"+className+\"'.\");\n\t}", "@Override\r\n\tpublic Country find(String name) {\r\n\t\tCountry retDM = null;\r\n\r\n\t\tif (name == null) {\r\n\t\t\tthrow new IllegalArgumentException(\"\");\r\n\t\t}\r\n\t\ttry {\r\n\t\t\treadMapFromFile();\r\n\t\t\tretDM=this.daoMap.get(name);\r\n\r\n\t\t} catch (JsonSyntaxException | JsonIOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn retDM;\r\n\t}", "public String getClassName(String path);", "public Class<?> loadClass(String fullClassName) {\n\ttry {\n\t return classLoader.loadClass(fullClassName);\n\t} catch (ClassNotFoundException e) {\n\t e.printStackTrace();\n\t return null;\n\t}\n }", "public static Class getJunctionTypeByName(String name) {\r\n return namedJunctionClasses.get(name);\r\n }", "@Override\n public JavaClass loadClass(String className) throws ClassNotFoundException {\n if ((className == null) || className.isEmpty()) {\n throw new IllegalArgumentException(\"Invalid class name \" + className);\n }\n className = className.replace('/', '.'); // Just in case, canonical form\n final JavaClass clazz = findClass(className);\n if (clazz != null) {\n return clazz;\n }\n\n IOException e = new IOException(\"Couldn't find: \" + className + \".class\");\n throw new ClassNotFoundException(\"Exception while looking for class \" +\n className + \": \" + e, e);\n }", "public final PrimitiveType findPrimitiveType(String name)\n {\n for (int i = 0; i < primitiveTypes.size(); i++) {\n PrimitiveType a = (PrimitiveType)(primitiveTypes.elementAt(i));\n if (a.getName().equals(name))\n return a;\n }\n return null;\n }", "public ScriptingClass getPropertyClass( final String name )\n {\n ScriptingClass propClass = null;\n if( properties != null )\n {\n propClass = (ScriptingClass) properties.get( name );\n }\n if( propClass == null && ancestors != null )\n {\n final int size = ancestors.size();\n for( int i = 0; i < size && propClass == null; i++ )\n {\n final ScriptingClass clazz = (ScriptingClass)\n ancestors.elementAt( i );\n propClass = clazz.getPropertyClass( name );\n }\n }\n if( propClass == null )\n {\n try\n {\n final ScriptingClass object = getClassLoader().load( \"object\" );\n propClass = object.getPropertyClass( name );\n }\n catch( ScriptingClassNotFoundException e )\n {\n }\n }\n return propClass;\n }", "public abstract ServiceLocator find(String name);", "public Field findField(final String name) {\r\n\t\tGeneratorHelper.checkJavaFieldName(\"parameter:name\", name);\r\n\r\n\t\tField found = null;\r\n\r\n\t\tfinal Iterator<Field> iterator = this.getFields().iterator();\r\n\r\n\t\twhile (iterator.hasNext()) {\r\n\t\t\tfinal Field field = iterator.next();\r\n\t\t\tif (field.getName().equals(name)) {\r\n\t\t\t\tfound = field;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn found;\r\n\t}", "E getByName(String name);", "Heaver findByName(String name);" ]
[ "0.7944996", "0.74737924", "0.73220694", "0.70661193", "0.7060124", "0.69716877", "0.6865962", "0.6803289", "0.6758706", "0.6757612", "0.67323047", "0.6697353", "0.66383773", "0.6603096", "0.6561058", "0.6478019", "0.6465454", "0.64646655", "0.6461601", "0.63494575", "0.63341045", "0.63289034", "0.6312081", "0.61998385", "0.61893344", "0.6062671", "0.60366654", "0.6009562", "0.6005163", "0.59875786", "0.596843", "0.5968176", "0.5934961", "0.58972937", "0.5879907", "0.58673096", "0.58100677", "0.57545656", "0.5747993", "0.5745889", "0.571892", "0.57084566", "0.5677383", "0.5654991", "0.56534696", "0.5609166", "0.5590047", "0.5584182", "0.5553075", "0.5550851", "0.55507785", "0.554806", "0.5503278", "0.5502779", "0.5500763", "0.5468047", "0.5466358", "0.54555196", "0.54536176", "0.5446903", "0.54355556", "0.5429349", "0.5427622", "0.54272306", "0.5424604", "0.5421689", "0.5417786", "0.54165244", "0.5414992", "0.54105574", "0.540781", "0.5405625", "0.53932947", "0.5384677", "0.53763914", "0.53638446", "0.5362703", "0.5349228", "0.5346432", "0.532452", "0.53171074", "0.531649", "0.5308312", "0.5301459", "0.52919126", "0.5288228", "0.52871954", "0.528697", "0.5267809", "0.5259795", "0.52596307", "0.5256497", "0.52540016", "0.5251951", "0.5251227", "0.5250743", "0.52502704", "0.5242242", "0.5226577", "0.5222482" ]
0.73532635
2
Finds a JavaClass object by name. If it is already in this Repository, the Repository version is returned.
@Override public JavaClass loadClass(String className) throws ClassNotFoundException { if ((className == null) || className.isEmpty()) { throw new IllegalArgumentException("Invalid class name " + className); } className = className.replace('/', '.'); // Just in case, canonical form final JavaClass clazz = findClass(className); if (clazz != null) { return clazz; } IOException e = new IOException("Couldn't find: " + className + ".class"); throw new ClassNotFoundException("Exception while looking for class " + className + ": " + e, e); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public FindResult findClass(String className);", "@Override\n public JavaClass findClass(final String className) {\n final SoftReference<JavaClass> ref = loadedClasses.get(className);\n if (ref == null) {\n return null;\n}\n return ref.get();\n }", "public RubyClass getClass(String name) {\n return objectClass.getClass(name);\n }", "public Class findClass(String name) {\n Class c = ( Class ) cache.get( name ) ;\n\n if ( c != null ) {\n return c ;\n }\n\n // Break the name into path names\n String p = parseClassName( name ) ;\n File path = null ;\n\n // Search the current user defined class path.\n for (int i=0;i<paths.size();i++) {\n String pathName = paths.elementAt(i) + p ;\n path = new File( pathName ) ;\n if ( path.exists() && path.isFile() )\n break ;\n else\n path = null ;\n }\n\n if ( path == null )\n return null ;\n\n byte[] b = loadClassData( path);\n\n // Process this class by creating a new \"stub\". Give it\n // a different name to distinguish it from any existing\n // class of the same name.\n ByteArrayInputStream bs = new ByteArrayInputStream( b ) ;\n DataInputStream ds = new DataInputStream( bs ) ;\n ClassObject classObject = new ClassObject() ;\n try {\n classObject.read( ds ) ;\n }\n catch ( IOException e ) {\n return null ;\n }\n\n return defineClass(name, b, 0, b.length);\n }", "protected Class findClass(final String name)\n\t\tthrows ClassNotFoundException\n\t{\n\t\t/* Protect the namespace */\n\t\tif (name.startsWith(\"java.\") ||\n\t\t\tname.startsWith(\"org.postgresql.pljava\"))\n\t\t{\n\t\t\tthrow new ClassNotFoundException(name); \n\t\t}\n\n\t\t/* Look to see if we have already loaded the class */\n\t\tClass c = findLoadedClass(name);\n\t\tif (c != null)\n\t\t\treturn c;\n\n\t\t/* Check for the class within our jar */\n\t\tString path = name.replace('.', '/').concat(\".class\");\n\t\tbyte[] entryImg = (byte[]) m_entries.get(path);\n\t\t\n\t\t/* If not found, raise an exception */\n\t\tif (entryImg == null)\n\t\t\tthrow new ClassNotFoundException(name);\n\n\t\t/* create a package for the class */\n\t\tdefinePackage(name);\n\n\t\t/* otherwise convert the image to a class and return it */\n\t\treturn defineClass(name, entryImg, 0, entryImg.length);\n\t}", "Repository findByName(String name);", "public static ClassObj findClass(@NonNull Snapshot snapshot, String name) {\n return snapshot.findClass(name);\n }", "protected Class< ? extends Object > findClass( String name ) throws ClassNotFoundException {\n\t\tfinal Class< ? extends Object > c = load_classes.get( name );\n\t\tif ( c == null ) throw new ClassNotFoundException();\n\t\treturn c;\n\t}", "Object find(String name);", "IArenaClass getClass(final String name);", "public Class<?> findClass(String name) throws ClassNotFoundException\n\t{\n\t\ttry\n\t\t{\n\t\t\tLOCK.lock();\n\t\t\tint i = name.lastIndexOf('.');\n\t\t\tif (i >= 0)\n\t\t\t{\n\t\t\t\tString pkgName = name.substring(0, i);\n\t\t\t\tPackage pkg = getPackage(pkgName);\n\t\t\t\tif (pkg == null)\n\t\t\t\t{\n\t\t\t\t\tdefinePackage(pkgName, null, null, null, null, null, null, null);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (debugEnabled) log.debug(\"looking up definition for resource [\" + name + \"]\");\n\t\t\tbyte[] b = null;\n\t\t\tString resName = name.replace('.', '/') + \".class\";\n\t\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\t\tmap.put(\"name\", resName);\n\t\t\tJPPFResourceWrapper resource = loadResourceData(map, false);\n\t\t\tif (resource == null) throw new ClassNotFoundException(\"could not find reosurce \" + name);\n\t\t\tb = resource.getDefinition();\n\t\t\tif ((b == null) || (b.length == 0))\n\t\t\t{\n\t\t\t\tif (debugEnabled) log.debug(\"definition for resource [\" + name + \"] not found\");\n\t\t\t\tthrow new ClassNotFoundException(\"Could not load class '\" + name + \"'\");\n\t\t\t}\n\t\t\tif (debugEnabled) log.debug(\"found definition for resource [\" + name + \", definitionLength=\" + b.length + \"]\");\n\t\t\treturn defineClass(name, b, 0, b.length);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tLOCK.unlock();\n\t\t}\n\t}", "public <T extends Base> T findByName(Class<T> T, String name)\n\t\t\tthrows IOException, ClassNotFoundException {\n\t\tT result = null;\n\t\tfor (T t : list(T)) {\n\t\t\tif (t.getName().equals(name)) {\n\t\t\t\tresult = t;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public static Class classForName(String nameClass)\n\t\t{\n\t\t\tClass classObject=null;\n\t\t\ttry {\n\t\t\tclassObject = Class.forName(\"com.spring.entity.\"+nameClass);\n\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t\treturn classObject;\n\t\t}", "public AssetClass findAssetClassByName(String name_);", "public static Class<?> getNewVersion(String className) {\n Class<?> ret = versions.get(className.hashCode());\n if (ret != null)\n return ret;\n return null;\n }", "private Class<?> findInternalClass(String name){\n Class<?> clazz = null;\n for (int i = 0; i < urls.length; i++) {\n String root = urls[i].getPath();\n clazz = realFindClass(root,name);\n if(clazz != null)\n break;\n }\n if(clazz != null) {\n classes.put(name,clazz);\n return clazz;\n }\n return null;\n }", "@Override\n\tprotected Class<?> findClass(String name) throws ClassNotFoundException {\n\t\tFile file = new File(getSimpleName(name) + \".class\");\n FileInputStream fis = null;\n Class<?> clazz = null;\n try {\n fis = new FileInputStream(file);\n int content = 0;\n int i = 0;\n byte[] data = new byte[fis.available()];\n while ((content = fis.read()) != -1) {\n // convert to char and display it\n data[i] = (byte) content;\n i++;\n }\n clazz = defineClass(name, data, 0, data.length);\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n if (fis != null)\n fis.close();\n } catch (IOException ex) {\n \t\tex.printStackTrace();\n \t}\n }\n return clazz;\n\t}", "private SymObject find(String name) {\n SymObject object = table.find(name);\n if (object == SymbolTable.OBJECT_NONE) {\n error(name + \" can't be resolved to a name\");\n }\n\n return object;\n }", "public PrimClass resolveClass(String name) {\n return findPrimClass(importFor(name));\n }", "@Override\n public JavaClass loadClass(final Class<?> clazz) throws ClassNotFoundException {\n final String className = clazz.getName();\n final JavaClass repositoryClass = findClass(className);\n if (repositoryClass != null) {\n return repositoryClass;\n }\n String name = className;\n final int i = name.lastIndexOf('.');\n if (i > 0) {\n name = name.substring(i + 1);\n }\n JavaClass cls = null;\n try (InputStream clsStream = clazz.getResourceAsStream(name + \".class\")) {\n return cls = loadClass(clsStream, className);\n } catch (final IOException e) {\n return cls;\n }\n\n }", "public Class<?> lookupClass(String name) throws ClassNotFoundException {\n return getClass().getClassLoader().loadClass(name);\n }", "public Car findCarByName(String name){\r\n return repository.findCarByName(name);\r\n }", "Car findByName(String name);", "public ClassPair findClassAndStub( String name ) {\n\n\n return null ;\n }", "public abstract T findByName(String name) ;", "public static Class<?> isVersionOf(String className) {\n return versionOf.get(className.hashCode());\n }", "public Collection find(String name) {\n return getHibernateTemplate().find(\n \"from ClassItem blah where blah.className = ?\", name);\n }", "private static RegistryImpl findRegistryImpl(String classname) \n throws ContentHandlerException\n {\n synchronized (mutex) {\n RegistryImpl impl = \n RegistryImpl.getRegistryImpl(classname, classSecurityToken);\n // Make sure there is a Registry; \n if (impl.getRegistry() == null) {\n impl.setRegistry(new Registry(impl));\n }\n return impl;\n }\n }", "public <T> T get(String name, Class<T> javaclass) {\n return null;\n }", "synchronized Repository getRepository(String name) {\n\t\treturn repositoryMap.get(name);\n\t}", "@Override\n public Named find(String name) throws SemanticException {\n try {\n return head.find(name);\n }\n catch (NoClassException e) {\n return tail.find(name);\n }\n }", "private Obj myFindForClass(String name, DesignatorIdent desIdent) {\n \tObj rez = findInMyScope(name); // provera da li je lokalna promenljiva trenutne funkcije\r\n \tif(rez!= Tab.noObj) {\r\n \t\treturn rez;\r\n \t}\r\n \t\r\n \tStruct classStruct = null;\r\n \tif(currentClass != null) {\r\n \t\tclassStruct = currentClass;\r\n \t}\r\n \telse {\r\n \t\tclassStruct = currentAbsClass;\r\n \t}\r\n \t\r\n \tObj resultObj = null;\r\n \tSymbolDataStructure members = Tab.currentScope().getOuter().getLocals(); // nisu dodati u classStruct, ali se nalaze u scope, vec su sig svi navedeni\r\n \t\r\n \twhile (classStruct != null) { // u sebi ga trazis ...ako si ga nasao pristupas preko implicitnog this!\r\n \t\tif (members != null) {\r\n \t\t\tresultObj = members.searchKey(name);\r\n \t\t\tif (resultObj != null) break;\r\n \t\t}\r\n \t\t\r\n \t\tclassStruct = classStruct.getElemType();\r\n \t\tif (classStruct != null) {\r\n \t\t\tmembers = classStruct.getMembersTable();\r\n \t\t}\r\n \t}\r\n \t\r\n \tif (resultObj != null) {\r\n \t\tStruct trenutna = null;\r\n \t\tif (currentClass != null)\r\n \t\t\ttrenutna = currentClass;\r\n \t\tif (currentAbsClass != null)\r\n \t\t\ttrenutna = currentAbsClass;\r\n// \t\tif (trenutna == null) // dal je moguce? ---> jeste u main-u npr ---> ovde nece moci jel sig zovem iz klase...\r\n// \t\t\treturn;\r\n \t\t// znaci polje sam klase \"klasa\" ; zovem se sa . nesto...sig sam polje ili metoda klase\r\n \t\tif (resultObj.getKind() == Obj.Fld || resultObj.getKind() == Obj.Meth) { \r\n \t\t\tif (resultObj.getFpPos() == 1 || resultObj.getFpPos() == -9) { // public\r\n \t\t\t\tif (resultObj.getKind() == Obj.Meth) {\r\n \t \t\t\treport_info(\"Detektovan poziv metoda unutrasnje klase: \" + desIdent.getName() + \" na liniji \" + desIdent.getLine(), desIdent);\r\n \t \t\t\tcallFunctionClassField = 1;\r\n \t \t\t}\r\n \t\t\t\treturn resultObj;\r\n \t\t\t}\r\n \t\t\t\r\n \t\t\tif (resultObj.getFpPos() == 2 || resultObj.getFpPos() == -8) { // protected\r\n \t\t\t\tif (resultObj.getKind() == Obj.Meth) {\r\n \t \t\t\treport_info(\"Detektovan poziv metoda unutrasnje klase: \" + desIdent.getName() + \" na liniji \" + desIdent.getLine(), desIdent);\r\n \t \t\t\tcallFunctionClassField = 1;\r\n \t \t\t}\r\n \t\t\t\treturn resultObj;\r\n \t\t\t}\r\n \t\t\t\r\n \t\t\tif (resultObj.getFpPos() == 3 || resultObj.getFpPos() == -7) { // private\r\n \t\t\t\tif (trenutna != classStruct) {\r\n \t\t\t\t\treport_error(\"Greska na liniji \" + desIdent.getLine()+ \" : polju \"+desIdent.getName()+\" se ne sme pristupati na ovom mestu, private je!\", null);\r\n \t\t\t\t}\r\n \t\t\t\telse {\r\n \t\t\t\t\tif (resultObj.getKind() == Obj.Meth) {\r\n \t\t \t\t\treport_info(\"Detektovan poziv metoda unutrasnje klase: \" + desIdent.getName() + \" na liniji \" + desIdent.getLine(), desIdent);\r\n \t\t \t\t\tcallFunctionClassField = 1;\r\n \t\t \t\t\treturn resultObj;\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\r\n// \t\tif (resultObj.getKind() == Obj.Meth) {\r\n// \t\t\treport_info(\"Detektovan poziv metoda unutrasnje klase: \" + desIdent.getName() + \" na liniji \" + desIdent.getLine(), desIdent);\r\n// \t\t\tcallFunctionClassField = 1;\r\n// \t\t}\r\n \t\treturn resultObj;\r\n \t}\r\n \t\r\n \tObj meth = Tab.find(name); // ako je global...\r\n \tif (meth.getKind() == Obj.Meth) {\r\n \t\treport_info(\"Detektovan poziv globalne f-je: \" + desIdent.getName() + \" na liniji \" + desIdent.getLine(), desIdent);\r\n\t\t\tcallFunctionClassField = 0;\r\n \t}\r\n \t\r\n \treturn meth;\r\n\t}", "public ClassDefinition getClassByJavaClassName(String cn){\n \treturn(classesByJavaClass.get(cn));\n }", "@Override\n protected Class \n findClass\n (\n String cname\n ) \n throws ClassNotFoundException\n {\n byte bs[] = pContents.get(cname);\n if(bs == null) \n throw new ClassNotFoundException\n\t(\"Unable to find class (\" + cname + \")!\");\n\n return defineClass(cname, bs, 0, bs.length);\n }", "public Currency findByName(String name) {\n openNewManager();\n Query query = manager.createNamedQuery(Currency.FIND_BY_NAME_QUERY)\n .setParameter(\"name\", name);\n Currency currency = (Currency)query.getSingleResult();\n closeManager();\n return currency;\n }", "public ClassFile getClassFile(String name) throws IOException {\n if (name.indexOf('.') > 0) {\n int i = name.lastIndexOf('.');\n String pathname = name.replace('.', File.separatorChar) + \".class\";\n if (baseFileName.equals(pathname) ||\n baseFileName.equals(pathname.substring(0, i) + \"$\" +\n pathname.substring(i+1, pathname.length()))) {\n return readClassFile(path);\n }\n } else {\n if (baseFileName.equals(name.replace('/', File.separatorChar) + \".class\")) {\n return readClassFile(path);\n }\n }\n return null;\n }", "public boolean existsClass(String name)\r\n\t{\r\n\t\treturn obtainOntClass(name) != null;\r\n\t}", "public ClassItem SearchClass(String className) {\n\t\tfor(ClassItem classitem : classItem)\n\t\t{\n\t\t\tif(classitem.name==className)\n\t\t\t\treturn classitem;\n\t\t}\n\t\treturn null;\n\t}", "protected Class<?> findClass(String paramString) throws ClassNotFoundException {\n/* 343 */ if (!paramString.startsWith(\"sun.reflect.misc.\")) {\n/* 344 */ throw new ClassNotFoundException(paramString);\n/* */ }\n/* 346 */ String str = paramString.replace('.', '/').concat(\".class\");\n/* 347 */ URL uRL = getResource(str);\n/* 348 */ if (uRL != null) {\n/* */ try {\n/* 350 */ return defineClass(paramString, uRL);\n/* 351 */ } catch (IOException iOException) {\n/* 352 */ throw new ClassNotFoundException(paramString, iOException);\n/* */ } \n/* */ }\n/* 355 */ throw new ClassNotFoundException(paramString);\n/* */ }", "private DocumentType findByName(String name, boolean caseSensitive) {\n \tif (name == null) {\n \t\treturn null;\n \t}\n return documentTypeDAO.findByName(name, caseSensitive);\n }", "Person findPerson(String name);", "public PrimObject resolveObject(String name) {\n return findObject(importFor(name));\n }", "private boolean findClassInComponents(String name) {\n // we need to search the components of the path to see if we can find the\n // class we want.\n final String classname = name.replace('.', '/') + \".class\";\n final String[] list = classpath.list();\n boolean found = false;\n int i = 0;\n while (i < list.length && found == false) {\n final File pathComponent = (File)project.resolveFile(list[i]);\n found = this.contains(pathComponent, classname);\n i++;\n }\n return found;\n }", "public synchronized Class<?> loadJPPFClass(String name) throws ClassNotFoundException\n\t{\n\t\ttry\n\t\t{\n\t\t\tif (debugEnabled) log.debug(\"looking up resource [\" + name + \"]\");\n\t\t\tClass<?> c = findLoadedClass(name);\n\t\t\tif (c != null)\n\t\t\t{\n\t\t\t\tClassLoader cl = c.getClassLoader();\n\t\t\t\tif (debugEnabled) log.debug(\"classloader = \" + cl);\n\t\t\t}\n\t\t\t/*\n\t\t\tif (c == null)\n\t\t\t{\n\t\t\t\tClassLoader parent = getParent();\n\t\t\t\tif (parent instanceof AbstractJPPFClassLoader) c = ((AbstractJPPFClassLoader) parent).findLoadedClass(name);\n\t\t\t}\n\t\t\t*/\n\t\t\tif (c == null)\n\t\t\t{\n\t\t\t\tif (debugEnabled) log.debug(\"resource [\" + name + \"] not already loaded\");\n\t\t\t\tc = findClass(name);\n\t\t\t}\n\t\t\tif (debugEnabled) log.debug(\"definition for resource [\" + name + \"] : \" + c);\n\t\t\treturn c;\n\t\t}\n\t\tcatch(NoClassDefFoundError e)\n\t\t{\n\t\t\tthrow e;\n\t\t}\n\t}", "@Override\n public ClassInfo findClass(String fqcn) {\n if (classLookup == null) {\n buildClassLookupMap();\n }\n return classLookup.get(fqcn);\n }", "<T extends ModelEntity> T safeFindOrCreate( Class<T> clazz, String name );", "private Class<?> getNMSClass(String name) {\n\t\tString version = Bukkit.getServer().getClass().getPackage().getName().split(\"\\\\.\")[3];\n\t\ttry {\n\t\t\treturn Class.forName(\"net.minecraft.server.\" + version + \".\" + name);\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "public <T extends Base> T findByNameAndStatus(Class<T> T, String name,\n\t\t\tString status) throws IOException, Exception,\n\t\t\tClassNotFoundException {\n\t\tT result = null;\n\t\tfor (T t : list(T)) {\n\t\t\tif (t.getName().equals(name)\n\t\t\t\t\t&& t.getStatus().toString().equalsIgnoreCase(status)) {\n\t\t\t\tresult = t;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public static Class<?> getNewVersion(Class<?> clazz) {\n Class<?> ret = versions.get(clazz.getName().hashCode());\n if (ret != null)\n return ret;\n return clazz;\n\n }", "public FileObject findResource(String name) {\n Enumeration en = getFileSystems ();\n while (en.hasMoreElements ()) {\n FileSystem fs = (FileSystem)en.nextElement ();\n FileObject fo = fs.findResource(name);\n if (fo != null) {\n // object found\n return fo;\n }\n }\n return null;\n }", "public DmcNamedObjectIF findNamedObject(String name){\n\t\tthrow(new IllegalStateException(\"The SchemaManager is designed to work with ambiguous naming. Use DmcObject.resolveReferences(DmcNameResolverWithClashSupportIF, DmcNameClashResolverIF)\\n\\n\" + DebugInfo.getCurrentStack()));\n }", "public static NetConnection find(String name){\n\t\tncdb.init();\n\t\tNetConnection nc = ncdb.find(name);\n\t\tncdb.close();\n\t\treturn((nc == null)?null:nc);\n\t}", "Optional<BankBranch> getByName(String name) throws ObjectNotFoundException;", "@Override\n public Class<?> findClass(String className) throws ClassNotFoundException {\n try {\n return super.findClass(className);\n } catch (ClassNotFoundException e) {\n if (fallbackClassLoader != null) {\n Throwable prob = null;\n try {\n return classForName(className, true, fallbackClassLoader);\n } catch (Exception e1) {\n prob = ClassUtil.getRootCause(e1);\n throw new ClassNotFoundException(prob.getMessage(), prob);\n }\n }\n throw e;\n }\n }", "@RequestMapping(method = RequestMethod.GET, value = \"/{id}\")\n\tpublic ResponseEntity<?> getClassById(@PathVariable Integer id) {\n\t\tif (classRepository.existsById(id)) {\n\t\t\tClassEntity classEntity = classRepository.findById(id).get();\n\t\t\tlogger.info(\"Viewed class with id number \" + id);\n\t\t\treturn new ResponseEntity<ClassEntity>(classEntity, HttpStatus.OK);\n\t\t} else {\n\t\t\treturn new ResponseEntity<RESTError>(\n\t\t\t\t\tnew RESTError(HttpStatus.NOT_FOUND.value(), \"Class with id number \" + id + \" not found\"),\n\t\t\t\t\tHttpStatus.NOT_FOUND);\n\t\t}\n\t}", "private static Class<?> tryName(String name) throws ClassNotFoundException {\n return Class.forName(name);\r\n }", "public User findUser(String name) {\n\n\t\ttry {\n\t\t\tConnection conn = getConnection();\n\t\t\tPreparedStatement ps = conn.prepareStatement(\"select * from users where name = ?\");\n\t\t\tps.setString(1, name);\n\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\tUser foundUser = new User(rs.getInt(1), rs.getString(2), rs.getString(3), rs.getString(4),\n\t\t\t\t\t\trs.getDate(5));\n\t\t\t\tconn.close();\n\t\t\t\treturn foundUser;\n\t\t\t}\n\t\t\tconn.close();\n\n\t\t} catch (SQLException | IOException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\n\t\treturn null;\n\t}", "@Deprecated\n public RubyClass fastGetClass(String internedName) {\n return getClass(internedName);\n }", "User findOneByName(String name);", "Category findByName(String name);", "@Override\r\n\tpublic Shop findOne(String shopname) {\n\t\treturn shopRepo.findOne(shopname);\r\n\t}", "Optional<Company> findByName(String name);", "public ObjectId findClassEntityState(String name, Commit c, boolean useAssignedCommits) {\r\n Query<CodeEntityState> cesq = datastore.find(CodeEntityState.class);\r\n\r\n if (useAssignedCommits && c.getCodeEntityStates() != null && c.getCodeEntityStates().size() > 0) {\r\n cesq.and(\r\n cesq.criteria(\"_id\").in(c.getCodeEntityStates()),\r\n cesq.criteria(\"ce_type\").equal(\"class\"),\r\n cesq.criteria(\"long_name\").equal(name)\r\n );\r\n } else {\r\n cesq.and(\r\n cesq.criteria(\"commit_id\").equal(c.getId()),\r\n cesq.criteria(\"ce_type\").equal(\"class\"),\r\n cesq.criteria(\"long_name\").equal(name)\r\n );\r\n }\r\n final List<CodeEntityState> ces = cesq.asList();\r\n\r\n if (ces.size() == 1) {\r\n return ces.get(0).getId();\r\n } else {\r\n logger.debug(\"Could not find ces for class: \" + name + \" in commit \" + c.getMessage());\r\n return null;\r\n }\r\n }", "@Override\r\n\tpublic Userinfo findbyname(String name) {\n\t\treturn userDAO.searchUserByName(name);\r\n\t}", "public Class getClass(int id) {\n\t\tSQLiteDatabase db = this.getReadableDatabase();\n\n\t\tCursor cursor = db.query(TABLE_USERCLASSES, new String[] { KEY_ID, KEY_TAKENIN }, KEY_ID + \"=?\",\n\t\t\t\tnew String[] { String.valueOf(id) }, null, null, null, null);\n\t\tif (cursor != null) {\n\t\t\tcursor.moveToFirst();\n\n\t\t\tClass c = new Class(Integer.parseInt(cursor.getString(0)), cursor.getString(1));\n\t\t\tdb.close();\n\t\t\treturn c;\n\n\t\t} // return class\n\t\tdb.close();\n\t\treturn null;\n\n\t}", "public static Class<?> getPrimitiveClass(String name) {\n Method method = null;\n try {\n method = Class.class.getDeclaredMethod(\"getPrimitiveClass\", String.class);\n } catch (NoSuchMethodException e) {\n throw new RuntimeException(e);\n }\n method.setAccessible(true);\n Class<?> clazz = null;\n try {\n clazz = (Class<?>) method.invoke(null, name);\n } catch (IllegalAccessException | InvocationTargetException e) {\n throw new RuntimeException(e);\n }\n return clazz;\n }", "SyncRecord findObject(String name, int type) throws NotFoundException\r\n\t{\r\n\t\tfor (int i=0; i<syncTable.size(); i++)\r\n\t\t{\r\n\t\t\tSyncRecord myrec = (SyncRecord)syncTable.elementAt(i);\r\n\t\t\tif ((myrec.name).equals(name) && (myrec.type)==type)\r\n\t\t\t\treturn myrec;\r\n\t\t}\r\n\t\tthrow new NotFoundException();\r\n\t}", "@Override\n public <T extends ParsedComponent> Optional<T> find(String exactName, Class<T> clazz) {\n\n if (exactName.equals(name) && clazz.equals(this.getClass())) {\n //noinspection unchecked\n return Optional.of((T) this);\n }\n\n return findInChildren(exactName, clazz);\n }", "@Override\n\tpublic finalDataBean findByName(String name) throws Exception {\n\t\treturn null;\n\t}", "<T extends ModelEntity> T findActualEntity( Class<T> entityClass, String name );", "public CacheEntry searchWithCache(String name) {\n CacheEntry entry = cacheHit(name);\n \n if (entry != null) return entry;\n \n // we grab serial number first; the worst that will happen is we cache a later\n // update with an earlier serial number, which would just flush anyway\n Object token = getCacheToken();\n DynamicMethod method = searchMethodInner(name);\n \n return method != null ? addToCache(name, method, token) : addToCache(name, UndefinedMethod.getInstance(), token);\n }", "public GitRef getRef(String aName)\n{\n Ref ref;\n System.out.println(\"GitDir.getRef: Used to be getRef() but that is gone now. Don't know if this is okay\");\n try { ref = getRepo().exactRef(aName); }\n catch(Exception e) { throw new RuntimeException(e); }\n return ref!=null ? new GitRef(ref) : null;\n}", "public ClassItem find(Long id) {\n return (ClassItem)find(ClassItem.class, id);\n }", "@CheckForNull\n FileObject find(@NonNull String filename);", "@Override\n\tpublic File getByName(String name) {\n\t\treturn getSession().createNamedQuery(\"getFileByName\", File.class).setParameter(\"name\", name).uniqueResult();\n\t}", "@Override\r\n\tpublic Country find(String name) {\r\n\t\tCountry retDM = null;\r\n\r\n\t\tif (name == null) {\r\n\t\t\tthrow new IllegalArgumentException(\"\");\r\n\t\t}\r\n\t\ttry {\r\n\t\t\treadMapFromFile();\r\n\t\t\tretDM=this.daoMap.get(name);\r\n\r\n\t\t} catch (JsonSyntaxException | JsonIOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn retDM;\r\n\t}", "@Nullable\n PriorityClass findPriorityClassByName(@NotNull String priorityClassName);", "@Override\r\n\tpublic Account findByName(String name) {\n\t\treturn null;\r\n\t}", "<T extends ModelEntity> T safeFindOrCreate( Class<T> clazz, String name, Long id );", "public ClassDefinition isClass(String name) throws DmcNameClashException, DmcValueException {\n \treturn(classDefinitions.getDefinition(name));\n// return((ClassDefinition)classDefs.get(getDefName(name)));\n }", "@Override\n\tpublic Classe getClasse(String id) {\n\t\treturn classeRepository.findById(id).get();\n\t}", "private String getInstanceClass(\n \t final ResultSet rs,\n \t final int i,\n \t final Loadable persister,\n \t final Serializable id,\n \t final SessionImplementor session)\n \tthrows HibernateException, SQLException {\n \n \t\tif ( persister.hasSubclasses() ) {\n \n \t\t\t// Code to handle subclasses of topClass\n \t\t\tObject discriminatorValue = persister.getDiscriminatorType().nullSafeGet(\n \t\t\t\t\trs,\n \t\t\t\t\tgetEntityAliases()[i].getSuffixedDiscriminatorAlias(),\n \t\t\t\t\tsession,\n \t\t\t\t\tnull\n \t\t\t\t);\n \n \t\t\tfinal String result = persister.getSubclassForDiscriminatorValue( discriminatorValue );\n \n \t\t\tif ( result == null ) {\n \t\t\t\t//woops we got an instance of another class hierarchy branch\n \t\t\t\tthrow new WrongClassException(\n \t\t\t\t\t\t\"Discriminator: \" + discriminatorValue,\n \t\t\t\t\t\tid,\n \t\t\t\t\t\tpersister.getEntityName()\n \t\t\t\t\t);\n \t\t\t}\n \n \t\t\treturn result;\n \n \t\t}\n \t\telse {\n \t\t\treturn persister.getEntityName();\n \t\t}\n \t}", "Heaver findByName(String name);", "<T extends ModelEntity> T findEntityType( Class<T> entityClass, String name );", "private TreeObject find(String name, int type) {\n\t return widgetRoots[type - 1].find(name);\n\t}", "@Override\n public Role findByName(String name) {\n Query query = getCurrentSession().createQuery(\"from Role r where r.name = :name\");\n query.setParameter(\"name\", name);\n\n return (Role) query.getResultList().get(0); }", "String getInstanceOfClass();", "public File findJarFileForClass(String type, String name) throws ClassNotFoundException {\n // On cherche la classe demandee parmi celles repertoriees lors du lancement de Kalimucho\n // Si on ne la trouve pas on recree la liste (cas ou le fichier jar aurait ete ajoute apres le demarrage)\n // Si on la trouve on revoie le fichier jar la contenant sinon on leve une exception\n int index=0;\n boolean trouve = false;\n while ((index<types.length) && (!trouve)) { // recherche du type\n if (type.equals(types[index])) trouve = true;\n else index++;\n }\n if (!trouve) throw new ClassNotFoundException(); // type introuvable\n else { // le type est connu on cherche la classe\n int essais = 0;\n while (essais != 2) {\n String fich = classesDisponibles[index].get(name);\n if (fich != null) { // classe repertoriee dans la liste\n essais = 2; // on renvoie le fichier\n return new File(Parameters.COMPONENTS_REPOSITORY+\"/\"+type+\"/\"+fich);\n }\n else { // la classe n'est pas dans la liste\n essais++;\n if (essais == 1) { // si on ne l'a pas deja fait on recree la liste a partir du depot\n rescanRepository();\n }\n }\n }\n throw new ClassNotFoundException(); // Classe introuvable meme apres avoir recree la liste\n }\n }", "public RubyClass defineOrGetClassUnder(String name, RubyClass superClazz) {\n // This method is intended only for defining new classes in Ruby code,\n // so it uses the allocator of the specified superclass or default to\n // the Object allocator. It should NOT be used to define classes that require a native allocator.\n \n Ruby runtime = getRuntime();\n IRubyObject classObj = getConstantAt(name);\n RubyClass clazz;\n \n if (classObj != null) {\n if (!(classObj instanceof RubyClass)) throw runtime.newTypeError(name + \" is not a class\");\n clazz = (RubyClass)classObj;\n \n if (superClazz != null) {\n RubyClass tmp = clazz.getSuperClass();\n while (tmp != null && tmp.isIncluded()) tmp = tmp.getSuperClass(); // need to skip IncludedModuleWrappers\n if (tmp != null) tmp = tmp.getRealClass();\n if (tmp != superClazz) throw runtime.newTypeError(\"superclass mismatch for class \" + name);\n // superClazz = null;\n }\n \n if (runtime.getSafeLevel() >= 4) throw runtime.newTypeError(\"extending class prohibited\");\n } else if (classProviders != null && (clazz = searchProvidersForClass(name, superClazz)) != null) {\n // reopen a java class\n } else {\n if (superClazz == null) superClazz = runtime.getObject();\n clazz = RubyClass.newClass(runtime, superClazz, name, superClazz.getAllocator(), this, true);\n }\n \n return clazz;\n }", "public ObjectType getObjectType(String name) {\r\n FactType ft = typeRepository.getFactType(name);\r\n if (ft != null && ft.isObjectType()) {\r\n return ft.getObjectType();\r\n } else {\r\n return null;\r\n }\r\n }", "@Override\n\tpublic TBasUnitClass findOne(String id) {\n\t\treturn tBasUnitClassRepository.findOne(id);\n\t}", "CMSObject getFirstNodeByName(String name, ConnectionInfo connectionInfo) throws RepositoryAccessException;", "@Override\r\n\tpublic Product findCheapestProduct(String name) {\r\n\t\t\r\n\t\t// Build the url to match the products with provided name and return \r\n\t\t// them sorted by sale price in ascending order.\r\n\t\tString url = apiBaseUrl + \"/search?apiKey={apiKey}&query={name}&format={format}&sort={sort}&ord={ord}&numItems={numItems}\";\r\n\t\t\r\n\t\t// Create the parameters to replace in the url.\r\n\t\tMap<String, String> params = new HashMap<String, String>();\r\n\t\tparams.put(\"name\", name);\r\n\t\tparams.put(\"apiKey\", apiKey);\r\n\t\tparams.put(\"format\", \"json\");\r\n\t\tparams.put(\"sort\", \"price\");\r\n\t\tparams.put(\"ord\", \"asc\");\r\n\t\tparams.put(\"numItems\", \"1\");\r\n\t\t\r\n\t\tRestTemplate template = new RestTemplate();\r\n\t\tWalmartSearchResponse response = template.getForObject(url, WalmartSearchResponse.class, params);\r\n\t\tif (response.getTotalResults() > 0) {\r\n\t\t\tWalmartSearchResponseItem[] responseProducts = response.getItems();\r\n\t\t\treturn new Product(\r\n\t\t\t\t\tresponseProducts[0].getName(),\r\n\t\t\t\t\tresponseProducts[0].getSalePrice(),\r\n\t\t\t\t\tWALMART_LOCATION);\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "@Override\n\tpublic Class<?> getLogicClassForEntityName(String entityName) {\n\t\t// Have we seen this entity before?\n\t\tString cachedLogicName = logicClassNames.get(entityName);\n\t\tif (cachedLogicName != null && cachedLogicName.length() > 0)\n\t\t\treturn loadClass(cachedLogicName);\n\t\tif (cachedLogicName != null && cachedLogicName.length() == 0) // We've already looked for it, and it's not there\n\t\t\treturn null;\n\t\t\n\t\t// We have not yet seen this entity -- see if we can find a logic class for it.\n\t\tString possiblePackages = LogicConfiguration.getInstance().getProperty(LogicConfiguration.PropertyName.LOGIC_PACKAGE_NAMES);\n\t\tString logicClassSuffix = LogicConfiguration.getInstance().getProperty(PropertyName.LOGIC_CLASS_SUFFIX);\n\t\tString logicClassName = null;\n\t\t\n\t\t// If the user has told us where to find the logic classes, look there\n\t\tif (possiblePackages != null && possiblePackages.trim().length() > 0) {\n\t\t\tString[] packages = possiblePackages.split(\",\");\n\t\t\tfor (String pkg : packages) {\n\t\t\t\tString possibleLogicName = pkg.trim() + \".\" + entityName + logicClassSuffix;\n\t\t\t\tif (classExists(possibleLogicName)) {\n\t\t\t\t\tlogicClassName = possibleLogicName;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tString possibleLogicName = \"businesslogic.\" + entityName + \"Logic\";\t\t\t\n\t\t\tif (classExists(possibleLogicName))\n\t\t\t\tlogicClassName = possibleLogicName;\n\t\t}\n\t\t\n\t\t// No point in doing this again for the same bean class -- cache the result\n\t\tif (logicClassName == null) {\n\t\t\tlogicClassNames.put(entityName, \"\"); // Empty string means we've looked for it and it ain't there\n\t\t\treturn null;\n\t\t}\n\n\t\tlogicClassNames.put(entityName, logicClassName);\n\t\treturn loadClass(logicClassName);\n\t}", "public long checkComponent(String name) {\n\t\tif(sessionFactory.getCurrentSession().createQuery(\"from Component c where c.name = ?\").setParameter(0, name).list().size()>0){\n\t\t\treturn ((Component)(sessionFactory.getCurrentSession().createQuery(\"from Component c where c.name = ?\").setParameter(0, name).list().get(0))).getId();\n\t\t}\n\t\treturn -1;\n\t}", "E find(Id id) throws RepositoryException;", "@Override\n\tpublic DmcObject findUniqueObject(DmcObjectName name) {\n\t\treturn null;\n\t}", "public Category findByName(String name) {\n\t\ttry {\n\t\t\tString sql = \"SELECT * FROM categories WHERE name = ?\";\n\t\t\treturn jdbcTemplate.queryForObject(sql, new BeanPropertyRowMapper<>(Category.class), name);\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Category by name '\" + name + \"': No data\");\n\t\t}\n\t\treturn null;\n\t}", "public Bundle findBundle(String packageName, String version)\n \t{\n \t\tClassService classService = ClassServiceUtility.getClassService();\n \t\tif (classService == null)\n \t\t\treturn null;\t// Never\n \t\tClassFinder classFinder = classService.getClassFinder(context);\n \t\tif (classFinder == null)\n \t\t\treturn null;\n \t\tBundle bundle = classFinder.findBundle(null, context, packageName, version);\n \t\tif (bundle == null)\n \t\t{\n \t Object resource = classFinder.deployThisResource(packageName + \".ClassName\", false, false); // Deploy, but do not start the bundle\n \t if (resource != null)\n \t \tbundle = classFinder.findBundle(resource, context, packageName, version);\n \t\t}\n \t\treturn bundle;\n \t}", "public <T extends Base> T findByActiveName(Class<T> T, String name)\n\t\t\tthrows Exception {\n\t\tT result = null;\n\t\tfor (T t : list(T)) {\n\t\t\tif (t.getName().equals(name) && t.isActive()) {\n\t\t\t\tresult = t;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "private Class<?> getClassFromHistoryEntry(final String clazz) {\n try {\n return Class.forName(clazz);\n } catch (ClassNotFoundException cnfe) {\n // I know this can't happen\n }\n \n return null;\n }" ]
[ "0.649329", "0.6391761", "0.6384544", "0.63427263", "0.62708104", "0.6232031", "0.61672395", "0.61422944", "0.6066092", "0.59723437", "0.5972246", "0.59629655", "0.5943792", "0.5903133", "0.5896146", "0.588223", "0.57979363", "0.5624481", "0.5621866", "0.5597663", "0.55844223", "0.55560595", "0.54925466", "0.54389185", "0.54350513", "0.5412051", "0.53567684", "0.53546965", "0.532696", "0.53261775", "0.5317408", "0.5311658", "0.5303379", "0.5293398", "0.52817124", "0.5252695", "0.52388906", "0.52026933", "0.51927626", "0.5189151", "0.51861733", "0.51728433", "0.51625854", "0.5153939", "0.51182425", "0.5113001", "0.51103854", "0.5099619", "0.5086924", "0.5085457", "0.50719655", "0.50686914", "0.50506884", "0.50429046", "0.5004396", "0.50017864", "0.49820796", "0.4979016", "0.49601588", "0.49462673", "0.49450693", "0.4939222", "0.49389094", "0.49232078", "0.4920977", "0.49086657", "0.49055436", "0.49051788", "0.490352", "0.48967713", "0.4894863", "0.4893008", "0.48817292", "0.48809534", "0.48789498", "0.48764032", "0.48723242", "0.4869736", "0.4862888", "0.48450965", "0.48307928", "0.48286015", "0.482599", "0.48246363", "0.4815983", "0.48122358", "0.48115858", "0.47994024", "0.47986132", "0.47912818", "0.47859934", "0.47831443", "0.47825274", "0.47806403", "0.4779723", "0.47793442", "0.47792494", "0.47779042", "0.47713464", "0.47644508", "0.4761879" ]
0.0
-1
Find the JavaClass object for a runtime Class object. If a class with the same name is already in this Repository, the Repository version is returned. Otherwise, getResourceAsStream() is called on the Class object to find the class's representation. If the representation is found, it is added to the Repository.
@Override public JavaClass loadClass(final Class<?> clazz) throws ClassNotFoundException { final String className = clazz.getName(); final JavaClass repositoryClass = findClass(className); if (repositoryClass != null) { return repositoryClass; } String name = className; final int i = name.lastIndexOf('.'); if (i > 0) { name = name.substring(i + 1); } JavaClass cls = null; try (InputStream clsStream = clazz.getResourceAsStream(name + ".class")) { return cls = loadClass(clsStream, className); } catch (final IOException e) { return cls; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public JavaClass findClass(final String className) {\n final SoftReference<JavaClass> ref = loadedClasses.get(className);\n if (ref == null) {\n return null;\n}\n return ref.get();\n }", "public Class<?> findClass(String name) throws ClassNotFoundException\n\t{\n\t\ttry\n\t\t{\n\t\t\tLOCK.lock();\n\t\t\tint i = name.lastIndexOf('.');\n\t\t\tif (i >= 0)\n\t\t\t{\n\t\t\t\tString pkgName = name.substring(0, i);\n\t\t\t\tPackage pkg = getPackage(pkgName);\n\t\t\t\tif (pkg == null)\n\t\t\t\t{\n\t\t\t\t\tdefinePackage(pkgName, null, null, null, null, null, null, null);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (debugEnabled) log.debug(\"looking up definition for resource [\" + name + \"]\");\n\t\t\tbyte[] b = null;\n\t\t\tString resName = name.replace('.', '/') + \".class\";\n\t\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\t\tmap.put(\"name\", resName);\n\t\t\tJPPFResourceWrapper resource = loadResourceData(map, false);\n\t\t\tif (resource == null) throw new ClassNotFoundException(\"could not find reosurce \" + name);\n\t\t\tb = resource.getDefinition();\n\t\t\tif ((b == null) || (b.length == 0))\n\t\t\t{\n\t\t\t\tif (debugEnabled) log.debug(\"definition for resource [\" + name + \"] not found\");\n\t\t\t\tthrow new ClassNotFoundException(\"Could not load class '\" + name + \"'\");\n\t\t\t}\n\t\t\tif (debugEnabled) log.debug(\"found definition for resource [\" + name + \", definitionLength=\" + b.length + \"]\");\n\t\t\treturn defineClass(name, b, 0, b.length);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tLOCK.unlock();\n\t\t}\n\t}", "protected Class findClass(final String name)\n\t\tthrows ClassNotFoundException\n\t{\n\t\t/* Protect the namespace */\n\t\tif (name.startsWith(\"java.\") ||\n\t\t\tname.startsWith(\"org.postgresql.pljava\"))\n\t\t{\n\t\t\tthrow new ClassNotFoundException(name); \n\t\t}\n\n\t\t/* Look to see if we have already loaded the class */\n\t\tClass c = findLoadedClass(name);\n\t\tif (c != null)\n\t\t\treturn c;\n\n\t\t/* Check for the class within our jar */\n\t\tString path = name.replace('.', '/').concat(\".class\");\n\t\tbyte[] entryImg = (byte[]) m_entries.get(path);\n\t\t\n\t\t/* If not found, raise an exception */\n\t\tif (entryImg == null)\n\t\t\tthrow new ClassNotFoundException(name);\n\n\t\t/* create a package for the class */\n\t\tdefinePackage(name);\n\n\t\t/* otherwise convert the image to a class and return it */\n\t\treturn defineClass(name, entryImg, 0, entryImg.length);\n\t}", "public synchronized Class<?> loadJPPFClass(String name) throws ClassNotFoundException\n\t{\n\t\ttry\n\t\t{\n\t\t\tif (debugEnabled) log.debug(\"looking up resource [\" + name + \"]\");\n\t\t\tClass<?> c = findLoadedClass(name);\n\t\t\tif (c != null)\n\t\t\t{\n\t\t\t\tClassLoader cl = c.getClassLoader();\n\t\t\t\tif (debugEnabled) log.debug(\"classloader = \" + cl);\n\t\t\t}\n\t\t\t/*\n\t\t\tif (c == null)\n\t\t\t{\n\t\t\t\tClassLoader parent = getParent();\n\t\t\t\tif (parent instanceof AbstractJPPFClassLoader) c = ((AbstractJPPFClassLoader) parent).findLoadedClass(name);\n\t\t\t}\n\t\t\t*/\n\t\t\tif (c == null)\n\t\t\t{\n\t\t\t\tif (debugEnabled) log.debug(\"resource [\" + name + \"] not already loaded\");\n\t\t\t\tc = findClass(name);\n\t\t\t}\n\t\t\tif (debugEnabled) log.debug(\"definition for resource [\" + name + \"] : \" + c);\n\t\t\treturn c;\n\t\t}\n\t\tcatch(NoClassDefFoundError e)\n\t\t{\n\t\t\tthrow e;\n\t\t}\n\t}", "@Override\n public Class getJavaClass() throws IOException, ClassNotFoundException {\n open();\n URL url;\n int p = path.lastIndexOf('/');\n int p2 = path.substring(0,p-1).lastIndexOf('/');\n\n File f = new File(path.substring(0,p2));\n url = f.toURI().toURL();\n URL[] urls = new URL[1];\n urls[0] = url;\n ClassLoader loader = new URLClassLoader(urls);\n\n String cls = path.substring(p2 + 1, path.lastIndexOf('.')).replace('/', '.');\n\n if (cfile.getParentFile().getParentFile().getName().equals(\"production\")) {\n cls = cls.substring(cls.lastIndexOf('.') + 1);\n }\n\n\n\n return loader.loadClass(cls);\n }", "public Class getObjectClass() {\n return objectFactory.getClassForPath(Collections.emptyList());\n }", "public FindResult findClass(String className);", "public RubyClass getClass(String name) {\n return objectClass.getClass(name);\n }", "private Class loadClass(ClassInfo classInfo) {\n Class type = null;\n try {\n URLClassLoader classLoader = new URLClassLoader(new URL[]{\n new File(classInfo.getPath()).toURI().toURL()\n });\n type = classLoader.loadClass(classInfo.getName());\n } catch (MalformedURLException ex) {\n Logger.getLogger(CDIC.class.getName()).log(Level.SEVERE, \"Class url stimmt nicht. Ggf. hat der ClassIndexer einen falschen Pfad!\", ex);\n } catch (ClassNotFoundException ex) {\n Logger.getLogger(CDIC.class.getName()).log(Level.SEVERE, \"Klasse konnte nicht gefunden werden!\", ex);\n }\n return type;\n }", "protected Class<?> findClass(String paramString) throws ClassNotFoundException {\n/* 343 */ if (!paramString.startsWith(\"sun.reflect.misc.\")) {\n/* 344 */ throw new ClassNotFoundException(paramString);\n/* */ }\n/* 346 */ String str = paramString.replace('.', '/').concat(\".class\");\n/* 347 */ URL uRL = getResource(str);\n/* 348 */ if (uRL != null) {\n/* */ try {\n/* 350 */ return defineClass(paramString, uRL);\n/* 351 */ } catch (IOException iOException) {\n/* 352 */ throw new ClassNotFoundException(paramString, iOException);\n/* */ } \n/* */ }\n/* 355 */ throw new ClassNotFoundException(paramString);\n/* */ }", "@Override\n\tprotected Class<?> findClass(String name) throws ClassNotFoundException {\n\t\tFile file = new File(getSimpleName(name) + \".class\");\n FileInputStream fis = null;\n Class<?> clazz = null;\n try {\n fis = new FileInputStream(file);\n int content = 0;\n int i = 0;\n byte[] data = new byte[fis.available()];\n while ((content = fis.read()) != -1) {\n // convert to char and display it\n data[i] = (byte) content;\n i++;\n }\n clazz = defineClass(name, data, 0, data.length);\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n if (fis != null)\n fis.close();\n } catch (IOException ex) {\n \t\tex.printStackTrace();\n \t}\n }\n return clazz;\n\t}", "public Class findClass(String name) {\n Class c = ( Class ) cache.get( name ) ;\n\n if ( c != null ) {\n return c ;\n }\n\n // Break the name into path names\n String p = parseClassName( name ) ;\n File path = null ;\n\n // Search the current user defined class path.\n for (int i=0;i<paths.size();i++) {\n String pathName = paths.elementAt(i) + p ;\n path = new File( pathName ) ;\n if ( path.exists() && path.isFile() )\n break ;\n else\n path = null ;\n }\n\n if ( path == null )\n return null ;\n\n byte[] b = loadClassData( path);\n\n // Process this class by creating a new \"stub\". Give it\n // a different name to distinguish it from any existing\n // class of the same name.\n ByteArrayInputStream bs = new ByteArrayInputStream( b ) ;\n DataInputStream ds = new DataInputStream( bs ) ;\n ClassObject classObject = new ClassObject() ;\n try {\n classObject.read( ds ) ;\n }\n catch ( IOException e ) {\n return null ;\n }\n\n return defineClass(name, b, 0, b.length);\n }", "public abstract Class resolveClass(GenerationContext context);", "protected Class< ? extends Object > findClass( String name ) throws ClassNotFoundException {\n\t\tfinal Class< ? extends Object > c = load_classes.get( name );\n\t\tif ( c == null ) throw new ClassNotFoundException();\n\t\treturn c;\n\t}", "protected OntClass obtainOntClass(String ontClass)\r\n\t{\r\n\t\tOntResource ontR = obtainOntResource(ontClass);\r\n\t\tif(ontR != null)\r\n\t\t\tif(ontR.canAs(OntClass.class))\r\n\t\t\t\treturn ontR.asClass();\r\n\t\treturn null;\t\r\n\t}", "ClassInstanceCreationExpression getClass_();", "private static RegistryImpl findRegistryImpl(String classname) \n throws ContentHandlerException\n {\n synchronized (mutex) {\n RegistryImpl impl = \n RegistryImpl.getRegistryImpl(classname, classSecurityToken);\n // Make sure there is a Registry; \n if (impl.getRegistry() == null) {\n impl.setRegistry(new Registry(impl));\n }\n return impl;\n }\n }", "private Class<?> findInternalClass(String name){\n Class<?> clazz = null;\n for (int i = 0; i < urls.length; i++) {\n String root = urls[i].getPath();\n clazz = realFindClass(root,name);\n if(clazz != null)\n break;\n }\n if(clazz != null) {\n classes.put(name,clazz);\n return clazz;\n }\n return null;\n }", "private static PsiClass isReturnTypeExistedAsClass(PsiType _type, PsiClass _targetClass) {\r\n PsiFile file = _targetClass.getContainingFile();\r\n if (file == null) return null;\r\n\r\n List<PsiClass> classList = new ArrayList<>();\r\n for (PsiFile f : _targetClass.getContainingFile().getContainingDirectory().getFiles()) {\r\n if (f.equals(file)) continue;\r\n else {\r\n for (PsiClass c : ((PsiClassOwner) f).getClasses()) classList.add(c);\r\n }\r\n }\r\n\r\n for (PsiClass cls : classList) {\r\n if (_type.getPresentableText().equals(cls.getName()))\r\n return cls;\r\n }\r\n return null;\r\n }", "public String getRuntimeClass();", "@Override\n protected Class \n findClass\n (\n String cname\n ) \n throws ClassNotFoundException\n {\n byte bs[] = pContents.get(cname);\n if(bs == null) \n throw new ClassNotFoundException\n\t(\"Unable to find class (\" + cname + \")!\");\n\n return defineClass(cname, bs, 0, bs.length);\n }", "private byte[] getClassBytes(String slashedName) {\n URL url = Thread.currentThread().getContextClassLoader().getResource(\n slashedName + \".class\");\n if (url == null) {\n logger.log(TreeLogger.DEBUG, \"Unable to find \" + slashedName\n + \" on the classPath\");\n return null;\n }\n String urlStr = url.toExternalForm();\n if (slashedName.equals(mainClass)) {\n // initialize the mainUrlBase for later use.\n mainUrlBase = urlStr.substring(0, urlStr.lastIndexOf('/'));\n } else {\n assert mainUrlBase != null;\n if (!mainUrlBase.equals(urlStr.substring(0, urlStr.lastIndexOf('/')))) {\n logger.log(TreeLogger.DEBUG, \"Found \" + slashedName + \" at \" + urlStr\n + \" The base location is different from that of \" + mainUrlBase\n + \" Not loading\");\n return null;\n }\n }\n \n // url != null, we found it on the class path.\n try {\n URLConnection conn = url.openConnection();\n return Util.readURLConnectionAsBytes(conn);\n } catch (IOException ignored) {\n logger.log(TreeLogger.DEBUG, \"Unable to load \" + urlStr\n + \", in trying to load \" + slashedName);\n // Fall through.\n }\n return null;\n }", "@SuppressWarnings(\"unchecked\")\n public <R> R lookup(Class<R> clazz, ComponentType compType) {\n ComponentBean bean = this.componentMap.get(compType);\n if (bean == null)\n return null;\n if (bean.getSuperType().equals(clazz))\n return (R) bean.getObject();\n return null;\n }", "protected synchronized Class<?> loadClass(String paramString, boolean paramBoolean) throws ClassNotFoundException {\n/* 321 */ ReflectUtil.checkPackageAccess(paramString);\n/* 322 */ Class<?> clazz = findLoadedClass(paramString);\n/* 323 */ if (clazz == null) {\n/* */ try {\n/* 325 */ clazz = findClass(paramString);\n/* 326 */ } catch (ClassNotFoundException classNotFoundException) {}\n/* */ \n/* */ \n/* 329 */ if (clazz == null) {\n/* 330 */ clazz = getParent().loadClass(paramString);\n/* */ }\n/* */ } \n/* 333 */ if (paramBoolean) {\n/* 334 */ resolveClass(clazz);\n/* */ }\n/* 336 */ return clazz;\n/* */ }", "private Class<?> getClassFromHistoryEntry(final String clazz) {\n try {\n return Class.forName(clazz);\n } catch (ClassNotFoundException cnfe) {\n // I know this can't happen\n }\n \n return null;\n }", "IArenaClass getClass(final String name);", "@Override\n public Class<?> findClass(String className) throws ClassNotFoundException {\n try {\n return super.findClass(className);\n } catch (ClassNotFoundException e) {\n if (fallbackClassLoader != null) {\n Throwable prob = null;\n try {\n return classForName(className, true, fallbackClassLoader);\n } catch (Exception e1) {\n prob = ClassUtil.getRootCause(e1);\n throw new ClassNotFoundException(prob.getMessage(), prob);\n }\n }\n throw e;\n }\n }", "Class<?> getImplementationClass();", "public Class<?> lookupClass(String name) throws ClassNotFoundException {\n return getClass().getClassLoader().loadClass(name);\n }", "private static ServiceRegistry getRegistry(final String registryClass) {\n ServiceLoader<ServiceRegistry> registryServices\n = ServiceLoader.load(ServiceRegistry.class);\n for (ServiceRegistry serviceRegistry : registryServices) {\n if (registryClass.equals(serviceRegistry.getClass().getName())) {\n return serviceRegistry;\n }\n }\n return null;\n }", "public Class getObjectClass() {\n return objectClass;\n }", "private Class<?> loadClass(String className) {\n try {\n return Class.forName(className);\n } catch (ClassNotFoundException ignore) {\n return null;\n }\n }", "String getInstanceOfClass();", "java.lang.String getClass_();", "java.lang.String getClass_();", "protected JavaSource getJavaSourceForClass(String clazzname) {\n String resource = clazzname.replaceAll(\"\\\\.\", \"/\") + \".java\";\n FileObject fileObject = classPath.findResource(resource);\n if (fileObject == null) {\n return null;\n }\n Project project = FileOwnerQuery.getOwner(fileObject);\n if (project == null) {\n return null;\n }\n SourceGroup[] sourceGroups = ProjectUtils.getSources(project).getSourceGroups(\"java\");\n for (SourceGroup sourceGroup : sourceGroups) {\n return JavaSource.create(ClasspathInfo.create(sourceGroup.getRootFolder()));\n }\n return null;\n }", "public static Class classForName(String nameClass)\n\t\t{\n\t\t\tClass classObject=null;\n\t\t\ttry {\n\t\t\tclassObject = Class.forName(\"com.spring.entity.\"+nameClass);\n\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t\treturn classObject;\n\t\t}", "public ResourceClass getResourceClass()\n {\n return resourceClass;\n }", "public AssetClass findAssetClassByName(String name_);", "private Class<V> getClassVO() throws ClassNotFoundException {\n Type superclass = this.getClass().getGenericSuperclass();\n\n if (superclass instanceof ParameterizedType) {\n ParameterizedType parameterizedType = (ParameterizedType) superclass;\n Type[] typeArguments = parameterizedType.getActualTypeArguments();\n\n if (typeArguments.length == 2) {\n Type typeVO = typeArguments[1];\n\n if (typeVO instanceof Class) {\n Class c = (Class) typeVO;\n String name = c.getName();\n\n return (Class<V>) Class.forName(name);\n }\n }\n }\n\n return null;\n }", "public abstract Class<?> getImplementation();", "public static Class inPackage(Package pcg, String clazz){\n try {\n List<Class> list = new ArrayList<>();\n\n list.addAll(new ClassesInPackageScanner().setResourceNameFilter((packageName, fileName) -> clazz.equalsIgnoreCase(RegexParser.getFileName(fileName))).scan(pcg.getName()));\n\n return Class.forName(list.get(0).getName());\n } catch (Exception e) {\n return null;\n }\n }", "public void loadClass(String name) throws InstantiationException, IllegalAccessException, ClassNotFoundException{\n\t\tSystem.out.println(\"Class object address \" + InspectClassLoader.class.hashCode());\n\t\tObject obj = getClass().getClassLoader().loadClass(\"InsideJVM.InspectClassLoader\").newInstance();\n\t\tSystem.out.println(\"Same class object: \" + (obj.getClass() == InspectClassLoader.class));\n\t\t\n\t\t// Class<?> object's class is ???\n\t\tClass<?> s = getClass().getClassLoader().loadClass(\"InsideJVM.InspectClassLoader\");\n\t\tSystem.out.println(s.getClass()); // output: java.land.Class\n\t\t\n\t\tSystem.out.println(\"class loader hashcode \" + getClass().getClassLoader().hashCode());\n\t}", "private Class<?> loadClass(final ClassLoader lastLoader, final String className) {\n Class<?> clazz;\n if (lastLoader != null) {\n try {\n clazz = lastLoader.loadClass(className);\n if (clazz != null) {\n return clazz;\n }\n } catch (final Exception ex) {\n // Ignore exception.\n }\n }\n try {\n clazz = Thread.currentThread().getContextClassLoader().loadClass(className);\n } catch (final ClassNotFoundException e) {\n try {\n clazz = Class.forName(className);\n } catch (final ClassNotFoundException e1) {\n try {\n clazz = getClass().getClassLoader().loadClass(className);\n } catch (final ClassNotFoundException e2) {\n return null;\n }\n }\n }\n return clazz;\n }", "public String getObjectClass() {\n return objectClass;\n }", "Class<? extends Resource> getResourceType();", "private ObjectClassWrapper findObjectClassWrapperInTree( ObjectClassImpl oc )\n {\n SchemaWrapper schemaWrapper = findSchemaWrapperInTree( oc.getSchema() );\n if ( schemaWrapper == null )\n {\n return null;\n }\n \n // Finding the correct node\n int group = Activator.getDefault().getPreferenceStore().getInt( PluginConstants.PREFS_SCHEMA_VIEW_GROUPING );\n List<TreeNode> children = schemaWrapper.getChildren();\n if ( group == PluginConstants.PREFS_SCHEMA_VIEW_GROUPING_FOLDERS )\n {\n for ( TreeNode child : children )\n {\n Folder folder = ( Folder ) child;\n if ( folder.getType() == FolderType.OBJECT_CLASS )\n {\n for ( TreeNode folderChild : folder.getChildren() )\n {\n ObjectClassWrapper ocw = ( ObjectClassWrapper ) folderChild;\n if ( ocw.getObjectClass().equals( oc ) )\n {\n return ocw;\n }\n }\n }\n }\n }\n else if ( group == PluginConstants.PREFS_SCHEMA_VIEW_GROUPING_MIXED )\n {\n for ( Object child : children )\n {\n if ( child instanceof ObjectClassWrapper )\n {\n ObjectClassWrapper ocw = ( ObjectClassWrapper ) child;\n if ( ocw.getObjectClass().equals( oc ) )\n {\n return ocw;\n }\n }\n }\n }\n \n return null;\n }", "public static <T> T findByClass(Context ctx, Class<T> klass) throws NamingException {\n\t\tif(jndiClassCache.containsKey(klass)) {\n\t\t\treturn klass.cast(jndiClassCache.get(klass));\n\t\t}\n\t\tNamingEnumeration<NameClassPair> ne = ctx.list(\"\");\n\t\tif (ne.hasMoreElements()) {\n\t\t\twhile (ne.hasMoreElements()) {\n\t\t\t\ttry {\n\t\t\t\t\tNameClassPair ncp = (NameClassPair) ne.nextElement();\n\t\t\t\t\tObject el = ctx.lookup(ncp.getName());\n\t\t\t\t\tif(klass.isAssignableFrom(el.getClass())) {\n\t\t\t\t\t\tjndiClassCache.put(klass, el);\n\t\t\t\t\t\treturn klass.cast(el);\n\t\t\t\t\t} else if (el instanceof Context) {\n\t\t\t\t\t\tObject o = findByClass((Context) el, klass);\n\t\t\t\t\t\tif (o != null)\n\t\t\t\t\t\t\treturn klass.cast(o);\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "@Override\n public Converter lookup(@SuppressWarnings(\"rawtypes\") Class clazz)\n {\n Converter conv = super.lookup(clazz);\n\n if (conv == null)\n {\n synchronized (baseClassConverters)\n {\n for (ConverterData cd : baseClassConverters)\n {\n if (cd.canHandleConverter(clazz))\n {\n conv = cd.getConverter();\n break;\n }\n }\n }\n }\n\n if (conv == null && getParent() != null)\n {\n conv = getParent().getConvertBean().lookup(clazz);\n }\n\n return conv;\n }", "@Override\n public ClassInfo findClass(String fqcn) {\n if (classLookup == null) {\n buildClassLookupMap();\n }\n return classLookup.get(fqcn);\n }", "com.google.protobuf.ByteString\n getClass_Bytes();", "com.google.protobuf.ByteString\n getClass_Bytes();", "@Override\n\tpublic Class<?> getLogicClassForBeanName(String clsFullName) {\n\t\t\n\t\t// Have we seen this class before?\n\t\tString cachedLogicName = logicClassNames.get(clsFullName);\n\t\tif (cachedLogicName != null && cachedLogicName.length() > 0)\n\t\t\treturn loadClass(cachedLogicName);\n\t\tif (cachedLogicName != null && cachedLogicName.length() == 0) // We've already looked for it, and it's not there\n\t\t\treturn null;\n\t\t\n\t\tString clsName = clsFullName;\n\t\tString clsPackageName = \"\";\n\t\tint lastDotIdx = clsFullName.lastIndexOf('.');\n\t\tif (lastDotIdx >= 0) { // In case the class doesn't have a package. Stranger things have happened.\n\t\t\tclsName = clsFullName.substring(lastDotIdx + 1);\n\t\t\tclsPackageName = clsFullName.substring(0, lastDotIdx);\n\t\t}\n\t\tString logicClassName = null;\n\t\t\n\t\t// We now know the bean's package and the name of the bean class. First of all, has the user specified\n\t\t// where the logic should be found?\n\t\tString possiblePackages = LogicConfiguration.getInstance().getProperty(LogicConfiguration.PropertyName.LOGIC_PACKAGE_NAMES);\n\t\t\n\t\tString parallelPackageName = LogicConfiguration.getInstance().getProperty(PropertyName.PARALLEL_PACKAGE_NAME);\n\t\tString logicClassSuffix = LogicConfiguration.getInstance().getProperty(PropertyName.LOGIC_CLASS_SUFFIX);\n\t\t\n\t\t// If the user has told us where to find the logic classes, look there\n\t\tif (possiblePackages != null && possiblePackages.trim().length() > 0) {\n\t\t\tString[] packages = possiblePackages.split(\",\");\n\t\t\tfor (String pkg : packages) {\n\t\t\t\tString possibleLogicName = pkg.trim() + \".\" + clsName + logicClassSuffix;\n\t\t\t\tif (classExists(possibleLogicName)) {\n\t\t\t\t\tlogicClassName = possibleLogicName;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// No package specified in the configuration file -- assume a parallel package\n\t\telse {\n\t\t\tif (log.isDebugEnabled())\n\t\t\t\tlog.debug(\"Looking for logic class in default package for \" + clsFullName);\n\t\t\tString possibleLogicName = null;\n\t\t\tint lastIdx = clsPackageName.lastIndexOf('.');\n\t\t\tif (lastIdx > 0) { // Package has at least two levels (e.g. a.b)\n\t\t\t\tString logicPkgName = clsPackageName.substring(0, lastIdx) + \".\" + parallelPackageName;\n\t\t\t\tpossibleLogicName = logicPkgName + \".\" + clsName + logicClassSuffix;\n\t\t\t}\n\t\t\telse if (clsPackageName.length() > 0) { // Package has only one level\n\t\t\t\tpossibleLogicName = parallelPackageName + \".\" + clsName + logicClassSuffix;\n\t\t\t}\n\t\t\telse { // No package\n\t\t\t\tpossibleLogicName = clsName + logicClassSuffix;\n\t\t\t}\n\n\t\t\tif (classExists(possibleLogicName)) {\n\t\t\t\tlogicClassName = possibleLogicName;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// No point in doing this again for the same bean class -- cache the result\n\t\tif (logicClassName == null) {\n\t\t\tlogicClassNames.put(clsFullName, \"\"); // Empty string means we've looked for it and it ain't there\n\t\t\treturn null;\n\t\t}\n\n\t\tlogicClassNames.put(clsFullName, logicClassName);\n\t\treturn loadClass(logicClassName);\n\t}", "private Resource getOntClass(Object bean) {\r\n\t\treturn ontClass(bean).addProperty(javaclass, bean.getClass().getName());\r\n\t}", "private static Class<?> loadClass(String className) {\n\t\tClass<?> theLogicClass = null;\n\t\ttry {\n\t\t\ttheLogicClass = ClassLoaderManager.getInstance().getLogicClassFromName(className);\n\t\t}\n\t\tcatch (Exception ex) {\n\t\t\tthrow new RuntimeException(\"Unable to load logic class: \" + className, ex);\n\t\t}\n\t\treturn theLogicClass;\n\t}", "public <T> T lookup(Class<T> clazz);", "public java.lang.String getJavaClass()\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_attribute_user(JAVACLASS$24);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }", "@SuppressWarnings(\"deprecation\")\r\n\tpublic static URL findResourceInClassPath(String resourceName) {\r\n\r\n\t\tURL url;\r\n\r\n\t\t// Tries to locate the resource with the class loader\r\n\t\turl = ClassLoader.getSystemResource(resourceName);\r\n\t\tif (url != null)\r\n\t\t\treturn url;\r\n\r\n\t\t// Tries to locate the resource in the main directory\r\n\t\turl = FileLoader.class.getResource(resourceName);\r\n\t\tif (url != null)\r\n\t\t\treturn url;\r\n\r\n\t\t// Tries to locate the resource in the class list\r\n\t\tString path = FileLoader.class.getResource(FileLoader.class.getSimpleName() + \".class\").getPath();\r\n\t\tif( path != null ) {\r\n\t\t\tString pathParts[] = path.split(\"!\");\r\n\t\t\tpath = pathParts[0];\r\n\t\t\tpathParts = path.split(\"file:\");\r\n\t\t\tif( pathParts.length > 1 ) {\r\n\t\t\t\tpath = pathParts[1];\r\n\t\t\t} else {\r\n\t\t\t\tpath = pathParts[0];\r\n\t\t\t}\r\n\t\t\tif( path.contains(\"/lib/\")) {\r\n\t\t\t\tFile f = new File(path);\r\n\t\t\t\tf = f.getParentFile().getParentFile();\r\n\t\t\t\tf = new File(f.getPath() + File.separator + \"classes\" + File.separator + resourceName);\r\n\t\t\t\tif( f.exists()) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\treturn f.toURL();\r\n\t\t\t\t\t} catch( Exception e) {}\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tFile f = new File(path);\r\n\t\t\t\ttry {\r\n\t\t\t\t\tf = f.getParentFile().getParentFile().getParentFile();\r\n\t\t\t\t\tf = new File(f.getPath() + File.separator + resourceName);\r\n\t\t\t\t\tif( f.exists()) {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\treturn f.toURL();\r\n\t\t\t\t\t\t} catch(Exception e) {}\r\n\t\t\t\t\t}\r\n\t\t\t\t} catch(NullPointerException npe) {}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn null;\r\n\t}", "public ClassDefinition getClassByJavaClassName(String cn){\n \treturn(classesByJavaClass.get(cn));\n }", "private Class<?> getClass(String parameterName, String classToCheck, final BeanValidationResult result) {\n if (StringUtils.isBlank(classToCheck)) {\n result.addResult(parameterName, classToCheck, ValidationStatus.INVALID, \"parameter is null or blank\");\n return null;\n }\n\n // Get the class for the event protocol\n try {\n return Class.forName(classToCheck);\n } catch (final ClassNotFoundException e) {\n result.addResult(parameterName, classToCheck, ValidationStatus.INVALID,\n \"class not found: \" + e.getMessage());\n LOGGER.warn(\"class not found: \", e);\n return null;\n }\n }", "public RubyClass defineOrGetClassUnder(String name, RubyClass superClazz) {\n // This method is intended only for defining new classes in Ruby code,\n // so it uses the allocator of the specified superclass or default to\n // the Object allocator. It should NOT be used to define classes that require a native allocator.\n \n Ruby runtime = getRuntime();\n IRubyObject classObj = getConstantAt(name);\n RubyClass clazz;\n \n if (classObj != null) {\n if (!(classObj instanceof RubyClass)) throw runtime.newTypeError(name + \" is not a class\");\n clazz = (RubyClass)classObj;\n \n if (superClazz != null) {\n RubyClass tmp = clazz.getSuperClass();\n while (tmp != null && tmp.isIncluded()) tmp = tmp.getSuperClass(); // need to skip IncludedModuleWrappers\n if (tmp != null) tmp = tmp.getRealClass();\n if (tmp != superClazz) throw runtime.newTypeError(\"superclass mismatch for class \" + name);\n // superClazz = null;\n }\n \n if (runtime.getSafeLevel() >= 4) throw runtime.newTypeError(\"extending class prohibited\");\n } else if (classProviders != null && (clazz = searchProvidersForClass(name, superClazz)) != null) {\n // reopen a java class\n } else {\n if (superClazz == null) superClazz = runtime.getObject();\n clazz = RubyClass.newClass(runtime, superClazz, name, superClazz.getAllocator(), this, true);\n }\n \n return clazz;\n }", "private String discoverDriverClassName(URLClassLoader urlClassLoader) throws IOException {\n String className = null;\n URL resource = urlClassLoader.findResource(\"META-INF/services/java.sql.Driver\");\n if (resource != null) {\n BufferedReader br = null;\n try {\n br = new BufferedReader(new InputStreamReader(resource.openStream()));\n className = br.readLine();\n } finally {\n if (br != null) {\n br.close();\n }\n }\n }\n return className;\n }", "private PersistenceClassElement getPersistenceClass (String className)\n\t{\n\t\treturn getModel().getPersistenceClass(className, getClassLoader());\n\t}", "public static Object loadFromClassPath(String path) throws SlickException {\n\t\tObject o = new Object();\n\t\tInputStream in = IO_Object.class.getClassLoader().getResourceAsStream(path);\n\t\tObjectInputStream inStream;\n\t\ttry {\n\t\t\tinStream = new ObjectInputStream(in);\n\t\t\to = inStream.readObject();\n\t\t\tinStream.close();\n\t\t\treturn o;\n\t\t} catch (Exception ex) {\n\t\t\tthrow new SlickException(ex.getMessage(), ex.getCause());\n\t\t}\n\t\t\n\t}", "public void testJavaClassRepository869() throws Exception {\n\t\tClassPath var2728 = new ClassPathFactory().createFromJVM();\n\t\tJavaClassRepository var2729 = new JavaClassRepository(var2728);\n\t\tString var2727 = \"com.google.test.metric.JavaClassRepositoryTest.MyClass.MyInnerClass\";\n\t\tvar2729.getClass(var2727);\n\t\tString var2722 = \"java.util.Map.Entry\";\n\t\tvar2729.getClass(var2722);\n\t}", "Class<?> readConcreteType();", "public Class<?> getClazz(ClassLoader loader);", "@Transient\n\tpublic Class<?> getClassType() {\n\t\treturn Book.class;\n\t}", "public static ClassObj findClass(@NonNull Snapshot snapshot, String name) {\n return snapshot.findClass(name);\n }", "public Class getReferenceClass(GenerationContext genContext) {\r\n return resolveClass(genContext);\r\n }", "public static Class<?> getNewVersion(String className) {\n Class<?> ret = versions.get(className.hashCode());\n if (ret != null)\n return ret;\n return null;\n }", "public RubyModule findImplementer(RubyModule clazz) {\n for (RubyModule module = this; module != null; module = module.getSuperClass()) {\n if (module.isSame(clazz)) return module;\n }\n \n return null;\n }", "public static Class get_CLASS()\n {\n Class clz;\n try\n {\n clz = Class.forName(\"com.tangosol.coherence/component/net/Security\".replace('/', '.'));\n }\n catch (ClassNotFoundException e)\n {\n throw new NoClassDefFoundError(e.getMessage());\n }\n return clz;\n }", "public Class<?> getJavaClass() {\n return clazz;\n }", "public ClassFile getClassFile(String name) throws IOException {\n if (name.indexOf('.') > 0) {\n int i = name.lastIndexOf('.');\n String pathname = name.replace('.', File.separatorChar) + \".class\";\n if (baseFileName.equals(pathname) ||\n baseFileName.equals(pathname.substring(0, i) + \"$\" +\n pathname.substring(i+1, pathname.length()))) {\n return readClassFile(path);\n }\n } else {\n if (baseFileName.equals(name.replace('/', File.separatorChar) + \".class\")) {\n return readClassFile(path);\n }\n }\n return null;\n }", "public Class returnedClass();", "public Object getObject(Class cls, long oid)\n{\n\treturn null;\n}", "public static ReflectionResponse<Class<?>> getClass(String clazz) {\n Validate.notNull(clazz, \"clazz cannot be null\");\n try {\n return new ReflectionResponse<>(Class.forName(clazz));\n } catch (ClassNotFoundException e) {\n return new ReflectionResponse<>(e);\n }\n }", "private static <T> Optional<T> find(ClassPath path, ClassNode in, Function<ClassNode, Optional<T>> get) {\n Optional<T> v = get.apply(in);\n if (v.isPresent()) {\n return v;\n }\n return supers(in).map(s -> {\n Optional<ClassNode> superClass = path.findClass(new ClassDescriptor(s));\n return superClass.<T>flatMap(c -> find(path, c, get));\n }).filter(Optional::isPresent).map(Optional::get).findFirst();\n }", "public static InputStream getClassAsStream(Class<?> cl) {\n\t\tString resourceName = cl.getSimpleName() + \".class\";\n \t\treturn cl.getResourceAsStream(resourceName);\n \t}", "public String getClassName(String path);", "@Override\n protected Class<?> loadClass(String name, boolean resolve)\n throws ClassNotFoundException {\n Class<?> loadedClass = findLoadedClass(name);\n if (loadedClass == null) {\n try {\n if (_classLoader != null) {\n loadedClass = _classLoader.loadClass(name);\n }\n } catch (ClassNotFoundException ex) {\n // class not found in system class loader... silently skipping\n }\n\n try {\n // find the class from given jar urls as in first constructor parameter.\n if (loadedClass == null) {\n loadedClass = findClass(name);\n }\n } catch (ClassNotFoundException e) {\n // class is not found in the given urls.\n // Let's try it in parent classloader.\n // If class is still not found, then this method will throw class not found ex.\n loadedClass = super.loadClass(name, resolve);\n }\n }\n\n if (resolve) { // marked to resolve\n resolveClass(loadedClass);\n }\n return loadedClass;\n }", "RefClass getOwnerClass();", "protected <K extends Resource> K doGetResource(String uri, Class<K> resourceType) {\n\t\tif (negCache.containsKey(uri)) {\n\t\t\t// System.out.println(\"in negative cache \" + uri);\n\t\t\treturn null;\n\t\t}\n\t\tString objectUri = uri;\n\t\tif (uri.startsWith(\"repo:\")) { //$NON-NLS-1$\n\t\t\tobjectUri = uri.substring(5);\n\t\t\tK r = getFromParent(objectUri, resourceType);\n\t\t\tif (r != null)\n\t\t\t\treturn addToCache(r, uri);\n\t\t}\n\t\tif (c != null)\n\t\t\ttry {\n\t\t\t\tIProgressMonitor monitor = new NullProgressMonitor();\n\t\t\t\t// System.out.println(\"get from server \" + uri);\n\t\t\t\tif (objectUri.contains(\"/\")) { //$NON-NLS-1$\n\t\t\t\t\t// Locate the resource inside the repository...\n\t\t\t\t\tResourceDescriptor r = new ResourceDescriptor();\n\t\t\t\t\tr.setUriString(objectUri);\n\t\t\t\t\tr = c.get(monitor, r, null);\n\t\t\t\t\tif (r.getIsReference())\n\t\t\t\t\t\tr = ReferenceResolver.resolveReference(c, r, null);\n\t\t\t\t\tif (rpath == null)\n\t\t\t\t\t\tinitRPath();\n\t\t\t\t\tString fpath = Misc.nvl(rpath);\n\t\t\t\t\tif (!objectUri.startsWith(\"/\")) //$NON-NLS-1$\n\t\t\t\t\t\tfpath += \"/\"; //$NON-NLS-1$\n\t\t\t\t\tfpath += objectUri;\n\t\t\t\t\tFile f = new File(fpath);\n\t\t\t\t\tif (f.getParentFile() != null)\n\t\t\t\t\t\tf.getParentFile().mkdirs();\n\t\t\t\t\tif (f.createNewFile()) {\n\t\t\t\t\t\tif (!r.getIsReference() && r.getHasData() && r.getData() != null) {\n\t\t\t\t\t\t\torg.apache.commons.io.FileUtils.writeByteArrayToFile(f, r.getData());\n\t\t\t\t\t\t} else\n\t\t\t\t\t\t\tc.get(monitor, r, f);\n\t\t\t\t\t}\n\t\t\t\t\tfileTypes.put(f, r.getWsType());\n\t\t\t\t} else if (runitUri != null) {\n\t\t\t\t\t// Locate the resource inside the report unit, if any...\n\t\t\t\t\tif (reportUnitResources == null) {\n\t\t\t\t\t\tResourceDescriptor rd = new ResourceDescriptor();\n\t\t\t\t\t\trd.setWsType(ResourceDescriptor.TYPE_REPORTUNIT);\n\t\t\t\t\t\trd.setUriString(runitUri);\n\t\t\t\t\t\trd = c.get(monitor, rd, null);\n\t\t\t\t\t\treportUnitResources = c.list(monitor, rd);\n\t\t\t\t\t\tif (reportUnitResources == null)\n\t\t\t\t\t\t\treportUnitResources = new ArrayList<ResourceDescriptor>();\n\t\t\t\t\t}\n\n\t\t\t\t\t// find the resource...\n\t\t\t\t\tfor (ResourceDescriptor r : reportUnitResources) {\n\t\t\t\t\t\tif (r.getName() == null || !r.getName().equals(objectUri))\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\tif (r.getIsReference())\n\t\t\t\t\t\t\tr = ReferenceResolver.resolveReference(c, r, monitor);\n\t\t\t\t\t\tif (ResourceFactory.isFileResourceType(r)) {\n\t\t\t\t\t\t\tIFile file = (IFile) jConfig.get(FileUtils.KEY_FILE);\n\n\t\t\t\t\t\t\tFile fp = null;\n\t\t\t\t\t\t\tIContainer pf = file.getParent();\n\t\t\t\t\t\t\tif (pf.getRawLocation() != null)\n\t\t\t\t\t\t\t\tfp = pf.getRawLocation().toFile();\n\t\t\t\t\t\t\telse if (pf.getLocationURI() != null)\n\t\t\t\t\t\t\t\tfp = new File(pf.getLocationURI());\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\treturn addToCache(null, uri);\n\n\t\t\t\t\t\t\tFile f = new File(fp, objectUri);\n\t\t\t\t\t\t\tif (f.getParentFile() != null && !f.getParentFile().mkdirs() && f.createNewFile())\n\t\t\t\t\t\t\t\tc.get(monitor, r, f);\n\t\t\t\t\t\t\tfileTypes.put(f, r.getWsType());\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\trefresh();\n\t\t\t\tString u = uri;\n\t\t\t\tif (u.startsWith(\"repo:\"))\n\t\t\t\t\tu = u.substring(5);\n\t\t\t\treturn addToCache(getFromParent(u, resourceType), uri);\n\t\t\t} catch (Exception ex) {\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\treturn addToCache(null, uri);\n\t}", "public static Class<?> getNewVersion(Class<?> clazz) {\n Class<?> ret = versions.get(clazz.getName().hashCode());\n if (ret != null)\n return ret;\n return clazz;\n\n }", "private ClassName getClassName(String rClass, String resourceType) {\n ClassName className = rClassNameMap.get(rClass);\n\n if (className == null) {\n Element rClassElement = getElementByName(rClass, elementUtils, typeUtils);\n\n String rClassPackageName =\n elementUtils.getPackageOf(rClassElement).getQualifiedName().toString();\n className = ClassName.get(rClassPackageName, \"R\", resourceType);\n\n rClassNameMap.put(rClass, className);\n }\n\n return className;\n }", "public <T extends Base> T findByName(Class<T> T, String name)\n\t\t\tthrows IOException, ClassNotFoundException {\n\t\tT result = null;\n\t\tfor (T t : list(T)) {\n\t\t\tif (t.getName().equals(name)) {\n\t\t\t\tresult = t;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}", "public ValueReader findReader(Class<?> raw)\n {\n ClassKey k = (_key == null) ? new ClassKey(raw, _features) : _key.with(raw, _features);\n ValueReader vr = _knownReaders.get(k);\n if (vr != null) {\n return vr;\n }\n vr = createReader(null, raw, raw);\n // 15-Jun-2016, tatu: Let's limit maximum number of readers to prevent\n // unbounded memory retention (at least wrt readers)\n if (_knownReaders.size() >= MAX_CACHED_READERS) {\n _knownReaders.clear();\n }\n _knownReaders.putIfAbsent(new ClassKey(raw, _features), vr);\n return vr;\n }", "public static Class findClass(Object object, String simpleName) {\n \t\tClass clazz = object.getClass();\n \t\tdo {\n \t\t\tClass result = findClass(clazz, simpleName);\n \t\t\tif (result!=null)\n \t\t\t\treturn result;\n \t\t\tclazz = clazz.getSuperclass();\n \t\t}\n \t\twhile (clazz!=null);\n \t\ttry {\n \t\t\t// last resort: try the UI plugin, this is where the Messages class is defined\n \t\t\tBundle b = OSGIUtils.getDefault().getBundle(\"org.eclipse.bpmn2.modeler.ui\"); //$NON-NLS-1$\n \t\t\tclazz = b.loadClass(\"org.eclipse.bpmn2.modeler.ui.Messages\"); //$NON-NLS-1$\n \t\t\tClass result = findClass(clazz, simpleName);\n \t\t\tif (result!=null)\n \t\t\t\treturn result;\n \t\t} catch (Exception e) {\n \t\t}\n \t\treturn null;\n \t}", "@RequestMapping(method = RequestMethod.GET, value = \"/{id}\")\n\tpublic ResponseEntity<?> getClassById(@PathVariable Integer id) {\n\t\tif (classRepository.existsById(id)) {\n\t\t\tClassEntity classEntity = classRepository.findById(id).get();\n\t\t\tlogger.info(\"Viewed class with id number \" + id);\n\t\t\treturn new ResponseEntity<ClassEntity>(classEntity, HttpStatus.OK);\n\t\t} else {\n\t\t\treturn new ResponseEntity<RESTError>(\n\t\t\t\t\tnew RESTError(HttpStatus.NOT_FOUND.value(), \"Class with id number \" + id + \" not found\"),\n\t\t\t\t\tHttpStatus.NOT_FOUND);\n\t\t}\n\t}", "public void testJavaClassRepository866() throws Exception {\n\t\tClassPath var2724 = new ClassPathFactory().createFromPaths(var2725,\n\t\t\t\t\"core/\" + var2725);\n\t\tJavaClassRepository var2726 = new JavaClassRepository(var2724);\n\t\tString var2727 = \"com.google.test.metric.JavaClassRepositoryTest.MyClass.MyInnerClass\";\n\t\tvar2726.getClass(var2727);\n\t\tvar2726.getClass(var2727);\n\t}", "public Class<?> loadMagic() {\n ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_MAXS);\n cw.visit(Opcodes.V1_4, Opcodes.ACC_PUBLIC, \"sun/reflect/GroovyMagic\", null, \"java/lang/Object\", null);\n MethodVisitor mv = cw.visitMethod(Opcodes.ACC_PUBLIC, \"<init>\", \"()V\", null, null);\n mv.visitCode();\n mv.visitMaxs(0,0);\n mv.visitEnd();\n cw.visitEnd();\n\n byte[] bytes = cw.toByteArray();\n\t return defineClass(\"sun.reflect.GroovyMagic\", bytes, 0, bytes.length);\n }", "String resolveClassPath(String classPath);", "public static Class get_CLASS()\n {\n Class clz;\n try\n {\n clz = Class.forName(\"com.tangosol.coherence/component/net/Security$RefAction\".replace('/', '.'));\n }\n catch (ClassNotFoundException e)\n {\n throw new NoClassDefFoundError(e.getMessage());\n }\n return clz;\n }", "@Override\n public void storeClass(final JavaClass clazz) {\n loadedClasses.put(clazz.getClassName(), new SoftReference<>(clazz));\n clazz.setRepository(this);\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic <T extends BusinessObject> T findOwnerByClass(Class<T> parentClass) {\n\t\tif (ClassUtil.isSuperclassOf(parentClass, getClass())) {\n\t\t\treturn (T)this;\n\t\t} else if (ownerProperty().getValue() != null) {\n\t\t\treturn ownerProperty().getValue().findOwnerByClass(parentClass);\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t}", "public File findJarFileForClass(String type, String name) throws ClassNotFoundException {\n // On cherche la classe demandee parmi celles repertoriees lors du lancement de Kalimucho\n // Si on ne la trouve pas on recree la liste (cas ou le fichier jar aurait ete ajoute apres le demarrage)\n // Si on la trouve on revoie le fichier jar la contenant sinon on leve une exception\n int index=0;\n boolean trouve = false;\n while ((index<types.length) && (!trouve)) { // recherche du type\n if (type.equals(types[index])) trouve = true;\n else index++;\n }\n if (!trouve) throw new ClassNotFoundException(); // type introuvable\n else { // le type est connu on cherche la classe\n int essais = 0;\n while (essais != 2) {\n String fich = classesDisponibles[index].get(name);\n if (fich != null) { // classe repertoriee dans la liste\n essais = 2; // on renvoie le fichier\n return new File(Parameters.COMPONENTS_REPOSITORY+\"/\"+type+\"/\"+fich);\n }\n else { // la classe n'est pas dans la liste\n essais++;\n if (essais == 1) { // si on ne l'a pas deja fait on recree la liste a partir du depot\n rescanRepository();\n }\n }\n }\n throw new ClassNotFoundException(); // Classe introuvable meme apres avoir recree la liste\n }\n }", "public PrimClass resolveClass(String name) {\n return findPrimClass(importFor(name));\n }", "public Class getJavaClass() {\n return _class;\n }", "Object getClass_();" ]
[ "0.60956013", "0.58198756", "0.5802649", "0.5775736", "0.5775231", "0.56472003", "0.56025475", "0.5511694", "0.5487917", "0.5483884", "0.5423529", "0.5371015", "0.53592956", "0.5320111", "0.52872044", "0.52697116", "0.52591956", "0.5228723", "0.5223387", "0.52198017", "0.52015954", "0.5111758", "0.5090675", "0.5074647", "0.50681096", "0.5045452", "0.5026072", "0.5020021", "0.49974126", "0.49838555", "0.49772775", "0.49744824", "0.4961457", "0.49603105", "0.49603105", "0.495419", "0.49483213", "0.49286133", "0.49210703", "0.49148414", "0.49036017", "0.4886051", "0.48797706", "0.4875368", "0.4875156", "0.48662382", "0.48562896", "0.48501018", "0.48420036", "0.48305365", "0.4824372", "0.4824372", "0.48225445", "0.48177812", "0.48140758", "0.4807268", "0.4804233", "0.47964013", "0.47942904", "0.47870705", "0.47587335", "0.47521156", "0.4743957", "0.4742887", "0.47426975", "0.47402102", "0.4733808", "0.47189042", "0.4701848", "0.46990803", "0.46907422", "0.4689157", "0.46850872", "0.46819016", "0.46766585", "0.46651694", "0.46631768", "0.46629152", "0.46604994", "0.46557218", "0.46532828", "0.4651967", "0.4649373", "0.46434334", "0.46430108", "0.46380687", "0.46293435", "0.46269023", "0.4625408", "0.4625279", "0.4615368", "0.46125075", "0.46002993", "0.4600252", "0.45840606", "0.45827916", "0.45764524", "0.45719817", "0.45669186", "0.45625117" ]
0.64441264
0
Clear all entries from cache.
@Override public void clear() { loadedClasses.clear(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void clear() {\n cache.clear();\n }", "public void clearCache();", "public void clear() {\n this.cache.clear();\n }", "void clearCache();", "void clearCache();", "public static void clearCache() {\n cacheKeys.clear();\n cacheValues.clear();\n }", "public static void clearAllCache() {\n try {\n sLruCache.evictAll();\n sDiskLruCache.delete();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static void clearAllCache() {\n page_cache.clear();\n key_relate.clear();\n }", "public void clear() {\n\t\tthis.cache.clear();\n\t}", "@Override\n\tpublic void clear() {\n\t\twriteLock.lock();\n\t\ttry {\n\t\t\tcache.clear();\n\t\t} finally {\n\t\t\twriteLock.unlock();\n\t\t}\n\t}", "public void clear()\n {\n // push next flush out to avoid attempts at multiple simultaneous\n // flushes\n deferFlush();\n\n synchronized (this)\n {\n while (true)\n {\n try\n {\n // notify cache entries of their impending removal\n for (Iterator iter = entrySet().iterator(); iter.hasNext(); )\n {\n ((Entry) iter.next()).discard();\n }\n\n // verify that the cache maintains its data correctly\n if (m_cCurUnits != 0)\n {\n // soft assertion\n Base.out(\"Invalid unit count after clear: \" + m_cCurUnits);\n m_cCurUnits = 0;\n }\n break;\n }\n catch (ConcurrentModificationException e)\n {\n }\n }\n\n // reset the cache storage\n super.clear();\n\n // reset hit/miss stats\n resetHitStatistics();\n\n // schedule next flush\n scheduleFlush();\n }\n }", "public void clearCache() {\n mCache.clear();\n }", "public abstract void clearCache();", "public void clear() {\n\t\tentries.clear();\n\t}", "public void clearCache() {\n\t\tsynchronized(mappingLock) {\n\t\t\tinvalidateCache();\n\t\t}\n\t}", "public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}", "public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}", "public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}", "public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}", "public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}", "public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}", "public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}", "public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}", "public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}", "public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}", "public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}", "public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}", "public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}", "public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}", "public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}", "public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}", "public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}", "public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}", "public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}", "public static void clearCache() {\n\t\tgetPersistence().clearCache();\n\t}", "@Override\n public void clearCache() {\n }", "private void clearResetCache() {\n for(IoBuffer buf : resetCache) {\n buf.free();\n }\n resetCache = null;\n }", "@Override\n\tpublic synchronized void clear() {\n\t\tFile[] files = mRootDirectory.listFiles();\n\t\tif (files != null) {\n\t\t\tfor (File file : files) {\n\t\t\t\tfile.delete();\n\t\t\t}\n\t\t}\n\t\tmEntries.clear();\n\t\tmTotalSize = 0;\n\t\tVolleyLog.d(\"Cache cleared.\");\n\t}", "public static void clearCache() {\n CACHE.remove();\n }", "public static void clearCache() {\n getPersistence().clearCache();\n }", "public static void clearCache() {\n getPersistence().clearCache();\n }", "public static void clearCache() {\n getPersistence().clearCache();\n }", "public void reset() {\n\t\tfor (Entry<TileCoordinate, DijkstraNode> entry: this.cache.entrySet()) {\n\t\t\tentry.getValue().reset();\n\t\t}\n\t}", "public void clear()\n {\n pages.stream().forEach((page) -> {\n page.clearCache();\n });\n\n pages.clear();\n listeners.clear();\n occupiedEntries.clear();\n }", "public void clearCache() {\n\n\t\t// clearing form soft reference\n\t\tif (softCache != null) {\n\t\t\tsoftCache.clear();\n\t\t}\n\n\t\t// clearing from cache directory\n\t\tdeleteCacheFiles();\n\n\t}", "public static void clearCache(){\n cache.clear();\n cache2.clear();\n }", "void resetCache();", "public void clear() {\r\n\t\tentryMap.clear();\r\n\t}", "public void clear() {\n cache = new BigDecimal[cache.length];\n }", "public void flushCaches() {\n LOCAL_SMALL_CACHE.clear();\n LOCAL_LARGE_CACHE.clear();\n }", "public void clearTimeEntryCache()\n {\n synchronized(timeEntries)\n {\n for (int i = 0; i < timeEntries.size(); i++)\n {\n timeEntries.set(i,TIME_ENTRY_NULL);\n }\n timeEntriesUpdateTimeStamp = 0L;\n }\n synchronized(timeEntryHoursSumDateMap)\n {\n timeEntryHoursSumDateMap.clear();\n }\n }", "public void clear() throws CacheException {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Cache \" + cache.getName() + \": removing all entries\");\n }\n cache.removeAll();\n }", "public void clearDataCache() {\n\t\t_cumulativeVolumeTable.clear();\n\t\tbookMap.clear();\n\t\tquoteMap.clear();\n\t\tmillisCST = 0L;\n\t}", "public void clearCache() {\r\n \t\ttagInfoCache.clear();\r\n \t\ttldElementsByPrefix.clear();\r\n \t}", "public void clear() {\n helpers.clear();\n islandKeysCache.clear();\n setDirty();\n }", "public void clearMemoryCache() {\r\n cache.evictAll();\r\n Log.d(TAG, \"Manually cleaned complete cache.\");\r\n }", "public static void clearCache() {\r\n\t\tsInstance.mSettings.clear();\r\n\t}", "protected void invalidateAll() {\n\t\tfor (CacheEntry entry : map.values()) {\n\t\t\tentry.getItem().invalidate();\n\t\t}\n\t}", "@Override\n @CacheEvict(value=AccountingPeriod.CACHE_NAME,allEntries=true)\n public void clearCache() {\n }", "public void clear() {\n tableCache.invalidateAll();\n }", "private void clearCache() {\r\n for (int i = 1; i < neurons.length; i++) {\r\n for (int j = 0; j < neurons[i].length; j++) {\r\n neurons[i][j].clearCache();\r\n }\r\n }\r\n }", "public void invalidateCache(){\n\t\tfor (Realm realm : realms) {\n\t\t\tif(realm instanceof IClearableRealmCache){\n\t\t\t\tIClearableRealmCache ar = (IClearableRealmCache)realm;\n\t\t\t\tar.clearAllCaches();\n\t\t} \n\t\t\t\n\t\t}\n\t}", "public void clear() {\n this.entries = new Empty<>();\n }", "public void reset() {\r\n for (int i = 0, tot = buckets.length; i < tot; i++) {\r\n CacheData<K, V> pair = getCacheData(i);\r\n if (pair != null) {\r\n pair.reset();\r\n }\r\n }\r\n }", "public void clearCache() {\n\tmyCachedCrum = null;\n\tmyCachedRoot = null;\n\tmyCachedPath = MuSet.make();\n/*\nudanax-top.st:13116:CanopyCache methodsFor: 'operations'!\n{void} clearCache\n\t\"Clear the cache because the canopy has\n\t changed. This ought to destroy the cachedPath. \n\t This must be cleared after every episode!!!!!!\"\n\tmyCachedCrum _ NULL.\n\tmyCachedRoot _ NULL.\n\tmyCachedPath _ MuSet make.!\n*/\n}", "public void clearAllAppMapCaches(){\n\t\tappmaps.clear();\n\t}", "protected void resetCache() {\n if (cacheResults && initialized) {\n dataCache.clear();\n }\n }", "public synchronized void deleteCache() {\n\n for (final File f : Constants.CACHE_LOCATION.listFiles()) {\n if (!f.isDirectory()) {\n f.delete();\n }\n }\n\n logsByCharacterMap = Collections.emptyMap();\n }", "@Override\n public int clear() {\n return deleteContents(getCacheDir());\n }", "public void clearCache() {\n textureCache.clear();\n modelCache.clear();\n blockModelCache.clear();\n }", "public void clearCache() {\n reflectorCache.clear();\n }", "public void clearCaches() {\n if (mImageCache != null) {\n mImageCache.clearCaches();\n }\n\n // clear the keys of images we've already downloaded\n sKeys.clear();\n }", "public void clear() {\r\n // synchronization is not a problem here\r\n // if this code were to be called while someone was getting or setting data\r\n // in the buckets, it would still work\r\n // in the case of someone setting a value in the buckets, then this coming along\r\n // and resetting the buckets-entry to null is fine, because the client still has the data reference\r\n // in the case of someone getting a value from the buckets while this is being reset\r\n // is fine as well because, if they get the data before it's set, they got it\r\n // if they as for it after it gets set to null, that's fine as well it's null and\r\n // that's a normal expected condition\r\n for (int i = 0, tot = buckets.length; i < tot; i++) {\r\n buckets[i] = new AtomicReference<CacheData<K, V>>(null);\r\n }\r\n }", "private void clearCache(T Cache) {\r\n\t\t\r\n\t\tcache.clear();\r\n\t\t\r\n\t}", "public static void clearCache() {\n\t\tclassNamesToPersistIds = null;\n\t\tclassesToPersistIds = null;\n\t}", "public void clearCache() {\n sHardBitmapCache.clear();\n sSoftBitmapCache.clear();\n }", "public static void clear() {\n\t\tmemoryCache.clear();\n\n\t\t// Remove everything from file cache\n\t\tFile cachedFileDir = new File(diskCachePath);\n\t\tif (cachedFileDir.exists() && cachedFileDir.isDirectory()) {\n\t\t\tFile[] cachedFiles = cachedFileDir.listFiles();\n\t\t\tfor (File f : cachedFiles) {\n\t\t\t\tif (f.exists() && f.isFile()) {\n\t\t\t\t\tf.delete();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void clearAll();", "public void clearAll();", "public void clearCache() {\n\t\troutes_.clearCache();\n\t}", "public final void clear() {\n ((List<Entry>) Router.callRouter(this.entries, Entries.class, \"getEntry\", null, null)).clear();\n this.fileName = null;\n this.password = null;\n this.modified = false;\n }", "@Override\n public void clear() {\n for (LinkedList<Entry<K,V>> list : table) {\n list = null;\n }\n }", "public void invalidateCaches() {\n cfgCache.invalidateAll();\n analysisCache.invalidateAll();\n }", "@Override\r\n\tpublic void clearAll() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void clearAll() {\n\t\t\r\n\t}", "static void clearCache() {\n CONFIG_VALUES = null;\n RUN_MODE = null;\n }", "void removeAllEntries();", "public static void clearCache() {\n sHardBitmapCache.clear();\n sSoftBitmapCache.clear();\n }", "public void clearDiskCache()\n {\n clearCache(cacheDirectory);\n }", "@Override\n public void cleanup() {\n for (String key : cache.keySet()) {\n CacheObject co = cache.get(key).get();\n if (co.isExpired()) {\n synchronized (co) {\n if (co.isExpired()) {\n cache.remove(key);\n queue.add(co);\n }\n }\n }\n }\n\n }", "public void clear() {\n buckets = new ArrayList<>();\n for (int i = 0; i < numBuckets; i++) {\n buckets.add(new ArrayList<>());\n }\n keySet = new HashSet<>();\n numEntries = 0;\n }", "public void clearCache() {\n constructorCache.clear();\n }", "void clearAll();", "void clearAll();", "private void invalidateCache() {\n\t\tLog.d(TAG, \"invalidateCache() is removing in-memory cache\");\n\t\tpackageMapping.clear();\n\t\tvalidCache = false;\n\t}", "public void clearCache() {\n/* 105 */ this.cachedRed = null;\n/* 106 */ this.cachedUsr2dev = null;\n/* 107 */ this.cachedGn2dev = null;\n/* 108 */ this.cachedBounds = null;\n/* */ }", "public void removeAllEntries() {\n }", "public void clearCache() {\n try {\n GenericResponse genericResponse = apiInvoker.clearCache();\n System.out.println(\"Clear Cache Result: \" + genericResponse.getResult());\n\n } catch (ApplicationException ae) {\n logger.error(ae.getName(), ae);\n System.out.println(ae.toString());\n if (ae.getCause() != null) {\n System.out.println(ae.getCause().toString());\n }\n\n } catch (Exception e) {\n logger.error(e.getMessage(), e);\n System.out.println(\"An error occurred clearing the CabTrip server's cache.\");\n System.out.println(e.toString());\n System.exit(1);\n }\n }", "@Override\n\tpublic void clear() {\n\t\tmap.clear();\n\t\tkeys.clear();\n\t}", "private void flushCache()\n {\n cachedDecomposition = null;\n cachedCentroid = null;\n cachedBounds = null;\n }", "@Test\n public void clear() {\n cache.put(1, \"a\");\n cache.put(2, \"b\");\n changesOf(0, 0, 2, 0);\n cache.clear();\n changesOf(0, 0, 0, 0);\n }" ]
[ "0.8388986", "0.8244677", "0.8232753", "0.8200961", "0.8200961", "0.8161878", "0.815123", "0.81192136", "0.8071736", "0.7995738", "0.7982605", "0.78698874", "0.7773567", "0.7727999", "0.7712063", "0.77042925", "0.77042925", "0.77042925", "0.77042925", "0.77042925", "0.77042925", "0.77042925", "0.77042925", "0.77042925", "0.77042925", "0.77042925", "0.77042925", "0.77042925", "0.77042925", "0.77042925", "0.77042925", "0.77042925", "0.77042925", "0.77042925", "0.77042925", "0.76919246", "0.7690952", "0.76851785", "0.7677679", "0.7624456", "0.7624456", "0.7624456", "0.75924104", "0.75907534", "0.7590209", "0.7574126", "0.75300556", "0.7501162", "0.749156", "0.7470951", "0.7447051", "0.7421212", "0.74010575", "0.73840326", "0.7372627", "0.73589396", "0.734741", "0.7333808", "0.7301088", "0.7299101", "0.7284867", "0.72752106", "0.7273957", "0.7266689", "0.72627765", "0.72469556", "0.72264683", "0.7223217", "0.7210231", "0.7207668", "0.72050166", "0.7151191", "0.7150029", "0.71404874", "0.7137044", "0.71362174", "0.7125142", "0.71120834", "0.71120834", "0.70817626", "0.7068227", "0.7043179", "0.7025966", "0.702304", "0.702304", "0.7010135", "0.7009036", "0.6998814", "0.6995309", "0.6984178", "0.69741553", "0.6968141", "0.6958988", "0.6958988", "0.69536906", "0.6951351", "0.6944488", "0.6938461", "0.6938115", "0.6934611", "0.69268954" ]
0.0
-1
1.Description: Restart job when previous job is abandoned 2.Biz Logic: 3.Author : LGCNS
@RequestMapping(value="/job/restartJob", produces = MediaType.APPLICATION_JSON_VALUE) public Map<String, Object> reStartJob(@RequestBody Map<String, Object> paramMap) throws Exception { Map<String, Object> msgMap = null; Map<String, Object> resultMap = new HashMap<String, Object>(); if (LOGGER.isDebugEnabled()) { LOGGER.debug("jobName :: {} :: Job Id :: {}" + paramMap.get("jobName"), paramMap.get("jobId")); } /** Check jobId, jobName from parameter **/ String jobName = paramMap.get("jobName") != null ? String.valueOf(paramMap.get("jobName")) : null; Long jobId = paramMap.get("jobId") != null ? Long.parseLong(String.valueOf(paramMap.get("jobId"))) : 0L; /** Check Input Parameter **/ if (NullUtil.isNull(jobName) || jobId <= 0) { msgMap = MessageUtil.getErrorMessage("There are no job Id or job Name in input parameter"); LOGGER.error("{}", resultMap); return resultMap; } /** Call job restart service **/ msgMap = jobControlSvi.restartJob(paramMap); resultMap.put(BaseConstants.DEFAULT_MESSAGE_NAME, msgMap); return resultMap; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void processRestart(){\n destroyWorkerQueue();\n initWorkerQueue();\n }", "boolean cancelJob(String jobId) throws Exception;", "public void resumeJob(String jobId);", "private void completeAbandonedJob(Integer id) {\r\n\t\tabandonedJobs++;\r\n\t\tBatchJobInstance batchJobInstance = batchJobInstanceManager.findById(id);\r\n\t\tif (batchJobInstance != null) {\r\n\t\t\tDate rightNow = new Date();\r\n\t\t\tbatchJobInstance.setStatus(BatchJobService.STATUS_ABANDONED);\r\n\t\t\tBatchJobEvent batchJobEvent = new BatchJobEvent();\r\n\t\t\tbatchJobEvent.setEvent(BatchJobService.STATUS_ABANDONED);\r\n\t\t\tbatchJobEvent.setDescription(\"Job marked as abandoned by PeriodicBatchJobReview\");\r\n\t\t\tbatchJobEvent.setCreationDate(rightNow);\r\n\t\t\tbatchJobEvent.setCreatedBy(\"PeriodicBatchJobReview\");\r\n\t\t\tbatchJobEvent.setLastUpdate(rightNow);\r\n\t\t\tbatchJobEvent.setLastUpdateBy(\"PeriodicBatchJobReview\");\r\n\t\t\tbatchJobInstance.addEvent(batchJobEvent);\r\n\t\t\tbatchJobInstance.setLastUpdate(rightNow);\r\n\t\t\tbatchJobInstance.setLastUpdateBy(\"PeriodicBatchJobReview\");\r\n\t\t\tbatchJobInstanceManager.save(batchJobInstance);\r\n\t\t\tupdatedJobs++;\r\n\t\t} else {\r\n\t\t\tlog.error(\"Unable to retrieve instance \" + id + \"; job will not be updated.\");\r\n\t\t\tfailedUpdates++;\r\n\t\t}\r\n\t}", "public synchronized void cancel() {\n this.executionState = JobExecutionState.CANCELLED;\n this.finished = Instant.now();\n }", "public static void cancelRefreshJob() {\n\t\ttry {\n\t\t\tScheduler sched = StdSchedulerFactory.getDefaultScheduler();\n\t\t\tSet<JobKey> jobKeys = sched.getJobKeys(jobGroupEquals(SCHEDULER_GROUP));\n\t\t\tif (jobKeys.size() > 0) {\n\t\t\t\tsched.deleteJobs(new ArrayList<JobKey>(jobKeys));\n\t\t\t\tlogger.debug(\"Found {} refresh jobs to delete from DefaulScheduler (keys={})\", jobKeys.size(), jobKeys);\n\t\t\t}\n\t\t} catch (SchedulerException e) {\n\t\t\tlogger.warn(\"Could not remove refresh job: {}\", e.getMessage());\n\t\t}\t\t\n\t}", "private void scheduleJob() {\n\n }", "void rescheduleAJob(String oldTriggerName, String oldTriggerGroup, Trigger newTrigger);", "void cancel()\n {\n cancelled = true;\n subjobComplete = true;\n result = null;\n }", "public void jobExecutionVetoed(JobExecutionContext jobExecutionContext) {}", "public void restartJob(Job job) throws IOException {\n\t\tCore.restartJob(job, getHttpMethodExecutor());\n\t}", "protected void afterJobExecution() {\n\t}", "public void restart() {\r\n\t\tthis.cancel = false;\r\n\t}", "JobResponse refresh();", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-09-06 12:50:58.285 -0400\", hash_original_method = \"BB75EF8F6E0673F65CCB71D9E93FEF94\", hash_generated_method = \"BD5AE59555BC5F38C24F9EF27A079410\")\n \npublic void restart() {\n if (isFailed()) {\n mPrintManager.restartPrintJob(mCachedInfo.getId());\n }\n }", "@Override\n public boolean onStopJob(JobParameters params) {\n return false;\n }", "protected void beforeJobExecution() {\n\t}", "String resubmitJob(JPPFJob job);", "@Override\n public boolean onStopJob(JobParameters job) {\n return true;\n }", "public void cancelJob(ConversionJob tjob){\n\t\tjobscheduler.cancelJob(tjob);\n\t\t//jlog.info(\"Cancel Job \"+tjob.getFullName());\n\t}", "@Override\n public boolean onStopJob(com.firebase.jobdispatcher.JobParameters job) {\n // If mBackgroundTask is valid, cancel it\n //Return true to signify the job should be retried\n if (mBackgroundTask != null) mBackgroundTask.cancel(true);\n return true;\n }", "private void cancelLaunchClientJob() {\n if (launchClientJob != null) {\n return;\n }\n\n launchClientJob = findLaunchClientJob();\n\n if (launchClientJob != null) {\n launchClientJob.cancel();\n }\n }", "@Override\n\tpublic boolean isJobRunning() {\n\t\treturn false;\n\t}", "public void closeJobHiring(String jobID, String email)\n {\n appList= JobSystemCoordinator.appManager.getPendingApplications(jobID);\n currentJob = getJobAtIndex(jobID);\n for(Application app : appList) {\n app.setStatus(\"Post no longer available!\");\n }\n currentJob.setStatus(\"FILLED\");\n String success = String.format(\"============CLOSING A JOB SUCCESS==============\\n\" +\n \"Job ID: %s\\n\" +\n \"Hired Candidates: %s\\n\", currentJob.getJobID(), email);\n System.out.println(success);\n }", "@Override\n\tpublic void resumeAllJobs() throws SchedulerException {\n\t\tscheduler.resumeAll();\n\t}", "private void restartProcess() {\n //you can send service or broadcast intent to restart your process\n Intent intent = getBaseContext().getPackageManager()\n .getLaunchIntentForPackage(getBaseContext().getPackageName());\n PendingIntent restartIntent = PendingIntent.getActivity(getApplicationContext(), 0, intent, PendingIntent.FLAG_ONE_SHOT);\n AlarmManager mgr = (AlarmManager) getSystemService(Context.ALARM_SERVICE);\n mgr.set(AlarmManager.RTC, System.currentTimeMillis() + 1000, restartIntent); // 1秒钟后重启应用\n System.exit(0);\n }", "public void testBundleRerun1() throws Exception {\n BundleJobBean job = this.addRecordToBundleJobTable(Job.Status.SUCCEEDED, false);\n this.addRecordToBundleActionTable(job.getId(), \"action1\", 0, Job.Status.SUCCEEDED);\n this.addRecordToBundleActionTable(job.getId(), \"action2\", 0, Job.Status.SUCCEEDED);\n addRecordToCoordJobTable(\"action1\", CoordinatorJob.Status.SUCCEEDED, false);\n addRecordToCoordJobTable(\"action2\", CoordinatorJob.Status.SUCCEEDED, false);\n\n JPAService jpaService = Services.get().get(JPAService.class);\n assertNotNull(jpaService);\n BundleJobGetJPAExecutor bundleJobGetExecutor = new BundleJobGetJPAExecutor(job.getId());\n job = jpaService.execute(bundleJobGetExecutor);\n assertEquals(Job.Status.SUCCEEDED, job.getStatus());\n\n new BundleRerunXCommand(job.getId(), null, \"2009-02-01T00:00Z\", false, true).call();\n\n job = jpaService.execute(bundleJobGetExecutor);\n assertEquals(Job.Status.RUNNING, job.getStatus());\n }", "@Override\r\n\tpublic void jobFailed(Job failedJob, Job retry) {\n\t\tgetCloudsim().log(\"WARNING: Job failed: \" + failedJob.getID());\r\n\t}", "public final synchronized void restart() {\r\n\t\tunblocked = false;\r\n\t\tcancelled = null;\r\n\t\terror = null;\r\n\t}", "public void testBundleRerun2() throws Exception {\n BundleJobBean job = this.addRecordToBundleJobTable(Job.Status.SUCCEEDED, false);\n this.addRecordToBundleActionTable(job.getId(), \"action1\", 0, Job.Status.SUCCEEDED);\n this.addRecordToBundleActionTable(job.getId(), \"action2\", 0, Job.Status.SUCCEEDED);\n addRecordToCoordJobTable(\"action1\", CoordinatorJob.Status.SUCCEEDED, false);\n addRecordToCoordJobTable(\"action2\", CoordinatorJob.Status.SUCCEEDED, false);\n\n JPAService jpaService = Services.get().get(JPAService.class);\n assertNotNull(jpaService);\n BundleJobGetJPAExecutor bundleJobGetExecutor = new BundleJobGetJPAExecutor(job.getId());\n job = jpaService.execute(bundleJobGetExecutor);\n assertEquals(Job.Status.SUCCEEDED, job.getStatus());\n\n new BundleRerunXCommand(job.getId(), \"action1\", null, false, true).call();\n\n job = jpaService.execute(bundleJobGetExecutor);\n assertEquals(Job.Status.RUNNING, job.getStatus());\n }", "@Override\n public boolean onStopJob(JobParameters jobParameters) {\n Log.d(TAG, \"Job cancelled before being completed.\");\n jobCancelled = true;\n boolean needsReschedule = isWorking;\n jobFinished(jobParameters, needsReschedule);\n return needsReschedule;\n }", "protected void runPostJobGloballyTerminated(JobID jobId, JobStatus jobStatus) {\n }", "JobResponse refresh(Context context);", "public void cancelAllJobs(View v) {\n JobScheduler tm = (JobScheduler) getSystemService(Context.JOB_SCHEDULER_SERVICE);\n tm.cancelAll();\n Toast.makeText(MainActivity.this, R.string.all_jobs_cancelled, Toast.LENGTH_SHORT).show();\n }", "public void cancel() {\n\t\tassertRunningInJobMasterMainThread();\n\t\twhile (true) {\n\n\t\t\tExecutionState current = this.state;\n\n\t\t\tif (current == CANCELING || current == CANCELED) {\n\t\t\t\t// already taken care of, no need to cancel again\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// these two are the common cases where we need to send a cancel call\n\t\t\telse if (current == RUNNING || current == DEPLOYING) {\n\t\t\t\t// try to transition to canceling, if successful, send the cancel call\n\t\t\t\tif (startCancelling(NUM_CANCEL_CALL_TRIES)) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// else: fall through the loop\n\t\t\t}\n\n\t\t\telse if (current == FINISHED) {\n\t\t\t\t// finished before it could be cancelled.\n\t\t\t\t// in any case, the task is removed from the TaskManager already\n\n\t\t\t\t// a pipelined partition whose consumer has never been deployed could still be buffered on the TM\n\t\t\t\t// release it here since pipelined partitions for FINISHED executions aren't handled elsewhere\n\t\t\t\t// covers the following cases:\n\t\t\t\t// \t\ta) restarts of this vertex\n\t\t\t\t// \t\tb) a global failure (which may result in a FAILED job state)\n\t\t\t\tsendReleaseIntermediateResultPartitionsRpcCall();\n\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse if (current == FAILED) {\n\t\t\t\t// failed before it could be cancelled.\n\t\t\t\t// in any case, the task is removed from the TaskManager already\n\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse if (current == CREATED || current == SCHEDULED) {\n\t\t\t\t// from here, we can directly switch to cancelled, because no task has been deployed\n\t\t\t\tif (cancelAtomically()) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// else: fall through the loop\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow new IllegalStateException(current.name());\n\t\t\t}\n\t\t}\n\t}", "public void ServiceJob(FJJob job, double time) {\n if (job == null) return;\n if (remaining_workers == 0) return;\n if (FJSimulator.DEBUG) System.out.println(\"begin service on job: \"+job.path_log_id+\" \"+time);\n\n // if the patience flag is set, then check the job queue to see if\n // this job can wait for more workers to become idle\n /*\n if (this.patient_job==null && patience) {\n \tif (this.job_queue.size() <= JOB_QUEUE_PATIENCE_THRESHOLD) {\n \t\tthis.patient_job = job;\n \t\t// compute how many workers we want to have idle before we start\n \t\t//this.idle_workers_needed = Math.min(job.num_tasks, Math.min(remaining_workers+1, num_workers));\n \t\t/**\n \t\t * Just waiting for one more worker, always, is kind-of dumb. If there is only\n \t\t * one worker available, waiting for a 2nd doubles the parallelism of the next job.\n \t\t * Also, if a lot of jobs are in service, the expected waiting time until the\n \t\t * next departure is shorter. OTOH, if almost all workers are already idle, then\n \t\t * the benefit of one more worker is negligible, and less jobs in progress means a\n \t\t * longer expected wait until another becomes available. So when deciding whether\n \t\t * to be patient or not, we should consider:\n \t\t * - the number of currently idle workers\n \t\t * - the fraction of currently idle workers\n \t\t * - the number of jobs in progress (and how many workers they have)\n \t\t * - \n \t\t * /\n \t\tint num_jobs_in_progress = this.activeJobs.size();\n \t\tdouble idle_fraction = (1.0*remaining_workers)/(1.0*num_workers);\n \t\tint busy_workers = num_workers - remaining_workers;\n \t\tdouble workers_per_job = (1.0*busy_workers)/(1.0*num_jobs_in_progress);\n \t\t\n \t\t// the expected factor to be gained by a job departing\n \t\tdouble rr = workers_per_job / remaining_workers;\n \t\t\n \t\tif ((rr >= 1.5) && (num_jobs_in_progress >= num_workers/4.0)) {\n \t\t\tthis.idle_workers_needed = Math.min(job.num_tasks, Math.min(remaining_workers+1, num_workers));\n \t\t\tSystem.out.println(\"** Setting a job to be patient rr=\"+rr);\n \t\t} else {\n \t\t\tSystem.out.println(\"-- J=\"+num_jobs_in_progress+\"\\t I=\"+remaining_workers+\"\\t B=\"+busy_workers+\"\\t rr=\"+rr);\n \t\t\tthis.idle_workers_needed = remaining_workers;\n \t\t}\n \t}\n }\n */\n\n /*\n * Try a really restrictive version of BackPressure and Patience.\n * Jobs are only patient in the case where there is only one available\n * worker, and at least k/2 jobs in progress. Also the only time the job\n * takes all workers is the case of a patient job.\n */\n if (this.patient_job==null && patience) {\n \tif ((this.job_queue.size() <= JOB_QUEUE_PATIENCE_THRESHOLD) \n \t\t\t&& (remaining_workers==1)\n \t\t\t&& (activeJobs.size() >= num_workers/2)) {\n \t\tthis.patient_job = job;\n \t\t\tthis.idle_workers_needed = remaining_workers + 1;\n \t}\n }\n\n \n // if we are going to wait for more workers, just return\n //TODO: if the job queue is no longer empty, should just start the job?\n boolean servicing_patient_job = false;\n if (patience && this.patient_job!=null) {\n \tif (this.patient_job != job) {\n \t\tSystem.err.println(\"ERROR: trying to service a job when another is being patient!\");\n \t\tSystem.exit(1);\n \t}\n \t\n \tif (remaining_workers < idle_workers_needed) {\n \t\t//System.out.println(\"Being patient for job remaining_workers=\"+remaining_workers+\" idle_workers_needed=\"+idle_workers_needed);\n \t\treturn;\n \t}\n \t\n \t// we're going to service the job that's been waiting\n \tthis.patient_job = null;\n \tidle_workers_needed = 0;\n \tservicing_patient_job = true;\n \t//System.out.println(\"Servicing a patient job \"+remaining_workers);\n }\n \n // pick out some number of workers to use\n // if the job queue is below some threshold, take all the workers\n int nworkers = (remaining_workers == 1) ? 1 : remaining_workers/2;\n //if (this.job_queue.isEmpty()) {\n if (this.job_queue.isEmpty() && servicing_patient_job) {\n \t//System.out.println(\" ** giving a patient job all the workers: \"+remaining_workers);\n \tnworkers = remaining_workers;\n }\n \n activeJobs.add(job);\n Vector<Integer> worker_pool = new Vector<Integer>();\n job2workers.put(job, worker_pool);\n for (int w=0; (w<num_workers && worker_pool.size()<nworkers); w++) {\n if (worker2job[w] == null) {\n worker_pool.add(w);\n worker2job[w] = job;\n remaining_workers--;\n }\n }\n \n //System.out.println(\"worker_pool.size() = \"+worker_pool.size()+\" nworkers = \"+nworkers+\" activeJobs.size() = \"+activeJobs.size()+\" queue size = \"+this.job_queue.size());\n \n // assign the job's tasks to the workers\n int worker_index = 0;\n FJTask t = null;\n while ((t = job.nextTask()) != null) {\n workers[0][worker_pool.get(worker_index)].queue.add(t);\n //System.out.println(\"assigning task \"+t+\" to worker \"+worker_pool.get(worker_index));\n worker_index = (worker_index + 1) % nworkers;\n }\n \n // These newly allocated workers will be idle. Put them to work.\n feedWorkers(time);\n }", "void deschedule(ScheduledJob job);", "public void finishJob(View v) {\n JobScheduler jobScheduler = (JobScheduler) getSystemService(Context.JOB_SCHEDULER_SERVICE);\n List<JobInfo> allPendingJobs = jobScheduler.getAllPendingJobs();\n if (allPendingJobs.size() > 0) {\n // Finish the last one\n int jobId = allPendingJobs.get(0).getId();\n jobScheduler.cancel(jobId);\n Toast.makeText(\n MainActivity.this, String.format(getString(R.string.cancelled_job), jobId),\n Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(\n MainActivity.this, getString(R.string.no_jobs_to_cancel),\n Toast.LENGTH_SHORT).show();\n }\n }", "@Override\r\n\tpublic void doBeforeJob() {\n\r\n\t}", "@Bean\n\tpublic void jobOneDetail() throws SchedulerException {\n\t\tJobDataMap jobDataMap = new JobDataMap();\n\t\tjobDataMap.put(\"jobLauncher\", jobLauncher);\n\t\tjobDataMap.put(\"jobLocator\", jobLocator);\n\n\t\tJobDetail job = JobBuilder.newJob(SimpleJob.class).withIdentity(\"demoJobOne\").setJobData(jobDataMap)\n\t\t\t\t.storeDurably().build();\n\t\tTrigger trigger = TriggerBuilder.newTrigger().forJob(job).withIdentity(\"jobOneTrigger\")\n\t\t\t\t.withSchedule(SimpleScheduleBuilder.simpleSchedule().withIntervalInHours(5).repeatForever()).build();\n\t\tschedulerFactoryBean.getScheduler().scheduleJob(job, trigger);\n\n\t\t/*\n\t\t * Payroll calculation job scheduled to calculate salary for Regular employees\n\t\t * on monthly basis\n\t\t */\n\t\tJobDataMap payrollJobParam4Regular = new JobDataMap();\n\t\tpayrollJobParam4Regular.put(\"jobLauncher\", jobLauncher);\n\t\tpayrollJobParam4Regular.put(\"jobLocator\", jobLocator);\n\t\tpayrollJobParam4Regular.put(\"empType\", \"Regular\");\n\t\tJobDetail payrollJob4Regular = JobBuilder.newJob(PayrollCalculationJob.class).withIdentity(\"payrollJob4Regular\")\n\t\t\t\t.setJobData(payrollJobParam4Regular).storeDurably().build();\n\t\tTrigger payrollTrigger4Regular = TriggerBuilder.newTrigger().forJob(payrollJob4Regular)\n\t\t\t\t.withIdentity(\"payrollTrigger4Regular\")\n\t\t\t\t.withSchedule(CronScheduleBuilder.cronSchedule(\"0 0 0 1 1/1 ? *\")).build();\n\t\tschedulerFactoryBean.getScheduler().scheduleJob(payrollJob4Regular, payrollTrigger4Regular);\n\n\t\t/*\n\t\t * Payroll calculation job scheduled to calculate salary for Internship\n\t\t * employees on weekly[Saturday] basis\n\t\t */\n\t\tJobDataMap payrollJobParam4Internship = new JobDataMap();\n\t\tpayrollJobParam4Internship.put(\"jobLauncher\", jobLauncher);\n\t\tpayrollJobParam4Internship.put(\"jobLocator\", jobLocator);\n\t\tpayrollJobParam4Internship.put(\"empType\", \"Internship\");\n\t\tJobDetail payrollJob4Internship = JobBuilder.newJob(PayrollCalculationJob.class)\n\t\t\t\t.withIdentity(\"payrollJob4Internship\").setJobData(payrollJobParam4Internship).storeDurably().build();\n\t\tTrigger payrollTrigger4Internship = TriggerBuilder.newTrigger().forJob(payrollJob4Internship)\n\t\t\t\t.withIdentity(\"payrollTrigger4Internship\")\n\t\t\t\t.withSchedule(CronScheduleBuilder.cronSchedule(\"0 0 0 ? * SAT *\")).build();\n\t\tschedulerFactoryBean.getScheduler().scheduleJob(payrollJob4Internship, payrollTrigger4Internship);\n\n\t\t/*\n\t\t * Payroll calculation job scheduled to calculate salary for Contract employees\n\t\t * on daily basis\n\t\t */\n\t\tJobDataMap payrollJobParam4Contract = new JobDataMap();\n\t\tpayrollJobParam4Contract.put(\"jobLauncher\", jobLauncher);\n\t\tpayrollJobParam4Contract.put(\"jobLocator\", jobLocator);\n\t\tpayrollJobParam4Contract.put(\"empType\", \"Internship\");\n\t\tJobDetail payrollJob4Contract = JobBuilder.newJob(PayrollCalculationJob.class)\n\t\t\t\t.withIdentity(\"payrollJob4Contract\").setJobData(payrollJobParam4Contract).storeDurably().build();\n\t\tTrigger payrollTrigger4Contract = TriggerBuilder.newTrigger().forJob(payrollJob4Contract)\n\t\t\t\t.withIdentity(\"payrollTrigger4Contract\")\n\t\t\t\t.withSchedule(CronScheduleBuilder.cronSchedule(\"0 0 0 1/1 * ? *\")).build();\n\t\tschedulerFactoryBean.getScheduler().scheduleJob(payrollJob4Contract, payrollTrigger4Contract);\n\n\t\t/*\n\t\t * Payroll calculation job scheduled to calculate salary for Freelancer\n\t\t * employees on hourly basis\n\t\t */\n\t\tJobDataMap payrollJobParam4Freelancer = new JobDataMap();\n\t\tpayrollJobParam4Freelancer.put(\"jobLauncher\", jobLauncher);\n\t\tpayrollJobParam4Freelancer.put(\"jobLocator\", jobLocator);\n\t\tpayrollJobParam4Freelancer.put(\"empType\", \"Internship\");\n\t\tJobDetail payrollJob4Freelancer = JobBuilder.newJob(PayrollCalculationJob.class)\n\t\t\t\t.withIdentity(\"payrollJob4Freelancer\").setJobData(payrollJobParam4Freelancer).storeDurably().build();\n\t\tTrigger payrollTrigger4Freelancer = TriggerBuilder.newTrigger().forJob(payrollJob4Freelancer)\n\t\t\t\t.withIdentity(\"payrollTrigger4Freelancer\")\n\t\t\t\t.withSchedule(CronScheduleBuilder.cronSchedule(\"0 0 0/1 1/1 * ? *\")).build();\n\t\tschedulerFactoryBean.getScheduler().scheduleJob(payrollJob4Freelancer, payrollTrigger4Freelancer);\n\n\t}", "public void scheduleJobs();", "public void resetForExecutionForRetry() {\n assertInvariants(ItemProcessingState.WAIT_FOR_MAPPING_UPDATE, ItemProcessingState.EXECUTED);\n currentItemState = ItemProcessingState.INITIAL;\n requestToExecute = null;\n executionResult = null;\n assertInvariants(ItemProcessingState.INITIAL);\n }", "@Override\r\n\tpublic void doAfterJob() {\n\r\n\t}", "@Override\n public void restart() {\n }", "@Override\n public boolean onStopJob(JobParameters job) {\n if (mTasksData != null) {\n mTasksData.cancel(true);\n }\n return true;\n }", "public void restartRebill(HashMap<String, String> params) {\n\t\tTRANSACTION_TYPE = \"SET\";\n\t\tREBILL_ID = params.get(\"rebillID\");\n\t\tNEXT_DATE = params.get(\"nextDate\");\n\t\tREBILL_STATUS = \"active\";\n\t\tAPI = \"bp20rebadmin\";\n\t}", "@Override\n\tpublic void restart() {\n\t\t\n\t}", "public void execute(JobExecutionContext context) {\n\t\t\n\t\tProcessManagerFactoryBean pmfb = new ProcessManagerFactoryBean();\n\t\t\n\t\tCalendar now = Calendar.getInstance();\n\t\t\n\t\tList<SchedulerItem> schedulerItems = this.getAllSchedule();\n\t\t\n\t\tfor (final SchedulerItem item : schedulerItems) {\n\t\t\t\n\t\t\tif (!(item.getStartDate().getTime() <= now.getTimeInMillis())) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tProcessManagerRemote pm = null;\n\t\t\tProcessInstance instance = null;\n\t\t\t\n\t\t\ttry {\n\t\t\t\tpm = pmfb.getProcessManager();\n\t\t\t\ttry {\n\t\t\t\t\tinstance = pm.getProcessInstance(item.getInstanceId());\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tboolean isError = true;\n\t\t\t\t\n\t\t\t\tif (instance != null) {\n\t\t\t\t\tActivity act = instance.getProcessDefinition().getActivity(item.getTracingTag());\n\n\t\t\t\t\tif (act != null && act instanceof WaitActivity) {\n\t\t\t\t\t\tString status = act.getStatus(instance);\n\t\t\t\t\t\tif (Activity.STATUS_RUNNING.equals(status) || Activity.STATUS_TIMEOUT.equals(status)) {\n\n\t\t\t\t\t\t\tinstance.getProcessTransactionContext().addTransactionListener(new TransactionListener() {\n\n\t\t\t\t\t\t\t\tpublic void beforeRollback(TransactionContext tx) throws Exception {\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tpublic void beforeCommit(TransactionContext tx) throws Exception {\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tpublic void afterRollback(TransactionContext tx) throws Exception {\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tpublic void afterCommit(TransactionContext tx) throws Exception {\n\t\t\t\t\t\t\t\t\tdeleteSchedule(item.getIdx());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\tact.fireComplete(instance);\n\t\t\t\t\t\t\tisError = false;\n\n\t\t\t\t\t\t} else if (Activity.STATUS_FAULT.equals(status)\n\t\t\t\t\t\t\t\t|| Activity.STATUS_READY.equals(status) \n\t\t\t\t\t\t\t\t|| Activity.STATUS_STOPPED.equals(status) || Activity.STATUS_CANCELLED.equals(status) ) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcontinue;\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 (isError) {\n\t\t\t\t\tdeleteSchedule(item.getIdx());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tpm.applyChanges();\t\n\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\ttry {\n\t\t\t\t\tpm.cancelChanges();\n\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t} finally{\n\t\t\t\ttry {\n\t\t\t\t\tpm.remove();\n\t\t\t\t} catch (RemoteException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (RemoveException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n//\t\tSystem.out.println(\"scheduler WaitJob execute() end...\");\n\t}", "void disjoinJob(long jobId, long joinedJobId);", "public interface Job {\n\n /** unique id for this job that is used as a reference in the service methods */\n String getId();\n\n /** job executor identification that has acquired this job and is going to execute it */\n String getLockOwner();\n\n /** in case this is a timer, it is the time that the timer should fire, in case this \n * is a message, it is null. */\n Date getDueDate();\n\n /** in case this is a timer, it is the time that the timer should fire, in case this \n * is a message, it is null.\n * @deprecated call {@link #getDueDate()} instead */\n @Deprecated\n Date getDuedate();\n\n /** exception that occurred during the last execution of this job. The transaction \n * of the job execution is rolled back. A synchronization is used to create \n * a separate transaction to update the exception and decrement the retries. */\n String getException();\n\n /** number of retries left. This is only decremented when an exception occurs during job \n * execution. The transaction of the job execution is rolled back. A synchronization is used to create \n * a separate transaction to update the exception and decrement the retries. */\n int getRetries();\n\n /** indicates if this job should be executed separate from any other job \n * in the same process instance */\n boolean isExclusive();\n\n /** the related execution */\n Execution getExecution();\n\n /** the related process instance */\n Execution getProcessInstance();\n\n Date getLockExpirationTime();\n\n}", "void markAbandoned();", "@Override\n public ReturnT<String> kill(String jobId) {\n JobThread jobThread = CcbJobExecutor.loadJobThread(jobId);\n if (jobThread != null) {\n \tCcbJobExecutor.removeJobThread(jobId, \"人工手动终止\");\n return ReturnT.SUCCESS;\n }\n\n return new ReturnT<String>(ReturnT.SUCCESS_CODE, \"job thread aleady killed.\");\n }", "public void stop() {\n \t\t\tif (isJobRunning) cancel();\n \t\t}", "boolean isDone(long number) throws NoSuchJobException;", "public void pauseJob(String jobId);", "private Integer[] getAbandonedJobs() {\r\n\t\tlog.info(\"Searching for abandoned jobs ...\");\r\n\t\tlog.info(\" \");\r\n\r\n\t\tList<Integer> jobs = new ArrayList<Integer>();\r\n\t\tConnection conn = null;\r\n\t\tStatement stmt = null;\r\n\t\tResultSet rs = null;\r\n\t\tString qs = \"select id from batchjobinstance where status = 'Running' and startDateTime < now() + interval -1 day\";\r\n\t\ttry {\r\n\t\t\tconn = dataSource.getConnection();\r\n\t\t\tstmt = conn.createStatement();\r\n\t\t\trs = stmt.executeQuery(qs);\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tjobs.add(rs.getInt(\"id\"));\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlog.error(\"Exception encountered while attempting to retrieve abandoned jobs: \" + e.toString() + \"; \" + e.getMessage(), e);\r\n\t\t\tlog.error(\"SQL statement: \" + qs);\r\n\t\t} finally {\r\n\t\t\tif (rs != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\trs.close();\r\n\t\t\t\t} catch (SQLException sqle) {\r\n\t\t\t\t\tlog.error(\"SQL error on rs.close(): \" + sqle.toString() + \"; \" + sqle.getMessage(), sqle);\r\n\t\t\t\t}\r\n\t\t\t\trs = null;\r\n\t\t\t}\r\n\t\t\tif (stmt != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tstmt.close();\r\n\t\t\t\t} catch (SQLException sqle) {\r\n\t\t\t\t\tlog.error(\"SQL error on stmt.close(): \" + sqle.toString() + \"; \" + sqle.getMessage(), sqle);\r\n\t\t\t\t}\r\n\t\t\t\tstmt = null;\r\n\t\t\t}\r\n\t\t\tif (conn != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tconn.close();\r\n\t\t\t\t} catch (SQLException sqle) {\r\n\t\t\t\t\tlog.error(\"SQL error on conn.close(): : \" + sqle.toString() + \"; \" + sqle.getMessage(), sqle);\r\n\t\t\t\t}\r\n\t\t\t\tconn = null;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tlog.info(jobs.size() + \" abandoned job(s) found\");\r\n\t\tlog.info(\" \");\r\n\r\n\t\treturn jobs.toArray(new Integer[0]);\r\n\t}", "public void markJobAsSuccess(String jobId) {\n JobWrapper wrapper = jobs.remove(jobId);\n if (wrapper != null) {\n jobMetrics.runningJobs.decrementAndGet();\n LOGGER.info(\"job instance {} is success\", jobId);\n // mark job as success.\n jobConfDB.updateJobState(jobId, StateSearchKey.SUCCESS);\n }\n }", "public void restart() {\r\n\t\tstart();\r\n\t}", "protected void restart() {\r\n\t\tthis.stop();\r\n\t\tthis.start();\r\n\t}", "@Override\n\tpublic void abortWorkItem(WorkItem arg0, WorkItemManager arg1) {\n\t}", "public static void restartbossair(){\n\t\t\t\tbossair.periodair=periodairinit;\n\t\t\t\tbossair.lastcreatedair=0; \n\t\t\t\tbossair.xmoving=xmovinginit; \n\t}", "public void restart();", "@PUT\n @Path(\"/job/{id}/retry\")\n @Consumes(MediaType.APPLICATION_JSON)\n @Produces(MediaType.APPLICATION_JSON)\n public Response retryJob(@PathParam(\"id\") String jobId, String body) {\n String reason = \"\";\n JSONObject jb = new JSONObject(body);\n log.info(\"Retry job received for [\" + jobId + \"]\");\n JSONObject ret = retryHelper(jobId, \"\");\n return Response.status(200).entity(ret.toString()).build();\n }", "private void deletejob() {\n\t\tjob.delete(new UpdateListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void done(BmobException e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif (e==null) {\n\t\t\t\t\ttoast(\"删除成功\");\n\t\t\t\t\tUpdateJobActivity.this.finish();\n\t\t\t\t} else {\n\t\t\t\t\ttoast(\"错误:\"+e.getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "private void forceRestart() {\n\n/*\t\tAlarmManager alarmMgr = (AlarmManager) getSystemService(Context.ALARM_SERVICE);\n\t\tlong timeMillis = SystemClock.elapsedRealtime() + 1000; //1 second\n\t\tIntent intent = getPackageManager().getLaunchIntentForPackage(getPackageName());\n\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\talarmMgr.set(AlarmManager.ELAPSED_REALTIME, timeMillis, PendingIntent.getActivity(this, 0, intent, 0));*/\n\t\tnew Thread(new Runnable() {\n\t\t\tpublic void run() {\n\t\t\t\ttry {\n\t\t\t\t\tThread.sleep(200);\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}).start();\n\t}", "@Override\n\t\t\tpublic void beforeJob(JobExecution jobExecution) {\n\t\t\t\t\n\t\t\t}", "public static void main(String[] args) throws BeansException, JobExecutionAlreadyRunningException, JobRestartException, JobInstanceAlreadyCompleteException, JobParametersInvalidException, InterruptedException, IOException {\n\r\n \tSystem.exit(0);\r\n }", "@Override\n\tpublic String getWaitingJobId() {\n\t\treturn null;\n\t}", "@Override\n\t@Transactional\n\tpublic Job updateJob(Job job) {\n\t\treturn null;\n\t}", "@Deployment(resources = {\"org/camunda/bpm/engine/test/api/mgmt/IncidentTest.testShouldCreateIncidentOnFailedStartTimerEvent.bpmn\"})\n @Test\n public void shouldCreateIncidentOnFailedStartTimerEvent() {\n JobQuery jobQuery = managementService.createJobQuery();\n assertEquals(1, jobQuery.count());\n\n Job job = jobQuery.singleResult();\n String jobId = job.getId();\n\n while(0 != job.getRetries()) {\n try {\n managementService.executeJob(jobId);\n fail();\n } catch (Exception e) {\n // expected\n }\n job = jobQuery.jobId(jobId).singleResult();\n\n }\n\n // job exists\n job = jobQuery.singleResult();\n assertNotNull(job);\n\n assertEquals(0, job.getRetries());\n\n // incident was created\n Incident incident = runtimeService.createIncidentQuery().configuration(job.getId()).singleResult();\n assertNotNull(incident);\n\n // manually delete job for timer start event\n managementService.deleteJob(job.getId());\n }", "public int getJobId() ;", "@Override\n\tpublic String resumeJob(String jobName, String jobGroup) throws SchedulerException {\n\n\t\tJobKey jobKey = new JobKey(jobName, jobGroup);\n\t\tJobDetail jobDetail = scheduler.getJobDetail(jobKey);\n\t\tif (jobDetail == null) {\n\t\t\treturn \"fail\";\n\t\t} else {\n\t\t\tscheduler.resumeJob(jobKey);\n\t\t\treturn \"success\";\n\t\t}\n\t}", "public void doRollback() throws Exception{\n /* rollback to last stable checkpoint */\n rStateManager.rollback();\n\n /* gets the last stable checkpoint, or zero if it doesn't exist */\n long seqn = rStateManager.getCurrentCheckpointID();\n\n IRecoverableServer lServer = (IRecoverableServer)getServer();\n \n getStateLog().setNextExecuteSEQ(seqn + 1);\n getStateLog().setCheckpointLowWaterMark(seqn);\n\n if(seqn >= 0){\n lServer.setCurrentState(rStateManager.getCurrentState());\n }else{\n lServer.setCurrentState(null);\n }\n\n if(seqn > getCurrentPrePrepareSEQ()){\n getStateLog().setNextPrePrepareSEQ(seqn+1);\n }else{\n tryExecuteRequests();\n }\n \n }", "java.lang.String getJobId();", "void cancelAllSimulations(String jobId);", "void notifyRestart();", "public void resetTask() {}", "public void onRestart(Bundle params) {\n }", "@Test(timeout=10000)\n public void testCancelJob() throws Exception {\n CommonClientTests.testCancelJob(client);\n }", "public void restart()\n\t{\n\t\tstop();\n\t\treset();\n\t\tstart();\n\t}", "public void abortWorkItem(WorkItem workItem, WorkItemManager manager) {\n\n }", "@Override\n \tprotected void onRestart() {\n \t\tsuper.onRestart();\n \t}", "@Override\r\n public void abortJob(JobContext context, int runState) \r\n throws IOException {\n cleanupJob(context);\r\n }", "@Override \r\n public void execute(JobExecutionContext executionContext) \r\n throws JobExecutionException {\n try { \r\n // Retrieve the state object. \r\n JobContext jobContext = (JobContext) executionContext \r\n .getJobDetail().getJobDataMap().get(\"jobContext\"); \r\n \r\n // Update state. \r\n jobContext.setState(new Date().toString()); \r\n \r\n // This is just a simulation of something going wrong. \r\n int number = 0; \r\n number = 123 / number; \r\n } catch (Exception e) { \r\n throw new JobExecutionException(e); \r\n } \r\n }", "protected abstract void restartImpl();", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-09-06 12:50:58.284 -0400\", hash_original_method = \"7522AD53308CD10F1544E38D1EB762CF\", hash_generated_method = \"CE79928AEF3A763B2BF787801BBC2702\")\n \npublic void cancel() {\n final int state = getInfo().getState();\n if (state == PrintJobInfo.STATE_QUEUED\n || state == PrintJobInfo.STATE_STARTED\n || state == PrintJobInfo.STATE_BLOCKED\n || state == PrintJobInfo.STATE_FAILED) {\n mPrintManager.cancelPrintJob(mCachedInfo.getId());\n }\n }", "@Override\n protected void onStop() {\n stopService(new Intent(this, MyJobScheduler.class));\n super.onStop();\n }", "@Override // androidx.work.impl.utils.CancelWorkRunnable\n @WorkerThread\n public void c() {\n WorkDatabase workDatabase = this.b.getWorkDatabase();\n workDatabase.beginTransaction();\n try {\n for (String str : workDatabase.workSpecDao().getUnfinishedWorkWithTag(this.c)) {\n a(this.b, str);\n }\n workDatabase.setTransactionSuccessful();\n workDatabase.endTransaction();\n b(this.b);\n } catch (Throwable th) {\n workDatabase.endTransaction();\n throw th;\n }\n }", "private void failJobAndIndependentStages(ActiveJob activeJob, String reason) {\n failJobAndIndependentStages(activeJob, reason, null);\n }", "@Override\n\tpublic void beforeJob(JobExecution arg0) {\n\t\t\n\t}", "public void removeJob(int jNo);", "protected void restart()\r\n \t{\r\n \t\tspielen();\r\n \t}", "@Override\n\tprotected void executeInternal(JobExecutionContext context,\n\t\t\tInteger channelId, Integer applicationId)\n\t\t\tthrows JobExecutionException {\n\t\t\n\t\t\n\t\tTaskManager taskManager = SpringUtil.getBean(TaskManager.class);\n\t\t\n\t\t//TODO 这里没法确定channel code,所以没法通过common notify packet方式生成task\n\t\t//不是很好\n\t\t//个人觉得没必要再单独生成一个额外的扫尾task,可以直接在扫尾的cron job中执行\n\t\tTask task = SpringUtil.getBean(SaoweiTask.class);\n\t\t//TODO 上下文的处理,系统级task上下文,这里暂时塞0吧,没啥关系\n\t\tChannelService channelService = SpringUtil.getBean(ChannelService.class);\n\t\tApplicationService applicationService = SpringUtil.getBean(ApplicationService.class);\n\t\tChannel channel = channelService.getChannelByCode(\"SYSTEM\");\n\t\tList<Application> applications = applicationService.getApplicationsByChannelId(channel.getId());\n\t\tApplication application = applications.get(0);\n\t\tTaskTemplateService templateService = SpringUtil.getBean(TaskTemplateService.class);\n\t\tTaskTemplate template = templateService.getTaskTemplateByTypeAndSubType(\"SYSTEM\", \"saowei\");\n\t\ttry {\n\t\t\ttask.setDataId(String.valueOf(System.nanoTime()));\n\t\t\ttask.setData(\"\");\n\t\t\ttask.setTemplate(template);\n\t\t\t\n\t\t\ttask.getContext().setChannelCode(channel.getCode());\n\t\t\ttask.getContext().setChannelId(channel.getId());\n\t\t\ttask.getContext().setApplicationCode(application.getCode());\n\t\t\ttask.getContext().setApplicationId(application.getId());\n\t\t\ttask.getContext().setStoreId(application.getStoreId());\n\t\t\t\n\t\t\tif (context.getMergedJobDataMap().containsKey(Constant.SCHEDULE_PARAM_TASK_RERUN_DELAY)) {\n\t\t\t\tString taskRerunDelay = (String)context.getMergedJobDataMap().get(Constant.SCHEDULE_PARAM_TASK_RERUN_DELAY);\n\t\t\t\ttask.getContext().put(Constant.SCHEDULE_PARAM_TASK_RERUN_DELAY, taskRerunDelay);\n\t\t\t}\n\t\t\t\n\t\t\ttaskManager.executeTask(task);\n\t\t} catch (TaskException e) {\n\t\t\t//e.printStackTrace();\n\t\t\tLOGGER.error(\"扫尾job运行失败\", e);\n\t\t\tthrow new JobExecutionException(e);\n\t\t}\n\t}", "@PostConstruct\n public void restartInterruptedMatching() throws Exception {\n if(getProperties().isCollectTrainingData()) {\n return;\n }\n\n List<State> states;\n states = getMatcherStateRepository().popAllStates();\n if (states != null) {\n setRemainingStates(states);\n for(State state : getRemainingStates()) {\n if (state.getPhase() == (byte) 1) {\n getCache().updatePhase(state.getShopId(), (byte) (state.getPhase() + 1), state.getPhase());\n }\n\n matchShop(state.getShopId(), state.getPhase(), state.getImageIds());\n getRemainingStates().remove(state);\n }\n }\n }", "public synchronized boolean cancelJob(String jobId) {\n if (jobId == null) {\n return false;\n }\n\n // We don't have access to BatchProcessor's executer service,\n // so the only way to cancel is stop giving new work packages\n BatchJobParameters job = runningJobs.get(jobId);\n Pair<WorkProviders.CancellableWorkProvider, Workers.CancellableWorker> pair = runningWorkProviders.get(jobId);\n if (pair != null) {\n boolean workProviderCanceled = pair.getFirst().cancel();\n boolean workerCanceled = pair.getSecond().cancel();\n boolean canceled = workProviderCanceled || workerCanceled; // either cancellation is a change\n if (canceled && job != null) {\n job.setStatus(BatchJobParameters.Status.CANCELED);\n }\n return canceled;\n }\n return false;\n }", "private void finishJob(int id) {\n Call<FinishJobResult> call = apiService.finishJob(id);\n final SharedPreferences.Editor editor = sharedPreferences.edit();\n call.enqueue(new Callback<FinishJobResult>() {\n @Override\n public void onResponse(Call<FinishJobResult> call, Response<FinishJobResult> response) {\n FinishJobResult finishJobResult = response.body();\n try {\n if (finishJobResult.getSuccess() == 1) {\n //job is now status 2 and it is finished\n editor.putInt(\"JOB_HANDLED\", 0);\n editor.apply();\n Toast.makeText(MapActivity.this, \"Done handling request.\", Toast.LENGTH_SHORT).show();\n recreate();\n }\n } catch (Exception e) {\n }\n }\n\n @Override\n public void onFailure(Call<FinishJobResult> call, Throwable t) {\n Toast.makeText(MapActivity.this, \"lease try again\", Toast.LENGTH_SHORT).show();\n }\n });\n }", "private List<BatchJobInstance> getFailedJobs() {\r\n\t\tlog.info(\"Searching for failed jobs ...\");\r\n\t\tlog.info(\" \");\r\n\r\n\t\tList<BatchJobInstance> jobs = new ArrayList<BatchJobInstance>();\r\n\t\tConnection conn = null;\r\n\t\tStatement stmt = null;\r\n\t\tResultSet rs = null;\r\n\t\tString qs = \"select id from batchjobinstance where status = 'Failed' and startDateTime > now() + interval -1 day\";\r\n\t\ttry {\r\n\t\t\tconn = dataSource.getConnection();\r\n\t\t\tstmt = conn.createStatement();\r\n\t\t\trs = stmt.executeQuery(qs);\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tjobs.add(batchJobInstanceManager.findById(rs.getInt(\"id\")));\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlog.error(\"Exception encountered while attempting to retrieve abandoned jobs: \" + e.toString() + \"; \" + e.getMessage(), e);\r\n\t\t\tlog.error(\"SQL statement: \" + qs);\r\n\t\t} finally {\r\n\t\t\tif (rs != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\trs.close();\r\n\t\t\t\t} catch (SQLException sqle) {\r\n\t\t\t\t\tlog.error(\"SQL error on rs.close(): \" + sqle.toString() + \"; \" + sqle.getMessage(), sqle);\r\n\t\t\t\t}\r\n\t\t\t\trs = null;\r\n\t\t\t}\r\n\t\t\tif (stmt != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tstmt.close();\r\n\t\t\t\t} catch (SQLException sqle) {\r\n\t\t\t\t\tlog.error(\"SQL error on stmt.close(): \" + sqle.toString() + \"; \" + sqle.getMessage(), sqle);\r\n\t\t\t\t}\r\n\t\t\t\tstmt = null;\r\n\t\t\t}\r\n\t\t\tif (conn != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tconn.close();\r\n\t\t\t\t} catch (SQLException sqle) {\r\n\t\t\t\t\tlog.error(\"SQL error on conn.close(): : \" + sqle.toString() + \"; \" + sqle.getMessage(), sqle);\r\n\t\t\t\t}\r\n\t\t\t\tconn = null;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tlog.info(jobs.size() + \" failed job(s) found\");\r\n\t\tlog.info(\" \");\r\n\r\n\t\treturn jobs;\r\n\t}", "void kickQueueProcessor() {\n\n long timeNow = this.tools.getTimestamp();\n this.lastKicked = timeNow;\n\n // ideally, we would run the queue at this time\n final long latestTimeToRun = timeNow + this.config.getProcessQueueIntervalShort();\n\n // only update the run time if we are bringing it forward not pushing it back\n this.runAgainAfterMs.getAndUpdate(previousTimeToRunNext ->\n (previousTimeToRunNext > latestTimeToRun) ? latestTimeToRun : previousTimeToRunNext);\n }", "public void resumeUpdates();", "@Override // androidx.work.impl.utils.CancelWorkRunnable\n @WorkerThread\n public void c() {\n WorkDatabase workDatabase = this.b.getWorkDatabase();\n workDatabase.beginTransaction();\n try {\n for (String str : workDatabase.workSpecDao().getUnfinishedWorkWithName(this.c)) {\n a(this.b, str);\n }\n workDatabase.setTransactionSuccessful();\n workDatabase.endTransaction();\n if (this.d) {\n b(this.b);\n }\n } catch (Throwable th) {\n workDatabase.endTransaction();\n throw th;\n }\n }" ]
[ "0.6575266", "0.606891", "0.60662574", "0.60051024", "0.59933925", "0.59653", "0.5920901", "0.59203446", "0.59104985", "0.58926547", "0.58394367", "0.57980245", "0.57698673", "0.57695824", "0.57337254", "0.5728472", "0.5703392", "0.5672362", "0.56658316", "0.5655897", "0.5634529", "0.5629665", "0.56036866", "0.5585221", "0.55822414", "0.55776596", "0.557074", "0.5568107", "0.5556181", "0.5554379", "0.55525154", "0.5531945", "0.5519102", "0.551676", "0.55130357", "0.55092317", "0.54950213", "0.5482465", "0.54771316", "0.54715025", "0.54572666", "0.54482174", "0.5437939", "0.54241097", "0.54233843", "0.5421038", "0.5420757", "0.541977", "0.5406558", "0.5405998", "0.5395665", "0.5387988", "0.5351825", "0.5345407", "0.5332995", "0.53181076", "0.53113866", "0.5306421", "0.5293959", "0.5291376", "0.528062", "0.5271213", "0.5262579", "0.5260797", "0.5260759", "0.5252823", "0.5251532", "0.5249857", "0.5225205", "0.52201515", "0.5213746", "0.5206634", "0.52031463", "0.5201961", "0.5199255", "0.5195544", "0.5190232", "0.5183947", "0.51684207", "0.5162927", "0.51623905", "0.5156013", "0.5146337", "0.51461923", "0.5144922", "0.5140024", "0.51397014", "0.5137736", "0.5132664", "0.5127708", "0.512496", "0.5123936", "0.5123247", "0.5122465", "0.51214755", "0.51188326", "0.5115476", "0.51148605", "0.51121587", "0.5103228" ]
0.57652396
14
1.Description: Stop job if the job is running 2.Biz Logic: 3.Author : LGCNS
@RequestMapping(value="/job/stopJob", produces = MediaType.APPLICATION_JSON_VALUE) public Map<String, Object> stopJob(@RequestBody Map<String, Object> paramMap) throws Exception { Map<String, Object> resultMap = new HashMap<String, Object>(); /** Check jobId, jobName from parameter **/ String jobName = paramMap.get("jobName") != null ? String.valueOf(paramMap.get("jobName")) : null; Long jobId = paramMap.get("jobId") != null ? Long.parseLong(String.valueOf(paramMap.get("jobId"))) : 0L; /** Check Input Parameter **/ if (NullUtil.isNull(jobName) || jobId <= 0) { resultMap = MessageUtil.getErrorMessage("There are no job Id or job Name in input parameter"); LOGGER.error("{}", resultMap); return resultMap; } /** Call job stop service **/ Map<String, Object> msgMap = jobControlSvi.stopJob(paramMap); resultMap.put(BaseConstants.DEFAULT_MESSAGE_NAME, msgMap); return resultMap; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void stop() {\n \t\t\tif (isJobRunning) cancel();\n \t\t}", "@Override\n public boolean onStopJob(JobParameters job) {\n return true;\n }", "@Override\n public boolean onStopJob(JobParameters params) {\n return false;\n }", "@Override\n public boolean onStopJob(JobParameters job) {\n if (mTasksData != null) {\n mTasksData.cancel(true);\n }\n return true;\n }", "@Override\n\tpublic boolean isJobRunning() {\n\t\treturn false;\n\t}", "boolean cancelJob(String jobId) throws Exception;", "@Override\n public boolean onStopJob(com.firebase.jobdispatcher.JobParameters job) {\n // If mBackgroundTask is valid, cancel it\n //Return true to signify the job should be retried\n if (mBackgroundTask != null) mBackgroundTask.cancel(true);\n return true;\n }", "@Override\n public boolean onStopJob(JobParameters job) {\n Log.d(LOG_TAG, \"Sync job stopped\");\n return true;\n }", "@Override\n public boolean onStopJob(JobParameters jobParameters) {\n Log.d(TAG, \"Job cancelled before being completed.\");\n jobCancelled = true;\n boolean needsReschedule = isWorking;\n jobFinished(jobParameters, needsReschedule);\n return needsReschedule;\n }", "public void stopWork() {\n stopWork = true;\n }", "public void stopWorkflow() {\n\t\tassert (status == WorkflowStatus.RUNNING || status == WorkflowStatus.PAUSED);\n\t\tsetStatus(WorkflowStatus.FINISHED);\n\t}", "public void stopDownloadJob(final DownloadJob downloadJob) {\n\t\tif (jobs != null) {\n\t\t\tString id = downloadJob.getJobId();\n\t\t\tfor (DownloadJob job : jobs) {\n\t\t\t\tif (id.equals(job.getJobId())) {\n\t\t\t\t\tjob.setStop(true);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "@Override\n protected void onStop() {\n stopService(new Intent(this, MyJobScheduler.class));\n super.onStop();\n }", "public final void stop() {\n running = false;\n \n \n\n }", "@Override\n public ReturnT<String> kill(String jobId) {\n JobThread jobThread = CcbJobExecutor.loadJobThread(jobId);\n if (jobThread != null) {\n \tCcbJobExecutor.removeJobThread(jobId, \"人工手动终止\");\n return ReturnT.SUCCESS;\n }\n\n return new ReturnT<String>(ReturnT.SUCCESS_CODE, \"job thread aleady killed.\");\n }", "boolean isDone(long number) throws NoSuchJobException;", "public void stop(){\n running = false;\n }", "public void Stop(){\r\n\t\trunning = false;\r\n\t\thelp.print(\"Closing server, waiting for workers to complete\");\r\n\t}", "public void stop()\n\t{\n\t\trunning = false;\n\t}", "public void terminateJob(STAXJob job)\n {\n\n TreeMap subJobs = (TreeMap)job.getData(\"subJobMap\");\n\n if (subJobs != null)\n {\n synchronized (subJobs)\n {\n subJobs.remove(String.valueOf(job.getJobNumber()));\n }\n }\n }", "public void finishJob(View v) {\n JobScheduler jobScheduler = (JobScheduler) getSystemService(Context.JOB_SCHEDULER_SERVICE);\n List<JobInfo> allPendingJobs = jobScheduler.getAllPendingJobs();\n if (allPendingJobs.size() > 0) {\n // Finish the last one\n int jobId = allPendingJobs.get(0).getId();\n jobScheduler.cancel(jobId);\n Toast.makeText(\n MainActivity.this, String.format(getString(R.string.cancelled_job), jobId),\n Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(\n MainActivity.this, getString(R.string.no_jobs_to_cancel),\n Toast.LENGTH_SHORT).show();\n }\n }", "Boolean closeJob(String id);", "public void stopIt() {\n UIMAFramework.getLogger(this.getClass()).logrb(Level.FINEST, this.getClass().getName(),\n \"process\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, \"UIMA_CPM_stop_cpm__FINEST\",\n new Object[] { Thread.currentThread().getName(), String.valueOf(killed) });\n\n dumpState();\n\n stopped = true;\n killed = true;\n if (!isRunning) {\n UIMAFramework.getLogger(this.getClass()).logrb(Level.FINEST, this.getClass().getName(),\n \"process\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, \"UIMA_CPM_already_stopped__FINEST\",\n new Object[] { Thread.currentThread().getName() });\n // Already stopped\n return;\n }\n // try {\n // Change global status\n isRunning = false;\n // terminate this thread if the thread has been previously suspended\n synchronized (lockForPause) {\n if (pause) {\n pause = false;\n lockForPause.notifyAll();\n }\n }\n // Let processing threads finish their work by emptying all queues. Even during a hard\n // stop we should try to clean things up as best as we can. First empty process queue or work\n // queue, dump result of analysis into output queue and let the consumers process that.\n // When all queues are empty we are done.\n\n // The logic below (now commented out) has a race condition -\n // The workQueue / outputQueue can become (temporarily) empty, but then\n // can be filled with the eof token\n // But this code proceeds to stop all the CAS processors,\n // which results in a hang because the pool isn't empty and the process thread waits for\n // an available cas processor forever.\n\n // Fix is to not kill the cas processors. Just let them finish normally. The artifact producer\n // will stop sending new CASes and send through an eof token, which causes normal shutdown to\n // occur for all the threads.\n\n /*\n * if (workQueue != null) { if (UIMAFramework.getLogger().isLoggable(Level.FINEST)) {\n * UIMAFramework.getLogger(this.getClass()).logrb( Level.FINEST, this.getClass().getName(),\n * \"process\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, \"UIMA_CPM_consuming_queue__FINEST\", new Object[]\n * { Thread.currentThread().getName(), workQueue.getName(),\n * String.valueOf(workQueue.getCurrentSize()) });\n * \n * } int cc = workQueue.getCurrentSize(); while (workQueue.getCurrentSize() > 0) {\n * sleep(MAX_WAIT_ON_QUEUE); if (System.getProperty(\"DEBUG\") != null) { if (cc <\n * workQueue.getCurrentSize()) { if (UIMAFramework.getLogger().isLoggable(Level.FINEST)) {\n * UIMAFramework.getLogger(this.getClass()).logrb( Level.FINEST, this.getClass().getName(),\n * \"process\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, \"UIMA_CPM_wait_consuming_queue__FINEST\", new\n * Object[] { Thread.currentThread().getName(), workQueue.getName(),\n * String.valueOf(workQueue.getCurrentSize()) });\n * \n * } cc = workQueue.getCurrentSize(); } } } } if (outputQueue != null) { while\n * (outputQueue.getCurrentSize() > 0) { sleep(MAX_WAIT_ON_QUEUE); if\n * (UIMAFramework.getLogger().isLoggable(Level.FINEST)) {\n * UIMAFramework.getLogger(this.getClass()).logrb( Level.FINEST, this.getClass().getName(),\n * \"process\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, \"UIMA_CPM_wait_consuming_queue__FINEST\", new\n * Object[] { Thread.currentThread().getName(), outputQueue.getName(),\n * String.valueOf(outputQueue.getCurrentSize()) }); } } if\n * (UIMAFramework.getLogger().isLoggable(Level.FINEST)) {\n * UIMAFramework.getLogger(this.getClass()).logrb(Level.FINEST, this.getClass().getName(),\n * \"process\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, \"UIMA_CPM_done_consuming_queue__FINEST\", new\n * Object[] { Thread.currentThread().getName() }); } }\n * \n * for (int i = 0; processingUnits != null && i < processingUnits.length && processingUnits[i]\n * != null; i++) { if (UIMAFramework.getLogger().isLoggable(Level.FINEST)) {\n * UIMAFramework.getLogger(this.getClass()).logrb(Level.FINEST, this.getClass().getName(),\n * \"process\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE, \"UIMA_CPM_stop_processors__FINEST\", new Object[]\n * { Thread.currentThread().getName(), String.valueOf(i) }); }\n * processingUnits[i].stopCasProcessors(false); }\n * \n * } catch (Exception e) { if (UIMAFramework.getLogger().isLoggable(Level.FINER)) {\n * e.printStackTrace(); } UIMAFramework.getLogger(this.getClass()).logrb(Level.FINER,\n * this.getClass().getName(), \"process\", CPMUtils.CPM_LOG_RESOURCE_BUNDLE,\n * \"UIMA_CPM_exception__FINER\", new Object[] { Thread.currentThread().getName(), e.getMessage()\n * }); }\n */\n }", "@Override\n protected void onStop() {\n stopService(new Intent(this, MyJobService.class));\n super.onStop();\n }", "public void stop() {\n _running = false;\n }", "public boolean stop();", "void cancel()\n {\n cancelled = true;\n subjobComplete = true;\n result = null;\n }", "boolean hasJobId();", "public void stop(){\n\t\t\n\t}", "public void stop()\n {\n running = false;\n }", "public void stop() {\r\n running = false;\r\n }", "public boolean isJob() {\n return false;\n }", "public void stop() {\n\t\t\n\t}", "private void stop(final Resource resource, final String state) throws PersistenceException {\n final ModifiableValueMap properties = resource.adaptTo(ModifiableValueMap.class);\n final String jobName = properties.get(KEY_JOB_NAME, String.class);\n\n log.debug(\"Stopping job [ {} ]\", jobName);\n\n if (StringUtils.isNotBlank(jobName)) {\n scheduler.removeJob(jobName);\n jobs.remove(resource.getPath());\n\n log.info(\"Bulk Workflow Manager stopped for [ {} ]\", jobName);\n\n properties.put(KEY_STATE, state);\n properties.put(KEY_STOPPED_AT, Calendar.getInstance());\n\n resource.getResourceResolver().commit();\n } else {\n log.error(\"Trying to stop a job without a name from Bulk Workflow Manager resource [ {} ]\",\n resource.getPath());\n }\n }", "public synchronized void cancel() {\n this.executionState = JobExecutionState.CANCELLED;\n this.finished = Instant.now();\n }", "private void stop()\n {\n if(running)\n {\n scheduledExecutorService.shutdownNow();\n running = false;\n }\n }", "public void stop() {\n if (this.runningTaskId != -1) {\n plugin.getServer().getScheduler().cancelTask(this.runningTaskId);\n }\n reset(true);\n running = false;\n }", "public void cancelJob(ConversionJob tjob){\n\t\tjobscheduler.cancelJob(tjob);\n\t\t//jlog.info(\"Cancel Job \"+tjob.getFullName());\n\t}", "public void stopRunning() {\n try {\n _running = false;\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void stop() {}", "public boolean killJob(Job job) {\n\t\tProcess process = jobProcesses.get(job);\n\t\tif (process == null) { \n\t\t\tlogger.info(\"Attempt to kill unknown job (already finished?): \"\n\t\t\t\t+ job);\n\t\t\treturn true;\n\t\t}\n\t\ttry {\n\t\t\tprocess.exitValue();\n\t\t\tlogger.info(\"Didn't kill already finished job \" + job);\n\t\t\tjobProcesses.remove(job);\n\t\t\treturn true;\n\t\t} catch (IllegalThreadStateException ex) {\n\t\t\tlogger.debug(\"Attempting to kill \" + job);\n\t\t\tprocess.destroy();\n\t\t}\n\t\t\n\t\t// Did it die?\n\t\ttry {\n\t\t\tlogger.info(\"Killed \" + job);\n\t\t\tprocess.exitValue();\n\t\t\tjobProcesses.remove(job);\n\t\t\treturn true;\n\t\t} catch (IllegalThreadStateException ex) {\n\t\t\tlogger.warn(\"Could not kill job \" + job);\n\t\t\treturn false;\n\t\t}\n\t}", "@Override\n protected void onStop() {\n stopService(new Intent(this, JobSchedulerService.class));\n super.onStop();\n }", "public void stop() {\n running = false;\n }", "private static void stopTimedJobs() throws SchedulerException {\n\t\tSchedulerFactory schedFact = new org.quartz.impl.StdSchedulerFactory();\n\t\tschedFact.getScheduler().shutdown(false);\n\t}", "public void stopTask() {\r\n\t\tquit = true;\r\n\t}", "@Override\n\tpublic void stop() {\n\t\tstopTask();\n\t\tmPlaybillPath = null;\n\t\tmResPlaybill = null;\n\t}", "public void stop()\n {\n if (task == -1) {\n return;\n }\n\n library.getPlugin().getServer().getScheduler().cancelTask(task);\n task = -1;\n }", "public void stop() {\n\t}", "boolean shouldStop();", "public void terminate(){\n running = false;\n }", "boolean isStop();", "public synchronized void stop() {\n this.running = false;\n }", "public void stop(){\n }", "void stop()\n {\n log.info(\"Begin stop(), instance = '\" + instance + \"'\");\n\n if (isAlive())\n {\n processor.stop();\n try { t.join(); } catch (InterruptedException e) {}\n running = false;\n }\n\n log.info(\"End stop(), instance = '\" + instance + \"'\");\n }", "public void stop() {\n }", "public void stop() {\n }", "public void stop() {\n\t\tthis.flag = false;\n\t\t\n\t\t\n\t}", "public void stop()\n {\n }", "public synchronized void stop(){\n\t\tthis.running = false;\n\t\ttry {\n\t\t\tthis.thread.join();\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public synchronized boolean cancelJob(String jobId) {\n if (jobId == null) {\n return false;\n }\n\n // We don't have access to BatchProcessor's executer service,\n // so the only way to cancel is stop giving new work packages\n BatchJobParameters job = runningJobs.get(jobId);\n Pair<WorkProviders.CancellableWorkProvider, Workers.CancellableWorker> pair = runningWorkProviders.get(jobId);\n if (pair != null) {\n boolean workProviderCanceled = pair.getFirst().cancel();\n boolean workerCanceled = pair.getSecond().cancel();\n boolean canceled = workProviderCanceled || workerCanceled; // either cancellation is a change\n if (canceled && job != null) {\n job.setStatus(BatchJobParameters.Status.CANCELED);\n }\n return canceled;\n }\n return false;\n }", "@Override\r\n\tpublic void stop() {\n\t\t\r\n\t}", "public void stop(){\n return;\n }", "public boolean isStopped();", "public void stop() {\n if (!sequencer.tryAcquire())\n throw new IllegalStateException(\"Can't acquire lock\");\n int errcount = 0;\n final StringBuilder b = new StringBuilder();\n\n try {\n switchState(STOPPED,\"stop\");\n\n errcount += cancelSessionTasks(b);\n errcount += stopDirectoryScanners(b);\n } finally {\n sequencer.release();\n }\n\n sendQueuedNotifications();\n if (errcount > 0) {\n b.insert(0,\"stop partially failed with \"+errcount+\" error(s):\");\n throw new RuntimeException(b.toString());\n }\n }", "public void stopping();", "public final boolean stopTask(final String taskName) throws ValetSchedulerException {\n\n\t\ttry {\n\t\t\treturn removeJob(taskName);\n\t\t} catch (SchedulerException e) {\n\t\t\tString errorMsg = Language.getFormatResQuartzGeneral(IQuartzGeneralMessages.LOGMQ03, new Object[ ] { taskName, getSchedulerGroup() });\n\t\t\tthrow new ValetSchedulerException(IValetException.COD_184, errorMsg, e);\n\t\t}\n\n\t}", "public synchronized void stop() {\n isRunning = false;\n try {\n thread.join();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "@Override\n\t\tpublic void stop() {\n\t\t\t// Nothing to do for now\n\t\t}", "public synchronized void stopScheduler() {\r\n\t\tstatus = false;\r\n\t\tstart = null;\r\n\t\tif (t != null) {\r\n\t\t\tt.cancel();\r\n\t\t\tt.purge();\r\n\t\t\tt = null;\r\n\t\t}\r\n\t\tstartDate = null;\r\n\t\tsuper.interrupt();\r\n\t}", "@Override\n\tpublic void stop()\n\t\t{\n\t\t}", "public void stop()\r\n\t{\r\n\t\tdoStop = true;\r\n\t}", "public void stopJob(Job job) throws IOException {\n\t\tCore.stopJob(job, getHttpMethodExecutor());\n\n\t}", "public final void stopRunning() {\n\t\t_running = false;\n\t}", "public void stop(){\n quit = true;\n }", "@Override\n\tpublic void stop() {\n\t\t\n\t}", "@Override\n\tpublic void stop() {\n\t\t\n\t}", "@Override\n\tpublic void stop() {\n\t\t\n\t}", "@Override\n\tpublic void stop() {\n\t\t\n\t}", "@Override\n\tpublic void stop() {\n\t\t\n\t}", "@Override\n\tpublic void stop() {\n\t\t\n\t}", "@Override\n\tpublic void stop() {\n\t\t\n\t}", "@Override\n\tpublic void stop() {\n\t\t\n\t}", "void stop(ExecutionContext context) throws ExecutorException;", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void closeJobHiring(String jobID, String email)\n {\n appList= JobSystemCoordinator.appManager.getPendingApplications(jobID);\n currentJob = getJobAtIndex(jobID);\n for(Application app : appList) {\n app.setStatus(\"Post no longer available!\");\n }\n currentJob.setStatus(\"FILLED\");\n String success = String.format(\"============CLOSING A JOB SUCCESS==============\\n\" +\n \"Job ID: %s\\n\" +\n \"Hired Candidates: %s\\n\", currentJob.getJobID(), email);\n System.out.println(success);\n }", "public void stop(){\n stop = true;\n }" ]
[ "0.78315914", "0.7397729", "0.7269999", "0.7071115", "0.6904629", "0.6867225", "0.67703974", "0.67323387", "0.66354024", "0.6432146", "0.6429245", "0.6345587", "0.63280696", "0.6310462", "0.62779903", "0.6275741", "0.6210583", "0.62019074", "0.61981875", "0.6178286", "0.616355", "0.61628467", "0.615296", "0.6144978", "0.6144525", "0.61384606", "0.6133603", "0.6123065", "0.6122771", "0.6092032", "0.60740054", "0.6063491", "0.60622185", "0.6052027", "0.6046238", "0.60395646", "0.60375595", "0.60259783", "0.6023063", "0.6019608", "0.6014466", "0.60088605", "0.6007446", "0.6004793", "0.59971195", "0.5994149", "0.599238", "0.5989649", "0.59892076", "0.5978137", "0.59643096", "0.5963528", "0.5951989", "0.5951281", "0.5941448", "0.5941448", "0.593777", "0.59310365", "0.5910781", "0.58968544", "0.5894092", "0.5876911", "0.5876653", "0.5862617", "0.58583385", "0.58518404", "0.58507836", "0.585064", "0.584872", "0.58285016", "0.58253175", "0.5822532", "0.581841", "0.581635", "0.5816234", "0.5816234", "0.5816234", "0.5816234", "0.5816234", "0.5816234", "0.5816234", "0.5816234", "0.5813714", "0.5808566", "0.5808566", "0.5808566", "0.5808566", "0.5808566", "0.5808566", "0.5808566", "0.5808566", "0.5808566", "0.5808566", "0.5808566", "0.5808566", "0.5808566", "0.5808566", "0.5808566", "0.5793475", "0.57819885" ]
0.607522
30
1.Description: Abandon job 2.Biz Logic: 3.Author : LGCNS
@RequestMapping(value="/job/abandonJob", produces = MediaType.APPLICATION_JSON_VALUE) public Map<String, Object> abandonJob(@RequestBody Map<String, Object> paramMap) throws Exception { Map<String, Object> resultMap = new HashMap<String, Object>(); Map<String, Object> msgMap = null; /** Check jobId, jobName from parameter **/ String jobName = paramMap.get("jobName") != null ? String.valueOf(paramMap.get("jobName")) : null; Long jobId = paramMap.get("jobId") != null ? Long.parseLong(String.valueOf(paramMap.get("jobId"))) : 0L; /** Check Input Parameter **/ if (NullUtil.isNull(jobName) || jobId <= 0) { msgMap = MessageUtil.getErrorMessage("There are no job Id or job Name in input parameter"); LOGGER.error("{}", resultMap); resultMap.put(BaseConstants.DEFAULT_MESSAGE_NAME, msgMap); return resultMap; } /** Call job abandon service **/ msgMap = jobControlSvi.abendonJob(paramMap); resultMap.put(BaseConstants.DEFAULT_MESSAGE_NAME, msgMap); return resultMap; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public synchronized void cancel() {\n this.executionState = JobExecutionState.CANCELLED;\n this.finished = Instant.now();\n }", "void cancel()\n {\n cancelled = true;\n subjobComplete = true;\n result = null;\n }", "boolean cancelJob(String jobId) throws Exception;", "void cancelProduction();", "@Override\n\tpublic void abortWorkItem(WorkItem arg0, WorkItemManager arg1) {\n\t}", "public void cancel()\n\t{\n\t}", "public void cancel();", "public void cancel() {\n\t}", "@Override\n\t\t\t\t\t\t\t\t\tpublic void cancel() {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}", "public void cancel();", "public void cancel();", "public void cancel();", "public void cancel();", "public void cancel();", "public void cancel();", "@objid (\"26d79ec6-186f-11e2-bc4e-002564c97630\")\n @Override\n public void performCancel() {\n }", "@Override\n\t\tpublic void cancel() {\n\t\t\t\n\t\t}", "@Override\r\n\tpublic void cancel() {\n\t\t\r\n\t}", "public void abortWorkItem(WorkItem workItem, WorkItemManager manager) {\n\n }", "void cancel();", "void cancel();", "void cancel();", "void cancel();", "void cancel();", "@Override\n public void cancel() {\n\n }", "@Override\n public void cancel() {\n\n }", "@Override\n public void cancel() {\n\n }", "@Override\n public void cancel() {\n\n }", "@Override\n\t\t\t\t\t\tpublic void cancel() {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}", "@Override\n public void cancel() {\n\n }", "void cancel(long inId);", "@Override\n\tpublic void cancel() {\n\t\t\n\t}", "public void abortWorkItem(WorkItem workItem, WorkItemManager manager) {\n }", "private void doBack() {\n\t\tif (!haveTaskRunning) {\r\n\t\t\tfinish();\r\n\t\t} else if (mStep == READ_BAGLOACK) { // 读袋锁阶段,初始化信息,启用码\r\n\t\t\tmVReadBagLock.setDoing(false);\r\n\t\t\tmBagInItTask.stop();\r\n\t\t\tmBtnConfirm.setEnabled(true);\r\n\t\t\thaveTaskRunning = false;\r\n\t\t} else if (mStep == READ_UHF) { // 读TID\r\n\t\t\tmVReadUhfLock.setDoing(false);\r\n\t\t\tmReadInitEPCTask.stop();\r\n\t\t\tmBtnConfirm.setEnabled(true);\r\n\t\t\tmStep = READ_BAGLOACK;\r\n\t\t\thaveTaskRunning = false;\r\n\t\t} else if (mStep == NET_CHECK ) { \r\n\t\t\tmBtnConfirm.setEnabled(true);\r\n\t\t\tmVNetCheck.setDoing(false);\r\n\t\t\tmBtnConfirm.setEnabled(true);\r\n\t\t\thaveTaskRunning = false;\r\n\t\t\t//更新袋锁,索引,条码,封签信息,标志位\r\n\t\t} else if (mStep == UPDATE_BAGLOCK) { // \r\n\t\t\tmVUpdateBagLock.setDoing(false);\r\n\t\t\tmWriteRfidTask.stop();\r\n\t\t\thaveTaskRunning = false;\r\n\t\t// 将条码等数据发送到服务器验证,是否已经封签过\r\n\t\t} \r\n\t}", "@Override\n\tpublic void cancel() {\n\n\t}", "@Override\n\tpublic void cancel() {\n\n\t}", "@Override\n\tpublic void cancel() {\n\n\t}", "public Boolean shouldAbandon() {\n return false;\n }", "@Override\r\n public void cancelMsg() {\n System.out.println(\"Transaction has been cancelled for gas pump #1..\");\r\n }", "public void cancelJob(ConversionJob tjob){\n\t\tjobscheduler.cancelJob(tjob);\n\t\t//jlog.info(\"Cancel Job \"+tjob.getFullName());\n\t}", "public void abortWorkItem(WorkItem workItem, WorkItemManager manager) {\n\t}", "public void cancel( String reason );", "public boolean cancel();", "private void cancel() {\n\t\tfinish();\n\t}", "@Override\n public void cancel() {\n }", "@Override\n\tpublic void cancelTransaction() {\n\t\t\n\t}", "public abstract boolean cancel();", "@Override\n\t\t\tpublic void cancel() {\n\t\t\t\tSystem.exit(0);\n\t\t\t}", "public void m33491b() {\n Action<String> aVar = f26278b;\n if (aVar != null) {\n aVar.mo21403a(\"User canceled.\");\n }\n f26277a = null;\n f26278b = null;\n finish();\n }", "public synchronized void cancel() {\n }", "public void finishJob(View v) {\n JobScheduler jobScheduler = (JobScheduler) getSystemService(Context.JOB_SCHEDULER_SERVICE);\n List<JobInfo> allPendingJobs = jobScheduler.getAllPendingJobs();\n if (allPendingJobs.size() > 0) {\n // Finish the last one\n int jobId = allPendingJobs.get(0).getId();\n jobScheduler.cancel(jobId);\n Toast.makeText(\n MainActivity.this, String.format(getString(R.string.cancelled_job), jobId),\n Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(\n MainActivity.this, getString(R.string.no_jobs_to_cancel),\n Toast.LENGTH_SHORT).show();\n }\n }", "public void cancelReport() {\n }", "private void handleActionBaz() {\n Notifier.cancelTimer(this);\n }", "public void cancel(){\n cancelled = true;\n }", "public void stop() {\n \t\t\tif (isJobRunning) cancel();\n \t\t}", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-09-06 12:50:58.284 -0400\", hash_original_method = \"7522AD53308CD10F1544E38D1EB762CF\", hash_generated_method = \"CE79928AEF3A763B2BF787801BBC2702\")\n \npublic void cancel() {\n final int state = getInfo().getState();\n if (state == PrintJobInfo.STATE_QUEUED\n || state == PrintJobInfo.STATE_STARTED\n || state == PrintJobInfo.STATE_BLOCKED\n || state == PrintJobInfo.STATE_FAILED) {\n mPrintManager.cancelPrintJob(mCachedInfo.getId());\n }\n }", "@Override\n public void abort() { \n abortFlag = true ;\n }", "@Override\n\tpublic void stateMachineAbort() {\n\n\t}", "@Override\n\tpublic void stateMachineAbort() {\n\n\t}", "@Override\n\tpublic void stateMachineAbort() {\n\n\t}", "@Override\n\tpublic void stateMachineAbort() {\n\n\t}", "@Action\n public void acCancel() {\n setChangeObj(false);\n }", "@Action\n public void acCancel() {\n setChangeObj(false);\n }", "public void cancelMethod1(){\n return;\n\n }", "@Override\n public boolean onStopJob(JobParameters params) {\n return false;\n }", "public void abortWorkItem(WorkItem workItem, WorkItemManager manager) {\n }", "public void cancelRebill(String rebillID){\n\t\tTRANSACTION_TYPE = \"SET\";\n\t\tREBILL_STATUS = \"stopped\";\n\t\tREBILL_ID = rebillID;\n\t\tAPI = \"bp20rebadmin\";\n\t}", "private void cancel() {\n recoTransaction.cancel();\n }", "@Override\r\n public void abortJob(JobContext context, int runState) \r\n throws IOException {\n cleanupJob(context);\r\n }", "public void cancelInvitionUser() {\n\n }", "@Override\n public ReturnT<String> kill(String jobId) {\n JobThread jobThread = CcbJobExecutor.loadJobThread(jobId);\n if (jobThread != null) {\n \tCcbJobExecutor.removeJobThread(jobId, \"人工手动终止\");\n return ReturnT.SUCCESS;\n }\n\n return new ReturnT<String>(ReturnT.SUCCESS_CODE, \"job thread aleady killed.\");\n }", "@Override\n public void cancel() {\n }", "public void cancel() {\r\n\t\tcanceled = true;\r\n\t\ttry {\r\n\t\t\tThread.sleep(51);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void cancel() {\n\t\tcancelled = true;\n\t}", "public void cancelExecution() {\n \n \t\tcancelOrKillExecution(true);\n \t}", "@Override\n\tpublic void stateMachineAbort() {\n\t}", "public void cancel() {\r\n\t\tbStop = true;\r\n\t}", "@Override\n public boolean onStopJob(JobParameters job) {\n if (mTasksData != null) {\n mTasksData.cancel(true);\n }\n return true;\n }", "public void cancel() {\r\n\t\tthis.cancel = true;\r\n\t}", "public void closeJobHiring(String jobID, String email)\n {\n appList= JobSystemCoordinator.appManager.getPendingApplications(jobID);\n currentJob = getJobAtIndex(jobID);\n for(Application app : appList) {\n app.setStatus(\"Post no longer available!\");\n }\n currentJob.setStatus(\"FILLED\");\n String success = String.format(\"============CLOSING A JOB SUCCESS==============\\n\" +\n \"Job ID: %s\\n\" +\n \"Hired Candidates: %s\\n\", currentJob.getJobID(), email);\n System.out.println(success);\n }", "@Override\n\tpublic void doAbortTask(String batchName, String username) throws PladipusReportableException {\n\t\tClientToControlMessage msg = new ClientToControlMessage(ClientTask.ABORT);\n\t\tmsg.setBatchName(batchName);\n\t\tmakeRequest(msg, username);\n\t\tcmdLineIO.printOutput(MessageFormat.format(cmdLine.getString(\"abort.success\"), (batchName != null && !batchName.isEmpty()) ? batchName : \"all\"));\n\t}", "@Test(timeout=10000)\n public void testCancelJob() throws Exception {\n CommonClientTests.testCancelJob(client);\n }", "public void cancelAllJobs(View v) {\n JobScheduler tm = (JobScheduler) getSystemService(Context.JOB_SCHEDULER_SERVICE);\n tm.cancelAll();\n Toast.makeText(MainActivity.this, R.string.all_jobs_cancelled, Toast.LENGTH_SHORT).show();\n }", "public void cancel() {\n\t\tcancel(false);\n\t}", "public void cancel() throws SQLException {\n\r\n }", "@Override\n\tpublic void canceled() {\n\t\t\n\t}", "@Override\n\tpublic void canceled() {\n\t\t\n\t}", "@Test\n public void cancelTicket() {\n Ticket ticket = givenTicketInOrderedBilled();\n\n // when\n boolean activateTicket = ticket.cancelTicket();\n\n // then\n assertTrue(activateTicket);\n assertTicketInState(ticket, TicketStateType.TICKET_CANCELLED, TransactionStateType.TRANSACTION_BILLED, 6);\n }", "private void cancelLaunchClientJob() {\n if (launchClientJob != null) {\n return;\n }\n\n launchClientJob = findLaunchClientJob();\n\n if (launchClientJob != null) {\n launchClientJob.cancel();\n }\n }", "private void deletejob() {\n\t\tjob.delete(new UpdateListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void done(BmobException e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif (e==null) {\n\t\t\t\t\ttoast(\"删除成功\");\n\t\t\t\t\tUpdateJobActivity.this.finish();\n\t\t\t\t} else {\n\t\t\t\t\ttoast(\"错误:\"+e.getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "public void cancel() {\n btCancel().push();\n }", "public void abandonProject(ProjectWasAbandoned evt)throws InvalidProjectCommandException{\n validator.validate(this);\n this.closedDate = Optional.of(new Date());\n state = ProjectState.ABANDONED;\n UpdateProperties(evt.getProperties());\n ArrayList<Event> events = new ArrayList<Event>();\n events.add(new ProjectWasCompleted(this, evt.getProperties()));\n }", "public void abort() {\n isAborted = true;\n cancelCommands();\n cancel(true);\n }", "void completeJob();", "public void mo42332a() {\n this.f36204P.cancel();\n mo42330e();\n }", "void markAbandoned();", "public void cancelOperation() {\n\n System.out.println(\"Sorry, a problem occurred, deposit money operation is unsuccessful\");\n System.out.println(\"Current information : \");\n while (!storage.isEmpty()) {\n Command command = storage.pop();\n command.undo();\n }\n }", "public String callEndWork(String userName, String isSucess);", "private void jCancelBookingActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jCancelBookingActionPerformed\n if(bookingNr != -1)\n bm.cancel(bookingNr);\n \n \n }", "@Override\n public boolean onStopJob(com.firebase.jobdispatcher.JobParameters job) {\n // If mBackgroundTask is valid, cancel it\n //Return true to signify the job should be retried\n if (mBackgroundTask != null) mBackgroundTask.cancel(true);\n return true;\n }" ]
[ "0.67740107", "0.6761903", "0.6590383", "0.6587997", "0.64780086", "0.6428614", "0.6423359", "0.6361917", "0.635972", "0.6335554", "0.6335554", "0.6335554", "0.6335554", "0.6335554", "0.6335554", "0.63347656", "0.6332719", "0.62964207", "0.6280135", "0.6266157", "0.6266157", "0.6266157", "0.6266157", "0.6266157", "0.62295175", "0.6218107", "0.6218107", "0.6218107", "0.6207711", "0.6205822", "0.62028503", "0.6193572", "0.61830723", "0.61744714", "0.6170394", "0.6170394", "0.6170394", "0.61649084", "0.6163776", "0.61521626", "0.614751", "0.613171", "0.6121869", "0.61192775", "0.6118986", "0.6116773", "0.61056334", "0.6078324", "0.60779023", "0.60752267", "0.6070428", "0.60697794", "0.60637146", "0.6060642", "0.60592717", "0.6031994", "0.60281605", "0.60271317", "0.60271317", "0.60271317", "0.60271317", "0.6018009", "0.6018009", "0.60167795", "0.60043144", "0.6000218", "0.59960103", "0.59938115", "0.59919286", "0.598738", "0.5972857", "0.5952556", "0.5933243", "0.5928588", "0.5906426", "0.5899925", "0.5894406", "0.5886256", "0.588363", "0.5883339", "0.58679444", "0.5866477", "0.58534074", "0.58479315", "0.5828299", "0.5825679", "0.5825679", "0.58147526", "0.58122504", "0.580974", "0.57912844", "0.5786424", "0.5776673", "0.5776217", "0.57648087", "0.57600194", "0.5756296", "0.5755782", "0.57538724", "0.5736067" ]
0.63493806
9
build WalManager for lsmEngine
public LSMEngineBuilder<T> buildWalManager(WALManager walManager) { lsmEngine.setWalManager(walManager); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public LSMEngineBuilder<T> buildLSMManagers(String packageName, WALManager walManager) {\n try {\n ApplicationContext property =\n ApplicationContextGenerator.GeneratePropertyWithAnnotation(packageName);\n buildLSMManagers(property, walManager);\n } catch (Exception e) {\n logger.error(e.getMessage());\n }\n return this;\n }", "public WandManager() {\n\t\tBukkit.getPluginManager().registerEvents(new WandListener(),\n\t\t\t\tSH.getPlugin());\n\t}", "public CheckEngineLightBuilder() {\r\n checkEngineLight = new CheckEngineLight();\r\n }", "public LSMEngine<T> build() {\n return lsmEngine;\n }", "public LSMEngineBuilder<T> buildLSMManagers(\n ApplicationContext applicationContext, WALManager walManager) {\n try {\n buildWalManager(walManager).buildLevelProcessors(applicationContext).buildRecoverManager();\n } catch (Exception e) {\n logger.error(e.getMessage());\n }\n return this;\n }", "Lighter build();", "Builder(HaloNetworkApi api) {\n mRequestBuilder = HaloRequest.builder(api);\n mClient = api.client();\n }", "private void initialiseByHand() {\n Configuration production = new Configuration(\"api.example.com\", false, 2000);\n Configuration staging = new Configuration(\"api-staging.example.com\", false, 2000);\n Configuration debug = new Configuration(\"api-dev.example.com\", true, 1000);\n Map<String, Configuration> baseVariants = new HashMap<>();\n baseVariants.put(PRODUCTION, production);\n baseVariants.put(STAGING, staging);\n baseVariants.put(DEBUG, debug);\n Neanderthal.initialise(this, baseVariants, PRODUCTION);\n }", "public LSystemBuilderImpl() {\n\t\tthis.commands = new Dictionary();\n\t\tthis.productions = new Dictionary();\n\t\tunitLength = 0.1;\n\t\tunitLengthDegreeScaler = 1;\n\t\torigin = new Vector2D(0, 0);\n\t\tangle = 0;\n\t\taxiom = \"\";\n\t}", "public BlueMeshService build(){\n BlueMeshService bms = new BlueMeshService();\n \n bms.setUUID(uuid);\n bms.setDeviceId(deviceId);\n bms.enableBluetooth(bluetoothEnabled);\n bms.setup();\n \n return bms;\n }", "private void createFrameworkManipulator() {\n \t\tFrameworkAdmin admin = getFrameworkAdmin();\n \t\tif (admin == null)\n \t\t\tthrow new RuntimeException(\"Framework admin service not found\"); //$NON-NLS-1$\n \t\tmanipulator = admin.getManipulator();\n \t\tif (manipulator == null)\n \t\t\tthrow new RuntimeException(\"Framework manipulator not found\"); //$NON-NLS-1$\n \t}", "private void build()\n\t{\n\t\tengine.addSystem(new InputSystem());\n\t\tengine.addSystem(new MovementSystem());\n\t\t\n\t}", "@Override\n\tpublic LSystem build() {\n\t\t\n\t\t/**\n\t\t * Nested class which implements the LSystem and provides two essential methods\n\t\t * for building the LSystem: draw and generate.\n\t\t * @author Alen Carin\n\t\t *\n\t\t */\n\t\tclass LSystemImpl implements LSystem {\n\n\t\t\t/**\n\t\t\t * Method used for drawing the Lyndermayer system.\n\t\t\t * Calls method generate to generate all of the productions and \n\t\t\t * executes all the commands that are in the generated string.\n\t\t\t */\n\t\t\t@Override\n\t\t\tpublic void draw(int depth, Painter painter) {\n\t\t\t\tTurtleState state = new TurtleState(\n\t\t\t\t\t\torigin.copy(), \n\t\t\t\t\t\tnew Vector2D(1, 0).rotated(angle), \n\t\t\t\t\t\tColor.BLACK,\n\t\t\t\t\t\tunitLength * Math.pow(unitLengthDegreeScaler, depth)\n\t\t\t\t\t\t);\n\t\t\t\tContext context = new Context();\n\t\t\t\tcontext.pushState(state);\n\t\t\t\tchar[] sequence = generate(depth).toCharArray();\n\t\t\t\t\n\t\t\t\texecuteAllCommands(context, painter, sequence);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Recursive method which generates a string of actions \n\t\t\t * which are generated from productions for the given depth.\n\t\t\t */\n\t\t\t@Override\n\t\t\tpublic String generate(int depth) {\n\t\t\t\tStringBuilder builder = new StringBuilder();\n\t\t\t\tif(depth == 0) {\n\t\t\t\t\treturn axiom;\n\t\t\t\t}\n\t\t\t\tbuilder.append(generate(depth-1));\n\t\t\t\t\n\t\t\t\tchar[] array = builder.toString().toCharArray();\n\t\t\t\tString result = new String();\n\t\t\t\tfor(int i = 0; i < array.length; i++) {\n\t\t\t\t\tString production = (String) productions.get(array[i]);\n\t\t\t\t\tif(production != null) {\n\t\t\t\t\t\tresult += production;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tresult += array[i];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn new LSystemImpl();\n\t}", "ImplementationManager createManager();", "public GameManager() {\n\t\tobjects.add(new Player(4, 4, ComponentManager.getComponent(ComponentManager.ComponentType.AABB), ProjectileManager.ProjectileType.Bullet, ComponentManager.ComponentType.AABB));\n\t\t\n\t\n\t\t\n\t\tobjects.add(new Platform(new AABBComponent()));\n\t\t\n\t\tloadLevel(\"/levelImage2_0.png\");\n\t\t\n\t\t//мусор\n\t\t\n\t\t//p1 = null;\n\t\t\n\t\t\n\t\tPBParticle p1 = null;\n\t\tPBParticle p2 = null;\n\t\t\n\t\tPLink l1 = null;\n\t\t\n\t\tnumOfPart = 48;\n\t\t\n\t\tint colNum = numOfPart / 3;\n\t\t\n\t\t\n\t\tfor(int i = 0; i < numOfPart; i ++)\n\t\t{\n\t\t\t\n\t\t\t\n\t\t\tp2 = p1; \n\t\t\t\n\t\t\tp1 = new PBParticle( (float)((4 + i % colNum) * TS),(float) ((4 + i / colNum) * TS), (float)(Math.random()*5), (float)(Math.random()*5), 1, new CircleComponent());\n\t\t\t\n\t\t\t\n\t\t\t//связи диагональ левый верхний - правый нижний\n\t\t\t/*if(i / colNum > 0 && i % colNum < colNum - 1)//не первая строка и не последняя чатсица в строке\n\t\t\t{\n\t\t\t\tl1 = new PLink(p1, (PBParticle)objects.get(objects.size() - colNum + 1), 20, this.stiffness);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tsdlinks.add(l1);\n\t\t\t}\n\t\t\t\n\t\t\t//связи диагональ правый верхний - левый нижний\n\t\t\t\n\t\t\tif(i / colNum > 0 && i % colNum > 0) \n\t\t\t{\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tl1 = new PLink(p1, (PBParticle)objects.get(objects.size() - colNum - 1), 20, this.stiffness);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tmdlinks.add(l1);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//горизонтальные связи\n\t\t\t\n\t\t\t//первая итерация для создания связи не подходит\n\t\t\t\n\t\t\t//также для создания горизонтальной связи не подходит итерация\n\t\t\t//когда p1 на новой строке, а p2 а старой\n\t\t\t\n\t\t\t\n\t\t\tif(p2 != null && (p1.getPosY() - p2.getPosY()) == 0)\n\t\t\t{\n\t\t\t\tl1 = new PLink(p1, p2, 20, this.stiffness);\n\t\t\t\t\n\t\t\t\thlinks.add(l1);\n\t\t\t}\n\t\t\t\n\t\t\t//вертикальные связи\n\t\t\t\n\t\t\t//проверить не ноль ли при делении i на количество столбцов\n\t\t\t//если не ноль то я должен выбрать из массива ссылок элемент \n\t\t\t//порядковый номер которого \n\t\t\tif(i / colNum != 0) //не первая строка\n\t\t\t{\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tl1 = new PLink(p1, (PBParticle)objects.get(objects.size() - colNum ), 20, this.stiffness);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tvlinks.add(l1);\n\t\t\t}*/\n\t\t\t\n\t\t\t\n\t\t\tobjects.add(p1);\n\t\t}\n\t\t\n\n\t\t\n\t\t\n\t\t//p1 = new PBParticle( 12 * TS, 1 * TS, 0, 1, 1);\n\t\t//objects.add(p1);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tcamera = new Camera(\"player\");\n\t}", "public CheckEngineLight build() {\r\n return checkEngineLight;\r\n }", "protected void build() {\n // Make sure we have a fresh build of everything needed to run a JAM session\n // - bootstrap, translator and agent suites\n builder(\"clean\");\n builder(\"\");\n buildBootstrap();\n }", "private UnitManager() {\r\n\t\tUM = new UnitMap(); // create an object\r\n\t}", "public HALeaseManagementModule() {\n\n }", "private void createAllFrameworks(){\n\t\tFramework fw1 = new Framework(\"Skype\");\r\n\t\tFeature fw1feat1 = new Feature(\"Audio\");\r\n\t\tfw1feat1.addAttribute(new Attribute(\"Enabled\", \"true\"));\r\n\t\tfw1feat1.addAttribute(new Attribute(\"NumberOfUsers\",\"2\")); \r\n\t\t\r\n\t\tFeature fw1feat2 = new Feature(\"Video\");\r\n\t\tfw1feat2.addAttribute(new Attribute(\"Enabled\", \"true\"));\r\n\t\tfw1feat2.addAttribute(new Attribute(\"NumberOfUsers\", \"2\"));\r\n\t\tfw1feat2.addAttribute(new Attribute(\"onlineStatus.Enabled\", \"true\"));\r\n\t\r\n\t\tfw1.addFeature(fw1feat1);\r\n\t\tfw1.addFeature(fw1feat2);\r\n\r\n\t\tFramework fw2 = new Framework(\"Smack\");\r\n\t\tFeature fw2feat1 = new Feature(\"Audio\");\r\n\t\tfw2feat1.addAttribute(new Attribute(\"Enabled\", \"true\"));\r\n\t\tfw2feat1.addAttribute(new Attribute(\"NumberOfUsers\",\"2\"));\r\n\t\tfw2.addFeature(fw2feat1);\r\n\r\n\t\tFeature fw2feat2 = new Feature(\"Video\");\r\n\t\tfw2feat2.addAttribute(new Attribute(\"Enabled\", \"true\"));\r\n\t\tfw2feat2.addAttribute(new Attribute(\"NumberOfUsers\",\"4\"));\r\n\t\tfw2feat2.addAttribute(new Attribute(\"onlineStatus.Enabled\", \"true\"));\r\n\t\tfw2.addFeature(fw2feat2);\r\n\r\n\t\tFramework fw3 = new Framework(\"Asterisk\");\r\n\t\tFeature fw3feat1 = new Feature(\"Audio\");\r\n\t\tfw3feat1.addAttribute(new Attribute(\"Enabled\", \"true\"));\r\n\t\tfw3feat1.addAttribute(new Attribute(\"NumberOfUsers\",\"8\"));\r\n\t\tfw3.addFeature(fw3feat1);\r\n\r\n\t\t// Available for NCB\r\n\t\taddFramework(fw3);\r\n\t\taddFramework(fw2);\r\n\t\taddFramework(fw1);\r\n\r\n\t}", "protected void init(KKAdminIf adminEng)\n {\n this.adminEng = adminEng;\n adminMgrFactory = new AdminMgrFactory(this.adminEng);\n }", "@Override\r\n\tpublic void buildImpl() {\n\t\tint nbLasers =(int)Math.ceil((double)lanesPerLink.length / (double)linksPerLaser);\r\n\t\tlasers = new Laser[nbLasers];\r\n\t\tpoweredChannelForLaserI = new int[nbLasers];\r\n\t\tpoweredHorizonForLaserI = new double[nbLasers];\r\n\t\tcanBeExtended = new boolean[nbLasers];\r\n\t\tboolean timeLine = lue.isWithTimeLine();\r\n\t\tfor (int i = 0; i < nbLasers ; i++) {\r\n\t\t\tlasers[i] = laserTemplate.getCopy(i, nbLasers, timeLine);\r\n\t\t\tlasers[i].setLinkUtilisationExperiment(lue);\r\n\t\t}\r\n\t}", "private void initDLManager() {\n //TODO poner estos datos en configuraciones\n final String botName = \"DL-MS+A\";\n final String directlinePrimaryKey =\n //\"5Cx8OLT2X98.cwA.1j4.FGE7LsMoVuBtww9vQYNuC6lwoVBWYrb-5DHGzBbOeO0\"; // J\n //\"sccvRjdQVbw.cwA.8tQ.3tw3MFQtgG9bcqYf5xxHgW-lUYKymaoSFNCoIzI-SJY\"; //MS+A\n //\"IWixc2S5WaU.cwA.DEw.DV8nbC-BijSw5TbtNimDJuvrp45GpsKCRW4wPTtqYeY\"; //MP-AURA DEV\n \"QyKjl6KL-XQ.cwA.UTM.puyqrjpLvO1Briz7TjM7q_VqqAOflJ3jN0ryBGvkEiU\";\n mDLManager =\n DLManager.getInstance(this, directlinePrimaryKey);\n }", "public LogicManager() {\n model = new ModelManager();\n conversationManager = new ConversationManager();\n }", "@Override\n public void onEnable() {\n plugin = this;\n if(!getServer().getPluginManager().isPluginEnabled(\"BedWars1058\")){\n getLogger().severe(\"Unable to locate Bedwars1058.\");\n getLogger().severe(\"Plugin will be disabled!\");\n getServer().getPluginManager().disablePlugin(this);\n return;\n }else{\n bwAPI = Bukkit.getServicesManager().getRegistration(BedWars .class).getProvider();\n bedwarsEnabled = true;\n }\n if(!getServer().getPluginManager().isPluginEnabled(\"Citizens\")){\n getLogger().severe(\"Citizens is missing shopkeeper won't be used!\");\n getServer().getPluginManager().disablePlugin(this);\n return;\n }else{\n npcRegistry = CitizensAPI.getNPCRegistry();\n citizensEnabled = true;\n getLogger().info(\"Hooked with Citizens for shopkeeper\");\n }\n /*commandManager = new BukkitCommandManager(this);\n if(commandManager == null){\n getLogger().severe(\"Unable to intialize BukkitCommandManager.\");\n getLogger().severe(\"Plugin will be disabled!\");\n getServer().getPluginManager().disablePlugin(this);\n return;\n }*/\n fileUtils = new FileUtils();\n configuration = new Configuration();\n if(!configuration.createConfiguration(this)){\n getLogger().severe(\"Unable to create configuration file.\");\n getLogger().severe(\"Plugin will be disabled!\");\n getServer().getPluginManager().disablePlugin(this);\n return;\n }\n messages = new Messages();\n if(!messages.generateMessages()){\n getLogger().severe(\"Unable to create messages.yml file.\");\n getLogger().severe(\"Plugin will be disabled!\");\n getServer().getPluginManager().disablePlugin(this);\n return;\n }\n cacheManager = new CacheManager(this);\n if(!cacheManager.buildCache()){\n getLogger().severe(\"Unable to create cache file.\");\n getLogger().severe(\"Plugin will be disabled!\");\n getServer().getPluginManager().disablePlugin(this);\n return;\n }\n scheduler = new WorkloadScheduler();\n scheduler.intializeThread();\n storage = new Storage(this,getConfiguration().isUsingMysql());\n storage.build();\n storage.tryConnection();\n storage.createDatabase();\n randomUtility = new RandomUtility(this);\n cosmeticManager = new CosmeticManager();\n cosmeticManager.loadCosmetics();\n playerManager = new PlayerCosmeticsManager();\n registerListeners();\n cooldownTasks = new Cooldowns();\n cooldownTasks.runTaskTimerAsynchronously(this,100L,20L);\n registerCommands();\n getLogger().info(\"------------------------------------------------\");\n getLogger().info(\"Enabled Plugin\");\n getLogger().info(\"------------------------------------------------\");\n\n }", "public void initialize()\n {\n \t// Luodaan manager-luokat\n EffectManager.getInstance();\n MessageManager.getInstance();\n CameraManager.getInstance();\n\n // Luodaan pelitilan eri osat\n backgroundManager = new BackgroundManager(wrapper);\n \tweaponManager = new WeaponManager();\n hud = new Hud(context, weaponManager);\n touchManager = new TouchManager(dm, surfaceView, context, hud, weaponManager);\n gameMode = new GameMode(gameActivity, this, dm, context, hud, weaponManager);\n \n // Järjestellään Wrapperin listat uudelleen\n wrapper.sortDrawables();\n wrapper.generateAiGroups();\n \n // Merkitään kaikki ladatuiksi\n allLoaded = true;\n }", "private void makeDirectory() {\n String userHome = System.getProperty(\"user.home\");\n wnwData = new File(userHome + \"/.wnwdata\");\n wnwData.mkdirs();\n\n makeCampaignChallengesFile();\n makeCustomChallengesFile();\n makeProgressFile();\n makeSettingsFile();\n }", "private void initManagers() {\n\t\t// TODO Auto-generated method stub\n\t\tvenueManager = new VenueManager();\n\t\tadView = new AdView(this, AdSize.SMART_BANNER,\n\t\t\t\tConstants.AppConstants.ADDMOB);\n\t\tanimationSounds = new AnimationSounds(VenuesActivity.this);\n\n\t}", "public WuicFacadeBuilder() {\n contextPath = \"\";\n warmUpStrategy = WuicFacade.WarmupStrategy.NONE;\n multipleConfigInTagSupport = Boolean.TRUE;\n wuicXmlPath = getClass().getResource(\"/wuic.xml\");\n useDefaultContextBuilderConfigurator = Boolean.TRUE;\n objectBuilderInspector = null;\n configurators = new ArrayList<ContextBuilderConfigurator>();\n }", "public AddeManager() {\n \t\ttry {\n \t\t\tdeterminePlatform();\n \t\t} catch (RuntimeException e) {\n \t\t\te.printStackTrace();\n \t\t}\n \n \t\tif (isUnixLike == true) {\n \t\t\taddeDirectory = System.getProperty(\"user.dir\") + \"/adde\";\n \t\t\taddeBin = addeDirectory + \"/bin\";\n \t\t\taddeData = addeDirectory + \"/data\";\n \t\t\taddeMcservl = addeBin + \"/mcservl\";\n \t\t} else {\n \t\t\taddeDirectory = System.getProperty(\"user.dir\") + \"\\\\adde\";\n \t\t\taddeBin = addeDirectory + \"\\\\bin\";\n \t\t\taddeData = addeDirectory + \"\\\\data\";\n \t\t\taddeMcservl = addeBin + \"\\\\mcservl\";\n \t\t}\n \t\t\n \t\tstartLocalServer();\n \t\n \t}", "public static void init() {\n // BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\n\n frisbeeRollerFrisbeeRoller = new Talon(FRISBEE_ROLLER_CHANNEL);\n\n conveyorMotor = new Talon(CONV_MOTOR_CHANNEL);\n\n spatulaMotor = new Relay(SPATULA_MOTOR_CHANNEL);\n\n loadTalon = new Talon(LOADER_TALON);\n\n elevateTalon = new Talon(ELEVATE_TALON);\n\n try {\n driveTrainrearRightTalon = new CANJaguar(REAR_RIGHT_JAG_CHANNEL);\n\n driveTrainfrontRightTalon = new CANJaguar(FRONT_RIGHT_JAG_CHANNEL);\n\n driveTrainfrontLeftTalon = new CANJaguar(FRONT_LEFT_JAG_CHANNEL);\n\n driveTrainrearLeftTalon = new CANJaguar(REAR_LEFT_JAG_CHANNEL);\n\n shootershooterJag = new CANJaguar(SHOOTER_JAG_CHANNEL);\n } catch (CANTimeoutException ex) {\n ex.printStackTrace();\n }\n // END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS\n }", "public StartupHandler(){\r\n\t\tloadGameFiles();\r\n\t\tnew Engine();\r\n\t}", "public void start() {\n System.out.println(\"OBRMAN started\");\n ApamManagers.addManager(this, 3);\n OBRMan.obr = new OBRManager(null, repoAdmin);\n obr.startWatchingRepository();\n }", "public WdlFactoryImpl() {\n\t\tsuper();\n\t}", "Wcs111Factory getWcs111Factory();", "public Manager(final Engine engine) throws Exception\r\n {\r\n //determine if sound is enabled\r\n final boolean enabled = (Toggle.values()[engine.getMenu().getOptionSelectionIndex(LayerKey.OptionsInGame, OptionKey.Sound)] == Toggle.Off);\r\n\r\n //set the audio depending on menu setting\r\n engine.getResources().setAudioEnabled(enabled);\r\n \r\n //set the game window where game play will occur\r\n setWindow(engine.getMain().getScreen());\r\n \r\n //create standard puzzles\r\n this.puzzles = new Puzzles(engine);\r\n \r\n //create object that contains all the pieces\r\n this.pieces = new Pieces();\r\n \r\n //store background image\r\n this.background = engine.getResources().getGameImage(GameImages.Keys.Background);\r\n \r\n //store victory image\r\n this.victory = engine.getResources().getGameImage(GameImages.Keys.Victory);\r\n \r\n //create new intermission\r\n this.intermission = new Intermission(\r\n engine.getResources().getGameImage(GameImages.Keys.Buildings),\r\n engine.getResources().getGameImage(GameImages.Keys.Player),\r\n engine.getResources().getGameImage(GameImages.Keys.EmptyBackground)\r\n );\r\n \r\n //maps = new Maps(engine.getResources().getGameImage(GameImages.Keys.Maps), getWindow());\r\n //hero.setImage(engine.getResources().getGameImage(GameImages.Keys.Heroes));\r\n //enemies = new Enemies(engine.getResources().getGameImage(GameImages.Keys.Enemies));\r\n \r\n //are we playing random Mode or Campaign\r\n random = CustomMenu.Toggle.values()[engine.getMenu().getOptionSelectionIndex(CustomMenu.LayerKey.Options, CustomMenu.OptionKey.Mode)];\r\n \r\n //set start level\r\n puzzles.setCurrent(engine.getMenu().getOptionSelectionIndex(CustomMenu.LayerKey.Options, CustomMenu.OptionKey.Level) - 1);\r\n \r\n //reset game\r\n reset(engine);\r\n }", "public void EngineInit() {\n TrustManager[] trustAllCerts = new TrustManager[] { new X509TrustManager() {\n public X509Certificate[] getAcceptedIssuers() {\n return new X509Certificate[] {};\n }\n\n public void checkClientTrusted(X509Certificate[] chain,\n String authType) throws CertificateException {\n }\n\n public void checkServerTrusted(X509Certificate[] chain,\n String authType) throws CertificateException {\n }\n } };\n\n try {\n\n\n //取得SSL的SSLContext实例\n SSLContext sslContext = SSLContext.getInstance(\"TLS\");\n sslContext.init(null,trustAllCerts,new java.security.SecureRandom());\n sslEngine = sslContext.createSSLEngine();\n sslEngine.setUseClientMode(true);\n\n } catch(NoSuchAlgorithmException e) {\n } catch(KeyManagementException e) {\n }\n SSLSession session = sslEngine.getSession();\n int appBufferMax = session.getApplicationBufferSize();\n int netBufferMax = session.getPacketBufferSize();\n Log.i(\"123\", \"EngineInit: appBufferMax:\"+appBufferMax + \"netBufferMax:\"+netBufferMax);\n ByteBuffer mTunSSRAppData = ByteBuffer.allocate(appBufferMax);\n ByteBuffer mTunSSRWrapData = ByteBuffer.allocate(netBufferMax);\n ByteBuffer peerAppData = ByteBuffer.allocate(appBufferMax);\n ByteBuffer peerNetData = ByteBuffer.allocate(netBufferMax);\n }", "public LemmingAgent(final LemmingBody _lemmingBody) {\n\t\ts_LOGGER.debug(\"Creation of the Lemming Agent...\");\n\n\t\tm_body = _lemmingBody;\n\n\t\ts_LOGGER.debug(\"Lemming Agent created.\");\n\t}", "private InformationManager() {\n\t\tlives = ConfigurationManager.getConfigurationManager().getConfiguration().getLives();\n\t\tshields = ConfigurationManager.getConfigurationManager().getConfiguration().getShields();\n\t}", "public static void init()\n {\n oreStarSteel = new BlockOreStarSteel(MSAConfig.ores, Material.rock);\n storageStarSteel = new BlockStorageStarSteel(MSAConfig.storageBlock, Material.iron);\n // tech blocks\n launchTower = new BlockLaunchTower(MSAConfig.launchTower, Material.iron);\n launchTowerController = new BlockLaunchControl(MSAConfig.launchController, Material.iron);\n rocketAssembler = new BlockRocketAssembler(MSAConfig.rocketAssembler, Material.iron);\n comSatellite = new BlockComSatellite(MSAConfig.comSatellite, Material.iron);\n ssBuilding = new BlockSSBuilding(MSAConfig.ssBuilding, Material.rock);\n commandCenter = new BlockCommandCenter(MSAConfig.commandCenter, Material.iron);\n\n /* Register Blocks */\n // ore blocks\n GameRegistry.registerBlock(oreStarSteel, \"oreStarSteel\");\n GameRegistry.registerBlock(storageStarSteel, \"storageStarSteel\");\n // tech blocks\n GameRegistry.registerBlock(launchTower, \"launchTower\");\n GameRegistry.registerBlock(launchTowerController, \"launchTowerController\");\n GameRegistry.registerBlock(rocketAssembler, \"rocketAssembler\");\n GameRegistry.registerBlock(comSatellite, \"comSatellite\");\n GameRegistry.registerBlock(ssBuilding, \"ssBuilding\");\n GameRegistry.registerBlock(commandCenter, \"commandCenter\");\n\n /* Set block harvest level */\n // ore blocks\n MinecraftForge.setBlockHarvestLevel(oreStarSteel, \"pickaxe\", 2);\n MinecraftForge.setBlockHarvestLevel(storageStarSteel, \"pickaxe\", 2);\n // building blocks\n MinecraftForge.setBlockHarvestLevel(ssBuilding, \"pickaxe\", 2);\n // tech blocks\n MinecraftForge.setBlockHarvestLevel(launchTower, \"pickaxe\", 1);\n }", "public LibraryBuilder() {\n\t\tthis.addToLibrary = new MyMusicLibrary();\n\t\tthis.addToArtiLibrary = new MyArtistLibrary();\n\t}", "public MongoManager()\n\t{\n\t\ttry\n\t\t{\n\t\t/*\tmorphia = new Morphia();\n\t\t\tclient = new MongoClient();\n\t\t\tmorphia.mapPackage(\"com.glenwood.kernai.data.entity\");\n\t\t\tdatastore = morphia.createDatastore(client, \"Kernai\");\n\t\t\tdatastore.ensureIndexes();\n\t\t*/\t\n\t\t}\n\t\tcatch(Exception ex)\n\t\t{\n\t\t\tthrow ex;\n\t\t}\n\t\n\t}", "private Engine() {\n\n }", "AgentPolicy build();", "private GameManager() \n\t{\n\t\t\n\t}", "public ChunkManager() {\n instance = this;\n\n durabilityDir = new File(ObsidianDestroyer.getInstance().getDataFolder(), \"data\" + File.separator + \"durabilities\");\n if (!durabilityDir.exists()) {\n durabilityDir.mkdirs();\n }\n\n load();\n }", "public void initialize() {\n warpController = new WarpController(this);\n kitController = new KitController(this);\n crafting = new CraftingController(this);\n mobs = new MobController(this);\n items = new ItemController(this);\n enchanting = new EnchantingController(this);\n anvil = new AnvilController(this);\n blockController = new BlockController(this);\n hangingController = new HangingController(this);\n entityController = new EntityController(this);\n playerController = new PlayerController(this);\n inventoryController = new InventoryController(this);\n explosionController = new ExplosionController(this);\n requirementsController = new RequirementsController(this);\n worldController = new WorldController(this);\n arenaController = new ArenaController(this);\n arenaController.start();\n if (CompatibilityLib.hasStatistics() && !CompatibilityLib.hasJumpEvent()) {\n jumpController = new JumpController(this);\n }\n File examplesFolder = new File(getPlugin().getDataFolder(), \"examples\");\n examplesFolder.mkdirs();\n\n File urlMapFile = getDataFile(URL_MAPS_FILE);\n File imageCache = new File(dataFolder, \"imagemapcache\");\n imageCache.mkdirs();\n maps = new MapController(this, urlMapFile, imageCache);\n\n // Initialize EffectLib.\n if (com.elmakers.mine.bukkit.effect.EffectPlayer.initialize(plugin, getLogger())) {\n getLogger().info(\"EffectLib initialized\");\n } else {\n getLogger().warning(\"Failed to initialize EffectLib\");\n }\n\n // Pre-create schematic folder\n File magicSchematicFolder = new File(plugin.getDataFolder(), \"schematics\");\n magicSchematicFolder.mkdirs();\n\n // One-time migration of legacy configurations\n migrateConfig(\"enchanting\", \"paths\");\n migrateConfig(\"automata\", \"blocks\");\n migrateDataFile(\"automata\", \"blocks\");\n\n // Ready to load\n load();\n resourcePacks.startResourcePackChecks();\n }", "private HardwareDeviceRental(){\r\n\r\n this.initializeComponent();\r\n hardwares= new ArrayList<HardwareDevice>();\r\n\r\n }", "public void init(HardwareMap ahwMap) {\n try {\n // Save reference to Hardware map\n hwMap = ahwMap;\n\n // Define and Initialize Motors\n motor1 = hwMap.dcMotor.get(\"motor1\");\n motor2 = hwMap.dcMotor.get(\"motor2\");\n motor3 = hwMap.dcMotor.get(\"motor3\");\n motor4 = hwMap.dcMotor.get(\"motor4\");\n\n pMotor1 = hwMap.dcMotor.get(\"pMotor1\");\n pMotor2 = hwMap.dcMotor.get(\"pMotor2\");\n beMotor = hwMap.dcMotor.get(\"beMotor\");\n fkMotor = hwMap.dcMotor.get(\"fkMotor\");\n\n\n // Set to FORWARD\n motor1.setDirection(DcMotor.Direction.FORWARD);\n motor2.setDirection(DcMotor.Direction.FORWARD);\n motor3.setDirection(DcMotor.Direction.FORWARD);\n motor4.setDirection(DcMotor.Direction.FORWARD);\n\n pMotor1.setDirection(DcMotor.Direction.FORWARD);\n pMotor2.setDirection(DcMotor.Direction.FORWARD);\n beMotor.setDirection(DcMotor.Direction.FORWARD);\n fkMotor.setDirection(DcMotor.Direction.FORWARD);\n\n\n // Set all motors to zero power\n motor1.setPower(0);\n motor2.setPower(0);\n motor3.setPower(0);\n motor4.setPower(0);\n\n pMotor1.setPower(0);\n pMotor2.setPower(0);\n beMotor.setPower(0);\n fkMotor.setPower(0);\n\n\n // Set all motors to run without encoders.\n // only use RUN_USING_ENCODERS in autonomous\n motor1.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n motor2.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n motor3.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n motor4.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n\n pMotor1.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n pMotor2.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n beMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n fkMotor.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n/*\n gyro = (ModernRoboticsI2cGyro) hardwareMap.gyroSensor.get(\"gyro\");\n colorSensor = hardwareMap.colorSensor.get(\"color\");\n rangeSensor = hardwareMap.get(ModernRoboticsI2cRangeSensor.class, \"range\");\n ods = hardwareMap.opticalDistanceSensor.get(\"ods\");\n ods2 = hardwareMap.opticalDistanceSensor.get(\"ods2\");\n*/\n // Define and initialize ALL installed servos.\n //servo1 = hwMap.servo.get(\"servo1\");\n\n runtime.reset();\n\n } catch (Exception e) {\n telemetry.addData(\"runOpMode ERROR\", e.toString());\n telemetry.update();\n }\n\n }", "protected void setup() {\n\t\t\t\t\tDFAgentDescription dfd = new DFAgentDescription();\n\t\t\t\t\tdfd.setName(getAID());\n\t\t\t\t\tServiceDescription sd = new ServiceDescription();\n\t\t\t\t\tsd.setType(\"wHOST\");\n\t\t\t\t\tsd.setName(\"wumpus-host-\" + Math.random());\n\t\t\t\t\tdfd.addServices(sd);\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tDFService.register(this, dfd);\n\t\t\t\t\t\thostMap = new WumpusMapHost();\n\t\t\t\t\t\tSystem.out.println(\"Registered as a host in the DF Service.\");\n\t\t\t\t\t\tlogic = new WumpusLogic();\n\t\t\t\t\t\tlogic.setHostMap(hostMap.getMap());\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\tcatch (FIPAException fe) {\n\t\t\t\t\t\tfe.printStackTrace();\n\t\t\t\t\t}\n\t\t\n\t\t// Printing out a message stating that the agent is ready for service.\n\t\tSystem.out.println(\"Wumpus host \"+getAID().getName()+\" is ready.\");\n\t\t\n\t\taddBehaviour(new TickerBehaviour(this, 1000) {\n\t\t\tprotected void onTick() {\n\t\t\t\tmyAgent.addBehaviour(new HandleRequest());\n\t\t\t}\n\t\t});\n\t \t\n\t\t\n\t}", "@Override public void init() {\n /// Important Step 2: Get access to a list of Expansion Hub Modules to enable changing caching methods.\n all_hubs_ = hardwareMap.getAll(LynxModule.class);\n /// Important Step 3: Option B. Set all Expansion hubs to use the MANUAL Bulk Caching mode\n for (LynxModule module : all_hubs_ ) {\n switch (motor_read_mode_) {\n case BULK_READ_AUTO:\n module.setBulkCachingMode(LynxModule.BulkCachingMode.AUTO);\n break;\n case BULK_READ_MANUAL:\n module.setBulkCachingMode(LynxModule.BulkCachingMode.MANUAL);\n break;\n case BULK_READ_OFF:\n default:\n module.setBulkCachingMode(LynxModule.BulkCachingMode.OFF);\n break;\n }\n }\n\n /// Use the hardwareMap to get the dc motors and servos by name.\n\n motorLF_ = hardwareMap.get(DcMotorEx.class, lfName);\n motorLB_ = hardwareMap.get(DcMotorEx.class, lbName);\n motorRF_ = hardwareMap.get(DcMotorEx.class, rfName);\n motorRB_ = hardwareMap.get(DcMotorEx.class, rbName);\n motorLF_.setDirection(DcMotor.Direction.REVERSE);\n motorLB_.setDirection(DcMotor.Direction.REVERSE);\n\n // map odometry encoders\n verticalLeftEncoder = hardwareMap.get(DcMotorEx.class, verticalLeftEncoderName);\n verticalRightEncoder = hardwareMap.get(DcMotorEx.class, verticalRightEncoderName);\n horizontalEncoder = hardwareMap.get(DcMotorEx.class, horizontalEncoderName);\n\n if( USE_ENCODER_FOR_TELEOP ) {\n motorLF_.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorLF_.setMode ( DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n motorLB_.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorLB_.setMode ( DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n motorRF_.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorRF_.setMode ( DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n motorRB_.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorRB_.setMode ( DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n\n verticalLeftEncoder.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n verticalRightEncoder.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n horizontalEncoder.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n\n motorLF_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n motorLB_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n motorRF_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n motorRB_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n }\n\n if( USE_INTAKE ) {\n motor_left_intake_ = hardwareMap.get(DcMotorEx.class, \"motorLeftIntake\");\n motor_right_intake_ = hardwareMap.get(DcMotorEx.class, \"motorRightIntake\");\n motor_right_intake_.setDirection(DcMotor.Direction.REVERSE) ;\n\n motor_left_intake_.setMode( DcMotor.RunMode.STOP_AND_RESET_ENCODER );\n motor_left_intake_.setMode( DcMotor.RunMode.RUN_USING_ENCODER );\n motor_right_intake_.setMode( DcMotor.RunMode.STOP_AND_RESET_ENCODER );\n motor_right_intake_.setMode( DcMotor.RunMode.RUN_USING_ENCODER );\n\n servo_left_intake_ = hardwareMap.servo.get(\"servoLeftIntake\");\n servo_left_intake_pos_ = CR_SERVO_STOP ;\n servo_left_intake_.setPosition(CR_SERVO_STOP);\n servo_right_intake_ = hardwareMap.servo.get(\"servoRightIntake\");\n servo_right_intake_pos_ = CR_SERVO_STOP ;\n servo_right_intake_.setPosition(CR_SERVO_STOP);\n }\n if( USE_LIFT ) {\n motor_lift_ = hardwareMap.get(DcMotorEx.class, \"motorLift\");\n motor_lift_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n motor_lift_.setMode( DcMotor.RunMode.STOP_AND_RESET_ENCODER );\n power_lift_ = 0.0;\n if( USE_RUN_TO_POS_FOR_LIFT ) {\n motor_lift_.setTargetPosition(0);\n motor_lift_.setMode( DcMotor.RunMode.RUN_TO_POSITION ); // must call setTargetPosition() before switching to RUN_TO_POSISTION\n } else {\n motor_lift_.setMode( DcMotor.RunMode.RUN_USING_ENCODER);\n }\n last_stone_lift_enc_ = -1;\n }\n\n if( USE_STONE_PUSHER ) {\n servo_pusher_ = hardwareMap.servo.get(\"servoPusher\");\n servo_pusher_.setPosition(PUSHER_INIT);\n servo_pusher_pos_ = PUSHER_INIT;\n }\n if( USE_STONE_GATER ) {\n servo_gater_ = hardwareMap.servo.get(\"servoGater\");\n servo_gater_.setPosition(GATER_INIT);\n servo_gater_pos_ = GATER_INIT;\n }\n\n if( USE_ARM ) {\n servo_arm_ = hardwareMap.servo.get(\"servoArm\");\n servo_arm_.setPosition(ARM_INIT);\n servo_arm_pos_ = ARM_INIT;\n servo_claw_ = hardwareMap.servo.get(\"servoClaw\");\n servo_claw_.setPosition(CLAW_OPEN);\n servo_claw_pos_ = CLAW_OPEN;\n }\n\n if( USE_HOOKS ) {\n servo_left_hook_ = hardwareMap.servo.get(\"servoLeftHook\");\n servo_left_hook_.setPosition(LEFT_HOOK_UP);\n servo_left_hook_pos_ = LEFT_HOOK_UP;\n servo_right_hook_ = hardwareMap.servo.get(\"servoRightHook\");\n servo_right_hook_.setPosition(RIGHT_HOOK_UP);\n servo_right_hook_pos_ = RIGHT_HOOK_UP;\n }\n\n if( USE_PARKING_STICKS ) {\n servo_left_park_ = hardwareMap.servo.get(\"servoLeftPark\");\n servo_left_park_.setPosition(LEFT_PARK_IN);\n servo_left_park_pos_ = LEFT_PARK_IN;\n servo_right_park_ = hardwareMap.servo.get(\"servoRightPark\");\n servo_right_park_.setPosition(RIGHT_PARK_IN);\n servo_right_park_pos_ = RIGHT_PARK_IN;\n }\n\n if( USE_RGB_FOR_STONE ) {\n rev_rgb_range_ = hardwareMap.get(LynxI2cColorRangeSensor.class, \"stoneColor\");\n //rev_rgb_range_ = hardwareMap.get(LynxI2cColorRangeSensor.class, \"stoneColorV3\"); // different interface for V3, can't define it as LynxI2cColorRangeSensor anymore, 2020/02/29\n if( rev_rgb_range_!=null ) {\n if( AUTO_CALIBRATE_RGB ) {\n int alpha = rev_rgb_range_.alpha();\n //double dist = rev_rgb_range_.getDistance(DistanceUnit.CM);\n double dist = rev_rgb_range_.getDistance(DistanceUnit.METER);\n if( alpha>=MIN_RGB_ALPHA && alpha<100000 ) {\n rev_rgb_alpha_init_ = alpha;\n }\n if( AUTO_CALIBRATE_RGB_RANGE && !Double.isNaN(dist) ) {\n if( dist>MIN_RGB_RANGE_DIST && dist<MAX_RGB_RANGE_DIST ) {\n rev_rgb_dist_init_ = dist;\n }\n }\n }\n }\n }\n if( USE_RGBV3_FOR_STONE ) {\n //rgb_color_stone_ = hardwareMap.get(ColorSensor.class, \"stoneColorV3\");\n rgb_range_stone_ = hardwareMap.get(DistanceSensor.class, \"stoneColorV3\");\n if( AUTO_CALIBRATE_RANGE && rgb_range_stone_!=null ) {\n while(true) { // wait till range sensor gets a valid reading\n double dis = getRangeDist(RangeName.RGB_RANGE_STONE);\n if( dis>0.0 && dis<0.2 ) {\n rgb_range_stone_dist_init_ = dis;\n break;\n }\n }\n }\n }\n\n if( USE_RIGHT_RANGE ) {\n range_right_ = (Rev2mDistanceSensor) (hardwareMap.get(DistanceSensor.class, \"rightRange\"));\n if( AUTO_CALIBRATE_RANGE && range_right_!=null ) {\n while(true) { // wait till range sensor gets a valid reading\n double dis = getRangeDist(RangeName.RANGE_RIGHT);\n if( dis>0.01 && dis<2.0 ) {\n range_right_dist_init_ = dis;\n break;\n }\n }\n }\n }\n if( USE_LEFT_RANGE ) {\n range_left_ = (Rev2mDistanceSensor) (hardwareMap.get(DistanceSensor.class, \"leftRange\"));\n if( AUTO_CALIBRATE_RANGE && range_left_!=null ) {\n while(true) { // wait till range sensor gets a valid reading\n double dis = getRangeDist(RangeName.RANGE_LEFT);\n if( dis>0.01 && dis<2.0 ) {\n range_left_dist_init_ = dis;\n break;\n }\n }\n }\n }\n\n if( USE_RANGE_FOR_STONE) {\n range_stone_ = (Rev2mDistanceSensor) (hardwareMap.get(DistanceSensor.class, \"stoneRange\"));\n if( AUTO_CALIBRATE_RANGE && range_stone_!=null ) {\n while(true) { // wait till range sensor gets a valid reading\n double dis = getRangeDist(RangeName.RANGE_STONE);\n if( dis>0.01 && dis<0.5 ) {\n range_stone_dist_init_ = dis;\n break;\n }\n }\n }\n }\n\n if( USE_INTAKE_MAG_SWITCH ) {\n intake_mag_switch_ = hardwareMap.get(DigitalChannel.class, \"intake_mag_switch\");\n intake_mag_switch_.setMode(DigitalChannelController.Mode.INPUT);\n intake_mag_prev_state_ = intake_mag_switch_.getState();\n intake_mag_change_time_ = 0.0;\n }\n if( USE_STONE_LIMIT_SWITCH ) {\n stone_limit_switch_ = hardwareMap.get(DigitalChannel.class, \"stone_limit_switch\");\n stone_limit_switch_.setMode(DigitalChannelController.Mode.INPUT);\n stone_limit_switch_prev_state_ = stone_limit_switch_.getState();\n }\n\n\n /////***************************** JOY STICKS *************************************/////\n\n /// Set joystick deadzone, any value below this threshold value will be considered as 0; moved from init() to init_loop() to aovid crash\n if(gamepad1!=null) gamepad1.setJoystickDeadzone( JOYSTICK_DEAD_ZONE );\n if(gamepad2!=null) gamepad2.setJoystickDeadzone( JOYSTICK_DEAD_ZONE );\n\n resetControlVariables();\n }", "private WrappedEngine() {\n logger = new ONDEXCoreLogger();\n addONDEXListener(logger);\n pluginLogger = new ONDEXPluginLogger();\n EnvironmentVariable ev = new EnvironmentVariable(\"ONDEX VAR=\" + Config.ondexDir);\n ev.setLog4jLevel(Level.INFO);\n fireEventOccurred(ev);\n }", "@Override\n public void setup_level(GameController gameController) {\n\n super.setup_level(gameController);\n \n castle = new Castle (this, FINISH_BARREL_POSITION, gameController);\n \n {\n BoxShape bottom_sensor_shape = new BoxShape (250f,0.2f);\n Body ground = new StaticBody(this,bottom_sensor_shape);\n Sensor killer_sensor = new Sensor(ground, bottom_sensor_shape);\n ground.setPosition(new Vec2(170f,-7f));\n killer_sensor.addSensorListener(new Hero_killer_sensor(this));\n \n \n Shape left_wall_shape = new BoxShape(1, 20);\n StaticBody wall = new StaticBody(this, left_wall_shape);\n wall.setPosition(new Vec2(-3f, 20f));\n wall.addImage(new BodyImage(\"sprites/platforms/invisible_wall.png\"));\n }\n {\n \n \n get_platforms().add(new Platform(this, 8, new Vec2 (3f, -1f), \"TRUNK\"));\n get_platforms().add(new Platform(this, 5, new Vec2 (20f, 6f), \"CLOUD\"));\n get_coins().add(new Coin(this, new Vec2(22f, 12f)));\n get_coins().add(new Coin(this, new Vec2(24f, 12f)));\n get_coins().add(new Coin(this, new Vec2(26f, 12f)));\n get_platforms().add(new Platform(this, 18, new Vec2 (42f, 6f), \"CLOUD\")); \n get_dynamic_enemies().add(new Turtle_fly_enemy(new Vec2(44f,7f), 4, \"TURTLE\", this));\n \n \n get_platforms().add(new Platform(this, 4, new Vec2 (96f, 6f), \"CLOUD\")); \n get_fire_rods().add(new Fire_rod(this, new Vec2 (90f, 18f)));\n \n get_platforms().add(new Platform(this, 4, new Vec2 (118f, 6f), \"CLOUD\"));\n get_fire_rods().add(new Fire_rod(this, new Vec2 (112f, 18f)));\n \n get_platforms().add(new Platform(this, 4, new Vec2 (136f, 2f), \"CLOUD\"));\n get_fire_rods().add(new Fire_rod(this, new Vec2 (138f, 12f)));\n \n get_platforms().add(new Platform(this, 4, new Vec2 (148f, 8f), \"CLOUD\"));\n get_coins().add(new Coin(this, new Vec2(150f, 14f)));\n get_coins().add(new Coin(this, new Vec2(152f, 14f)));\n get_platforms().add(new Platform(this, 5, new Vec2 (164f, 8f), \"CLOUD\"));\n \n get_fire_rods().add(new Fire_rod(this, new Vec2 (179f, 4f)));\n get_dynamic_enemies().add(new Turtle_fly_enemy(new Vec2(167f,9f), 4, \"TURTLE\", this));\n \n get_platforms().add(new Platform(this, 5, new Vec2 (184f, 8f), \"CLOUD\"));\n get_dynamic_enemies().add(new Brown_enemy(new Vec2(187f, 9f), 4, \"BROWN\", this));\n \n get_platforms().add(new Platform(this, 3, new Vec2 (204, 8f), \"CLOUD\"));\n get_coins().add(new Coin(this, new Vec2(206f, 14f)));\n get_platforms().add(new Platform(this, 3, new Vec2 (214, 13f), \"CLOUD\"));\n \n get_fire_rods().add(new Fire_rod(this, new Vec2 (230f, 10.5f)));\n get_platforms().add(new Platform(this, 3, new Vec2 (228, 13f), \"CLOUD\"));\n \n get_fire_rods().add(new Fire_rod(this, new Vec2 (244f, 10.5f)));\n get_platforms().add(new Platform(this, 3, new Vec2 (242, 13f), \"CLOUD\"));\n get_coins().add(new Coin(this, new Vec2(246f, 19f)));\n get_coins().add(new Coin(this, new Vec2(246f, 21f)));\n get_coins().add(new Coin(this, new Vec2(244f, 19f)));\n get_coins().add(new Coin(this, new Vec2(244f, 21f)));\n get_fire_rods().add(new Fire_rod(this, new Vec2 (258f, 10.5f)));\n get_platforms().add(new Platform(this, 3, new Vec2 (256, 13f), \"CLOUD\"));\n \n get_platforms().add(new Platform(this, 3, new Vec2 (266, 18f), \"CLOUD\"));\n get_dynamic_enemies().add(new Brown_enemy(new Vec2(268f, 19.25f), 4, \"BROWN\", this));\n \n get_platforms().add(new Platform(this, 3, new Vec2 (276f, 5f), \"TRUNK\"));\n get_coins().add(new Coin(this, new Vec2(279f, 21f)));\n get_coins().add(new Coin(this, new Vec2(279f, 19f)));\n get_coins().add(new Coin(this, new Vec2(279f, 17f)));\n get_coins().add(new Coin(this, new Vec2(279f, 15f)));\n \n get_platforms().add(new Platform(this, 6, new Vec2 (292f, 4f), \"TRUNK\"));\n get_dynamic_enemies().add(new Turtle_fly_enemy(new Vec2(294f,6f), -4, \"TURTLE\", this));\n get_dynamic_enemies().add(new Turtle_fly_enemy(new Vec2(298f,6f), 4, \"TURTLE\", this));\n \n get_platforms().add(new Platform(this, 2, new Vec2 (312f, 5f), \"TRUNK\"));\n \n get_platforms().add(new Platform(this, 2, new Vec2 (322f, 8f), \"TRUNK\"));\n \n get_platforms().add(new Platform(this, 1, new Vec2 (333f, 11f), \"CLOUD\"));\n \n \n \n \n get_fire_rods().add(new Fire_rod(this, new Vec2 (351f, 11.5f)));\n get_platforms().add(new Platform(this, 1, new Vec2 (343f, 15f), \"CLOUD\"));\n get_platforms().add(new Platform(this, 1, new Vec2 (351, 15f), \"CLOUD\"));\n \n get_fire_rods().add(new Fire_rod(this, new Vec2 (357f, 27.5f)));\n \n get_platforms().add(new Platform(this, 2, new Vec2 (359, 15f), \"CLOUD\"));\n \n get_platforms().add(new Platform(this, 2, new Vec2 (373, 6f), \"TRUNK\"));\n get_pipes().add(new Pipe(this, new Vec2(374.3f,11f) , true));\n get_platforms().add(new Platform(this, 3, new Vec2 (389, 12f), \"CLOUD\"));\n get_dynamic_enemies().add(new Turtle_fly_enemy(new Vec2(391f,14f), -4, \"TURTLE\", this));\n \n get_platforms().add(new Platform(this, 20, new Vec2 (399, 3f), \"GROUND\"));\n \n \n \n \n \n\n }\n \n this.start();\n\n }", "public AudioSettings() {\n this.emulator = NEmuSUnified.getInstance().getEmulator();\n }", "public static void initializeBlocks() {\n if (Config.enableGiveADamn) {\n giveADamn = new GiveADamn();\n }\n\n if (Config.enableGlowstone) {\n glowstone = new HeavyLight();\n }\n\n if (Config.enableSpicedSand) {\n sandSpiced = new SpicedSand();\n }\n /*\n\n if (Config.enableMuffler){\n muffler = new Muffler();\n }\n */\n }", "private static Handler buildChain() {\n Handler ForAbroad = new ForAbroad();\n\n //chain.XmlHandler is the successor of chain.Mp3Handler.\n Handler ForCountry = new ForCountry(ForAbroad);\n\n return new ForCity(ForCountry);\n }", "private ModuleServiceImpl(){\n\t\t//initialize local data.\n\t\tfactories = new ConcurrentHashMap<String, IModuleFactory>();\n\t\tstorages = new ConcurrentHashMap<String, IModuleStorage>();\n\t\tcache = new ConcurrentHashMap<String, Module>();\n\t\tmoduleListeners = new ConcurrentHashMap<String, IModuleListener>();\n\n\t\tif (LOGGER.isDebugEnabled()) {\n\t\t\tLOGGER.debug(\"Created new ModuleServiceImplementation\");\n\t\t}\n\n\t\tConfigurationManager.INSTANCE.configure(this);\n\t}", "public void onStart() {\n FileWriteAheadLogManager wal = (FileWriteAheadLogManager)ctx.cache().context().wal();\n\n if (wal == null)\n return;\n\n this.wal = wal;\n\n SegmentRouter segmentRouter = wal.getSegmentRouter();\n\n if (segmentRouter.hasArchive())\n walFolders = new File[] {segmentRouter.getWalArchiveDir(), segmentRouter.getWalWorkDir()};\n else\n walFolders = new File[] {segmentRouter.getWalWorkDir()};\n }", "public void addBuildables(){\n this.allBuildables.add(new Nexus());\n this.allBuildables.add(new Pylon());\n this.allBuildables.add(new Assimilator());\n this.allBuildables.add(new Gateway());\n this.allBuildables.add(new CyberneticsCore());\n this.allBuildables.add(new RoboticsFacility());\n this.allBuildables.add(new Stargate());\n this.allBuildables.add(new TwilightCouncil());\n this.allBuildables.add(new TemplarArchives());\n this.allBuildables.add(new DarkShrine());\n this.allBuildables.add(new RoboticsBay());\n this.allBuildables.add(new FleetBeacon());\n this.allBuildables.add(new Probe());\n this.allBuildables.add(new Zealot());\n this.allBuildables.add(new Stalker());\n this.allBuildables.add(new Sentry());\n this.allBuildables.add(new Observer());\n this.allBuildables.add(new Immortal());\n this.allBuildables.add(new Phoenix());\n this.allBuildables.add(new VoidRay());\n this.allBuildables.add(new Colossus());\n this.allBuildables.add(new HighTemplar());\n this.allBuildables.add(new DarkTemplar());\n this.allBuildables.add(new Carrier());\n }", "private GroupManager() {\r\n\t\tqueueManagers = new HashMap<Integer,QueueManager>();\r\n\t\tqueueManagerDeletionTimeout = -1;\r\n\t\thousekeepingSleep = HOUSEKEEPING_SLEEP;\r\n\t\thouseKeeper = new HouseKeeper(\"GroupManager_HouseKeeper\");\r\n\t\thouseKeeper.start();\r\n\t}", "public void initReasoner() throws IllegalConfigurationException, OWLOntologyCreationException {\n\t\tOntopSQLOWLAPIConfiguration config = (OntopSQLOWLAPIConfiguration) OntopSQLOWLAPIConfiguration.defaultBuilder()\n .nativeOntopMappingFile(_obdaFile)\n .ontologyFile(_owlFile)\n .propertyFile(_propertyFile)\n .enableTestMode()\n .build();\n\t\tOntopOWLFactory factory = OntopOWLFactory.defaultFactory();\n\t\t_reasoner = factory.createReasoner(config);\n\t}", "private void registerManagers() {\n registerProviders();\n\n // Cast Managers\n if (worldGuardManager.isEnabled()) castManagers.add(worldGuardManager);\n if (preciousStonesManager.isEnabled()) castManagers.add(preciousStonesManager);\n if (redProtectManager != null && redProtectManager.isFlagsEnabled()) castManagers.add(redProtectManager);\n\n // Entity Targeting Managers\n if (preciousStonesManager.isEnabled()) targetingProviders.add(preciousStonesManager);\n if (townyManager.isEnabled()) targetingProviders.add(townyManager);\n if (residenceManager != null) targetingProviders.add(residenceManager);\n if (redProtectManager != null) targetingProviders.add(redProtectManager);\n\n // PVP Managers\n if (worldGuardManager.isEnabled()) pvpManagers.add(worldGuardManager);\n if (pvpManager.isEnabled()) pvpManagers.add(pvpManager);\n if (multiverseManager.isEnabled()) pvpManagers.add(multiverseManager);\n if (preciousStonesManager.isEnabled()) pvpManagers.add(preciousStonesManager);\n if (townyManager.isEnabled()) pvpManagers.add(townyManager);\n if (griefPreventionManager.isEnabled()) pvpManagers.add(griefPreventionManager);\n if (factionsManager.isEnabled()) pvpManagers.add(factionsManager);\n if (residenceManager != null) pvpManagers.add(residenceManager);\n if (redProtectManager != null) pvpManagers.add(redProtectManager);\n\n // Build Managers\n if (worldGuardManager.isEnabled()) blockBuildManagers.add(worldGuardManager);\n if (factionsManager.isEnabled()) blockBuildManagers.add(factionsManager);\n if (locketteManager.isEnabled()) blockBuildManagers.add(locketteManager);\n if (preciousStonesManager.isEnabled()) blockBuildManagers.add(preciousStonesManager);\n if (townyManager.isEnabled()) blockBuildManagers.add(townyManager);\n if (griefPreventionManager.isEnabled()) blockBuildManagers.add(griefPreventionManager);\n if (mobArenaManager != null && mobArenaManager.isProtected()) blockBuildManagers.add(mobArenaManager);\n if (residenceManager != null) blockBuildManagers.add(residenceManager);\n if (redProtectManager != null) blockBuildManagers.add(redProtectManager);\n if (landsManager != null) blockBuildManagers.add(landsManager);\n\n // Break Managers\n if (worldGuardManager.isEnabled()) blockBreakManagers.add(worldGuardManager);\n if (factionsManager.isEnabled()) blockBreakManagers.add(factionsManager);\n if (locketteManager.isEnabled()) blockBreakManagers.add(locketteManager);\n if (preciousStonesManager.isEnabled()) blockBreakManagers.add(preciousStonesManager);\n if (townyManager.isEnabled()) blockBreakManagers.add(townyManager);\n if (griefPreventionManager.isEnabled()) blockBreakManagers.add(griefPreventionManager);\n if (mobArenaManager != null && mobArenaManager.isProtected()) blockBreakManagers.add(mobArenaManager);\n if (citadelManager != null) blockBreakManagers.add(citadelManager);\n if (residenceManager != null) blockBreakManagers.add(residenceManager);\n if (redProtectManager != null) blockBreakManagers.add(redProtectManager);\n if (landsManager != null) blockBreakManagers.add(landsManager);\n\n // Team providers\n if (heroesManager != null && heroesManager.useParties()) teamProviders.add(heroesManager);\n if (skillAPIManager != null && skillAPIManager.usesAllies()) teamProviders.add(skillAPIManager);\n if (useScoreboardTeams) teamProviders.add(new ScoreboardTeamProvider());\n if (permissionTeams != null && !permissionTeams.isEmpty()) {\n teamProviders.add(new PermissionsTeamProvider(permissionTeams));\n }\n if (factionsManager != null) teamProviders.add(factionsManager);\n if (battleArenaManager != null && useBattleArenaTeams) teamProviders.add(battleArenaManager);\n if (ultimateClansManager != null) teamProviders.add(ultimateClansManager);\n\n // Player warp providers\n if (preciousStonesManager != null && preciousStonesManager.isEnabled()) {\n playerWarpManagers.put(\"fields\", preciousStonesManager);\n }\n if (redProtectManager != null) playerWarpManagers.put(\"redprotect\", redProtectManager);\n if (residenceManager != null) playerWarpManagers.put(\"residence\", residenceManager);\n }", "protected void buildBootstrap() {\n String command = \"-prod -mac -o2 rom -strip:d j2me imp\";\n if (includeDebugger) {\n command += \" debugger\";\n }\n command += \" -- translator\";\n builder(command);\n }", "private void createWeapons()\n {\n woodSword = new Weapon(\"wood sword\", \" | does 12 damage\", 10, true); \n rustedSword = new Weapon(\"rusted sword\", \" | does 17 damage\", 15, true);\n silverSword = new Weapon(\"silver sword\", \" | does 32 damage\", 30, true);\n goldSword = new Weapon(\"gold sword\", \" | does 22 damage\", 20, true);\n titaniumSword = new Weapon(\"titanium sword\", \" | does 52 damage\", 50, true);\n silverSpear = new Weapon(\"silver spear\", \" | does 25 damage\", 23, true);\n infantryBow = new Weapon(\"infantry bow\", \" | does 30 damage\", 28, true);\n }", "default void buildMainSpace() throws Exception {\n buildMainBuildModules();\n buildMainCheckModules();\n buildMainGenerateAPIDocumentation();\n buildMainGenerateCustomRuntimeImage();\n }", "private void loadModules() {\n\n ModuleTiers moduleTiers = new ModuleTiers();\n moduleTiers.setSource(.5);\n moduleTiers.setNumTiers(5);\n String tiersKey = \"module tiers\";\n addDemoPanelWithModule(moduleTiers, tiersKey, null);\n demoPanels.get(tiersKey).removeGUI();\n\n ModuleCellular moduleCellular = new ModuleCellular();\n moduleCellular.setCoefficients(9, .5, 3, 7);\n String cellularKey = \"module cellular\";\n addDemoPanelWithModule(moduleCellular, cellularKey, null);\n demoPanels.get(cellularKey).removeGUI();\n\n /*\n * ground_gradient\n */\n // ground_gradient\n ModuleGradient groundGradient = new ModuleGradient();\n groundGradient.setGradient(0, 0, 0, 1, 0, 0);\n String gradientKey = \"Ground Gradient\";\n addDemoPanelWithModule(groundGradient, gradientKey, null);\n demoPanels.get(gradientKey).removeGUI();\n\n String mountainsKey = \"mountains before gradient\";\n TerrainNoiseSettings mountainSettings = getDemoPanelSettings(mountainsKey);\n if (mountainSettings == null) {\n mountainSettings = TerrainNoiseSettings.MountainTerrainNoiseSettings(seed, false);\n }\n Module mountainTerrainNoGradient = mountainSettings.makeTerrainModule(null);\n addDemoPanelWithModule(mountainTerrainNoGradient, mountainsKey, mountainSettings);\n\n String mountainsWithGradientKey = \"translate gradient domain with mountains\";\n TerrainNoiseSettings gradMountainSettings = getDemoPanelSettings(mountainsWithGradientKey);\n if (gradMountainSettings == null) {\n gradMountainSettings = TerrainNoiseSettings.MountainTerrainNoiseSettings(seed, false);\n }\n ModuleTranslateDomain mountainTerrain = new ModuleTranslateDomain();\n mountainTerrain.setAxisYSource(mountainTerrainNoGradient);\n mountainTerrain.setSource(groundGradient);\n\n addDemoPanelWithModule(mountainTerrain, mountainsWithGradientKey, gradMountainSettings);\n demoPanels.get(mountainsWithGradientKey).removeGUI();\n\n /*\n String highlandKey = \"highlands\";\n TerrainNoiseSettings highlandSettings = getDemoPanelSettings(highlandKey);\n if (highlandSettings == null) {\n highlandSettings = TerrainNoiseSettings.HighLandTerrainNoiseSettings(seed);\n }\n Module highlandTerrain = TerrainDataProvider.MakeTerrainNoise(groundGradient, highlandSettings );\n addDemoPanelWithModule(highlandTerrain, highlandKey, highlandSettings);\n */\n /*\n * select air or solid with mountains\n */\n String terrainSelectKey = \"terrain Select\";\n TerrainNoiseSettings terrSelectSettings = getDemoPanelSettings(terrainSelectKey);\n if (terrSelectSettings == null) {\n terrSelectSettings = TerrainNoiseSettings.TerrainSettingsWithZeroOneModuleSelect(seed, mountainTerrain);\n } else {\n terrSelectSettings.moduleSelectSettings.controlSource = mountainTerrain;\n }\n Module terrSelectModule = terrSelectSettings.moduleSelectSettings.makeSelectModule();\n addDemoPanelWithModule(terrSelectModule, terrainSelectKey, terrSelectSettings);\n\n /*\n * noise to determine which kind of solid block\n */\n String typeSelectSettingKey = \"terrain type select\";\n TerrainNoiseSettings typeSelectSettings = getDemoPanelSettings(typeSelectSettingKey);\n if (typeSelectSettings == null) {\n typeSelectSettings = TerrainNoiseSettings.TerrainTypeSelectModuleNoiseSettings(seed, false);\n }\n Module selectTypeTerr = typeSelectSettings.makeTerrainModule(null);\n //addDemoPanelWithModule(selectTypeTerr, typeSelectSettingKey, typeSelectSettings);\n\n String dirtOrStoneSelectSettingsKey = \"dirt or stone\";\n TerrainNoiseSettings dirtOrStoneSelectSettings = getDemoPanelSettings(dirtOrStoneSelectSettingsKey);\n if (dirtOrStoneSelectSettings == null) {\n dirtOrStoneSelectSettings = TerrainNoiseSettings.BlockTypeSelectModuleSettings(seed, selectTypeTerr, BlockType.DIRT, BlockType.STONE);\n } else {\n dirtOrStoneSelectSettings.moduleSelectSettings.controlSource = selectTypeTerr;\n }\n Module dirtOrStoneModule = dirtOrStoneSelectSettings.moduleSelectSettings.makeSelectModule();\n //addDemoPanelWithModule(dirtOrStoneModule, dirtOrStoneSelectSettingsKey, dirtOrStoneSelectSettings);\n\n /*\n * combine terrain select and block type select\n */\n String combineTerrainAndBlockTypeKey = \"Terrain And BlockType\";\n ModuleCombiner terrAndBlockTypeMod = new ModuleCombiner(ModuleCombiner.CombinerType.MULT);\n terrAndBlockTypeMod.setSource(0, terrSelectModule);\n terrAndBlockTypeMod.setSource(1, dirtOrStoneModule);\n TerrainNoiseSettings combineSettings = new TerrainNoiseSettings(seed); //defaults\n combineSettings.renderWithBlockColors = true;\n //addDemoPanelWithModule(terrAndBlockTypeMod, combineTerrainAndBlockTypeKey, combineSettings);\n //demoPanels.get(combineTerrainAndBlockTypeKey).removeGUI();\n\n\n\n }", "private void initHardware(){\n }", "private IndexingManager() {\n Provider provider = new BouncyCastleProvider();\n Security.addProvider(provider);\n utility = Database_Utility.getInstance();\n conn = utility.getConnection();\n IMbuffer = IndexingManagerBuffer.getInstance();\n\n // This statement is to create purge table.\n\n boolean k = checkTable1(\"PurgeTable\");\n if (!k) {\n utility.createtable2(\"PurgeTable\");\n }\n boolean k1 = checkTable1(\"UserToCertMap\");\n if (!k1) {\n utility.createtable1();\n }\n\n // This statement is to run maintenance thread on loading of class to purge entries whose timer has expired.\n\n //maintenancethread();\n\n // This statement is to run maintenance thread on loading of class to ascertain root nodes.\n\n // maintenancethread1();\n\n // This statement is to run maintenance thread on loading of class to delete entries from purge table.\n\n // maintenancethread2();\n\n }", "private StrategyChainBuilder() {\n\t}", "private WolUtil() {\n }", "public final void init() {\r\n GroundItemManager.create(this);\r\n SPAWNS.add(this);\r\n }", "constructalgo(ArrayList<String> m,ArrayList<String> w,String mpref[][],String wpref[][]) throws IOException\r\n\t\t\t{\r\n\t\t\t\t\r\n\t\t\t\tmen = m;\r\n\t\t\t\twomen = w;\r\n\t\t\t\t\r\n\t\t\t\tmenpreflist = mpref;\r\n\t\t\t\t\r\n\t\t\t\twomenpreflist = wpref;\r\n\t\t\t\t\r\n\t\t\t\t// calculate a size of men Array List\r\n\t\t\t\tnumberofmen = men.size();\r\n\t\t\t\t\r\n\t\t\t\t// calculate a size of women Array List\r\n\t\t\t\tnumberofwomen = women.size();\r\n\t\t\t\t\r\n\t\t\t\t// Initially all the men are free so add them into freeman array list\r\n\t\t\t\tfreeman.addAll(men);\r\n\t\t\t\t\r\n\t\t\t//\tSystem.out.println(freeman);\r\n\t\t\t\t\r\n\t\t\t//\tSystem.out.println(\"Inside Constructor\");\r\n\t\t\t\t\r\n\t\t\t\t// Call calculatematches for follow Gale shapley Algorithm\r\n\t\t\t\tcalculatematches();\r\n\t\t\t\r\n\t\t\t\t\r\n\t\t\t}", "public MEKeyTool() {\n keystore = new PublicKeyStoreBuilderBase();\n }", "public static void init() {\n if (initialized) {\n return;\n }\n initialized = true;\n DebugOptions.DEV_ROOT_PATH = \"engine/src/main/resources/\";\n GL20 mockGL = new MockGL();\n Gdx.gl = mockGL;\n Gdx.gl20 = mockGL;\n\n ServiceRegistry serviceRegistry = new ServiceRegistry();\n serviceRegistry\n .with(FacadeModuleConfig.class)\n .lifetime(Lifetime.Singleton)\n .use(TestModuleConfig::new);\n serviceRegistry\n .with(ModulePathScanner.class)\n .lifetime(Lifetime.Singleton);\n\n final HeadlessApplication application = new HeadlessApplication(new SolApplication(100, serviceRegistry), new HeadlessApplicationConfiguration());\n game = ((SolApplication) application.getApplicationListener()).getGame();\n }", "public Game() {\n String configPath= String.valueOf(getClass().getResource(\"/config/conf.xml\"));\n\n listeners= new ArrayList<>();\n assembler= new Assembler(configPath);\n levelApple= (ILevel) assembler.newInstance(\"levelApple\");\n levelRarity= (ILevel) assembler.newInstance(\"levelRarity\");\n levelRainbow= (ILevel) assembler.newInstance(\"levelRainbow\");\n levelRunning= levelApple;\n levelApple.selected();\n levelFlutter= null;\n levelPinky= null;\n jukebox = (Jukebox) assembler.newInstance(\"jukebox\");\n jukebox.switchTo(\"apple\");\n event = new LevelChangeEvent();\n event.setNumberOfLevel(6);\n setEventSelected(true, false, false);\n setEventRunning(true, true, true);\n }", "public void init(HardwareMap ahwMap) {\n // Save reference to Hardware map\n hwMap = ahwMap;\n\n // Define and Initialize Motors\\\n frontLeft = hwMap.get(DcMotor.class, \"frontLeft\");\n backLeft = hwMap.get(DcMotor.class, \"backLeft\");\n frontRight = hwMap.get(DcMotor.class, \"frontRight\");\n backRight = hwMap.get(DcMotor.class, \"backRight\");\n conveyorBelt = hwMap.get(DcMotor.class, \"conveyorBelt\");\n arm = hwMap.get(DcMotor.class, \"arm\");\n shooter = hwMap.get(DcMotor.class, \"conBeltWheels\");\n platform = hwMap.get(DcMotor.class, \"platform\");\n\n // Set all motors to zero power\n frontLeft.setPower(0);\n backLeft.setPower(0);\n frontRight.setPower(0);\n backRight.setPower(0);\n arm.setPower(0);\n conveyorBelt.setPower(0);\n shooter.setPower(0);\n platform.setPower(0);\n\n\n // sets zeroPowerBehavior\n frontLeft.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n frontRight.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n backLeft.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n backRight.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n arm.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n conveyorBelt.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n shooter.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n platform.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n // Sets motor directions\n frontLeft.setDirection(DcMotor.Direction.REVERSE);\n backLeft.setDirection(DcMotor.Direction.REVERSE);\n frontRight.setDirection(DcMotor.Direction.FORWARD);\n backRight.setDirection(DcMotor.Direction.FORWARD);\n arm.setDirection(DcMotor.Direction.FORWARD);\n conveyorBelt.setDirection(DcMotor.Direction.FORWARD);\n shooter.setDirection(DcMotor.Direction.REVERSE);\n platform.setDirection(DcMotor.Direction.FORWARD);\n\n // sets enconder mode to run with encoder\n frontRight.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n backRight.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n frontLeft.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n backLeft.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n arm.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n conveyorBelt.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n shooter.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n platform.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n\n // Define and initialize ALL installed servos.\n claw = hwMap.get(Servo.class, \"claw\");\n intakeWheel1 = hwMap.get(Servo.class, \"intakeWheel1\");\n intakeWheel2 = hwMap.get(Servo.class, \"intakeWheel2\");\n ringBringer = hwMap.get(Servo.class, \"ringBringer\");\n\n //platform.setPosition(SERVO_HOME);\n claw.setPosition(SERVO_HOME);\n intakeWheel1.setPosition(SERVO_HOME);\n intakeWheel2.setPosition(SERVO_HOME);\n ringBringer.setPosition(SERVO_HOME);\n\n }", "public modGenRoomControl() {\r\n //construct MbModule\r\n super();\r\n roomObjects = new HashMap(32);\r\n gui = new GUI();\r\n //we depend on the RemoteControl-module\r\n addDependency(\"RemoteControl\");\r\n //we depend on the ARNE-module\r\n addDependency(\"ARNE\");\r\n //register our packet data handler\r\n setPacketDataHandler(new PacketDataHandler());\r\n //we have a html-interface, so lets register it\r\n setHTMLInterface(new HTMLInterface());\r\n }", "public HangerSubsystem() {\n // WRITE CODE BETWEEN THESE LINES -------------------------------------------------------- //\n // TODO: configure and initialize motor (if necessary)\n\n // TODO: configure and initialize sensor (if necessary)\n\n // ^^-----------------------------------------------------------------------------------^^ //\n }", "public WuicFacade build() throws WuicException {\n log.info(\"Building facade.\");\n return new WuicFacade(this);\n }", "public static void main(String[] args) {\n\t\tFramework f = new Framework();\n\t\t\n\t\tMammals m1 = new Mammals();\n\t\tf.work(m1);\n\t\t//m1.hand_bones(); // not sure of type\n\t\t\n\t\tMammals m2 = new Humans();\n\t\tf.work(m2);\n\t\t//m2.hand_bones(); // not flying away, does work\n\t\t\n\t\tMammals m3 = new Bats();\n\t\tf.work(m3);\n\t\t//m3.hand_bones(); \n\t}", "public ModuliHandler() {\n\t}", "public TwilioWrapperLibrary buildLibrary()\n {\n return new TwilioWrapperLibrary( this.twilio_account_sid, this.twilio_account_token, this.thinQ_id, this.thinQ_token);\n }", "public void init(HardwareMap ahwMap) {\n // Save reference to Hardware map\n hwMap = ahwMap;\n \n // Define and Initialize Motors\n leftMotorFrt = hwMap.get(DcMotor.class, \"LeftMotorFwd\");\n rightMotorFrt = hwMap.get(DcMotor.class, \"RightMotorFwd\");\n //PickupUnit = hwMap.get(DcMotor.class, \"PickupUnit\");\n leftMotorBck = hwMap.get(DcMotor.class, \"LeftMotorBck\");\n rightMotorBck = hwMap.get(DcMotor.class, \"RightMotorBck\");\n foundationHookRight = hwMap.get(Servo.class, \"hookRight\");\n foundationHookLeft = hwMap.get(Servo.class, \"hookLeft\");\n TheClaw = hwMap.get(Servo.class, \"theclaw\");\n foundTouch = hwMap.get(TouchSensor.class, \"foundTouch\");\n intakeRight = hwMap.get(DcMotor.class, \"intakeRight\");\n intakeLeft = hwMap.get(DcMotor.class, \"intakeLeft\");\n \n foundationHookRight.setPosition(0.7);\n foundationHookLeft.setPosition(0.7);\n leftMotorFrt.setDirection(DcMotor.Direction.FORWARD); // Set to REVERSE if using AndyMark motors\n rightMotorFrt.setDirection(DcMotor.Direction.REVERSE);// Set to FORWARD if using AndyMark motors\n leftMotorBck.setDirection(DcMotor.Direction.FORWARD); // Set to REVERSE if using AndyMark motors\n rightMotorBck.setDirection(DcMotor.Direction.REVERSE);// Set to FORWARD if using AndyMark motors\n intakeRight.setDirection(DcMotor.Direction.REVERSE);\n intakeLeft.setDirection(DcMotor.Direction.FORWARD);\n\n // Set all motors to zero power\n leftMotorFrt.setPower(0);\n rightMotorFrt.setPower(0);\n leftMotorBck.setPower(0);\n rightMotorBck.setPower(0);\n //PickupUnit.setPower(0);\n \n leftMotorFrt.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n rightMotorFrt.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n leftMotorBck.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n rightMotorBck.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n //PickupUnit.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n \n // Set all motors to run without encoders.\n // May want to use RUN_USING_ENCODERS if encoders are installed.\n leftMotorFrt.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODERS);\n rightMotorFrt.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODERS);\n leftMotorBck.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODERS);\n rightMotorBck.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODERS);\n //PickupUnit.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODERS);\n \n }", "public void gameEngineInitializer() {\n\t\t\r\n\t\tthis.sputacchioGameEngine = new SputacchioGameEngine(supportDeck, mainDeck, mainBoard, players, gamestate, playerDoingTurnNumber);// da implementare alla fine\r\n\t\tthis.classicGameEngine = new ClassicGameEngine(supportDeck, mainDeck, mainBoard, players, gamestate, playerDoingTurnNumber, engineUtility, filter);\r\n\t\t\r\n\t\tthis.gamestate.setCurrentGameType(GameType.CLASSICGAME);//si dovrebbe iniziare dal cucù ma facciamo dopo\r\n\t\tthis.gamestate.setCurrentHandNumber(INITIALHANDNUMBER);\r\n\t\tthis.givePersonalJolly();\r\n\t\t\r\n\t\tthis.classicGameEngine.distributeHands();//queste due si fanno all'inizio di ogni mano, non sono da fare solo la prima volta e basta\r\n\t\tthis.classicGameEngine.substituteJolly();\r\n\t\t\r\n\t\tmainEngine();\r\n\t\t//TODO ci vuole un metodo che, a parte la prima chiamata di Server Room, chiama il sotto-engine giusto in base a game type. Se classic game engine fa una return per segnalare\r\n\t\t//che la mano è finita perchè nessuno ha carte in mano, game engine deve ridare le 6 carte o settare l'ultima mano, o la mano della scala obbligatoria, e cambiare chi inizia a cucù.\r\n\t\t//Poi penso che debba chiamare Filter per mostrare a entrambi cosa accade, stampare le nuove carte e dichiarare l'inizio del cucù.\r\n\t}", "public Stemmer ()\n {\n AllWords = new HashMap<String,String>();\n dictionary = Dictionary.getInstance();\n p = PointerUtils.getInstance();\n\n try\n {\n // JWNL.initialize(new FileInputStream(\"file_properties.xml\"));\n JWNLConnecter.initializeJWNL();\n dic = Dictionary.getInstance();\n morph = dic.getMorphologicalProcessor();\n // ((AbstractCachingDictionary)dic).\n //\tsetCacheCapacity (10000);\n IsInitialized = true;\n }\n catch (Exception e){\n System.err.println(e.getMessage());\n }\n /*catch ( FileNotFoundException e )\n {\n System.out.println ( \"Error initializing Stemmer: JWNLproperties.xml not found\" );\n }\n catch ( JWNLException e )\n {\n System.out.println ( \"Error initializing Stemmer: \"\n + e.toString() );\n }*/\n\n }", "private void buildPebbleEngine () {\n Builder builder = new PebbleEngine.Builder();\r\n\r\n // Add bundle specific loader\r\n builder.loader(loader);\r\n\r\n // Add page extensions\r\n Extension pageExtension = new AbstractExtension() {\r\n @Override\r\n public List<TokenParser> getTokenParsers() {\r\n List<TokenParser> parsers = new ArrayList<>();\r\n parsers.add(new Entity2TokenParser(loader));\r\n return parsers;\r\n }\r\n };\r\n builder.extension(pageExtension);\r\n \r\n // Build the Pebble engine\r\n pebbleEngine = builder.build();\r\n }", "@Override\n public WsClient build() {\n header(HEADER_UPGRADE_WS);\n header(HEADER_WS_VERSION);\n header(Http.HeaderValues.CONTENT_LENGTH_ZERO);\n if (subprotocols.isEmpty()) {\n removeHeader(HEADER_WS_PROTOCOL);\n } else {\n header(HEADER_WS_PROTOCOL, subprotocols);\n }\n\n return new WsClientImpl(this);\n }", "public <R extends IQueryRequest> LSMEngineBuilder<T> buildQueryManager(\n QueryManager<T, R> queryManager) {\n lsmEngine.setQueryManager(queryManager);\n return this;\n }", "protected void setup() {\n\t\tgetContentManager().registerOntology(JADEManagementOntology.getInstance());\r\n getContentManager().registerLanguage(new SLCodec(), FIPANames.ContentLanguage.FIPA_SL0);\r\n\t\tSystem.out.println(\"Agent FixCop cree : \"+getLocalName());\r\n\t\tObject[] args = getArguments();\r\n\t\tList<String> itinerary = (List<String>) args[0];\r\n\t\tint period = (int) args[1];\r\n\t\t\r\n\t\t\r\n\t// POLICIER STATIONNAIRE DO THE CYCLIC BEHAVIOUR TO SCAN THE ROOT , IF THE INTRUDER IS IN ROOT, POLICIER STATIO KILLS HIM.\r\n addBehaviour(new StationScanRootBehaviour(this));\r\n\r\n\t// RESPAWN ANOTHER POLICIER MOBILE AFTER EACH POLICIER MOBILE's LIFETIME DURATION ELAPSES.\r\n addBehaviour(new RespawnCopBehaviour(this, period, itinerary));\r\n\r\n\t}", "@Override\n public void initEngine() {\n \n }", "@Override\n public void initEngine() {\n \n }", "private void setupPowerSystem() {\n\t\tps = new PowerSystem(PowerSystemSolutionMethod.ANL_OPF);\r\n\t\t\r\n\t\t// Create nodes & register with power system\r\n\t\tNodeData nodeWindGenerator = new NodeData(1,1.0,0,false,true);\r\n\t\tps.addNode(nodeWindGenerator);\r\n\t\tNodeData nodeSubstation2 = new NodeData(2,1.0,0,false);\r\n\t\tps.addNode(nodeSubstation2);\r\n\t\tNodeData nodeCityResidential = new NodeData(3,1.0,0,false);\r\n\t\tps.addNode(nodeCityResidential);\r\n\t\tNodeData nodeCityIndustrial = new NodeData(4,1.0,0,false);\r\n\t\tps.addNode(nodeCityIndustrial);\r\n\t\tNodeData nodeCityCommercial = new NodeData(5,1.0,0,false);\r\n\t\tps.addNode(nodeCityCommercial);\r\n\t\tNodeData nodeCoalGenerator = new NodeData(7,1.0,0,false,true);\r\n\t\tps.addNode(nodeCoalGenerator);\r\n\t\tNodeData nodeSubstation3 = new NodeData(8,1.0,0,false);\r\n\t\tps.addNode(nodeSubstation3);\r\n\t\tNodeData nodeGasGenerator = new NodeData(11,1.0,0,false,true);\r\n\t\tps.addNode(nodeGasGenerator);\r\n\t\tNodeData nodeWindStorage = new NodeData(9,1.0,0,false);\r\n\t\tps.addNode(nodeWindStorage);\r\n\t\tNodeData nodeSubstation1 = new NodeData(0,1.0,0,false);\r\n\t\tps.addNode(nodeSubstation1);\r\n\t\t\r\n\t\t// Create lines & register with power system\r\n\t\tMWTimeSeries branchTimeSeries = null;\r\n\t\t\r\n\t\tBranchData branchWindGeneratorToLocalSubstation = new BranchData(nodeWindGenerator,nodeSubstation1,0.01,0,1500.0,true);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchWindGeneratorToLocalSubstation,\"Wind Generator to Substation 1\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\r\n\t\tps.addBranch(branchWindGeneratorToLocalSubstation);\r\n\r\n\t\tBranchData branchWindStorageToLocalSubstation = new BranchData(nodeWindStorage,nodeSubstation1,0.01,0,1500.0,false);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchWindStorageToLocalSubstation,\"Storage to Substation 1\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\r\n\t\tps.addBranch(branchWindStorageToLocalSubstation);\r\n\t\t\r\n\t\tbranchWindLocalSubstationToCitySubstation = new BranchData(nodeSubstation1,nodeSubstation2,0.01,0,125.0,false);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchWindLocalSubstationToCitySubstation,\"Substation 1 to Substation 2\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\r\n\t\tps.addBranch(branchWindLocalSubstationToCitySubstation);\r\n\t\t\r\n\t\tBranchData branchWindToResidential = new BranchData(nodeSubstation2,nodeCityResidential,0.01,0,1500.0,true);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchWindToResidential,\"Substation 2 to Residential\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\r\n\t\tps.addBranch(branchWindToResidential);\r\n\t\t\r\n\t\tBranchData branchWindToCommercial = new BranchData(nodeSubstation2,nodeCityCommercial,0.01,0,1500.0,true);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchWindToCommercial,\"Substation 2 to Commercial\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\r\n\t\tps.addBranch(branchWindToCommercial);\r\n\r\n\t\tBranchData branchWindToIndustrial = new BranchData(nodeSubstation2,nodeCityIndustrial,0.01,0,1500.0,true);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchWindToIndustrial,\"Substation 2 to Industrial\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\t\t\r\n\t\tps.addBranch(branchWindToIndustrial);\r\n\t\t\r\n\t\tBranchData branchCoalGeneratorToSubstation = new BranchData(nodeCoalGenerator,nodeSubstation3,0.01,0,1500.0,true);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchCoalGeneratorToSubstation,\"Coal Generator to Substation 3\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\r\n\t\tps.addBranch(branchCoalGeneratorToSubstation);\r\n\t\t\r\n\t\t\r\n\t\tBranchData branchGasToSubstation = new BranchData(nodeGasGenerator,nodeSubstation3,0.01,0,1500.0,true);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchGasToSubstation,\"Natural Gas Generator to Substation 3\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\t\t\r\n\t\tps.addBranch(branchGasToSubstation);\r\n\t\t\r\n\t\tBranchData branchCoalToResidential = new BranchData(nodeSubstation3,nodeCityResidential,0.01,0,1500.0,true);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchCoalToResidential,\"Substation 3 to Residential\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\t\t\r\n\t\tps.addBranch(branchCoalToResidential);\r\n\t\t\r\n\t\tBranchData branchCoalToIndustrial = new BranchData(nodeSubstation3,nodeCityIndustrial,0.01,0,1500.0,true);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchCoalToIndustrial,\"Substation 3 to Industrial\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\t\t\r\n\t\tps.addBranch(branchCoalToIndustrial);\r\n\t\t\r\n\t\tBranchData branchCoalToCommercial = new BranchData(nodeSubstation3,nodeCityCommercial,0.01,0,1500.0,true);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchCoalToCommercial,\"Substation 3 to Commercial\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\t\t\r\n\t\tps.addBranch(branchCoalToCommercial);\r\n\r\n\t\t\r\n\t\t// Create loads\r\n\t\tMWTimeSeries loadTimeSeries = null;\r\n\t\t\r\n\t\tloadResidential = new LoadData(nodeCityResidential,100.0,0,true);\r\n\t\tloadTimeSeries = new MWTimeSeries(simClock,loadResidential,\"Residential load\");\r\n\t\tcircuitpanel.getAnimatables().add(loadTimeSeries);\r\n\t\tloadInformation.add(loadTimeSeries);\r\n\t\tps.addLoad(loadResidential);\r\n\t\t\r\n\t\tloadCommercial = new LoadData(nodeCityCommercial,100.0,0,true);\r\n\t\tloadTimeSeries = new MWTimeSeries(simClock,loadCommercial,\"Commercial load\");\r\n\t\tcircuitpanel.getAnimatables().add(loadTimeSeries);\r\n\t\tloadInformation.add(loadTimeSeries);\r\n\t\tps.addLoad(loadCommercial);\r\n\t\t\r\n\t\tloadIndustrial = new LoadData(nodeCityIndustrial,100.0,0,true);\r\n\t\tloadTimeSeries = new MWTimeSeries(simClock,loadIndustrial,\"Industrial load\");\r\n\t\tcircuitpanel.getAnimatables().add(loadTimeSeries);\r\n\t\tloadInformation.add(loadTimeSeries);\r\n\t\tps.addLoad(loadIndustrial);\r\n\t\t\r\n\t\t// Create gens\r\n\t\tMWTimeSeries genTimeSeries = null;\r\n\t\t\r\n\t\tgensWithCostsAndEmissions = new ArrayList<CostAndEmissionsProvider>();\r\n\t\tGeneratorDataWithLinearCostAndEmissions genCoal = new GeneratorDataWithLinearCostAndEmissions(nodeCoalGenerator,600,0,2000,0,0,9999,true,2000,20.0,0,1.0,includeFixedCostsAndEmissions);\r\n\t\tgensWithCostsAndEmissions.add(genCoal);\r\n\t\tcostAndEmissionsTimeSeries.addCostAndEmissionsProvider(genCoal);\r\n\t\tgenTimeSeries = new MWTimeSeries(simClock,genCoal,\"Coal generation\");\r\n\t\tcircuitpanel.getAnimatables().add(genTimeSeries);\r\n\t\tgeneratorInformation.add(genTimeSeries);\r\n\t\tps.addGenerator(genCoal);\r\n\t\t\r\n\t\tGeneratorDataWithLinearCostAndEmissions genGas = new GeneratorDataWithLinearCostAndEmissions(nodeGasGenerator,200,0,2000,0,0,9999,true,700.0,70.0,0,0.5,includeFixedCostsAndEmissions);\r\n\t\tgensWithCostsAndEmissions.add(genGas);\r\n\t\tcostAndEmissionsTimeSeries.addCostAndEmissionsProvider(genGas);\r\n\t\tgenTimeSeries = new MWTimeSeries(simClock,genGas,\"Natural gas generation\");\r\n\t\tcircuitpanel.getAnimatables().add(genTimeSeries);\r\n\t\tgeneratorInformation.add(genTimeSeries);\r\n\t\tps.addGenerator(genGas);\r\n\t\t\r\n\t\tgenWind = new WindGeneratorDataWithLinearCostAndEmissions(nodeWindGenerator,initialWindGen,0,210,initialWindVariation,true,200.0,0,0,0,includeFixedCostsAndEmissions);\r\n\t\tgenWind.setAnimating(false);\r\n\t\tcostAndEmissionsTimeSeries.addCostAndEmissionsProvider(genWind);\r\n\t\tgenTimeSeries = new MWTimeSeries(simClock,genWind,\"Wind generation\");\r\n\t\twindGenTimeSeries = genTimeSeries;\r\n\t\tcircuitpanel.getAnimatables().add(genTimeSeries);\r\n\t\tgeneratorInformation.add(genTimeSeries);\r\n\t\tgensWithCostsAndEmissions.add(genWind);\r\n\t\tps.addGenerator(genWind);\r\n\t\t\r\n\t\tgenStorage = new StorageDevice(nodeWindStorage,0,0,0,0,0,0,true,genWind,branchWindLocalSubstationToCitySubstation,simClock,1000,100);\r\n\t\tgenTimeSeries = new MWTimeSeries(simClock,genStorage,\"Storage generation\");\r\n\t\tcostAndEmissionsTimeSeries.addCostAndEmissionsProvider(genStorage);\r\n\t\tcircuitpanel.getAnimatables().add(genTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(genStorage);\r\n\t\tgeneratorInformation.add(genTimeSeries);\r\n\t\tgensWithCostsAndEmissions.add(genStorage);\r\n\t\tps.addGenerator(genStorage);\r\n\t\t\r\n\t\tps.solve();\r\n\t\t\r\n\t\tArrayList<LineAndDistanceInfoProvider> lines; \r\n\t\tFlowArrowsForBranchData fA;\r\n\t\tSimpleLineDisplay line;\r\n\t\t\r\n\t\tBranchColorProvider branchColorProvider = new BranchColorDynamic(Color.BLACK,0.85,Color.ORANGE,1.0,Color.RED);\r\n\t\tBranchThicknessProvider branchThicknessProvider = new BranchThicknessDynamic(1.0,0.85,2.0,1.0,3.0);\r\n\t\tFlowArrowColorProvider flowArrowColorProvider = new FlowArrowColorDynamic(new Color(0,255,0,255/2),0.85,new Color(255,128,64,255/2),1.0,new Color(255,0,0,255/2));\r\n\t\t\r\n\t\t\r\n\t\tdouble switchthickness = 5.0;\r\n\r\n\t\t// Line Coal Generator to Fossil Substation & flow label\r\n\t\tArrayList<Point2D.Double> pointsCoalGenToCoalSubstation = new ArrayList<Point2D.Double>();\r\n\t\tline = new SimpleLineDisplay(new Point2D.Double(710 - 70,350),new Point2D.Double(710 - 70,212),1);\r\n\t\tpointsCoalGenToCoalSubstation.add(line.getFromPoint());\r\n\t\tpointsCoalGenToCoalSubstation.add(DrawUtilities.getPointAtDistanceOnLine(line,line.getLength()/3));\r\n\t\tpointsCoalGenToCoalSubstation.add(DrawUtilities.getPointAtDistanceOnLine(line,2*line.getLength()/3));\r\n\t\tpointsCoalGenToCoalSubstation.add(line.getToPoint());\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsCoalGenToCoalSubstation, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 1, Math.PI/20, \r\n\t\t\t\tbranchCoalGeneratorToSubstation, branchColorProvider, circuitpanel, true,\r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchCoalGeneratorToSubstation,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\r\n\t\t//circuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(640,260),12,new Color(0f,0f,0f,1f),0,branchCoalGeneratorToSubstation));\r\n\t\t\r\n\t\t// Line Gas Generator to Fossil Substation & flow label\r\n\t\tArrayList<Point2D.Double> pointsGasGenToFossilSubstation = new ArrayList<Point2D.Double>();\r\n\t\tline = new SimpleLineDisplay(new Point2D.Double(710 - 70,112.5),new Point2D.Double(765 - 70,160),1);\r\n\t\tpointsGasGenToFossilSubstation.add(line.getFromPoint());\r\n\t\tpointsGasGenToFossilSubstation.add(DrawUtilities.getPointAtDistanceOnLine(line,line.getLength()/3));\r\n\t\tpointsGasGenToFossilSubstation.add(DrawUtilities.getPointAtDistanceOnLine(line,2*line.getLength()/3));\r\n\t\tpointsGasGenToFossilSubstation.add(line.getToPoint());\r\n\t\tpointsGasGenToFossilSubstation.add(new Point2D.Double(710 - 70,212));\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsGasGenToFossilSubstation, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 1, Math.PI/20, \r\n\t\t\t\tbranchGasToSubstation, branchColorProvider, circuitpanel, \r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchGasToSubstation,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\t\t\r\n\t\t//circuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(660,170),12,new Color(0f,0f,0f,1f),0,branchGasToSubstation));\r\n\t\t\r\n\t\t// Line Wind Generator to Wind Substation & flow label\r\n\t\tArrayList<Point2D.Double> pointsWindGenToWindSubstation = new ArrayList<Point2D.Double>();\r\n\t\tline = new SimpleLineDisplay(new Point2D.Double(89,281),new Point2D.Double(89,150),1);\r\n\t\tpointsWindGenToWindSubstation.add(line.getFromPoint());\r\n\t\tpointsWindGenToWindSubstation.add(DrawUtilities.getPointAtDistanceOnLine(line,line.getLength()/3));\r\n\t\tpointsWindGenToWindSubstation.add(DrawUtilities.getPointAtDistanceOnLine(line,2*line.getLength()/3));\r\n\t\tpointsWindGenToWindSubstation.add(line.getToPoint());\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsWindGenToWindSubstation, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 1, Math.PI/20, \r\n\t\t\t\tbranchWindGeneratorToLocalSubstation, branchColorProvider, circuitpanel, \r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchWindGeneratorToLocalSubstation,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\t\t\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(100,200),12,new Color(0f,0f,0f,1f),0,branchWindGeneratorToLocalSubstation));\t\t\r\n\t\t\r\n\t\t// Line storage to Wind Substation & flow label\r\n\t\tArrayList<Point2D.Double> pointsWindStorageToWindSubstation = new ArrayList<Point2D.Double>();\r\n\t\tpointsWindStorageToWindSubstation.add(new Point2D.Double(210,25));\r\n\t\tpointsWindStorageToWindSubstation.add(new Point2D.Double(85,25));\r\n\t\tpointsWindStorageToWindSubstation.add(new Point2D.Double(85,55));\r\n\t\tpointsWindStorageToWindSubstation.add(new Point2D.Double(85,95));\r\n\t\tpointsWindStorageToWindSubstation.add(new Point2D.Double(85,140));\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsWindStorageToWindSubstation, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 2, Math.PI/20, \r\n\t\t\t\tbranchWindStorageToLocalSubstation, branchColorProvider, circuitpanel, true,\r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchWindStorageToLocalSubstation,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\t\t\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(100,75),12,new Color(0f,0f,0f,1f),0,branchWindStorageToLocalSubstation));\t\t\r\n\t\t\r\n\t\t// Line substation 2 to Residential load\r\n\t\tArrayList<Point2D.Double> pointsWindStationToResidential = new ArrayList<Point2D.Double>();\r\n\t\tpointsWindStationToResidential.add(new Point2D.Double(351 - 70,212.5));\r\n\t\tpointsWindStationToResidential.add(new Point2D.Double(419 - 70,212.5));\r\n\t\tpointsWindStationToResidential.add(new Point2D.Double(457 - 70,212.5));\r\n\t\tpointsWindStationToResidential.add(new Point2D.Double(525 - 70,212.5));\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsWindStationToResidential, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 1, Math.PI/20, \r\n\t\t\t\tbranchWindToResidential, branchColorProvider, circuitpanel, true, \r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchWindToResidential,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\t\t\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(413 - 70,180),12,new Color(0f,0f,0f,1f),0,branchWindToResidential));\t\t\r\n\t\t\r\n\t\t// Line substation 3 to Residential load\r\n\t\tArrayList<Point2D.Double> pointsFossilStationToResidential = new ArrayList<Point2D.Double>();\r\n\t\tpointsFossilStationToResidential.add(new Point2D.Double(710 - 70,212.5));\r\n\t\tpointsFossilStationToResidential.add(new Point2D.Double(631 - 70,212.5));\r\n\t\tpointsFossilStationToResidential.add(new Point2D.Double(592 - 70,212.5));\r\n\t\tpointsFossilStationToResidential.add(new Point2D.Double(525 - 70,212.5));\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsFossilStationToResidential, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 1, Math.PI/20, \r\n\t\t\t\tbranchCoalToResidential, branchColorProvider, circuitpanel, \r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchCoalToResidential,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\t\t\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(585 - 70,180),12,new Color(0f,0f,0f,1f),0,branchCoalToResidential));\t\t\r\n\t\t\r\n\t\t// Line Substation 3 to Industrial load & flow label\r\n\t\tArrayList<Point2D.Double> pointsFossilSubstationToIndustrial = new ArrayList<Point2D.Double>();\r\n\t\tline = new SimpleLineDisplay(new Point2D.Double(710 - 70,212.5),new Point2D.Double(525 - 70,365),1);\r\n\t\tpointsFossilSubstationToIndustrial.add(line.getFromPoint());\r\n\t\tpointsFossilSubstationToIndustrial.add(DrawUtilities.getPointAtDistanceOnLine(line,line.getLength()/3));\r\n\t\tpointsFossilSubstationToIndustrial.add(DrawUtilities.getPointAtDistanceOnLine(line,2*line.getLength()/3));\r\n\t\tpointsFossilSubstationToIndustrial.add(line.getToPoint());\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsFossilSubstationToIndustrial, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 1, Math.PI/20, \r\n\t\t\t\tbranchCoalToIndustrial, branchColorProvider, circuitpanel, \r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchCoalToIndustrial,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\t\t\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(585 - 70,280),12,new Color(0f,0f,0f,1f),-Math.PI/5,branchCoalToIndustrial));\r\n\t\t\r\n\t\t// Line Substation 3 to Commercial load & flow label\r\n\t\tArrayList<Point2D.Double> pointsSub3ToCommercial = new ArrayList<Point2D.Double>();\r\n\t\tline = new SimpleLineDisplay(new Point2D.Double(710 - 70,212.5),new Point2D.Double(525 - 70,55),1);\r\n\t\tpointsSub3ToCommercial.add(line.getFromPoint());\r\n\t\tpointsSub3ToCommercial.add(DrawUtilities.getPointAtDistanceOnLine(line,line.getLength()/3));\r\n\t\tpointsSub3ToCommercial.add(DrawUtilities.getPointAtDistanceOnLine(line,2*line.getLength()/3));\r\n\t\tpointsSub3ToCommercial.add(line.getToPoint());\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsSub3ToCommercial, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 1, Math.PI/20, \r\n\t\t\t\tbranchCoalToCommercial, branchColorProvider, circuitpanel, \r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchCoalToCommercial,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\t\t\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(615 - 70,105),12,new Color(0f,0f,0f,1f),Math.PI/5,branchCoalToCommercial));\r\n\r\n\t\t\r\n\t\t// Line Substation 2 to Industrial load & flow label\r\n\t\tArrayList<Point2D.Double> pointsWindSubstationToIndustrial = new ArrayList<Point2D.Double>();\r\n\t\tline = new SimpleLineDisplay(new Point2D.Double(351 - 70,212.5),new Point2D.Double(525 - 70,365),1);\r\n\t\tpointsWindSubstationToIndustrial.add(line.getFromPoint());\r\n\t\tpointsWindSubstationToIndustrial.add(DrawUtilities.getPointAtDistanceOnLine(line,line.getLength()/3));\r\n\t\tpointsWindSubstationToIndustrial.add(DrawUtilities.getPointAtDistanceOnLine(line,2*line.getLength()/3));\r\n\t\tpointsWindSubstationToIndustrial.add(line.getToPoint());\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsWindSubstationToIndustrial, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 1, Math.PI/20, \r\n\t\t\t\tbranchWindToIndustrial, branchColorProvider, circuitpanel, \r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchWindToIndustrial,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\t\t\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(399 - 70,273),12,new Color(0f,0f,0f,1f),Math.PI/4,branchWindToIndustrial));\r\n\r\n\t\t// Line Substation 2 to Commercial load & flow label\r\n\t\tArrayList<Point2D.Double> pointsWindSubstationToCommercial = new ArrayList<Point2D.Double>();\r\n\t\tline = new SimpleLineDisplay(new Point2D.Double(351 - 70,212.5),new Point2D.Double(525 - 70,55),1);\r\n\t\tpointsWindSubstationToCommercial.add(line.getFromPoint());\r\n\t\tpointsWindSubstationToCommercial.add(DrawUtilities.getPointAtDistanceOnLine(line,line.getLength()/3));\r\n\t\tpointsWindSubstationToCommercial.add(DrawUtilities.getPointAtDistanceOnLine(line,2*line.getLength()/3));\r\n\t\tpointsWindSubstationToCommercial.add(line.getToPoint());\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsWindSubstationToCommercial, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 1, Math.PI/20, \r\n\t\t\t\tbranchWindToCommercial, branchColorProvider, circuitpanel, true,\r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchWindToCommercial,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\t\t\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(396 - 70,140),12,new Color(0f,0f,0f,1f),-Math.PI/4,branchWindToCommercial));\r\n\t\t\r\n\t\t// Line Substation 1 to Substation 2\r\n\t\tArrayList<Point2D.Double> pointsSub0ToSub1 = new ArrayList<Point2D.Double>();\r\n\t\tpointsSub0ToSub1.add(new Point2D.Double(85,140));\r\n\t\tpointsSub0ToSub1.add(new Point2D.Double(175,140));\r\n\t\tpointsSub0ToSub1.add(new Point2D.Double(175,156));\r\n\t\tpointsSub0ToSub1.add(new Point2D.Double(175,196));\r\n\t\tpointsSub0ToSub1.add(new Point2D.Double(175,212));\r\n\t\tpointsSub0ToSub1.add(new Point2D.Double(190,212));\r\n\t\tpointsSub0ToSub1.add(new Point2D.Double(230,212));\r\n\t\tpointsSub0ToSub1.add(new Point2D.Double(351 - 70,212));\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsSub0ToSub1, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 2, Math.PI/20, \r\n\t\t\t\tbranchWindLocalSubstationToCitySubstation, branchColorProvider, circuitpanel, true,\r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchWindLocalSubstationToCitySubstation,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\t\t\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(195,141),12,new Color(0f,0f,0f,1f),0,branchWindLocalSubstationToCitySubstation));\r\n\t\t\r\n\t\t\r\n\t\t// Coal plant display\r\n\t\ttry {\r\n\t\t\tCoalPlantDisplay coaldisplay = new CoalPlantDisplay(new Point2D.Double(650 - 70,300),0,0.0,genCoal);\r\n\t\t\tcircuitpanel.getMiddleLayerRenderables().add(coaldisplay);\r\n\t\t\tcircuitpanel.addMouseListener(coaldisplay);\r\n\t\t\tCostAndEmissionsOverlay coaloverlay = new CostAndEmissionsOverlay(new Point2D.Double(700 - 70,450),genCoal);\r\n\t\t\tcostOverlays.add(coaloverlay);\r\n\t\t\tcircuitpanel.getTopLayerRenderables().add(coaloverlay);\r\n\t\t} catch (IOException ie) {\r\n\t\t\tSystem.out.println(ie);\r\n\t\t}\r\n\t\t\r\n\t\t// Gas plant display\r\n\t\ttry {\r\n\t\tGasPlantDisplay gasdisplay = new GasPlantDisplay(new Point2D.Double(650 - 70,40),0.0,genGas);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(gasdisplay);\r\n\t\tcircuitpanel.addMouseListener(gasdisplay);\r\n\t\tCostAndEmissionsOverlay gasoverlay = new CostAndEmissionsOverlay(new Point2D.Double(700 - 70,20),genGas);\r\n\t\tcostOverlays.add(gasoverlay);\r\n\t\tcircuitpanel.getTopLayerRenderables().add(gasoverlay);\r\n\t\t} catch (IOException ie) {\r\n\t\t\tSystem.out.println(ie);\r\n\t\t}\r\n\t\t\r\n\t\t// Wind plant display\r\n\t\ttry {\r\n\t\t\twinddisplay = new WindPlantDisplay(new Point2D.Double(50,240),0.0,genWind);\r\n\t\t\tcircuitpanel.getMiddleLayerRenderables().add(winddisplay);\r\n\t\t\tcircuitpanel.getAnimatables().add(winddisplay);\r\n\t\t\tcircuitpanel.addMouseListener(winddisplay);\r\n\t\t\tCostAndEmissionsOverlay windoverlay = new CostAndEmissionsOverlay(new Point2D.Double(100,450),genWind);\r\n\t\t\tcostOverlays.add(windoverlay);\r\n\t\t\tcircuitpanel.getTopLayerRenderables().add(windoverlay);\t\t\t\t\t\t\r\n\t\t} catch (IOException ie) {\r\n\t\t\tSystem.out.println(ie);\r\n\t\t}\t\t\r\n\t\t\r\n\t\t// Storage display\r\n//\t\ttry {\r\n\t\t\t//SubstationDisplay storagedisplay = new SubstationDisplay(new Point2D.Double(160,0),\"Storage\");\r\n\t\t\t//circuitpanel.getMiddleLayerRenderables().add(storagedisplay);\r\n\t\t\tStorageDisplay storagedisplay = new StorageDisplay(genStorage,StorageDisplay.Alignment.LEFT,StorageDisplay.Alignment.TOP,new Point2D.Double(170,0));\r\n\t\t\tcircuitpanel.getMiddleLayerRenderables().add(storagedisplay);\r\n//\t\t} catch (IOException ie) {\r\n//\t\t\tSystem.out.println(ie);\r\n//\t\t}\r\n\t\t\r\n\t\t// Commercial load\r\n\t\ttry {\r\n\t\t\tCityDisplay commercetonLoad = new CityDisplay(new Point2D.Double(475 - 70,25),CityDisplay.CityType.COMMERCIAL,\"Commercial\",loadCommercial,0);\r\n\t\t\tcircuitpanel.getBottomLayerRenderables().add(commercetonLoad);\r\n\t\t\tcircuitpanel.addMouseListener(commercetonLoad);\r\n\t\t} catch (IOException ie) {\r\n\t\t\tSystem.err.println(ie.toString());\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t// Residential load\r\n\t\ttry {\r\n\t\t\tCityDisplay residentialLoad = new CityDisplay(new Point2D.Double(475 - 70,175),CityDisplay.CityType.RESIDENTIAL,\"Residential\",loadResidential,0);\r\n\t\t\tcircuitpanel.getBottomLayerRenderables().add(residentialLoad);\r\n\t\t\tcircuitpanel.addMouseListener(residentialLoad);\r\n\t\t} catch (IOException ie) {\r\n\t\t\tSystem.err.println(ie.toString());\r\n\t\t}\r\n\t\t\r\n\t\t// Industrial load\r\n\t\ttry {\r\n\t\t\tCityDisplay industrialLoad = new CityDisplay(new Point2D.Double(475 - 70,329),CityDisplay.CityType.INDUSTRIAL,\"Industrial\",loadIndustrial,0);\r\n\t\t\tcircuitpanel.getBottomLayerRenderables().add(industrialLoad);\r\n\t\t\tcircuitpanel.addMouseListener(industrialLoad);\r\n\t\t} catch (IOException ie) {\r\n\t\t\tSystem.err.println(ie.toString());\r\n\t\t}\t\t\t\r\n\t\t\r\n\t\t// Substation 3\r\n\t\ttry {\r\n\t\t\tcircuitpanel.getMiddleLayerRenderables().add(new SubstationDisplay(new Point2D.Double(660 - 70,212 - 25.0),3));\r\n\t\t} catch (IOException ie) {\r\n\t\t\tSystem.out.println(ie);\r\n\t\t}\t\t\r\n\t\t\r\n\t\t// Substation 2\r\n\t\ttry {\r\n\t\t\tcircuitpanel.getMiddleLayerRenderables().add(new SubstationDisplay(new Point2D.Double(305 - 70,212 - 25.0),2));\r\n\t\t} catch (IOException ie) {\r\n\t\t\tSystem.out.println(ie);\r\n\t\t}\r\n\t\t\r\n\t\t// Substation 1\r\n\t\ttry {\r\n\t\t\tcircuitpanel.getMiddleLayerRenderables().add(new SubstationDisplay(new Point2D.Double(39,120.0),1));\r\n\t\t} catch (IOException ie) {\r\n\t\t\tSystem.out.println(ie);\r\n\t\t}\t\t\t\r\n\t\t\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(new StoredEnergyLabel(new Point2D.Double(230,56),12,Color.BLACK,0,genStorage));\r\n\t\t\r\n\t\t/*\r\n\t\ttotalloadplot = new TotalLoadPlot(\r\n\t\t\t\tnew Point2D.Double(10,10),\r\n\t\t\t\t700,200,\r\n\t\t\t\tps,\r\n\t\t\t\tminutesPerAnimationStep,\r\n\t\t\t\t0,24,\r\n\t\t\t\t0,3000);\r\n\t\t*/\r\n\t\t/*\r\n\t\tMouseCoordinateLabel mclabel = new MouseCoordinateLabel(new Point2D.Double(0,20),12,Color.BLACK,0);\r\n\t\tcircuitpanel.getTopLayerRenderables().add(mclabel);\r\n\t\tcircuitpanel.addMouseMotionListener(mclabel);\r\n\t\tMouseCoordinateLabel mclabel = new MouseCoordinateLabel(new Point2D.Double(0,0),12,Color.BLACK,0);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(mclabel);\r\n\t\tcircuitpanel.addMouseMotionListener(mclabel);\r\n\t\t*/\r\n\t\t\r\n\t\tWindMaxDisplay windMaxLabel = new WindMaxDisplay(new Point2D.Double(144,384),12,Color.BLACK,0,genWind);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(windMaxLabel);\r\n\t\tWindCurtailedDisplay windCurtailedLabel = new WindCurtailedDisplay(new Point2D.Double(144,404),12,Color.BLACK,0,genWind);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(windCurtailedLabel);\r\n\r\n\t\tcircuitpanel.getTopLayerRenderables().add(new BlackoutDisplay(ps));\t\t\r\n\t\t\r\n\t\tcircuitpanel.getAnimatables().add(ps);\r\n\t\t\r\n\t\tcircuitpanel.getTopLayerRenderables().add(\r\n\t\t\t\tnew SimClockDisplay(new Point2D.Double(350,5),12,Color.BLACK,0,simClock)); \r\n\t\t\r\n\t\t// Wind plant at node sixteen\r\n//\t\ttry {\r\n//\t\t\tWindPlantDisplay winddisplay = new WindPlantDisplay(new Point2D.Double(650,340),0.0,genWind);\r\n//\t\t\tcircuitpanel.getMiddleLayerRenderables().add(winddisplay);\r\n//\t\t\tcircuitpanel.getAnimatables().add(winddisplay);\r\n//\t\t\tcircuitpanel.addMouseListener(winddisplay);\r\n//\t\t\tCostAndEmissionsOverlay windoverlay = new CostAndEmissionsOverlay(new Point2D.Double(689,462),genWind);\r\n//\t\t\tcostOverlays.add(windoverlay);\r\n//\t\t\tcircuitpanel.getTopLayerRenderables().add(windoverlay);\t\t\t\t\t\t\r\n//\t\t} catch (IOException ie) {\r\n//\t\t\tSystem.out.println(ie);\r\n//\t\t}\r\n\t\t\r\n\t}", "private LSMEngineBuilder<T> buildLevelProcessors(ApplicationContext applicationContext) {\n LevelProcessorChain<T, IInsertionRequest, InsertRequestContext> insertionLevelProcessChain =\n generateLevelProcessorsChain(applicationContext.getInsertionLevelProcessClass());\n LevelProcessorChain<T, IDeletionRequest, DeleteRequestContext> deletionLevelProcessChain =\n generateLevelProcessorsChain(applicationContext.getDeletionLevelProcessClass());\n LevelProcessorChain<T, IQueryRequest, QueryRequestContext> queryLevelProcessChain =\n generateLevelProcessorsChain(applicationContext.getQueryLevelProcessClass());\n return buildQueryManager(queryLevelProcessChain)\n .buildInsertionManager(insertionLevelProcessChain)\n .buildDeletionManager(deletionLevelProcessChain);\n }", "public GameManager(){\r\n init = new Initialisation();\r\n tower=init.getTower();\r\n courtyard=init.getCourtyard();\r\n kitchen=init.getKitchen();\r\n banquetHall=init.getBanquetHall();\r\n stock=init.getStock();\r\n throneHall=init.getThroneHall();\r\n vestibule=init.getVestibule();\r\n stables=init.getStables();\r\n\r\n this.player = new Player(tower);\r\n\r\n push(new IntroductionState());\r\n\t}", "@Override\n public void addLoaders(WorldLoader wl, WorldInfo info) {\n }", "public GameManager( GameFrame gameFrame ){\r\n\t\tpassedLevelIds = new ArrayList<Integer>();\r\n\t\tthis.gameFrame = gameFrame;\r\n\t\tcollectionManager = new CollectionManager(this);\r\n\t\tlevelManager = new LevelManager(this);\r\n\t\tmusicOn = true;\r\n\t\tcurrentLevelId = levelManager.getCurrentLevelId();\r\n\t\tsoundManager = new SoundManager();\r\n\t\tobservers = new ArrayList<GameManagerObserver>();\r\n\t}", "public Level1()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(560, 560, 1); \n prepare();\n gfs_level1 = new GreenfootSound(\"main.wav\");\n\n }", "private WAPIHelper() { }", "public void create() {\n connect();\n batch = new SpriteBatch();\n font = new BitmapFont();\n\n audioManager.preloadTracks(\"midlevelmusic.wav\", \"firstlevelmusic.wav\", \"finallevelmusic.wav\", \"mainmenumusic.wav\");\n\n mainMenuScreen = new MainMenuScreen(this);\n pauseMenuScreen = new PauseMenuScreen(this);\n settingsScreen = new SettingsScreen(this);\n completeLevelScreen = new CompleteLevelScreen(this);\n completeGameScreen = new CompleteGameScreen(this);\n\n setScreen(mainMenuScreen);\n }", "public static void generateCustomGameConfiguration() {\n // GameConfig.getInstance().setMapWidthX(20);\n // GameConfig.getInstance().setMapHeightY(20);\n // GameConfig.getInstance().setMaxEnergyPirateValue(100);\n // GameConfig.getInstance().setMonkeyErraticSpeed(1000);\n // GameConfig.getInstance().setMonkeyHunterSpeed(750);\n // GameConfig.getInstance().setRumEnergyValue(10);\n // GameConfig.getInstance().setTimeRumVisibility(10000);\n // GameConfig.getInstance().setRumList(Brain.getInstance().getObjectManager().getRumList());\n // GameConfig.getInstance().setSquaresList(Brain.getInstance().getMapManager().getMap().getSquareList());\n // ArrayList<Monkey> monkeyArrayList = new ArrayList<Monkey>();\n // for(int i=0;i<10;i++) {\n // if (i % 2 == 0) {\n // monkeyArrayList.add(new Monkey(PositionUtils.getSpawnPosition(\n // Map.getInstance().getGroundSquareList(),\n // CharacterManager.getInstance(Brain.getInstance()).getCharacterList(),\n // ObjectManager.getInstance(Brain.getInstance()).getObjectList()\n // ), Monkey.MonkeyType.ERRATIC));\n // } else {\n // monkeyArrayList.add(new Monkey(PositionUtils.getSpawnPosition(\n // Map.getInstance().getGroundSquareList(),\n // CharacterManager.getInstance(Brain.getInstance()).getCharacterList(),\n // ObjectManager.getInstance(Brain.getInstance()).getObjectList()\n // ), Monkey.MonkeyType.HUNTER));\n // }\n // }\n // GameConfig.getInstance().setMonkeyList(monkeyArrayList);\n // for(int i=0;i< Brain.getInstance().getMapManager().getMap().getSquareList().size();i++) {\n // for (int j = 0; j < Brain.getInstance().getMapManager().getMap().getSquareList().get(i).size(); j++) {\n // if (i == 0 || j==0 || i == GameConfig.getInstance().getMapWidthX()-1\n // || j == GameConfig.getInstance().getMapHeightY()-1) {\n // Brain.getInstance().getMapManager().getMap().getSquareList().get(i).get(j)\n // .setSquareType(Square.SquareType.SEA);\n // }else{\n // Brain.getInstance().getMapManager().getMap().getSquareList().get(i).get(j)\n // .setSquareType(Square.SquareType.GROUND);\n // }\n // }\n // }\n // GameConfig.getInstance().setSquaresList(Brain.getInstance().getMapManager().getMap().getSquareList());\n // saveGameConfiguration();\n }" ]
[ "0.5951258", "0.57870984", "0.56993246", "0.5608138", "0.5537123", "0.5388355", "0.53378916", "0.5248516", "0.5218922", "0.5193822", "0.51300466", "0.51232177", "0.50763154", "0.50754374", "0.50719064", "0.5034922", "0.5027665", "0.5026051", "0.5023516", "0.4991935", "0.4984511", "0.4970448", "0.4941559", "0.49347472", "0.4899596", "0.48885325", "0.48822352", "0.48759142", "0.48708987", "0.4847582", "0.48439875", "0.48323596", "0.48237818", "0.48024648", "0.47846562", "0.47767106", "0.47753543", "0.4773542", "0.47567242", "0.4749434", "0.4744962", "0.47396818", "0.47381413", "0.47377953", "0.4737451", "0.47005963", "0.46973133", "0.46914303", "0.4688303", "0.4684012", "0.46688622", "0.46686378", "0.4667514", "0.46630234", "0.4663013", "0.4661506", "0.46513918", "0.4650439", "0.46497327", "0.46478567", "0.4643873", "0.46394676", "0.46306163", "0.46301082", "0.4629845", "0.46198085", "0.46081313", "0.46063554", "0.4602728", "0.4601676", "0.4600119", "0.45972043", "0.45915866", "0.45886022", "0.45872793", "0.45782936", "0.45776892", "0.45734453", "0.45702916", "0.45670176", "0.4564827", "0.4560941", "0.45485806", "0.45476264", "0.4541489", "0.4539902", "0.45382985", "0.4537268", "0.45332313", "0.4531621", "0.4531621", "0.45271933", "0.45196685", "0.4513594", "0.45102227", "0.4509899", "0.4508829", "0.45062825", "0.4504188", "0.45012888" ]
0.64788437
0
build InsertionManager for lsmEngine
public <R extends IInsertionRequest> LSMEngineBuilder<T> buildInsertionManager( LevelProcessorChain<T, R, InsertRequestContext> levelProcessChain) { InsertionManager<T, R> insertionManager = new InsertionManager<>(lsmEngine.getWalManager()); insertionManager.setLevelProcessorsChain(levelProcessChain); buildInsertionManager(insertionManager); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public <R extends IInsertionRequest> LSMEngineBuilder<T> buildInsertionManager(\n InsertionManager<T, R> insertionManager) {\n lsmEngine.setInsertionManager(insertionManager);\n return this;\n }", "public LSMEngine<T> build() {\n return lsmEngine;\n }", "ImplementationManager createManager();", "private LSMEngineBuilder<T> buildLevelProcessors(ApplicationContext applicationContext) {\n LevelProcessorChain<T, IInsertionRequest, InsertRequestContext> insertionLevelProcessChain =\n generateLevelProcessorsChain(applicationContext.getInsertionLevelProcessClass());\n LevelProcessorChain<T, IDeletionRequest, DeleteRequestContext> deletionLevelProcessChain =\n generateLevelProcessorsChain(applicationContext.getDeletionLevelProcessClass());\n LevelProcessorChain<T, IQueryRequest, QueryRequestContext> queryLevelProcessChain =\n generateLevelProcessorsChain(applicationContext.getQueryLevelProcessClass());\n return buildQueryManager(queryLevelProcessChain)\n .buildInsertionManager(insertionLevelProcessChain)\n .buildDeletionManager(deletionLevelProcessChain);\n }", "private void init() {\n configureInsertMode(SMART_INSERT, false);\n setDocumentProvider(new SimpleDocumentProvider());\n }", "void setUpLinearManager();", "public void onEnable() {\n\t\tpermissionsManager = new PermissionsManager();\n\n\t\t// build our notes table\n\t\tDatabaseTableInfo notesTable = new DatabaseTableInfo();\n\t\tnotesTable.name = \"notes\";\n\t\tnotesTable.fields = new String[]{\n\t\t\t\t\"date TIMESTAMP DEFAULT 0\",\n\t\t\t\t\"noteTaker TINYTEXT\",\n\t\t\t\t\"notee TINYTEXT\",\n\t\t\t\t\"note TEXT\"\n\t\t};\n\t\tDatabaseManager.addTableConstruct(notesTable);\n\t\t\n\t\t// initialize our database manager\n\t\tdatabaseManager = new DatabaseManager();\n\t\t\n\t\t// our note manager\n\t\tnoteManager = new NoteManager();\n\t\t\n\t\t// set our command executors\n\t\tcommandManager = new CommandManager();\n\t\tthis.getCommand(\"note\").setExecutor(commandManager);\n\t\tthis.getCommand(\"notes\").setExecutor(commandManager);\n\t\tthis.getCommand(\"editnote\").setExecutor(commandManager);\n\t\tthis.getCommand(\"notedate\").setExecutor(commandManager);\n\t\tthis.getCommand(\"notepad\").setExecutor(commandManager);\n\t\t\n\t\t// load our multiline chat handler\n\t\tmultilineChatEntry = new MultilineChatEntry();\n\t\t\n\t\t// load our configuration\n\t\t//this.saveDefaultConfig();\n\t\tconfigurationManager = new ConfigurationManager(this.getConfig());\n\t\tthis.saveConfig();\n\t\t\n\t\t// let them now!\n\t\tLogger.log(\"&aPlugin enabled!\");\n\t}", "public MongoManager()\n\t{\n\t\ttry\n\t\t{\n\t\t/*\tmorphia = new Morphia();\n\t\t\tclient = new MongoClient();\n\t\t\tmorphia.mapPackage(\"com.glenwood.kernai.data.entity\");\n\t\t\tdatastore = morphia.createDatastore(client, \"Kernai\");\n\t\t\tdatastore.ensureIndexes();\n\t\t*/\t\n\t\t}\n\t\tcatch(Exception ex)\n\t\t{\n\t\t\tthrow ex;\n\t\t}\n\t\n\t}", "@Override\n public void initEngine() {\n \n }", "@Override\n public void initEngine() {\n \n }", "public void initClassificationModule(KinectInterface kinectModule, MovementFoundInterface engineModule);", "private IndexingManager() {\n Provider provider = new BouncyCastleProvider();\n Security.addProvider(provider);\n utility = Database_Utility.getInstance();\n conn = utility.getConnection();\n IMbuffer = IndexingManagerBuffer.getInstance();\n\n // This statement is to create purge table.\n\n boolean k = checkTable1(\"PurgeTable\");\n if (!k) {\n utility.createtable2(\"PurgeTable\");\n }\n boolean k1 = checkTable1(\"UserToCertMap\");\n if (!k1) {\n utility.createtable1();\n }\n\n // This statement is to run maintenance thread on loading of class to purge entries whose timer has expired.\n\n //maintenancethread();\n\n // This statement is to run maintenance thread on loading of class to ascertain root nodes.\n\n // maintenancethread1();\n\n // This statement is to run maintenance thread on loading of class to delete entries from purge table.\n\n // maintenancethread2();\n\n }", "private void build()\n\t{\n\t\tengine.addSystem(new InputSystem());\n\t\tengine.addSystem(new MovementSystem());\n\t\t\n\t}", "private EntityManager initSystems() {\n CameraSystem cameraSystem = new CameraSystem(Constants.WINDOW_WIDTH, Constants.WINDOW_HEIGHT);\n addSystem(cameraSystem);\n addSystem(new ZoomSystem());\n //Physics System\n addSystem(new PhysicsSystem());\n //Player movement system\n addSystem(new PlayerMovementSystem());\n\n addSystem(new CannonFiringSystem());\n addSystem(new CollisionSystem());\n addSystem(new KillSystem());\n addSystem(new HealthSystem());\n addSystem(new StatisticSystem());\n addSystem(new EnemySpawningSystem());\n addSystem(new InventorySystem());\n addSystem(new CurrencySystem());\n\n GUISystem guiSystem = new GUISystem();\n InputSystem inputSystem = new InputSystem(guiSystem);\n\n //Input System\n addSystem(inputSystem);\n //Entity Render System\n addSystem(new EntityRenderSystem());\n //Particle System\n addSystem(new ParticleSystem());\n addSystem(new PlayerActionSystem(guiSystem));\n addSystem(new MapRenderSystem());\n addSystem(new HUDSystem());\n //Debug Render System\n addSystem(new DebugRendererSystem());\n //GUI System\n addSystem(guiSystem);\n\n return this;\n }", "public void init() {\n \t\n this.onContentPropertyUpdate = new JavaBehaviour(this, \"onContentPropertyUpdate\", Behaviour.NotificationFrequency.TRANSACTION_COMMIT);\n this.beforeDeleteNode = new JavaBehaviour(this, \"beforeDeleteNode\", Behaviour.NotificationFrequency.FIRST_EVENT);\n this.onMoveNode = new JavaBehaviour(this, \"onMoveNode\", Behaviour.NotificationFrequency.TRANSACTION_COMMIT);\n this.onAddAspect = new JavaBehaviour(this, \"onAddAspect\", Behaviour.NotificationFrequency.TRANSACTION_COMMIT);\n \n this.policyComponent.bindClassBehaviour(\n ContentServicePolicies.OnContentPropertyUpdatePolicy.QNAME,\n QName.createQName(\n NamespaceService.CONTENT_MODEL_1_0_URI,\n \"content\"),\n this.onContentPropertyUpdate);\n \n this.policyComponent.bindClassBehaviour(\n NodeServicePolicies.BeforeDeleteNodePolicy.QNAME,\n QName.createQName(\n NamespaceService.CONTENT_MODEL_1_0_URI,\n \"cmobject\"),\n this.beforeDeleteNode);\n \n this.policyComponent.bindClassBehaviour(\n NodeServicePolicies.OnMoveNodePolicy.QNAME,\n QName.createQName(\n NamespaceService.CONTENT_MODEL_1_0_URI,\n \"cmobject\"),\n this.onMoveNode);\n \n this.policyComponent.bindClassBehaviour(\n NodeServicePolicies.OnAddAspectPolicy.QNAME,\n FolderQuotaConstants.ASPECT_FQ_QUOTA,\n this.onAddAspect);\n \n //set up transaction listener to run code after transaction\n this.transactionListener = new FolderSizeTransactionListener();\n \n logger.info(\"[FolderQuota] - Bound FolderQuotaBehaviour\");\n\n }", "protected void startInsertRunnable() {\n\t}", "public Engine build() {\n this.extensions.add(new CoreExtension());\n \n // load extensions\n this.extensions.forEach(extension -> {\n this.renderers.putAll(extension.getRenderers());\n this.directives.putAll(extension.getDirectives());\n this.nodeParsers.putAll(extension.getNodeParsers());\n this.filters.putAll(extension.getFilters());\n this.tests.putAll(extension.getTests());\n this.unaryOperators.putAll(extension.getUnaryOperators());\n this.binaryOperators.putAll(extension.getBinaryOperators());\n this.factories.addAll(extension.getNodeVisitorFactories());\n this.safeNodes.addAll(extension.getSafeNodes());\n });\n \n // create an operator token parser\n TokenParser unaryOperatorParser = TokenParser.in(TokenType.OPERATOR, this.unaryOperators.keySet().toArray(new String[]{}));\n TokenParser binaryOperatorParser = TokenParser.in(TokenType.OPERATOR, this.binaryOperators.keySet().toArray(new String[]{}));\n TokenParser operatorParser = unaryOperatorParser.or(binaryOperatorParser);\n \n // create a execute token parser\n TokenParser executeOpenParser = TokenParser.from(TokenType.EXECUTE_OPEN, compile(quote(this.executeOpen)), false);\n TokenParser executeCloseParser = TokenParser.from(TokenType.EXECUTE_CLOSE, compile(quote(this.executeClose)), false);\n TokenParser executeParser = executeOpenParser.then(NAME).then(operatorParser.or(EXPRESSION).until(executeCloseParser));\n this.starts.add(this.executeOpen);\n \n // create a print token parser\n TokenParser printOpenParser = TokenParser.from(TokenType.PRINT_OPEN, compile(quote(this.printOpen)), false);\n TokenParser printCloseParser = TokenParser.from(TokenType.PRINT_CLOSE, compile(quote(this.printClose)), false);\n TokenParser printParser = printOpenParser.then(operatorParser.or(EXPRESSION).until(printCloseParser));\n this.starts.add(this.printOpen);\n \n // create a comment token parser\n TokenParser commentOpenParser = TokenParser.from(TokenType.COMMENT_OPEN, compile(quote(this.commentOpen)), false);\n TokenParser commentCloseParser = TokenParser.from(TokenType.COMMENT_CLOSE, compile(quote(this.commentClose)), false);\n TokenParser commentInner = TokenParser.until(TokenType.TEXT, this.commentClose);\n TokenParser commentParser = commentOpenParser.then(commentInner.optional()).then(commentCloseParser);\n this.starts.add(this.commentOpen);\n \n // create a text token parser\n TokenParser leadingText = TokenParser.until(TokenType.TEXT, this.starts);\n TokenParser text = TokenParser.from(TokenType.TEXT, Pattern.compile(\"^.*\", Pattern.DOTALL | Pattern.MULTILINE), false);\n \n TokenParser principal = commentParser.or(executeParser).or(printParser).or(leadingText).zeroOrMore().then(text.optional()).then(EOF);\n this.tokenizerBuilder.parser(principal);\n Tokenizer tokenizer = this.tokenizerBuilder.build();\n \n ExpressionParser expressionParser = new ExpressionParser(this.unaryOperators, this.binaryOperators);\n \n Engine engine = new Engine(this.environment, expressionParser,\n renderers, directives, nodeParsers, \n filters, tests, factories, safeNodes,\n tokenizer);\n return engine;\n }", "public static void init() {\n\t\tinsertAdministratorAccessGroupSQL = new StringBuffer();\n\t\tinsertAdministratorAccessGroupSQL.append(\"INSERT INTO ADMINISTRATORACCESSGROUP \");\n\t\tinsertAdministratorAccessGroupSQL.append(\"( \");\n\t\tinsertAdministratorAccessGroupSQL.append(\" ADMINISTRATORACCESSGROUPID, \");\n\t\tinsertAdministratorAccessGroupSQL.append(\" ADMINISTRATORID, \");\n\t\tinsertAdministratorAccessGroupSQL.append(\" ADMINACCESSGROUPID, \");\n\t\tinsertAdministratorAccessGroupSQL.append(\" CREATIONTIMESTAMP, \");\n\t\tinsertAdministratorAccessGroupSQL.append(\" AUDITORID, \");\n\t\tinsertAdministratorAccessGroupSQL.append(\" AUDITTIMESTAMP \");\n\t\tinsertAdministratorAccessGroupSQL.append(\") \");\n\t\tinsertAdministratorAccessGroupSQL.append(\"VALUES \");\n\t\tinsertAdministratorAccessGroupSQL.append(\"( \");\n\t\tinsertAdministratorAccessGroupSQL.append(\" ^, \");\n\t\tinsertAdministratorAccessGroupSQL.append(\" ^, \");\n\t\tinsertAdministratorAccessGroupSQL.append(\" ^, \");\n\t\tinsertAdministratorAccessGroupSQL.append(\" ^, \");\n\t\tinsertAdministratorAccessGroupSQL.append(\" ^, \");\n\t\tinsertAdministratorAccessGroupSQL.append(\" ^ \");\n\t\tinsertAdministratorAccessGroupSQL.append(\") \");\n\t\t// Get delete AdministratorAccessGroup SQL.\n\t\tdeleteAdministratorAccessGroupSQL = new StringBuffer();\n\t\t// deleteAdministratorAccessGroupSQL = new StringBuffer();\n\t\tdeleteAdministratorAccessGroupSQL.append(\"UPDATE ADMINISTRATORACCESSGROUP \");\n\t\tdeleteAdministratorAccessGroupSQL.append(\"SET ACTIVE = FALSE, \");\n\t\tdeleteAdministratorAccessGroupSQL.append(\" AUDITORID = ^, \");\n\t\tdeleteAdministratorAccessGroupSQL.append(\" AUDITTIMESTAMP = ^, \");\n\t\tdeleteAdministratorAccessGroupSQL.append(\" NOOFCHANGES = NOOFCHANGES + 1 \");\n\t\tdeleteAdministratorAccessGroupSQL.append(\"WHERE ADMINISTRATORACCESSGROUPID = ^ \");\n\t\tdeleteAdministratorAccessGroupSQL.append(\"AND NOOFCHANGES = ^ \");\n\t\t// Get select AdministratorAccessGroupUsers SQL.\n\t\tselectAdministratorAccessGroupUsersSQL = new StringBuffer();\n\t\tselectAdministratorAccessGroupUsersSQL.append(\"SELECT A.ADMINISTRATORACCESSGROUPID, \");\n\t\tselectAdministratorAccessGroupUsersSQL.append(\" A.ADMINISTRATORID, \");\n\t\tselectAdministratorAccessGroupUsersSQL.append(\" A.ADMINACCESSGROUPID, \");\n\t\tselectAdministratorAccessGroupUsersSQL.append(\" A.CREATIONTIMESTAMP, \");\n\t\tselectAdministratorAccessGroupUsersSQL.append(\" A.AUDITORID, \");\n\t\tselectAdministratorAccessGroupUsersSQL.append(\" A.AUDITTIMESTAMP, \");\n\t\tselectAdministratorAccessGroupUsersSQL.append(\" A.ACTIVE, \");\n\t\tselectAdministratorAccessGroupUsersSQL.append(\" A.NOOFCHANGES, \");\n\t\tselectAdministratorAccessGroupUsersSQL.append(\" B.NAME AS ADMINACCESSGROUPNAME \");\n\t\tselectAdministratorAccessGroupUsersSQL.append(\"FROM ADMINISTRATORACCESSGROUP A, \");\n\t\tselectAdministratorAccessGroupUsersSQL.append(\" ADMINACCESSGROUP B \");\n\t\tselectAdministratorAccessGroupUsersSQL.append(\"WHERE B.ADMINACCESSGROUPID = A.ADMINACCESSGROUPID \");\n\t\t// Get select AdministratorAccessGroupUsers for Administrator SQL.\n\t\tselectAdministratorAccessGroupUsersForAdministratorSQL = new StringBuffer(selectAdministratorAccessGroupUsersSQL);\n\t\tselectAdministratorAccessGroupUsersForAdministratorSQL.append(\"AND A.ADMINISTRATORID = ^ \");\n\t\tselectAdministratorAccessGroupUsersForAdministratorSQL.append(\"AND A.ACTIVE = TRUE \");\n\t\tselectAdministratorAccessGroupUsersForAdministratorSQL.append(\"ORDER BY B.NAME \");\n\t}", "public GameManager() {\n\t\tobjects.add(new Player(4, 4, ComponentManager.getComponent(ComponentManager.ComponentType.AABB), ProjectileManager.ProjectileType.Bullet, ComponentManager.ComponentType.AABB));\n\t\t\n\t\n\t\t\n\t\tobjects.add(new Platform(new AABBComponent()));\n\t\t\n\t\tloadLevel(\"/levelImage2_0.png\");\n\t\t\n\t\t//мусор\n\t\t\n\t\t//p1 = null;\n\t\t\n\t\t\n\t\tPBParticle p1 = null;\n\t\tPBParticle p2 = null;\n\t\t\n\t\tPLink l1 = null;\n\t\t\n\t\tnumOfPart = 48;\n\t\t\n\t\tint colNum = numOfPart / 3;\n\t\t\n\t\t\n\t\tfor(int i = 0; i < numOfPart; i ++)\n\t\t{\n\t\t\t\n\t\t\t\n\t\t\tp2 = p1; \n\t\t\t\n\t\t\tp1 = new PBParticle( (float)((4 + i % colNum) * TS),(float) ((4 + i / colNum) * TS), (float)(Math.random()*5), (float)(Math.random()*5), 1, new CircleComponent());\n\t\t\t\n\t\t\t\n\t\t\t//связи диагональ левый верхний - правый нижний\n\t\t\t/*if(i / colNum > 0 && i % colNum < colNum - 1)//не первая строка и не последняя чатсица в строке\n\t\t\t{\n\t\t\t\tl1 = new PLink(p1, (PBParticle)objects.get(objects.size() - colNum + 1), 20, this.stiffness);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tsdlinks.add(l1);\n\t\t\t}\n\t\t\t\n\t\t\t//связи диагональ правый верхний - левый нижний\n\t\t\t\n\t\t\tif(i / colNum > 0 && i % colNum > 0) \n\t\t\t{\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tl1 = new PLink(p1, (PBParticle)objects.get(objects.size() - colNum - 1), 20, this.stiffness);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tmdlinks.add(l1);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//горизонтальные связи\n\t\t\t\n\t\t\t//первая итерация для создания связи не подходит\n\t\t\t\n\t\t\t//также для создания горизонтальной связи не подходит итерация\n\t\t\t//когда p1 на новой строке, а p2 а старой\n\t\t\t\n\t\t\t\n\t\t\tif(p2 != null && (p1.getPosY() - p2.getPosY()) == 0)\n\t\t\t{\n\t\t\t\tl1 = new PLink(p1, p2, 20, this.stiffness);\n\t\t\t\t\n\t\t\t\thlinks.add(l1);\n\t\t\t}\n\t\t\t\n\t\t\t//вертикальные связи\n\t\t\t\n\t\t\t//проверить не ноль ли при делении i на количество столбцов\n\t\t\t//если не ноль то я должен выбрать из массива ссылок элемент \n\t\t\t//порядковый номер которого \n\t\t\tif(i / colNum != 0) //не первая строка\n\t\t\t{\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tl1 = new PLink(p1, (PBParticle)objects.get(objects.size() - colNum ), 20, this.stiffness);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tvlinks.add(l1);\n\t\t\t}*/\n\t\t\t\n\t\t\t\n\t\t\tobjects.add(p1);\n\t\t}\n\t\t\n\n\t\t\n\t\t\n\t\t//p1 = new PBParticle( 12 * TS, 1 * TS, 0, 1, 1);\n\t\t//objects.add(p1);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tcamera = new Camera(\"player\");\n\t}", "private void initDLManager() {\n //TODO poner estos datos en configuraciones\n final String botName = \"DL-MS+A\";\n final String directlinePrimaryKey =\n //\"5Cx8OLT2X98.cwA.1j4.FGE7LsMoVuBtww9vQYNuC6lwoVBWYrb-5DHGzBbOeO0\"; // J\n //\"sccvRjdQVbw.cwA.8tQ.3tw3MFQtgG9bcqYf5xxHgW-lUYKymaoSFNCoIzI-SJY\"; //MS+A\n //\"IWixc2S5WaU.cwA.DEw.DV8nbC-BijSw5TbtNimDJuvrp45GpsKCRW4wPTtqYeY\"; //MP-AURA DEV\n \"QyKjl6KL-XQ.cwA.UTM.puyqrjpLvO1Briz7TjM7q_VqqAOflJ3jN0ryBGvkEiU\";\n mDLManager =\n DLManager.getInstance(this, directlinePrimaryKey);\n }", "@Override\r\n\tpublic void onEnable() {\n\t\tDatabaseHandler dbHandler = new DatabaseHandler();\r\n\t\tdbHandler.connect(\"localhost\", 27017);\r\n\t\t\r\n\t\t// store stuff\r\n\t\tArrayList<Inventory> storeInventoryList = new ArrayList<Inventory>();\r\n\t\tBlock storeMarker = Bukkit.getServer().getWorld(\"world\").getBlockAt(-45, 71, 26);\r\n\t\tChunk storeChunk = storeMarker.getChunk();\r\n\t\t\r\n\t\t// property world stuff\r\n\t\tHashMap<UUID, Location> previousPlayerLocations = new HashMap<UUID, Location>();\r\n\t\tWorld propertyWorld = Bukkit.getServer().createWorld(new WorldCreator(\"PropertyWorld\"));\r\n\t\t\r\n\t\t// set up listeners\r\n\t\tPluginManager pm = getServer().getPluginManager();\r\n\t\t\r\n\t\tpm.registerEvents(new JoinListener(dbHandler), this);\r\n\t\tpm.registerEvents(new ChunkListener(dbHandler), this);\r\n\t\tpm.registerEvents(new BlockListener(dbHandler), this);\r\n\t\tpm.registerEvents(new InteractListener(dbHandler), this);\r\n\t\tpm.registerEvents(new StoreListener(dbHandler, storeInventoryList), this);\r\n\t\t\r\n\t\t// set up commands\r\n\t\tthis.getCommand(\"store\").setExecutor(new CommandStore(dbHandler, storeInventoryList, storeChunk));\r\n\t\tthis.getCommand(\"bal\").setExecutor(new CommandBal(dbHandler));\r\n\t\tthis.getCommand(\"taxi\").setExecutor(new CommandTaxi(dbHandler));\r\n\t\tthis.getCommand(\"taxicheckfare\").setExecutor(new CommandTaxiCheckFare());\r\n\t\tthis.getCommand(\"property\").setExecutor(new CommandProperty(dbHandler));\r\n\t\tthis.getCommand(\"propertyview\").setExecutor(new CommandPropertyView(dbHandler, propertyWorld, previousPlayerLocations, this));\r\n\t\t\r\n\t}", "public manager() {\n initComponents();\n autoID();\n table_update();\n }", "int insert(WfCfgModuleCatalog record);", "public void initForAddNew() {\r\n\r\n\t}", "public void register(OpModeManager manager) {\n //manager.register(\"INFO: ver. 3.51.01 (pre-summer version)\", infoclass.class);\n// manager.register(\"NullOp\", NullOp.class);\n// manager.register(\"newTeleOp\", newTeleOp.class);\n// manager.register(\"ARMTESTER\", armsinglestick.class);\n// manager.register(\"BOTv1\", botv1.class);\n// manager.register(\"TURNLEFT\", auto2.class);\n// manager.register(\"TURNRIGHT\", auto3.class);\n// manager.register(\"ColorTest\", ColorTest.class);\n // manager.register(\"basicLineFollow\", basicLineFollow.class);\n // manager.register(\"basicLineAlign\", basicLineAlign.class);\n manager.register(\"TeleOp\", Teleop.class);\n // manager.register(\"JupiterTeleOp\", JupiterBotTeleOp.class);\n manager.register(\"PushTeleOp\", PushBotTest.class);\n // manager.register(\"PushTeleOp42\", PushBotTest42.class);\n// manager.register(\"colortest\", onecolortesst.class);\n// manager.register(\"AUTOENCODERS\", autoencode.class);\n// manager.register(\"autotestfour\", auto4.class);\n// manager.register(\"theGOOD THING\", encodertest.class);\n// manager.register(\"colortest2222222222\", seenpush.class);\n //manager.register(\"encode\", encodertest.class);\n//manager.register(\"encode\", encode.class);\n// manager.register(\"TESTR4LIN3D3T3CT!!!!\", linedetect.class);\n// manager.register(\"gyro test\", gyro.class);\n // manager.register(\"Kierian's teleop\", teleoptest.class);\n // manager.register(\"I2CCHANGER bottom\", LinearI2cColorSensorAddressChange9915.class);\n // manager.register(\"I2CCHANGER top\", Lineari2cchange2.class);\n// manager.register(\"pushbutton\", pushbutton.class);\n// manager.register(\"right\", practice.class);\n//manager.register(\"left\",left.class);\n// manager.register(\"rightclimber\", rightclimber.class);\n// manager.register(\"leftclimber\", leftclimber.class);\n// manager.register(\"leftreg\", regleft.class);/\n// / manager.register(\"rightreg\", regright.class);\n// manager.register(\"gyrotest\", gyro.class);\n// manager.register(\"THISISGONNAWORK\", thisisgonnawork.class);\n// manager.register(\"auto\", thisisgonnaworkods.class);\n// manager.register(\"ods test\", odstest.class);\n// manager.register(\"real\", realauto.class);\n //manager.register(\"right aka blue WITH THE LINE FOLLOW\", bluepid.class);\n //manager.register(\"right aka blue\", blue.class);\n// manager.register(\"line follow\", linefoolow.class);\n// manager.register(\"right\", radicalnewideablue.class);\n // manager.register(\"rightrmi\", rniblue.class);\n // manager.register(\"leftrmi\", rnired.class);\n // manager.register(\"they're running right\", theysayitsbetterblue.class);\n // manager.register(\"they're running left\", theysayitsbetterred.class);\n// manager.register(\"color\", button.class);\n // manager.register(\"left aka red (use at own risk)\", red.class);\n// manager.register(\"rightest\", bluetest.class);\n// manager.register(\"fake\", fakeauto.class);\n// manager.register(\"button\", temp.class);\n// manager.register(\"tot\", tot.class);\n// manager.register(\"left\", red.class);\n }", "public NormalSearch() throws InstantiationException, IllegalAccessException, ClassNotFoundException, SQLException {\n super();\n //ins = new globalInstance();\n // TODO Auto-generated constructor stub\n }", "public void newConfig ()\n {\n Class<?> clazz = group.getRawConfigClasses().get(0);\n try {\n ManagedConfig cfg = (ManagedConfig)PreparedEditable.PREPARER.apply(\n clazz.newInstance());\n if (cfg instanceof DerivedConfig) {\n ((DerivedConfig)cfg).cclass = group.getConfigClass();\n }\n newNode(cfg);\n } catch (Exception e) {\n log.warning(\"Failed to instantiate config [class=\" + clazz + \"].\", e);\n }\n }", "public LogicManager() {\n model = new ModelManager();\n conversationManager = new ConversationManager();\n }", "public GameManager( GameFrame gameFrame ){\r\n\t\tpassedLevelIds = new ArrayList<Integer>();\r\n\t\tthis.gameFrame = gameFrame;\r\n\t\tcollectionManager = new CollectionManager(this);\r\n\t\tlevelManager = new LevelManager(this);\r\n\t\tmusicOn = true;\r\n\t\tcurrentLevelId = levelManager.getCurrentLevelId();\r\n\t\tsoundManager = new SoundManager();\r\n\t\tobservers = new ArrayList<GameManagerObserver>();\r\n\t}", "private UpdateManager () {}", "public DBManager() {\n\t\t\n\t}", "private void importState() {\n SpeakerManager s = new SpeakerManager();\n this.speakerManager = s.importState();\n\n RoomManager r = new RoomManager();\n this.roomManager = r.importState();\n\n OrganizerManager o = new OrganizerManager();\n this.organizerManager = o.importState();\n\n EventManager e = new EventManager();\n this.eventManager = e.importState();\n\n ChatManager c = new ChatManager();\n this.chatManager = c.importState();\n\n AttendeeManager a = new AttendeeManager();\n this.attendeeManager = a.importState();\n\n\n }", "public SPManager() {\n \tmyCon = new DBManager();\n }", "private void registerManagers() {\n registerProviders();\n\n // Cast Managers\n if (worldGuardManager.isEnabled()) castManagers.add(worldGuardManager);\n if (preciousStonesManager.isEnabled()) castManagers.add(preciousStonesManager);\n if (redProtectManager != null && redProtectManager.isFlagsEnabled()) castManagers.add(redProtectManager);\n\n // Entity Targeting Managers\n if (preciousStonesManager.isEnabled()) targetingProviders.add(preciousStonesManager);\n if (townyManager.isEnabled()) targetingProviders.add(townyManager);\n if (residenceManager != null) targetingProviders.add(residenceManager);\n if (redProtectManager != null) targetingProviders.add(redProtectManager);\n\n // PVP Managers\n if (worldGuardManager.isEnabled()) pvpManagers.add(worldGuardManager);\n if (pvpManager.isEnabled()) pvpManagers.add(pvpManager);\n if (multiverseManager.isEnabled()) pvpManagers.add(multiverseManager);\n if (preciousStonesManager.isEnabled()) pvpManagers.add(preciousStonesManager);\n if (townyManager.isEnabled()) pvpManagers.add(townyManager);\n if (griefPreventionManager.isEnabled()) pvpManagers.add(griefPreventionManager);\n if (factionsManager.isEnabled()) pvpManagers.add(factionsManager);\n if (residenceManager != null) pvpManagers.add(residenceManager);\n if (redProtectManager != null) pvpManagers.add(redProtectManager);\n\n // Build Managers\n if (worldGuardManager.isEnabled()) blockBuildManagers.add(worldGuardManager);\n if (factionsManager.isEnabled()) blockBuildManagers.add(factionsManager);\n if (locketteManager.isEnabled()) blockBuildManagers.add(locketteManager);\n if (preciousStonesManager.isEnabled()) blockBuildManagers.add(preciousStonesManager);\n if (townyManager.isEnabled()) blockBuildManagers.add(townyManager);\n if (griefPreventionManager.isEnabled()) blockBuildManagers.add(griefPreventionManager);\n if (mobArenaManager != null && mobArenaManager.isProtected()) blockBuildManagers.add(mobArenaManager);\n if (residenceManager != null) blockBuildManagers.add(residenceManager);\n if (redProtectManager != null) blockBuildManagers.add(redProtectManager);\n if (landsManager != null) blockBuildManagers.add(landsManager);\n\n // Break Managers\n if (worldGuardManager.isEnabled()) blockBreakManagers.add(worldGuardManager);\n if (factionsManager.isEnabled()) blockBreakManagers.add(factionsManager);\n if (locketteManager.isEnabled()) blockBreakManagers.add(locketteManager);\n if (preciousStonesManager.isEnabled()) blockBreakManagers.add(preciousStonesManager);\n if (townyManager.isEnabled()) blockBreakManagers.add(townyManager);\n if (griefPreventionManager.isEnabled()) blockBreakManagers.add(griefPreventionManager);\n if (mobArenaManager != null && mobArenaManager.isProtected()) blockBreakManagers.add(mobArenaManager);\n if (citadelManager != null) blockBreakManagers.add(citadelManager);\n if (residenceManager != null) blockBreakManagers.add(residenceManager);\n if (redProtectManager != null) blockBreakManagers.add(redProtectManager);\n if (landsManager != null) blockBreakManagers.add(landsManager);\n\n // Team providers\n if (heroesManager != null && heroesManager.useParties()) teamProviders.add(heroesManager);\n if (skillAPIManager != null && skillAPIManager.usesAllies()) teamProviders.add(skillAPIManager);\n if (useScoreboardTeams) teamProviders.add(new ScoreboardTeamProvider());\n if (permissionTeams != null && !permissionTeams.isEmpty()) {\n teamProviders.add(new PermissionsTeamProvider(permissionTeams));\n }\n if (factionsManager != null) teamProviders.add(factionsManager);\n if (battleArenaManager != null && useBattleArenaTeams) teamProviders.add(battleArenaManager);\n if (ultimateClansManager != null) teamProviders.add(ultimateClansManager);\n\n // Player warp providers\n if (preciousStonesManager != null && preciousStonesManager.isEnabled()) {\n playerWarpManagers.put(\"fields\", preciousStonesManager);\n }\n if (redProtectManager != null) playerWarpManagers.put(\"redprotect\", redProtectManager);\n if (residenceManager != null) playerWarpManagers.put(\"residence\", residenceManager);\n }", "public <R extends IQueryRequest> LSMEngineBuilder<T> buildQueryManager(\n QueryManager<T, R> queryManager) {\n lsmEngine.setQueryManager(queryManager);\n return this;\n }", "public static void build ()\r\n {\r\n lgt.insert(1);\r\n lgt.insert(2);\r\n lgt.insert(5);\r\n \r\n lgt.findRoot();\r\n lgt.insert(3);\r\n \r\n lgt.findRoot();\r\n lgt.insert(4);\r\n \r\n lgt.insert(6);\r\n lgt.findParent();\r\n lgt.insert(7);\r\n \r\n }", "public void start() {\n System.out.println(\"OBRMAN started\");\n ApamManagers.addManager(this, 3);\n OBRMan.obr = new OBRManager(null, repoAdmin);\n obr.startWatchingRepository();\n }", "EMInitializer() {\r\n try {\r\n emf = Persistence.createEntityManagerFactory(\"pl.polsl_MatchStatist\"\r\n + \"icsWeb_war_4.0-SNAPSHOTPU\");\r\n em = emf.createEntityManager();\r\n } catch (Exception e) {\r\n em = null;\r\n emf = null;\r\n }\r\n\r\n }", "private void initEmulator() {\n From from;\n\n from = new From();\n Random rnd = new Random();\n int n = rnd.nextInt(900000);\n\n //TODO poner estos datos en configuraciones\n from.setId(\"DL-USER\" + n);\n from.setName(\"CogDLUser\" + n);\n\n mEmulator = new Emulator(from);\n }", "public GameManagerAstratta init(Giocatore[] nomiGiocatori, int numGiocatori,\r\n String nomeConfigurazione) throws SQLException {\n return null;\r\n }", "private ScriptInstanceManager() {\n\t\tsuper();\n\t}", "public static void insLns() throws ClassNotFoundException, SQLException {\r\n Statement s = DBConnect.connection.createStatement();\r\n for (int w = 1; w < 11; w++) {\r\n String insLines = \"INSERT INTO \" + StFrmNm\r\n + \"(Line) \"\r\n + \"VALUES(\"\r\n + \"'\" + w + \"'\"\r\n + \")\";\r\n s.execute(insLines);\r\n }\r\n }", "public Engine(){\n name = \"Basic Engine\";\n moveDeduction = 1;\n }", "public LSMEngineBuilder<T> buildLSMManagers(String packageName, WALManager walManager) {\n try {\n ApplicationContext property =\n ApplicationContextGenerator.GeneratePropertyWithAnnotation(packageName);\n buildLSMManagers(property, walManager);\n } catch (Exception e) {\n logger.error(e.getMessage());\n }\n return this;\n }", "public interface DatabaseManager {\r\n\r\n // NOTE: this is a draft of the interface. More methods will likely be\r\n // added.\r\n\r\n /**\r\n * Uploads the specified feature to the database.\r\n * \r\n * @param file the shapefile (*.shp) to upload\r\n * @param project the project to associate the shapefile with\r\n * @return the id of the feature in the database\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n int uploadFeature(File file, String project) throws IOException, SQLException;\r\n\r\n /**\r\n * Uploads the specified modis tile to the database.\r\n * \r\n * @param file the .hdf to upload\r\n * @param product the modis product\r\n * @param date the date the data was captured\r\n * @param downloaded the date the data was downloaded from the host\r\n * @param horz the horizontal tile number\r\n * @param vert the vertical tile number\r\n * @return the id of the Modis raster in the database\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n int uploadModis(File file, ModisProduct product, DataDate date, DataDate updated, int horz, int vert) throws IOException, SQLException;\r\n\r\n /**\r\n * Uploads the specified ETo file to the database.\r\n * \r\n * @param file the\r\n * @param date\r\n * @param updated\r\n * @return the id of the ETo raster in the database\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n int uploadEto(File file, DataDate date, DataDate updated) throws IOException, SQLException;\r\n\r\n /**\r\n * Uploads the specified TRMM file to the database.\r\n * \r\n * @param file\r\n * @param date\r\n * @param updated\r\n * @return the id of the TRMM raster in the database\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n int uploadTrmm(File file, DataDate date, DataDate updated) throws IOException, SQLException;\r\n\r\n /**\r\n * Uploads the specified projected Modis product to the database.\r\n * \r\n * @param file\r\n * @param project\r\n * @param product\r\n * @param date\r\n * @param updated\r\n * @return the id of the projected Modis raster in the database\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n int uploadProjectedModis(File file, String project, ModisProduct product, DataDate date, DataDate updated) throws IOException, SQLException;\r\n\r\n /**\r\n * Uploads the specified projected ETo product to the database.\r\n * \r\n * @param file\r\n * @param project\r\n * @param date\r\n * @param updated\r\n * @return the id of the projected ETo raster in the database\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n int uploadProjectedEto(File file, String project, DataDate date, DataDate updated) throws IOException, SQLException;\r\n\r\n /**\r\n * Uploads the projected TRMM product to the database.\r\n * \r\n * @param file\r\n * @param project\r\n * @param date\r\n * @param updated\r\n * @return the id of the TRMM raster in the database\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n int uploadProjectedTrmm(File file, String project, DataDate date, DataDate updated) throws IOException, SQLException;\r\n\r\n /**\r\n * Uploads the specified ETa product to the database.\r\n * \r\n * @param file\r\n * @param project\r\n * @param date\r\n * @param updated\r\n * @return the id of the ETa raster in the database\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n int uploadEta(File file, String project, DataDate date, DataDate updated) throws IOException, SQLException;\r\n\r\n /**\r\n * Uploads the specified EVI product to the database.\r\n * \r\n * @param file\r\n * @param project\r\n * @param date\r\n * @param updated\r\n * @return the id of the EVI raster in the database\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n int uploadEvi(File file, String project, DataDate date, DataDate updated) throws IOException, SQLException;\r\n\r\n /**\r\n * Uploads the specified NDVI product to the database.\r\n * \r\n * @param file\r\n * @param project\r\n * @param date\r\n * @param updated\r\n * @return the id of the NDVI raster in the database\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n int uploadNdvi(File file, String project, DataDate date, DataDate updated) throws IOException, SQLException;\r\n\r\n /**\r\n * Uploads the specified NDWI5 product to the database.\r\n * \r\n * @param file\r\n * @param project\r\n * @param date\r\n * @param updated\r\n * @return the id of the NDWI5 raster in the database\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n int uploadNdwi5(File file, String project, DataDate date, DataDate updated) throws IOException, SQLException;\r\n\r\n /**\r\n * Uploads the specified NDWI6 product to the database.\r\n * \r\n * @param file\r\n * @param project\r\n * @param date\r\n * @param updated\r\n * @return the id of the NDWI6 raster in the database\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n int uploadNdwi6(File file, String project, DataDate date, DataDate updated) throws IOException, SQLException;\r\n\r\n /**\r\n * Uploads the specified SAVI product to the database.\r\n * \r\n * @param file\r\n * @param project\r\n * @param date\r\n * @param updated\r\n * @return the id of the SAVI raster in the database\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n int uploadSavi(File file, String project, DataDate date, DataDate updated) throws IOException, SQLException;\r\n\r\n /**\r\n * Downloads the specified feature and places it in the specified file in\r\n * the shapefile.\r\n * \r\n * @param file the location to save the feature\r\n * @param id the id of the feature\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n void downloadFeature(File file, int id) throws IOException, SQLException;\r\n\r\n /**\r\n * Downloads the specified Modis tile from the database.\r\n * \r\n * @param file\r\n * @param product\r\n * @param id\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n void downloadModis(File file, ModisProduct product, int id) throws IOException, SQLException;\r\n\r\n /**\r\n * Downloads the specified ETo raster from the database and saves it to the\r\n * specified file.\r\n * \r\n * @param file\r\n * @param id\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n void downloadEto(File file, int id) throws IOException, SQLException;\r\n\r\n /**\r\n * Downloads the specified TRMM raster from the database and saves it to the\r\n * specified file.\r\n * \r\n * @param file\r\n * @param id\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n void downloadTrmm(File file, int id) throws IOException, SQLException;\r\n\r\n /**\r\n * Downloads the specified projected Modis product from the database.\r\n * \r\n * @param file\r\n * @param product\r\n * @param id\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n void downloadProjectedModis(File file, ModisProduct product, int id) throws IOException, SQLException;\r\n\r\n /**\r\n * Downloads the specified projected ETo product from the database.\r\n * \r\n * @param file\r\n * @param id\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n void downloadProjectedEto(File file, int id) throws IOException, SQLException;\r\n\r\n /**\r\n * Downloads the specified projected TRMM product from the database.\r\n * \r\n * @param file\r\n * @param id\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n void downloadProjectedTrmm(File file, int id) throws IOException, SQLException;\r\n\r\n /**\r\n * Downloads the specified ETa product from the database.\r\n * \r\n * @param file\r\n * @param id\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n void downloadEta(File file, int id) throws IOException, SQLException;\r\n\r\n /**\r\n * Downloads the specified EVI product from the database.\r\n * \r\n * @param file\r\n * @param id\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n void downloadEvi(File file, int id) throws IOException, SQLException;\r\n\r\n /**\r\n * Downloads the specified NDVI product from the database.\r\n * \r\n * @param file\r\n * @param id\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n void downloadNdvi(File file, int id) throws IOException, SQLException;\r\n\r\n /**\r\n * Downloads the specified NDWI5 product from the database.\r\n * \r\n * @param file\r\n * @param id\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n void downloadNdwi5(File file, int id) throws IOException, SQLException;\r\n\r\n /**\r\n * Downloads the specified NDWI6 product from the database.\r\n * \r\n * @param file\r\n * @param id\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n void downloadNdwi6(File file, int id) throws IOException, SQLException;\r\n\r\n /**\r\n * Downloads the specified SAVI product from the database.\r\n * \r\n * @param file\r\n * @param id\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n void downloadSavi(File file, int id) throws IOException, SQLException;\r\n\r\n /**\r\n * Returns the id of the MODIS raster for the specified product and date.\r\n * \r\n * @param product\r\n * @param date\r\n * @param horz\r\n * @param vert\r\n * @return the id of the raster or -1 if the raster isn't found\r\n * @throws SQLException\r\n */\r\n int getModisId(ModisProduct product, DataDate date, int horz, int vert) throws SQLException;\r\n\r\n /**\r\n * Returns the id of the ETo for the specified date.\r\n * \r\n * @param date\r\n * @return the id of the raster or -1 if the raster isn't found\r\n * @throws SQLException\r\n */\r\n int getEtoId(DataDate date) throws SQLException;\r\n\r\n /**\r\n * Returns the id of the TRMM for the specified date.\r\n * \r\n * @param date\r\n * @return the id of the raster or -1 if the raster isn't found\r\n * @throws SQLException\r\n */\r\n int getTrmmId(DataDate date) throws SQLException;\r\n\r\n /**\r\n * Returns the id of the reprojected Modis raster for the specified\r\n * project, product, and date.\r\n * \r\n * @param project\r\n * @param product\r\n * @param date\r\n * @return the id of the raster or -1 if the raster isn't found\r\n * @throws SQLException\r\n */\r\n int getReprojectedModisId(String project, DataDate date) throws SQLException;\r\n\r\n /**\r\n * Returns the id of the reprojected ETo raster for the specified project\r\n * and date.\r\n * \r\n * @param project\r\n * @param date\r\n * @return the id of the raster or -1 if the raster isn't found\r\n * @throws SQLException\r\n */\r\n int getReprojectedEtoId(String project, DataDate date) throws SQLException;\r\n\r\n /**\r\n * Returns the id of the reprojected TRMM raster for the specified project\r\n * and date.\r\n * \r\n * @param project\r\n * @param date\r\n * @return the id of the raster or -1 if the raster isn't found\r\n * @throws SQLException\r\n */\r\n int getReprojectedTrmmId(String project, DataDate date) throws SQLException;\r\n\r\n /**\r\n * Returns the id of the ETa raster for the specified project and date.\r\n * \r\n * @param project\r\n * @param date\r\n * @return the id of the raster or -1 if the raster isn't found\r\n * @throws SQLException\r\n */\r\n int getEtaId(String project, DataDate date) throws SQLException;\r\n\r\n /**\r\n * Returns the id of the EVI raster for the specified project and date.\r\n * \r\n * @param project\r\n * @param date\r\n * @return the id of the raster or -1 if the raster isn't found\r\n * @throws SQLException\r\n */\r\n int getEviId(String project, DataDate date) throws SQLException;\r\n\r\n /**\r\n * Returns the id of the NDVI raster for the specified project and date.\r\n * \r\n * @param project\r\n * @param date\r\n * @return the id of the raster or -1 if the raster isn't found\r\n * @throws SQLException\r\n */\r\n int getNdviId(String project, String feature, DataDate date) throws SQLException;\r\n\r\n /**\r\n * Returns the id of the NDWI5 raster for the specified project and date.\r\n * \r\n * @param project\r\n * @param date\r\n * @return the id of the raster or -1 if the raster isn't found\r\n * @throws SQLException\r\n */\r\n int getNdwi5Id(String project, String feature, DataDate date) throws SQLException;\r\n\r\n /**\r\n * Returns the id of the NDWI6 raster for the specified project and date.\r\n * \r\n * @param project\r\n * @param date\r\n * @return the id of the raster or -1 if the raster isn't found\r\n * @throws SQLException\r\n */\r\n int getNdwi6Id(String project, String feature, DataDate date) throws SQLException;\r\n\r\n /**\r\n * Returns the id of the SAVI raster for the specified project and date.\r\n * \r\n * @param project\r\n * @param date\r\n * @return the id of the raster or -1 if the raster isn't found\r\n * @throws SQLException\r\n */\r\n int getSaviId(String project, String feature, DataDate date) throws SQLException;\r\n\r\n /**\r\n * Uploads the specified zonal statistics.\r\n * \r\n * @param project\r\n * @param feature\r\n * @param zoneField\r\n * @param zone\r\n * @param date\r\n * @param index\r\n * @param zonalStatistics\r\n */\r\n void uploadZonalStatistic(String project, String feature, String zoneField,\r\n String zone, DataDate date, EnvironmentalIndex index,\r\n ZonalStatistic zonalStatistics) throws SQLException;\r\n\r\n /**\r\n * Returns the id of the zonal statistics for the specified parameters.\r\n * \r\n * @param project\r\n * @param feature\r\n * @param zoneField\r\n * @param zone\r\n * @param date\r\n * @param index\r\n * @return the id or -1 if it is not found\r\n */\r\n int getZonalStatisticId(String project, String feature, String zoneField,\r\n String zone, DataDate date, EnvironmentalIndex index)\r\n throws SQLException;\r\n\r\n /**\r\n * Returns zonal statistics for the specified zonal statistic id.\r\n * \r\n * @param id\r\n * @return zonal statistics\r\n * @throws SQLException\r\n */\r\n ZonalStatistic getZonalStatistic(int id) throws SQLException;\r\n}", "private ModuleServiceImpl(){\n\t\t//initialize local data.\n\t\tfactories = new ConcurrentHashMap<String, IModuleFactory>();\n\t\tstorages = new ConcurrentHashMap<String, IModuleStorage>();\n\t\tcache = new ConcurrentHashMap<String, Module>();\n\t\tmoduleListeners = new ConcurrentHashMap<String, IModuleListener>();\n\n\t\tif (LOGGER.isDebugEnabled()) {\n\t\t\tLOGGER.debug(\"Created new ModuleServiceImplementation\");\n\t\t}\n\n\t\tConfigurationManager.INSTANCE.configure(this);\n\t}", "public void initialize() {\n while (il == null)\n try {\n Thread.sleep(1);\n } catch (InterruptedException e) {\n continue;\n }\n\n // Set up command manager (undo and redo)\n commandManager = new ModifySongManager(staff, this);\n \n // Set up staff.\n HBox[] staffLedgerLines = { staffExtLinesHighC, staffExtLinesHighA,\n staffExtLinesLowC, staffExtLinesLowA };\n staff = new Staff(staffLedgerLines, this, il, arrangementList);\n controlPanel = new Controls(staff, this, il, arrangementList);\n staff.setControlPanel(controlPanel);\n \n // HACK\n staffInstrumentEventHandler = new StaffInstrumentEventHandler(staff, il, commandManager);\n \n commandManager.setStaff(staff);\n \n // Set up top line.\n instBLine = new ButtonLine(instLine, selectedInst, il, staff);\n selectedInst.setImage(il.getSpriteFX(ImageIndex.MARIO));\n\n topPanel = new PanelButtons(staff, this, il, instBLine);\n staff.setTopPanel(topPanel);\n\n arrangementList.setEditable(true);\n arrangementList.setStyle(\"-fx-font: 8pt \\\"Arial\\\";\");\n // Hide all arranger features for now.\n arrangementList.setVisible(false);\n addButton.setVisible(false);\n deleteButton.setVisible(false);\n upButton.setVisible(false);\n downButton.setVisible(false);\n \n // Set up clipboard.\n rubberBand = new StaffRubberBand();\n clipboard = new StaffClipboard(rubberBand, staff, this, il);\t\n \n // Fix TextField focus problems.\n new SongNameController(songName, this);\n \n }", "private AdminEntity() {\n \tsuper();\n\n this.emf = Persistence.createEntityManagerFactory(\"entityManager\");\n\tthis.em = this.emf.createEntityManager();\n\tthis.tx = this.em.getTransaction();\n }", "int insertSelective(WfCfgModuleCatalog record);", "@Override\n public void onEnable() {\n plugin = this;\n if(!getServer().getPluginManager().isPluginEnabled(\"BedWars1058\")){\n getLogger().severe(\"Unable to locate Bedwars1058.\");\n getLogger().severe(\"Plugin will be disabled!\");\n getServer().getPluginManager().disablePlugin(this);\n return;\n }else{\n bwAPI = Bukkit.getServicesManager().getRegistration(BedWars .class).getProvider();\n bedwarsEnabled = true;\n }\n if(!getServer().getPluginManager().isPluginEnabled(\"Citizens\")){\n getLogger().severe(\"Citizens is missing shopkeeper won't be used!\");\n getServer().getPluginManager().disablePlugin(this);\n return;\n }else{\n npcRegistry = CitizensAPI.getNPCRegistry();\n citizensEnabled = true;\n getLogger().info(\"Hooked with Citizens for shopkeeper\");\n }\n /*commandManager = new BukkitCommandManager(this);\n if(commandManager == null){\n getLogger().severe(\"Unable to intialize BukkitCommandManager.\");\n getLogger().severe(\"Plugin will be disabled!\");\n getServer().getPluginManager().disablePlugin(this);\n return;\n }*/\n fileUtils = new FileUtils();\n configuration = new Configuration();\n if(!configuration.createConfiguration(this)){\n getLogger().severe(\"Unable to create configuration file.\");\n getLogger().severe(\"Plugin will be disabled!\");\n getServer().getPluginManager().disablePlugin(this);\n return;\n }\n messages = new Messages();\n if(!messages.generateMessages()){\n getLogger().severe(\"Unable to create messages.yml file.\");\n getLogger().severe(\"Plugin will be disabled!\");\n getServer().getPluginManager().disablePlugin(this);\n return;\n }\n cacheManager = new CacheManager(this);\n if(!cacheManager.buildCache()){\n getLogger().severe(\"Unable to create cache file.\");\n getLogger().severe(\"Plugin will be disabled!\");\n getServer().getPluginManager().disablePlugin(this);\n return;\n }\n scheduler = new WorkloadScheduler();\n scheduler.intializeThread();\n storage = new Storage(this,getConfiguration().isUsingMysql());\n storage.build();\n storage.tryConnection();\n storage.createDatabase();\n randomUtility = new RandomUtility(this);\n cosmeticManager = new CosmeticManager();\n cosmeticManager.loadCosmetics();\n playerManager = new PlayerCosmeticsManager();\n registerListeners();\n cooldownTasks = new Cooldowns();\n cooldownTasks.runTaskTimerAsynchronously(this,100L,20L);\n registerCommands();\n getLogger().info(\"------------------------------------------------\");\n getLogger().info(\"Enabled Plugin\");\n getLogger().info(\"------------------------------------------------\");\n\n }", "abstract void initPersistance();", "private static void InitTagger() {\n\t\ttagger = new MaxentTagger(\"models/english-left3words-distsim.tagger\");\n\t}", "public StorageManagerImpl()\n {\n if (log.isDebugEnabled())\n {\n log.debug(\"Creating Instance of StorageManagerImpl\");\n }\n storageProxyHolder = new Hashtable();\n\n try\n {\n initializeStorageProxies();\n nRegister();\n }\n catch (Throwable throwable)\n {\n if (log.isErrorEnabled())\n {\n log.error(\"Failed to create StorageManager object\", throwable);\n }\n throwable.printStackTrace();\n }\n }", "private UnitManager() {\r\n\t\tUM = new UnitMap(); // create an object\r\n\t}", "public ChunkManager() {\n instance = this;\n\n durabilityDir = new File(ObsidianDestroyer.getInstance().getDataFolder(), \"data\" + File.separator + \"durabilities\");\n if (!durabilityDir.exists()) {\n durabilityDir.mkdirs();\n }\n\n load();\n }", "public EntityManager(WeaponModule playerWeapon) {\n player = new PlayerEntity(\n Settings.game_width/2 - PlayerEntity.DEF_PLAYER_WIDTH/2,\n Settings.game_height/2 - PlayerEntity.DEF_PLAYER_HEIGHT/2,\n playerWeapon\n// new MainBlasterModule(Settings.player_gun_lock)\n// new SideBlasterModule()\n );\n\n ents = new ArrayList<Entity>();\n sub_queue = new ArrayList<Entity>();\n unsub_queue = new ArrayList<Entity>();\n\n cols = new ArrayList<CollisionBox>();\n sub_cueue = new ArrayList<CollisionBox>();\n unsub_cueue = new ArrayList<CollisionBox>();\n\n particles = new ArrayList<Particle>();\n p_sub_queue = new ArrayList<Particle>();\n p_unsub_queue = new ArrayList<Particle>();\n }", "@Override\n public void initialise(GameEngine engine, Context rootContext) {\n TypeHandlerLibrary typeHandlerLibrary = rootContext.get(TypeHandlerLibrary.class);\n Gson gson = new GsonBuilder().setPrettyPrinting().create();\n Serializer<GsonPersistedData> serializer = new Serializer<>(\n typeHandlerLibrary,\n new GsonPersistedDataSerializer(),\n new GsonPersistedDataWriter(gson),\n new GsonPersistedDataReader(gson)\n );\n autoConfigManager = new AutoConfigManager(serializer);\n typeHandlerLibrary.addTypeHandlerFactory(new AutoConfigTypeHandlerFactory(typeHandlerLibrary));\n rootContext.put(AutoConfigManager.class, autoConfigManager);\n\n autoConfigManager.loadConfigsIn(rootContext);\n }", "private void createAgent() {\n logger.info(\"Creating agent\");\n iteration = 0;\n aiManager = new AIManager(configDialogInfo);\n aiManager.getAgent().addObserver(\"gameEngine\", this);\n AIBirth.generate(aiManager.getAgent());\n aiManager.start();\n }", "public interface Manager {\n\n}", "@Override\n public void onEnable() {\n // Config\n getConfig().options().copyDefaults(true);\n saveConfig();\n\n // Get and load the libraries\n LIBRARIES = new LibraryHandler(this);\n\n // Evo-inflector\n LIBRARIES.addMavenLibrary(LibraryHandler.MAVEN_CENTRAL, Depends.ORG_ATTEO, Depends.EVO, Depends.EVO_VER);\n\n if (Setting.MONGODB_PERSISTENCE) {\n LIBRARIES.addMavenLibrary(LibraryHandler.MAVEN_CENTRAL, Depends.ORG_MONGO, Depends.MONGODB,\n Depends.MONGODB_VER);\n }\n\n // Enable\n new DGGame(this);\n }", "private void createFrameworkManipulator() {\n \t\tFrameworkAdmin admin = getFrameworkAdmin();\n \t\tif (admin == null)\n \t\t\tthrow new RuntimeException(\"Framework admin service not found\"); //$NON-NLS-1$\n \t\tmanipulator = admin.getManipulator();\n \t\tif (manipulator == null)\n \t\t\tthrow new RuntimeException(\"Framework manipulator not found\"); //$NON-NLS-1$\n \t}", "public Session(){\n\t\tdb = ALiteOrmBuilder.getInstance().openWritableDatabase();\n\t\texternalsCallbacks = new ArrayList<EntityListener>();\n\t}", "private void initManagers() {\n\t\t// TODO Auto-generated method stub\n\t\tvenueManager = new VenueManager();\n\t\tadView = new AdView(this, AdSize.SMART_BANNER,\n\t\t\t\tConstants.AppConstants.ADDMOB);\n\t\tanimationSounds = new AnimationSounds(VenuesActivity.this);\n\n\t}", "public interface AvanceSalaireManager\r\n extends GenericManager<AvanceSalaire, Long>\r\n{\r\n\r\n public final static String SERVICE_NAME = \"AvanceSalaireManager\";\r\n \r\n public AvanceSalaire generereglement(AvanceSalaire entity);\r\n \r\n public AvanceSalaire confirme(AvanceSalaire entity);\r\n \r\n public AvanceSalaire annule(AvanceSalaire entity);\r\n\r\n}", "@Override\n public void onEnable() {\n log.info(\"Loading players file\");\n try {\n players = this.load(PLAYERS_CONF_PATH);\n } catch (Exception e) {\n }\n if (players == null) {\n log.info(\"players == null, creating Map\");\n players = new HashMap<String, PlayerConfig>();\n }\n log.info(\"Enabling CanBadia Plugin\");\n\n PluginManager pm = this.getServer().getPluginManager();\n\n\n getCommand(\"trade\").setExecutor(tradeCommandExecutor);\n getCommand(\"god\").setExecutor(godCommandExecutor);\n getCommand(\"godsfullpower\").setExecutor(godCommandExecutor);\n getCommand(\"market\").setExecutor(marketCommandExecutor);\n getCommand(\"class\").setExecutor(godCommandExecutor);\n getCommand(\"wall\").setExecutor(wallCommandExecutor);\n\n\n /*Some other example listeners\n pm.registerEvent(Event.Type.PLAYER_MOVE, playerListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.BLOCK_PLACE, blockListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.ENTITY_DAMAGE, entityListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.BLOCK_BREAK, blockListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.ENTITY_EXPLODE, entityListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.BLOCK_BREAK, blockListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.CREATURE_SPAWN, spawnListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.ENTITY_EXPLODE, entityListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.BLOCK_BURN, blockListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.BLOCK_IGNITE, blockListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.PLAYER_JOIN, playerListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.PLAYER_INTERACT, playerListener, Event.Priority.Normal, this);\n */\n\n }", "public ExamMagicDataModule(Configuration config){\r\n\t\tthis.config = config;\r\n\t}", "@StartStep(localName=\"command-engineering\", after={\"config\"})\n public static void startCommandEngineering(LifecycleContext context) \n {\n // for each class that is a Catalog or Command, create an entry for those in the context.\n ClassScanner classScanner = new ClassScanner(context);\n classScanner.scan();\n }", "private TSLManager() {\n\t\tsuper();\n\t}", "@Before\n\tpublic void onSetUpBeforeTransaction() throws Exception {\n\t\t// load the spring created dao class bean from the Spring Application\n\t\t// Context\n\t\tQnaDao dao = (QnaDao) applicationContext.getBean(\"org.sakaiproject.qna.dao.impl.QnaDaoTarget\");\n\t\tif (dao == null) {\n\t\t\tlog.error(\"onSetUpBeforeTransaction: DAO could not be retrieved from spring context\");\n\t\t}\n\t\t\t\n\t\tpermissionLogic = new PermissionLogicImpl();\n\t\tpermissionLogic.setExternalLogic(externalLogicStub);\n\t\t\n\t\t// create and setup options\n\t\toptionsLogic = new OptionsLogicImpl();\n\t\toptionsLogic.setDao(dao);\n\t\toptionsLogic.setPermissionLogic(permissionLogic);\n\t\toptionsLogic.setExternalLogic(externalLogicStub);\n\t\toptionsLogic.setExternalEventLogic(externalEventLogicStub);\n\t\toptionsLogic.setServerConfigurationService(serverConfigurationServiceStub);\n\t\t\n\t\t// create and setup category logic\n\t\tcategoryLogic = new CategoryLogicImpl();\n\t\tcategoryLogic.setDao(dao);\n\t\tcategoryLogic.setExternalEventLogic(externalEventLogicStub);\n\t\tcategoryLogic.setExternalLogic(externalLogicStub);\n\t\tcategoryLogic.setPermissionLogic(permissionLogic);\n\t\tcategoryLogic.setQnaBundleLogic(bundleLogicStub);\n\t\t\n\t\t// create and setup the question logic\n\t\tquestionLogic = new QuestionLogicImpl();\n\t\tquestionLogic.setDao(dao);\n\t\tquestionLogic.setPermissionLogic(permissionLogic);\n\t\tquestionLogic.setOptionsLogic(optionsLogic);\n\t\tquestionLogic.setExternalLogic(externalLogicStub);\n\t\tquestionLogic.setExternalEventLogic(externalEventLogicStub);\n\t\tquestionLogic.setDeveloperHelperService(developerHelperServiceStub);\n\t\tquestionLogic.setNotificationLogic(notificationLogicStub);\n\t\tquestionLogic.setCategoryLogic(categoryLogic);\n\t\t\n\t\tquestionSmsCommand = new QuestionSmsCommand();\n\t\tquestionSmsCommand.setOptionsLogic(optionsLogic);\n\t\tquestionSmsCommand.setQnaBundleLogic(bundleLogicStub);\n\t\tquestionSmsCommand.setQuestionLogic(questionLogic);\n\t\tquestionSmsCommand.setCategoryLogic(categoryLogic);\n\t\tquestionSmsCommand.setExternalLogic(externalLogicStub);\n\t\tquestionSmsCommand.setPermissionLogic(permissionLogic);\n\n\t}", "private WrappedEngine() {\n logger = new ONDEXCoreLogger();\n addONDEXListener(logger);\n pluginLogger = new ONDEXPluginLogger();\n EnvironmentVariable ev = new EnvironmentVariable(\"ONDEX VAR=\" + Config.ondexDir);\n ev.setLog4jLevel(Level.INFO);\n fireEventOccurred(ev);\n }", "public TManagerImp() {\n transactions = new ConcurrentHashMap<>();\n }", "private DatarouterStoragePlugin(DatarouterStorageDaosModule daosModule){\n\t\tthis(null, null, null, null, null, null, null, daosModule, null, null, null, null);\n\t}", "private DaoManager() {\n }", "public LazyKeyManager(Configuration config, KeyManager prevMgr) {\n super(config);\n keyList = prevMgr.keyList;\n }", "public void init() {\r\n\tlog.info(\"OsylManagerServiceImpl service init() \");\r\n\t// register functions\r\n\tfor (Iterator<String> i = functionsToRegister.iterator(); i.hasNext();) {\r\n\t String function = i.next();\r\n\t functionManager.registerFunction(function);\r\n\t}\r\n }", "public interface Constants {\n\n /**\n * Add new modules\n * params: \"Title\", \"Description\", \"Module Tag\", \"Image url\"\n */\n Module moduleMaps = new Module(\"Maps\", \"Google map integrations with geofencing & more...\", \"\", \"http://3.bp.blogspot.com/_ZaGO7GjCqAI/Rh47v0ZvaoI/AAAAAAAABjA/20hcUi_0XVo/s640/maps-building-layer.png\");\n Module moduleVolley = new Module(\"Volley\", \"Network calls, caching & queuing...\", \"personal.aron.devstuff.views.VolleyActivity\", \"http://4.bp.blogspot.com/-K7j65NVErX4/Vg1fo0yVl5I/AAAAAAAACIM/e9vbLaxqA-U/s1600/image00.png\");\n Module moduleDynamicForms = new Module(\"Dynamic Forms\", \"Creating forms using json...\", \"personal.aron.devstuff.views.DynamicFormActivity\", \"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQEXcK-FALJ2WYj0GM015I70-al_Xxe7rkXRqtczHs6bZqRiau1xQ\");\n Module modulePermissions = new Module(\"App Permissions\", \"Asking permissions and handling it...\", \"personal.aron.devstuff.views.PermissionsActivity\", \"https://i.kinja-img.com/gawker-media/image/upload/s--Mjlv9Tan--/c_fill,fl_progressive,g_center,h_450,q_80,w_800/18hvgdkyebym4jpg.jpg\");\n\n public Module[] moduleList = {moduleMaps, moduleVolley, moduleDynamicForms, modulePermissions};\n\n public int numColumnsGridHome = 2;\n public String homeBackDrop = \"http://wallarthd.com/wp-content/uploads/2014/08/Art-Android-Wallpaper-Background.jpg\";\n\n}", "public SQLManager(Context context) {\n handler = new SQLHandler(context);\n }", "private void instantiate(){\n inputAddressList = new LinkedList<Address>();\n inputGroupList = new LinkedList<Group>();\n root = new Group(\"root\", 0);\n }", "protected abstract void createDatabaseData(EntityManager entityManager);", "public interface ImportBaseManager {\n @Transactional\n void readFile(File file);\n\n void addUnitUser(Map<String, User> userMap, Map<String, Unit> unitMap);\n\n @Transactional\n Map<String,User> addUser(List<ImportBaseVO> vos, Map<String, Corp> unitCorpMap);\n\n @Transactional\n void addCostomerInfo(List<ImportBaseVO> vos, Map<String, Corp> customerMap, Map<String, Unit> unitMap);\n\n @Transactional\n Map<String,Corp> addCorp(List<ImportBaseVO> vos);\n\n @Transactional\n Map<String, Unit> addUnit(List<ImportBaseVO> vos, Map<String, Corp> customerMap,\n Map<String, City> provinceMap, Map<String, City> cityMap);\n\n // 保存客户公司\n Map<String,Corp> addCustomer(List<ImportBaseVO> vos);\n}", "public static void initManager() {\n theManager = new LevelManager();\n lives = 3;\n }", "private DbManager() {\n \t\tquestions = new ArrayList<Question>();\n \t\tanswers = new ArrayList<Answer>();\n \t\tcomments = new ArrayList<Comment>();\n \t\tusers = new ArrayList<User>();\n \t\ttags = new ArrayList<String>();\n \t\tthis.userCounterIdCounter = 0;\n \t\tthis.questionIdCounter = 0;\n \t\tthis.answerIdCounter = 0;\n \t\tthis.commentIdCounter = 0;\n \t\treputations = new ArrayList[3];\n \t\treputations[0] = new ArrayList<User>();\n \t\treputations[1] = new ArrayList<Date>();\n \t\treputations[2] = new ArrayList<Integer>();\n \t}", "@PreInit\n\tpublic void preInit(FMLPreInitializationEvent evt) {\n\t\tmanHelper.checkManPack(evt.getModMetadata().name);\n\t\n\t// If Manager Pack is installed, then...\n\t\tif (manHelper.loading) {\n\t\t\t\n\t\t// init managers\n\t\t\tString[] ver = evt.getModMetadata().version.split(\"\\\\.\");\n\t\t\tmanHelper.initMan(\n\t\t\t\t\tnew SAP_ConfigManagerII(\"Turret Mod 3\", \"TurretMod3.txt\", \"/sanandreasp/\"),\n\t\t\t\t\tnew SAP_LanguageManager(\"/sanandreasp/TurretMod3\", \"1.0\", \"Turret Mod 3\"),\n\t\t\t\t\tnew SAP_UpdateManager(\"Turret Mod 3\", Integer.parseInt(ver[0]), Integer.parseInt(ver[1]), Integer.parseInt(ver[2]), \"https://dl.dropboxusercontent.com/u/56920617/TurretMod_latest.txt\", \"http://www.minecraftforum.net/topic/562836-\")\n\t\t\t);\n\t\t\t\n\t\t// init Creative Tab\n\t\t\ttabTurret = new CreativeTabTurrets(\"turretTab\");\n\t\t\t\n\t\t// create helper instance for the Config Manager (CFGMan)\n\t\t\tSAP_ConfigManagerII cfgman = manHelper.getCfgMan();\n\t\t\t\n\t\t// add Config Groups to CFGMan\n\t\t\tcfgman.addGroup(\"Other Settings (Doubles)\", DataTypes.DOUBLE);\n\t\t\tcfgman.addGroup(\"Other Settings (Booleans)\", DataTypes.BOOL);\n\t\t\t\n\t\t// set pre-defined config values and value names to CFGMan\n\t\t\tcfgman.addStaticItemIDs(itemIDs.keySet().toArray(new String[itemIDs.size()]), itemIDs.values().toArray(new Integer[itemIDs.size()]));\n\t\t\tcfgman.addStaticBlockIDs(blockIDs.keySet().toArray(new String[blockIDs.size()]), blockIDs.values().toArray(new Integer[blockIDs.size()]));\n\t\t\tcfgman.addAchievementIDs(AchievementPageTM.achieveNames, AchievementPageTM.achievementIDs);\n\t\t\tcfgman.addProperty(\"Label Render Range\", \"Other Settings (Doubles)\", (double) labelRenderRange);\n\t\t\tcfgman.addProperty(\"can Collector collect XP orbs\", \"Other Settings (Booleans)\", canCollectorGetXP);\n\t\t\t\n\t\t// load Config\n\t\t\tcfgman.loadConfig();\n\t\t\t\n\t\t\tfor (String propName : itemIDs.keySet()) {\n\t\t\t\titemIDs.put(propName, cfgman.getItemID(propName));\n\t\t\t}\n\t\t\tfor (String propName : blockIDs.keySet()) {\n\t\t\t\tblockIDs.put(propName, cfgman.getBlockID(propName));\n\t\t\t}\n\t\t\t\n\t\t\tAchievementPageTM.achievementIDs = cfgman.getAchievementIDs(AchievementPageTM.achieveNames);\n\t\t\t\n\t\t\tdouble d = cfgman.getProperty(\"Label Render Range\", \"Other Settings (Doubles)\");\n\t\t\tlabelRenderRange = (float) d;\t\t\t\n\t\t\tboolean b = cfgman.getProperty(\"can Collector collect XP orbs\", \"Other Settings (Booleans)\");\n\t\t\tcanCollectorGetXP = b;\n\t\t\t\n\t\t// register Forge Events and Handlers\n\t\t\tif (FMLCommonHandler.instance().getSide().isClient()) {\n\t\t\t\tMinecraftForge.EVENT_BUS.register(new SoundRegistry());\n\t\t\t\tTickRegistry.registerTickHandler(new TickHandlerClientRnd(), Side.CLIENT);\n\t\t\t\tKeyBindingRegistry.registerKeyBinding(new KeyBindHandler());\n\t\t\t}\n\t\t\t\n\t\t\tMinecraftForge.EVENT_BUS.register(new ServerEvents());\n\t\t\tTickRegistry.registerScheduledTickHandler(new SchedTickHandlerWorld(), Side.SERVER);\n\t\t\t\n\t\t// add Icon to the IconCache-Item\n\t\t\tItemIconCache.iconList.put(0, \"TurretMod3:ach_piercing\");\n\t\t\tItemIconCache.iconList.put(1, \"TurretMod3:redFlame\");\n\t\t\tItemIconCache.iconList.put(2, \"TurretMod3:blueFlame\");\n\n\t\t// register Ammo-Item types\n\t\t\tItemAmmunitions.addAmmoItem(0, \"arrowPack\", \"Arrow Pack\");\n\t\t\tItemAmmunitions.addAmmoItem(1, \"pebbles\", \"Pebbles\");\n\t\t\tItemAmmunitions.addAmmoItem(2, \"pebble\", \"Pebble\");\n\t\t\tItemAmmunitions.addAmmoItem(3, \"bullets\", \"Bullets\");\n\t\t\tItemAmmunitions.addAmmoItem(4, \"bulletPack\", \"Bullet Pack\");\n\t\t\tItemAmmunitions.addAmmoItem(5, \"tank\", \"FT Fuel\");\n\t\t\tItemAmmunitions.addAmmoItem(6, \"tankPack\", \"FT Fuel Pack\");\n\t\t\tItemAmmunitions.addAmmoItem(7, \"gMelonPack\", \"Glistering Melon Bundle\");\n\t\t\tItemAmmunitions.addAmmoItem(8, \"enderPearlPack\", \"Ender Pearl Bundle\");\n\t\t\t\t\n\t\t// initialize items\n\t\t\tinitItems();\n\t\t\t\n\t\t// register Achievement Page and initialize Achievements\n\t\t\tAchievementPageTM.initAchievementPage();\n\t\t\t\n\t\t// register optional Main Menu, if MainMenuAPI is installed\n\t\t\tregisterMainMenu();\n\t// ... else set the Enabled-State to false\n\t\t} else {\n\t\t\tLoader.instance().getIndexedModList().get(TM3ModRegistry.modID).setEnabledState(false);\n\t\t}\n\t}", "private void setup(Command cmd) throws RuntimeException, PropertyException, IOException, EngineException{\n\t\tbaseRec = new BaseRecognizer(((JSGFGrammar) cm.lookup(\"jsgfGrammar\")).getGrammarManager());\n\t\trecognizer = (Recognizer) cm.lookup(\"recognizer\");\n\t\tmicrophone = (Microphone) cm.lookup(\"microphone\");\n\n\t\tbaseRec.allocate();\n\t\trecognizer.allocate();\n\t}", "@Override\n\tpublic void insertProcess() {\n\t\t\n\t}", "public void initPersistence (){\n\t\tif (!this._onAppInit){\n\t\t\t/*\n\t\t\t * Evita stackoverflow\n\t\t\t */\n\t\t\tcloseActiveStoreData ();\n\t\t}\n\t\tsetDatastoreProperties ();\n\t\tfinal Properties properties = this._dataStoreEnvironment.getDataStoreProperties ();\n\t\tfinal PersistenceManagerFactory pmf =\n\t\t\t\t\t JDOHelper.getPersistenceManagerFactory(properties);\n\t\t\n//\t\tSystem.out.println (\"Setting persistent manager from \"+properties);\n\t\t\n\t\tthis.pm = pmf.getPersistenceManager();\n\t\t\n\t\tif (this.pm.currentTransaction().isActive ()){\n\t\t\tthis.pm.currentTransaction().commit();\n\t\t}\n\t\tthis.pm.currentTransaction().setOptimistic (false);\n//\t\tthis.pm.currentTransaction().begin();\n\t}", "public ColocatePreloader (PersistenceManager pm) {\n\t\tthis.pm = pm;\n\t}", "public SUMOQueryParser(SUMOQueryParserTokenManager tm) {\n token_source = tm;\n token = new Token();\n jj_ntk = -1;\n jj_gen = 0;\n for (int i = 0; i < 11; i++) jj_la1[i] = -1;\n for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();\n }", "public void startPlugin() {\n classesDisponibles = new HashMap[types.length];\n try { // enregistrer le service d'acces aux depot de jars\n ServicesRegisterManager.registerService(Parameters.JAR_REPOSITORY_MANAGER, this);\n rescanRepository(); // creer les listes de classes disponibles a partir du depot\n }\n catch (ServiceInUseException mbiue) {\n System.err.println(\"Jar Repository Manager service created twice\");\n }\n }", "private static void init(){\n entityManager = HibernateUtil.getEntityManager();\n transaction = entityManager.getTransaction();\n }", "public void initialize() {\n warpController = new WarpController(this);\n kitController = new KitController(this);\n crafting = new CraftingController(this);\n mobs = new MobController(this);\n items = new ItemController(this);\n enchanting = new EnchantingController(this);\n anvil = new AnvilController(this);\n blockController = new BlockController(this);\n hangingController = new HangingController(this);\n entityController = new EntityController(this);\n playerController = new PlayerController(this);\n inventoryController = new InventoryController(this);\n explosionController = new ExplosionController(this);\n requirementsController = new RequirementsController(this);\n worldController = new WorldController(this);\n arenaController = new ArenaController(this);\n arenaController.start();\n if (CompatibilityLib.hasStatistics() && !CompatibilityLib.hasJumpEvent()) {\n jumpController = new JumpController(this);\n }\n File examplesFolder = new File(getPlugin().getDataFolder(), \"examples\");\n examplesFolder.mkdirs();\n\n File urlMapFile = getDataFile(URL_MAPS_FILE);\n File imageCache = new File(dataFolder, \"imagemapcache\");\n imageCache.mkdirs();\n maps = new MapController(this, urlMapFile, imageCache);\n\n // Initialize EffectLib.\n if (com.elmakers.mine.bukkit.effect.EffectPlayer.initialize(plugin, getLogger())) {\n getLogger().info(\"EffectLib initialized\");\n } else {\n getLogger().warning(\"Failed to initialize EffectLib\");\n }\n\n // Pre-create schematic folder\n File magicSchematicFolder = new File(plugin.getDataFolder(), \"schematics\");\n magicSchematicFolder.mkdirs();\n\n // One-time migration of legacy configurations\n migrateConfig(\"enchanting\", \"paths\");\n migrateConfig(\"automata\", \"blocks\");\n migrateDataFile(\"automata\", \"blocks\");\n\n // Ready to load\n load();\n resourcePacks.startResourcePackChecks();\n }", "private OperatorManager() {}", "public SQLManager(FileConfiguration config) {\n ConfigurationSection sql = config.getConfigurationSection(\"sql\");\n if (sql == null) {\n Logger.log(LogType.ERROR, \"No SQL Section in \" + config.getName());\n return;\n }\n\n String host = sql.getString(\"host\");\n int port = sql.getInt(\"port\", 3306);\n String database = sql.getString(\"database\");\n String user = sql.getString(\"user\");\n String password = sql.getString(\"password\");\n\n HikariConfig hikariConfig = new HikariConfig();\n hikariConfig.setJdbcUrl(\"jdbc:mysql://\" + host + \":\" + port + \"/\" + database);\n hikariConfig.setDriverClassName(\"com.mysql.jdbc.Driver\");\n hikariConfig.setUsername(user);\n hikariConfig.setPassword(password);\n hikariConfig.setMinimumIdle(1);\n hikariConfig.setMaximumPoolSize(10);\n hikariConfig.setConnectionTimeout(10000);\n\n this.dataSource = new HikariDataSource(hikariConfig);\n this.queryThread = new QueryThread(this);\n\n initTables();\n }", "protected abstract DatabaseInitializer createInitializer();", "@Override public void init() {\n /// Important Step 2: Get access to a list of Expansion Hub Modules to enable changing caching methods.\n all_hubs_ = hardwareMap.getAll(LynxModule.class);\n /// Important Step 3: Option B. Set all Expansion hubs to use the MANUAL Bulk Caching mode\n for (LynxModule module : all_hubs_ ) {\n switch (motor_read_mode_) {\n case BULK_READ_AUTO:\n module.setBulkCachingMode(LynxModule.BulkCachingMode.AUTO);\n break;\n case BULK_READ_MANUAL:\n module.setBulkCachingMode(LynxModule.BulkCachingMode.MANUAL);\n break;\n case BULK_READ_OFF:\n default:\n module.setBulkCachingMode(LynxModule.BulkCachingMode.OFF);\n break;\n }\n }\n\n /// Use the hardwareMap to get the dc motors and servos by name.\n\n motorLF_ = hardwareMap.get(DcMotorEx.class, lfName);\n motorLB_ = hardwareMap.get(DcMotorEx.class, lbName);\n motorRF_ = hardwareMap.get(DcMotorEx.class, rfName);\n motorRB_ = hardwareMap.get(DcMotorEx.class, rbName);\n motorLF_.setDirection(DcMotor.Direction.REVERSE);\n motorLB_.setDirection(DcMotor.Direction.REVERSE);\n\n // map odometry encoders\n verticalLeftEncoder = hardwareMap.get(DcMotorEx.class, verticalLeftEncoderName);\n verticalRightEncoder = hardwareMap.get(DcMotorEx.class, verticalRightEncoderName);\n horizontalEncoder = hardwareMap.get(DcMotorEx.class, horizontalEncoderName);\n\n if( USE_ENCODER_FOR_TELEOP ) {\n motorLF_.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorLF_.setMode ( DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n motorLB_.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorLB_.setMode ( DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n motorRF_.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorRF_.setMode ( DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n motorRB_.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorRB_.setMode ( DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n\n verticalLeftEncoder.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n verticalRightEncoder.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n horizontalEncoder.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n\n motorLF_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n motorLB_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n motorRF_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n motorRB_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n }\n\n if( USE_INTAKE ) {\n motor_left_intake_ = hardwareMap.get(DcMotorEx.class, \"motorLeftIntake\");\n motor_right_intake_ = hardwareMap.get(DcMotorEx.class, \"motorRightIntake\");\n motor_right_intake_.setDirection(DcMotor.Direction.REVERSE) ;\n\n motor_left_intake_.setMode( DcMotor.RunMode.STOP_AND_RESET_ENCODER );\n motor_left_intake_.setMode( DcMotor.RunMode.RUN_USING_ENCODER );\n motor_right_intake_.setMode( DcMotor.RunMode.STOP_AND_RESET_ENCODER );\n motor_right_intake_.setMode( DcMotor.RunMode.RUN_USING_ENCODER );\n\n servo_left_intake_ = hardwareMap.servo.get(\"servoLeftIntake\");\n servo_left_intake_pos_ = CR_SERVO_STOP ;\n servo_left_intake_.setPosition(CR_SERVO_STOP);\n servo_right_intake_ = hardwareMap.servo.get(\"servoRightIntake\");\n servo_right_intake_pos_ = CR_SERVO_STOP ;\n servo_right_intake_.setPosition(CR_SERVO_STOP);\n }\n if( USE_LIFT ) {\n motor_lift_ = hardwareMap.get(DcMotorEx.class, \"motorLift\");\n motor_lift_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n motor_lift_.setMode( DcMotor.RunMode.STOP_AND_RESET_ENCODER );\n power_lift_ = 0.0;\n if( USE_RUN_TO_POS_FOR_LIFT ) {\n motor_lift_.setTargetPosition(0);\n motor_lift_.setMode( DcMotor.RunMode.RUN_TO_POSITION ); // must call setTargetPosition() before switching to RUN_TO_POSISTION\n } else {\n motor_lift_.setMode( DcMotor.RunMode.RUN_USING_ENCODER);\n }\n last_stone_lift_enc_ = -1;\n }\n\n if( USE_STONE_PUSHER ) {\n servo_pusher_ = hardwareMap.servo.get(\"servoPusher\");\n servo_pusher_.setPosition(PUSHER_INIT);\n servo_pusher_pos_ = PUSHER_INIT;\n }\n if( USE_STONE_GATER ) {\n servo_gater_ = hardwareMap.servo.get(\"servoGater\");\n servo_gater_.setPosition(GATER_INIT);\n servo_gater_pos_ = GATER_INIT;\n }\n\n if( USE_ARM ) {\n servo_arm_ = hardwareMap.servo.get(\"servoArm\");\n servo_arm_.setPosition(ARM_INIT);\n servo_arm_pos_ = ARM_INIT;\n servo_claw_ = hardwareMap.servo.get(\"servoClaw\");\n servo_claw_.setPosition(CLAW_OPEN);\n servo_claw_pos_ = CLAW_OPEN;\n }\n\n if( USE_HOOKS ) {\n servo_left_hook_ = hardwareMap.servo.get(\"servoLeftHook\");\n servo_left_hook_.setPosition(LEFT_HOOK_UP);\n servo_left_hook_pos_ = LEFT_HOOK_UP;\n servo_right_hook_ = hardwareMap.servo.get(\"servoRightHook\");\n servo_right_hook_.setPosition(RIGHT_HOOK_UP);\n servo_right_hook_pos_ = RIGHT_HOOK_UP;\n }\n\n if( USE_PARKING_STICKS ) {\n servo_left_park_ = hardwareMap.servo.get(\"servoLeftPark\");\n servo_left_park_.setPosition(LEFT_PARK_IN);\n servo_left_park_pos_ = LEFT_PARK_IN;\n servo_right_park_ = hardwareMap.servo.get(\"servoRightPark\");\n servo_right_park_.setPosition(RIGHT_PARK_IN);\n servo_right_park_pos_ = RIGHT_PARK_IN;\n }\n\n if( USE_RGB_FOR_STONE ) {\n rev_rgb_range_ = hardwareMap.get(LynxI2cColorRangeSensor.class, \"stoneColor\");\n //rev_rgb_range_ = hardwareMap.get(LynxI2cColorRangeSensor.class, \"stoneColorV3\"); // different interface for V3, can't define it as LynxI2cColorRangeSensor anymore, 2020/02/29\n if( rev_rgb_range_!=null ) {\n if( AUTO_CALIBRATE_RGB ) {\n int alpha = rev_rgb_range_.alpha();\n //double dist = rev_rgb_range_.getDistance(DistanceUnit.CM);\n double dist = rev_rgb_range_.getDistance(DistanceUnit.METER);\n if( alpha>=MIN_RGB_ALPHA && alpha<100000 ) {\n rev_rgb_alpha_init_ = alpha;\n }\n if( AUTO_CALIBRATE_RGB_RANGE && !Double.isNaN(dist) ) {\n if( dist>MIN_RGB_RANGE_DIST && dist<MAX_RGB_RANGE_DIST ) {\n rev_rgb_dist_init_ = dist;\n }\n }\n }\n }\n }\n if( USE_RGBV3_FOR_STONE ) {\n //rgb_color_stone_ = hardwareMap.get(ColorSensor.class, \"stoneColorV3\");\n rgb_range_stone_ = hardwareMap.get(DistanceSensor.class, \"stoneColorV3\");\n if( AUTO_CALIBRATE_RANGE && rgb_range_stone_!=null ) {\n while(true) { // wait till range sensor gets a valid reading\n double dis = getRangeDist(RangeName.RGB_RANGE_STONE);\n if( dis>0.0 && dis<0.2 ) {\n rgb_range_stone_dist_init_ = dis;\n break;\n }\n }\n }\n }\n\n if( USE_RIGHT_RANGE ) {\n range_right_ = (Rev2mDistanceSensor) (hardwareMap.get(DistanceSensor.class, \"rightRange\"));\n if( AUTO_CALIBRATE_RANGE && range_right_!=null ) {\n while(true) { // wait till range sensor gets a valid reading\n double dis = getRangeDist(RangeName.RANGE_RIGHT);\n if( dis>0.01 && dis<2.0 ) {\n range_right_dist_init_ = dis;\n break;\n }\n }\n }\n }\n if( USE_LEFT_RANGE ) {\n range_left_ = (Rev2mDistanceSensor) (hardwareMap.get(DistanceSensor.class, \"leftRange\"));\n if( AUTO_CALIBRATE_RANGE && range_left_!=null ) {\n while(true) { // wait till range sensor gets a valid reading\n double dis = getRangeDist(RangeName.RANGE_LEFT);\n if( dis>0.01 && dis<2.0 ) {\n range_left_dist_init_ = dis;\n break;\n }\n }\n }\n }\n\n if( USE_RANGE_FOR_STONE) {\n range_stone_ = (Rev2mDistanceSensor) (hardwareMap.get(DistanceSensor.class, \"stoneRange\"));\n if( AUTO_CALIBRATE_RANGE && range_stone_!=null ) {\n while(true) { // wait till range sensor gets a valid reading\n double dis = getRangeDist(RangeName.RANGE_STONE);\n if( dis>0.01 && dis<0.5 ) {\n range_stone_dist_init_ = dis;\n break;\n }\n }\n }\n }\n\n if( USE_INTAKE_MAG_SWITCH ) {\n intake_mag_switch_ = hardwareMap.get(DigitalChannel.class, \"intake_mag_switch\");\n intake_mag_switch_.setMode(DigitalChannelController.Mode.INPUT);\n intake_mag_prev_state_ = intake_mag_switch_.getState();\n intake_mag_change_time_ = 0.0;\n }\n if( USE_STONE_LIMIT_SWITCH ) {\n stone_limit_switch_ = hardwareMap.get(DigitalChannel.class, \"stone_limit_switch\");\n stone_limit_switch_.setMode(DigitalChannelController.Mode.INPUT);\n stone_limit_switch_prev_state_ = stone_limit_switch_.getState();\n }\n\n\n /////***************************** JOY STICKS *************************************/////\n\n /// Set joystick deadzone, any value below this threshold value will be considered as 0; moved from init() to init_loop() to aovid crash\n if(gamepad1!=null) gamepad1.setJoystickDeadzone( JOYSTICK_DEAD_ZONE );\n if(gamepad2!=null) gamepad2.setJoystickDeadzone( JOYSTICK_DEAD_ZONE );\n\n resetControlVariables();\n }", "public CommandManager() {}", "public CollisionManager(){\n\t\tcollidables \t\t= new HashMap<Integer, List<CollidableObject>>() ;\n\t\tcollisionsTypes \t= new HashMap<Integer, List<Integer>>() ;\n\t\tcollisionHandlers \t= new HashMap<String, CollisionHandler>() ;\n\t}", "@SuppressWarnings(\"unchecked\")\n @Override\n public void postRun(MobConfig eConfig, Configuration config) {\n eConfig.save();\n \n // Register mob\n Class<? extends EntityLiving> clazz = (Class<? extends EntityLiving>) eConfig.ELEMENT;\n if (Helpers.isClientSide())\n ClientProxy.ENTITY_RENDERERS.put(clazz, eConfig.getRender());\n EntityRegistry.registerGlobalEntityID(clazz, eConfig.NAMEDID, EntityRegistry.findGlobalUniqueEntityId(), eConfig.getBackgroundEggColor(), eConfig.getForegroundEggColor());\n EntityRegistry.registerModEntity(clazz, eConfig.NAMEDID, eConfig.ID, EvilCraft._instance, 80, 3, true);\n \n // Add I18N\n LanguageRegistry.instance().addStringLocalization(\"entity.\" + Reference.MOD_ID + \".instance.\" + eConfig.NAMEDID + \".name\", eConfig.NAME);\n LanguageRegistry.instance().addStringLocalization(\"entity.\" + Reference.MOD_ID + \".\" + eConfig.NAMEDID + \".name\", eConfig.NAME);\n LanguageRegistry.instance().addStringLocalization(\"entity.\" + eConfig.NAMEDID + \".name\", eConfig.NAME); // For global registering\n }", "public void onEnable(){\n new File(getDataFolder().toString()).mkdir();\n playerFile = new File(getDataFolder().toString() + \"/playerList.txt\");\n commandFile = new File(getDataFolder().toString() + \"/commands.txt\");\n blockFile = new File(getDataFolder().toString() + \"/blockList.txt\");\n deathFile = new File(getDataFolder().toString() + \"/deathList.txt\");\n startupFile = new File(getDataFolder().toString() + \"/startupCommands.txt\");\n \n //Load the player file data\n playerCommandMap = new HashMap<String, String>();\n try{\n BufferedReader br = new BufferedReader(new FileReader(playerFile));\n StringTokenizer st;\n String input;\n String name;\n String command;\n while((input = br.readLine()) != null){\n if(input.compareToIgnoreCase(\"<Player> <Command>\") == 0){\n continue;\n }\n st = new StringTokenizer(input, \" \");\n name = st.nextToken();\n command = st.nextToken();\n playerCommandMap.put(name, command);\n }\n \n }catch(FileNotFoundException e){\n log.info(\"No original player command file, creating new one.\");\n }catch(IOException e){\n log.info(\"Error reading player command file\");\n }catch(Exception e){\n log.info(\"Incorrectly formatted player command file\");\n }\n \n //Load the block file data\n blockCommandMap = new HashMap<Location, String>();\n try{\n BufferedReader br = new BufferedReader(new FileReader(blockFile));\n StringTokenizer st;\n String input;\n String command;\n Location loc = null;\n \n while((input = br.readLine()) != null){\n if(input.compareToIgnoreCase(\"<Block Location> <Command>\") == 0){\n continue;\n }\n st = new StringTokenizer(input, \" \");\n loc = new Location(getServer().getWorld(UUID.fromString(st.nextToken())), Double.parseDouble(st.nextToken()), Double.parseDouble(st.nextToken()), Double.parseDouble(st.nextToken()));\n command = st.nextToken();\n blockCommandMap.put(loc, command);\n }\n \n }catch(FileNotFoundException e){\n log.info(\"No original block command file, creating new one.\");\n }catch(IOException e){\n log.info(\"Error reading block command file\");\n }catch(Exception e){\n log.info(\"Incorrectly formatted block command file\");\n }\n \n //Load the player death file data\n deathCommandMap = new HashMap<String, String>();\n try{\n BufferedReader br = new BufferedReader(new FileReader(deathFile));\n StringTokenizer st;\n String input;\n String name;\n String command;\n while((input = br.readLine()) != null){\n if(input.compareToIgnoreCase(\"<Player> <Command>\") == 0){\n continue;\n }\n st = new StringTokenizer(input, \" \");\n name = st.nextToken();\n command = st.nextToken();\n deathCommandMap.put(name, command);\n }\n \n }catch(FileNotFoundException e){\n log.info(\"No original player death command file, creating new one.\");\n }catch(IOException e){\n log.info(\"Error reading player death command file\");\n }catch(Exception e){\n log.info(\"Incorrectly formatted player death command file\");\n }\n \n //Load the start up data\n startupCommands = \"\";\n try{\n BufferedReader br = new BufferedReader(new FileReader(startupFile));\n String input;\n while((input = br.readLine()) != null){\n if(input.compareToIgnoreCase(\"<Command>\") == 0){\n continue;\n }\n startupCommands += \":\" + input;\n }\n \n }catch(FileNotFoundException e){\n log.info(\"No original start up command file, creating new one.\");\n }catch(IOException e){\n log.info(\"Error reading start up command file\");\n }catch(Exception e){\n log.info(\"Incorrectly formatted start up command file\");\n }\n \n //Load the command file data\n commandMap = new HashMap<String, String>();\n try{\n BufferedReader br = new BufferedReader(new FileReader(commandFile));\n StringTokenizer st;\n String input;\n String args;\n String name;\n \n //Assumes that the name is only one token long\n while((input = br.readLine()) != null){\n if(input.compareToIgnoreCase(\"<Identifing name> <Command>\") == 0){\n continue;\n }\n st = new StringTokenizer(input, \" \");\n name = st.nextToken();\n args = st.nextToken();\n while(st.hasMoreTokens()){\n args += \" \" + st.nextToken();\n }\n commandMap.put(name, args);\n }\n \n }catch(FileNotFoundException e){\n log.info(\"No original command file, creating new one.\");\n }catch(IOException e){\n log.info(\"Error reading command file\");\n }catch(Exception e){\n log.info(\"Incorrectly formatted command file\");\n }\n \n placeBlock = false;\n startupDone = false;\n blockCommand = \"\";\n playerPosMap = new HashMap<String, Location>();\n \n //Set up the listeners\n PluginManager pm = this.getServer().getPluginManager();\n pm.registerEvent(Event.Type.PLAYER_INTERACT_ENTITY, playerListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.PLAYER_INTERACT, playerListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.PLAYER_MOVE, playerListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.PLAYER_JOIN, playerListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.PLAYER_QUIT, playerListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.ENTITY_DEATH, entityListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.BLOCK_BREAK, blockListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.PLUGIN_ENABLE, serverListener, Event.Priority.Normal, this);\n \n log.info(\"Autorun Commands v2.3 is enabled\");\n }", "private DatabaseManager() {}" ]
[ "0.6944725", "0.56634575", "0.5584613", "0.51998156", "0.51997936", "0.5158339", "0.5113606", "0.5083592", "0.5016889", "0.5016889", "0.5005549", "0.49848914", "0.49748683", "0.4973747", "0.49071497", "0.48838767", "0.48408318", "0.4821163", "0.4815989", "0.48070756", "0.48013908", "0.47794878", "0.47645515", "0.47586575", "0.47171712", "0.46975017", "0.4680571", "0.46705323", "0.466938", "0.46358037", "0.4635079", "0.46311653", "0.4625667", "0.46135753", "0.46000326", "0.45726413", "0.4571093", "0.4566319", "0.4562683", "0.45595694", "0.45517516", "0.4549268", "0.45483625", "0.4545722", "0.45452434", "0.4544574", "0.45415312", "0.45408058", "0.4540797", "0.45303184", "0.45199004", "0.45161495", "0.45154113", "0.45134103", "0.45123357", "0.45120403", "0.45083016", "0.45032814", "0.4503054", "0.44997975", "0.44991827", "0.44971344", "0.4496697", "0.44937423", "0.4493241", "0.4492144", "0.44892403", "0.44888866", "0.44817576", "0.4478575", "0.44699422", "0.44641185", "0.44615293", "0.44532564", "0.44530225", "0.4451448", "0.44457585", "0.44434074", "0.44400644", "0.44379157", "0.44245914", "0.44198778", "0.441497", "0.4410535", "0.44059733", "0.44055063", "0.44054404", "0.44011685", "0.44002405", "0.439834", "0.43933713", "0.43838543", "0.43828982", "0.4379964", "0.43757313", "0.43725425", "0.4368019", "0.43657443", "0.43632138", "0.43630803" ]
0.61462164
1
build InsertionManager for lsmEngine
public <R extends IInsertionRequest> LSMEngineBuilder<T> buildInsertionManager( InsertionManager<T, R> insertionManager) { lsmEngine.setInsertionManager(insertionManager); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public <R extends IInsertionRequest> LSMEngineBuilder<T> buildInsertionManager(\n LevelProcessorChain<T, R, InsertRequestContext> levelProcessChain) {\n InsertionManager<T, R> insertionManager = new InsertionManager<>(lsmEngine.getWalManager());\n insertionManager.setLevelProcessorsChain(levelProcessChain);\n buildInsertionManager(insertionManager);\n return this;\n }", "public LSMEngine<T> build() {\n return lsmEngine;\n }", "ImplementationManager createManager();", "private void init() {\n configureInsertMode(SMART_INSERT, false);\n setDocumentProvider(new SimpleDocumentProvider());\n }", "private LSMEngineBuilder<T> buildLevelProcessors(ApplicationContext applicationContext) {\n LevelProcessorChain<T, IInsertionRequest, InsertRequestContext> insertionLevelProcessChain =\n generateLevelProcessorsChain(applicationContext.getInsertionLevelProcessClass());\n LevelProcessorChain<T, IDeletionRequest, DeleteRequestContext> deletionLevelProcessChain =\n generateLevelProcessorsChain(applicationContext.getDeletionLevelProcessClass());\n LevelProcessorChain<T, IQueryRequest, QueryRequestContext> queryLevelProcessChain =\n generateLevelProcessorsChain(applicationContext.getQueryLevelProcessClass());\n return buildQueryManager(queryLevelProcessChain)\n .buildInsertionManager(insertionLevelProcessChain)\n .buildDeletionManager(deletionLevelProcessChain);\n }", "void setUpLinearManager();", "public void onEnable() {\n\t\tpermissionsManager = new PermissionsManager();\n\n\t\t// build our notes table\n\t\tDatabaseTableInfo notesTable = new DatabaseTableInfo();\n\t\tnotesTable.name = \"notes\";\n\t\tnotesTable.fields = new String[]{\n\t\t\t\t\"date TIMESTAMP DEFAULT 0\",\n\t\t\t\t\"noteTaker TINYTEXT\",\n\t\t\t\t\"notee TINYTEXT\",\n\t\t\t\t\"note TEXT\"\n\t\t};\n\t\tDatabaseManager.addTableConstruct(notesTable);\n\t\t\n\t\t// initialize our database manager\n\t\tdatabaseManager = new DatabaseManager();\n\t\t\n\t\t// our note manager\n\t\tnoteManager = new NoteManager();\n\t\t\n\t\t// set our command executors\n\t\tcommandManager = new CommandManager();\n\t\tthis.getCommand(\"note\").setExecutor(commandManager);\n\t\tthis.getCommand(\"notes\").setExecutor(commandManager);\n\t\tthis.getCommand(\"editnote\").setExecutor(commandManager);\n\t\tthis.getCommand(\"notedate\").setExecutor(commandManager);\n\t\tthis.getCommand(\"notepad\").setExecutor(commandManager);\n\t\t\n\t\t// load our multiline chat handler\n\t\tmultilineChatEntry = new MultilineChatEntry();\n\t\t\n\t\t// load our configuration\n\t\t//this.saveDefaultConfig();\n\t\tconfigurationManager = new ConfigurationManager(this.getConfig());\n\t\tthis.saveConfig();\n\t\t\n\t\t// let them now!\n\t\tLogger.log(\"&aPlugin enabled!\");\n\t}", "public MongoManager()\n\t{\n\t\ttry\n\t\t{\n\t\t/*\tmorphia = new Morphia();\n\t\t\tclient = new MongoClient();\n\t\t\tmorphia.mapPackage(\"com.glenwood.kernai.data.entity\");\n\t\t\tdatastore = morphia.createDatastore(client, \"Kernai\");\n\t\t\tdatastore.ensureIndexes();\n\t\t*/\t\n\t\t}\n\t\tcatch(Exception ex)\n\t\t{\n\t\t\tthrow ex;\n\t\t}\n\t\n\t}", "@Override\n public void initEngine() {\n \n }", "@Override\n public void initEngine() {\n \n }", "public void initClassificationModule(KinectInterface kinectModule, MovementFoundInterface engineModule);", "private IndexingManager() {\n Provider provider = new BouncyCastleProvider();\n Security.addProvider(provider);\n utility = Database_Utility.getInstance();\n conn = utility.getConnection();\n IMbuffer = IndexingManagerBuffer.getInstance();\n\n // This statement is to create purge table.\n\n boolean k = checkTable1(\"PurgeTable\");\n if (!k) {\n utility.createtable2(\"PurgeTable\");\n }\n boolean k1 = checkTable1(\"UserToCertMap\");\n if (!k1) {\n utility.createtable1();\n }\n\n // This statement is to run maintenance thread on loading of class to purge entries whose timer has expired.\n\n //maintenancethread();\n\n // This statement is to run maintenance thread on loading of class to ascertain root nodes.\n\n // maintenancethread1();\n\n // This statement is to run maintenance thread on loading of class to delete entries from purge table.\n\n // maintenancethread2();\n\n }", "private void build()\n\t{\n\t\tengine.addSystem(new InputSystem());\n\t\tengine.addSystem(new MovementSystem());\n\t\t\n\t}", "private EntityManager initSystems() {\n CameraSystem cameraSystem = new CameraSystem(Constants.WINDOW_WIDTH, Constants.WINDOW_HEIGHT);\n addSystem(cameraSystem);\n addSystem(new ZoomSystem());\n //Physics System\n addSystem(new PhysicsSystem());\n //Player movement system\n addSystem(new PlayerMovementSystem());\n\n addSystem(new CannonFiringSystem());\n addSystem(new CollisionSystem());\n addSystem(new KillSystem());\n addSystem(new HealthSystem());\n addSystem(new StatisticSystem());\n addSystem(new EnemySpawningSystem());\n addSystem(new InventorySystem());\n addSystem(new CurrencySystem());\n\n GUISystem guiSystem = new GUISystem();\n InputSystem inputSystem = new InputSystem(guiSystem);\n\n //Input System\n addSystem(inputSystem);\n //Entity Render System\n addSystem(new EntityRenderSystem());\n //Particle System\n addSystem(new ParticleSystem());\n addSystem(new PlayerActionSystem(guiSystem));\n addSystem(new MapRenderSystem());\n addSystem(new HUDSystem());\n //Debug Render System\n addSystem(new DebugRendererSystem());\n //GUI System\n addSystem(guiSystem);\n\n return this;\n }", "public void init() {\n \t\n this.onContentPropertyUpdate = new JavaBehaviour(this, \"onContentPropertyUpdate\", Behaviour.NotificationFrequency.TRANSACTION_COMMIT);\n this.beforeDeleteNode = new JavaBehaviour(this, \"beforeDeleteNode\", Behaviour.NotificationFrequency.FIRST_EVENT);\n this.onMoveNode = new JavaBehaviour(this, \"onMoveNode\", Behaviour.NotificationFrequency.TRANSACTION_COMMIT);\n this.onAddAspect = new JavaBehaviour(this, \"onAddAspect\", Behaviour.NotificationFrequency.TRANSACTION_COMMIT);\n \n this.policyComponent.bindClassBehaviour(\n ContentServicePolicies.OnContentPropertyUpdatePolicy.QNAME,\n QName.createQName(\n NamespaceService.CONTENT_MODEL_1_0_URI,\n \"content\"),\n this.onContentPropertyUpdate);\n \n this.policyComponent.bindClassBehaviour(\n NodeServicePolicies.BeforeDeleteNodePolicy.QNAME,\n QName.createQName(\n NamespaceService.CONTENT_MODEL_1_0_URI,\n \"cmobject\"),\n this.beforeDeleteNode);\n \n this.policyComponent.bindClassBehaviour(\n NodeServicePolicies.OnMoveNodePolicy.QNAME,\n QName.createQName(\n NamespaceService.CONTENT_MODEL_1_0_URI,\n \"cmobject\"),\n this.onMoveNode);\n \n this.policyComponent.bindClassBehaviour(\n NodeServicePolicies.OnAddAspectPolicy.QNAME,\n FolderQuotaConstants.ASPECT_FQ_QUOTA,\n this.onAddAspect);\n \n //set up transaction listener to run code after transaction\n this.transactionListener = new FolderSizeTransactionListener();\n \n logger.info(\"[FolderQuota] - Bound FolderQuotaBehaviour\");\n\n }", "protected void startInsertRunnable() {\n\t}", "public Engine build() {\n this.extensions.add(new CoreExtension());\n \n // load extensions\n this.extensions.forEach(extension -> {\n this.renderers.putAll(extension.getRenderers());\n this.directives.putAll(extension.getDirectives());\n this.nodeParsers.putAll(extension.getNodeParsers());\n this.filters.putAll(extension.getFilters());\n this.tests.putAll(extension.getTests());\n this.unaryOperators.putAll(extension.getUnaryOperators());\n this.binaryOperators.putAll(extension.getBinaryOperators());\n this.factories.addAll(extension.getNodeVisitorFactories());\n this.safeNodes.addAll(extension.getSafeNodes());\n });\n \n // create an operator token parser\n TokenParser unaryOperatorParser = TokenParser.in(TokenType.OPERATOR, this.unaryOperators.keySet().toArray(new String[]{}));\n TokenParser binaryOperatorParser = TokenParser.in(TokenType.OPERATOR, this.binaryOperators.keySet().toArray(new String[]{}));\n TokenParser operatorParser = unaryOperatorParser.or(binaryOperatorParser);\n \n // create a execute token parser\n TokenParser executeOpenParser = TokenParser.from(TokenType.EXECUTE_OPEN, compile(quote(this.executeOpen)), false);\n TokenParser executeCloseParser = TokenParser.from(TokenType.EXECUTE_CLOSE, compile(quote(this.executeClose)), false);\n TokenParser executeParser = executeOpenParser.then(NAME).then(operatorParser.or(EXPRESSION).until(executeCloseParser));\n this.starts.add(this.executeOpen);\n \n // create a print token parser\n TokenParser printOpenParser = TokenParser.from(TokenType.PRINT_OPEN, compile(quote(this.printOpen)), false);\n TokenParser printCloseParser = TokenParser.from(TokenType.PRINT_CLOSE, compile(quote(this.printClose)), false);\n TokenParser printParser = printOpenParser.then(operatorParser.or(EXPRESSION).until(printCloseParser));\n this.starts.add(this.printOpen);\n \n // create a comment token parser\n TokenParser commentOpenParser = TokenParser.from(TokenType.COMMENT_OPEN, compile(quote(this.commentOpen)), false);\n TokenParser commentCloseParser = TokenParser.from(TokenType.COMMENT_CLOSE, compile(quote(this.commentClose)), false);\n TokenParser commentInner = TokenParser.until(TokenType.TEXT, this.commentClose);\n TokenParser commentParser = commentOpenParser.then(commentInner.optional()).then(commentCloseParser);\n this.starts.add(this.commentOpen);\n \n // create a text token parser\n TokenParser leadingText = TokenParser.until(TokenType.TEXT, this.starts);\n TokenParser text = TokenParser.from(TokenType.TEXT, Pattern.compile(\"^.*\", Pattern.DOTALL | Pattern.MULTILINE), false);\n \n TokenParser principal = commentParser.or(executeParser).or(printParser).or(leadingText).zeroOrMore().then(text.optional()).then(EOF);\n this.tokenizerBuilder.parser(principal);\n Tokenizer tokenizer = this.tokenizerBuilder.build();\n \n ExpressionParser expressionParser = new ExpressionParser(this.unaryOperators, this.binaryOperators);\n \n Engine engine = new Engine(this.environment, expressionParser,\n renderers, directives, nodeParsers, \n filters, tests, factories, safeNodes,\n tokenizer);\n return engine;\n }", "public static void init() {\n\t\tinsertAdministratorAccessGroupSQL = new StringBuffer();\n\t\tinsertAdministratorAccessGroupSQL.append(\"INSERT INTO ADMINISTRATORACCESSGROUP \");\n\t\tinsertAdministratorAccessGroupSQL.append(\"( \");\n\t\tinsertAdministratorAccessGroupSQL.append(\" ADMINISTRATORACCESSGROUPID, \");\n\t\tinsertAdministratorAccessGroupSQL.append(\" ADMINISTRATORID, \");\n\t\tinsertAdministratorAccessGroupSQL.append(\" ADMINACCESSGROUPID, \");\n\t\tinsertAdministratorAccessGroupSQL.append(\" CREATIONTIMESTAMP, \");\n\t\tinsertAdministratorAccessGroupSQL.append(\" AUDITORID, \");\n\t\tinsertAdministratorAccessGroupSQL.append(\" AUDITTIMESTAMP \");\n\t\tinsertAdministratorAccessGroupSQL.append(\") \");\n\t\tinsertAdministratorAccessGroupSQL.append(\"VALUES \");\n\t\tinsertAdministratorAccessGroupSQL.append(\"( \");\n\t\tinsertAdministratorAccessGroupSQL.append(\" ^, \");\n\t\tinsertAdministratorAccessGroupSQL.append(\" ^, \");\n\t\tinsertAdministratorAccessGroupSQL.append(\" ^, \");\n\t\tinsertAdministratorAccessGroupSQL.append(\" ^, \");\n\t\tinsertAdministratorAccessGroupSQL.append(\" ^, \");\n\t\tinsertAdministratorAccessGroupSQL.append(\" ^ \");\n\t\tinsertAdministratorAccessGroupSQL.append(\") \");\n\t\t// Get delete AdministratorAccessGroup SQL.\n\t\tdeleteAdministratorAccessGroupSQL = new StringBuffer();\n\t\t// deleteAdministratorAccessGroupSQL = new StringBuffer();\n\t\tdeleteAdministratorAccessGroupSQL.append(\"UPDATE ADMINISTRATORACCESSGROUP \");\n\t\tdeleteAdministratorAccessGroupSQL.append(\"SET ACTIVE = FALSE, \");\n\t\tdeleteAdministratorAccessGroupSQL.append(\" AUDITORID = ^, \");\n\t\tdeleteAdministratorAccessGroupSQL.append(\" AUDITTIMESTAMP = ^, \");\n\t\tdeleteAdministratorAccessGroupSQL.append(\" NOOFCHANGES = NOOFCHANGES + 1 \");\n\t\tdeleteAdministratorAccessGroupSQL.append(\"WHERE ADMINISTRATORACCESSGROUPID = ^ \");\n\t\tdeleteAdministratorAccessGroupSQL.append(\"AND NOOFCHANGES = ^ \");\n\t\t// Get select AdministratorAccessGroupUsers SQL.\n\t\tselectAdministratorAccessGroupUsersSQL = new StringBuffer();\n\t\tselectAdministratorAccessGroupUsersSQL.append(\"SELECT A.ADMINISTRATORACCESSGROUPID, \");\n\t\tselectAdministratorAccessGroupUsersSQL.append(\" A.ADMINISTRATORID, \");\n\t\tselectAdministratorAccessGroupUsersSQL.append(\" A.ADMINACCESSGROUPID, \");\n\t\tselectAdministratorAccessGroupUsersSQL.append(\" A.CREATIONTIMESTAMP, \");\n\t\tselectAdministratorAccessGroupUsersSQL.append(\" A.AUDITORID, \");\n\t\tselectAdministratorAccessGroupUsersSQL.append(\" A.AUDITTIMESTAMP, \");\n\t\tselectAdministratorAccessGroupUsersSQL.append(\" A.ACTIVE, \");\n\t\tselectAdministratorAccessGroupUsersSQL.append(\" A.NOOFCHANGES, \");\n\t\tselectAdministratorAccessGroupUsersSQL.append(\" B.NAME AS ADMINACCESSGROUPNAME \");\n\t\tselectAdministratorAccessGroupUsersSQL.append(\"FROM ADMINISTRATORACCESSGROUP A, \");\n\t\tselectAdministratorAccessGroupUsersSQL.append(\" ADMINACCESSGROUP B \");\n\t\tselectAdministratorAccessGroupUsersSQL.append(\"WHERE B.ADMINACCESSGROUPID = A.ADMINACCESSGROUPID \");\n\t\t// Get select AdministratorAccessGroupUsers for Administrator SQL.\n\t\tselectAdministratorAccessGroupUsersForAdministratorSQL = new StringBuffer(selectAdministratorAccessGroupUsersSQL);\n\t\tselectAdministratorAccessGroupUsersForAdministratorSQL.append(\"AND A.ADMINISTRATORID = ^ \");\n\t\tselectAdministratorAccessGroupUsersForAdministratorSQL.append(\"AND A.ACTIVE = TRUE \");\n\t\tselectAdministratorAccessGroupUsersForAdministratorSQL.append(\"ORDER BY B.NAME \");\n\t}", "public GameManager() {\n\t\tobjects.add(new Player(4, 4, ComponentManager.getComponent(ComponentManager.ComponentType.AABB), ProjectileManager.ProjectileType.Bullet, ComponentManager.ComponentType.AABB));\n\t\t\n\t\n\t\t\n\t\tobjects.add(new Platform(new AABBComponent()));\n\t\t\n\t\tloadLevel(\"/levelImage2_0.png\");\n\t\t\n\t\t//мусор\n\t\t\n\t\t//p1 = null;\n\t\t\n\t\t\n\t\tPBParticle p1 = null;\n\t\tPBParticle p2 = null;\n\t\t\n\t\tPLink l1 = null;\n\t\t\n\t\tnumOfPart = 48;\n\t\t\n\t\tint colNum = numOfPart / 3;\n\t\t\n\t\t\n\t\tfor(int i = 0; i < numOfPart; i ++)\n\t\t{\n\t\t\t\n\t\t\t\n\t\t\tp2 = p1; \n\t\t\t\n\t\t\tp1 = new PBParticle( (float)((4 + i % colNum) * TS),(float) ((4 + i / colNum) * TS), (float)(Math.random()*5), (float)(Math.random()*5), 1, new CircleComponent());\n\t\t\t\n\t\t\t\n\t\t\t//связи диагональ левый верхний - правый нижний\n\t\t\t/*if(i / colNum > 0 && i % colNum < colNum - 1)//не первая строка и не последняя чатсица в строке\n\t\t\t{\n\t\t\t\tl1 = new PLink(p1, (PBParticle)objects.get(objects.size() - colNum + 1), 20, this.stiffness);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tsdlinks.add(l1);\n\t\t\t}\n\t\t\t\n\t\t\t//связи диагональ правый верхний - левый нижний\n\t\t\t\n\t\t\tif(i / colNum > 0 && i % colNum > 0) \n\t\t\t{\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tl1 = new PLink(p1, (PBParticle)objects.get(objects.size() - colNum - 1), 20, this.stiffness);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tmdlinks.add(l1);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//горизонтальные связи\n\t\t\t\n\t\t\t//первая итерация для создания связи не подходит\n\t\t\t\n\t\t\t//также для создания горизонтальной связи не подходит итерация\n\t\t\t//когда p1 на новой строке, а p2 а старой\n\t\t\t\n\t\t\t\n\t\t\tif(p2 != null && (p1.getPosY() - p2.getPosY()) == 0)\n\t\t\t{\n\t\t\t\tl1 = new PLink(p1, p2, 20, this.stiffness);\n\t\t\t\t\n\t\t\t\thlinks.add(l1);\n\t\t\t}\n\t\t\t\n\t\t\t//вертикальные связи\n\t\t\t\n\t\t\t//проверить не ноль ли при делении i на количество столбцов\n\t\t\t//если не ноль то я должен выбрать из массива ссылок элемент \n\t\t\t//порядковый номер которого \n\t\t\tif(i / colNum != 0) //не первая строка\n\t\t\t{\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tl1 = new PLink(p1, (PBParticle)objects.get(objects.size() - colNum ), 20, this.stiffness);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tvlinks.add(l1);\n\t\t\t}*/\n\t\t\t\n\t\t\t\n\t\t\tobjects.add(p1);\n\t\t}\n\t\t\n\n\t\t\n\t\t\n\t\t//p1 = new PBParticle( 12 * TS, 1 * TS, 0, 1, 1);\n\t\t//objects.add(p1);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tcamera = new Camera(\"player\");\n\t}", "private void initDLManager() {\n //TODO poner estos datos en configuraciones\n final String botName = \"DL-MS+A\";\n final String directlinePrimaryKey =\n //\"5Cx8OLT2X98.cwA.1j4.FGE7LsMoVuBtww9vQYNuC6lwoVBWYrb-5DHGzBbOeO0\"; // J\n //\"sccvRjdQVbw.cwA.8tQ.3tw3MFQtgG9bcqYf5xxHgW-lUYKymaoSFNCoIzI-SJY\"; //MS+A\n //\"IWixc2S5WaU.cwA.DEw.DV8nbC-BijSw5TbtNimDJuvrp45GpsKCRW4wPTtqYeY\"; //MP-AURA DEV\n \"QyKjl6KL-XQ.cwA.UTM.puyqrjpLvO1Briz7TjM7q_VqqAOflJ3jN0ryBGvkEiU\";\n mDLManager =\n DLManager.getInstance(this, directlinePrimaryKey);\n }", "@Override\r\n\tpublic void onEnable() {\n\t\tDatabaseHandler dbHandler = new DatabaseHandler();\r\n\t\tdbHandler.connect(\"localhost\", 27017);\r\n\t\t\r\n\t\t// store stuff\r\n\t\tArrayList<Inventory> storeInventoryList = new ArrayList<Inventory>();\r\n\t\tBlock storeMarker = Bukkit.getServer().getWorld(\"world\").getBlockAt(-45, 71, 26);\r\n\t\tChunk storeChunk = storeMarker.getChunk();\r\n\t\t\r\n\t\t// property world stuff\r\n\t\tHashMap<UUID, Location> previousPlayerLocations = new HashMap<UUID, Location>();\r\n\t\tWorld propertyWorld = Bukkit.getServer().createWorld(new WorldCreator(\"PropertyWorld\"));\r\n\t\t\r\n\t\t// set up listeners\r\n\t\tPluginManager pm = getServer().getPluginManager();\r\n\t\t\r\n\t\tpm.registerEvents(new JoinListener(dbHandler), this);\r\n\t\tpm.registerEvents(new ChunkListener(dbHandler), this);\r\n\t\tpm.registerEvents(new BlockListener(dbHandler), this);\r\n\t\tpm.registerEvents(new InteractListener(dbHandler), this);\r\n\t\tpm.registerEvents(new StoreListener(dbHandler, storeInventoryList), this);\r\n\t\t\r\n\t\t// set up commands\r\n\t\tthis.getCommand(\"store\").setExecutor(new CommandStore(dbHandler, storeInventoryList, storeChunk));\r\n\t\tthis.getCommand(\"bal\").setExecutor(new CommandBal(dbHandler));\r\n\t\tthis.getCommand(\"taxi\").setExecutor(new CommandTaxi(dbHandler));\r\n\t\tthis.getCommand(\"taxicheckfare\").setExecutor(new CommandTaxiCheckFare());\r\n\t\tthis.getCommand(\"property\").setExecutor(new CommandProperty(dbHandler));\r\n\t\tthis.getCommand(\"propertyview\").setExecutor(new CommandPropertyView(dbHandler, propertyWorld, previousPlayerLocations, this));\r\n\t\t\r\n\t}", "public manager() {\n initComponents();\n autoID();\n table_update();\n }", "int insert(WfCfgModuleCatalog record);", "public void initForAddNew() {\r\n\r\n\t}", "public void register(OpModeManager manager) {\n //manager.register(\"INFO: ver. 3.51.01 (pre-summer version)\", infoclass.class);\n// manager.register(\"NullOp\", NullOp.class);\n// manager.register(\"newTeleOp\", newTeleOp.class);\n// manager.register(\"ARMTESTER\", armsinglestick.class);\n// manager.register(\"BOTv1\", botv1.class);\n// manager.register(\"TURNLEFT\", auto2.class);\n// manager.register(\"TURNRIGHT\", auto3.class);\n// manager.register(\"ColorTest\", ColorTest.class);\n // manager.register(\"basicLineFollow\", basicLineFollow.class);\n // manager.register(\"basicLineAlign\", basicLineAlign.class);\n manager.register(\"TeleOp\", Teleop.class);\n // manager.register(\"JupiterTeleOp\", JupiterBotTeleOp.class);\n manager.register(\"PushTeleOp\", PushBotTest.class);\n // manager.register(\"PushTeleOp42\", PushBotTest42.class);\n// manager.register(\"colortest\", onecolortesst.class);\n// manager.register(\"AUTOENCODERS\", autoencode.class);\n// manager.register(\"autotestfour\", auto4.class);\n// manager.register(\"theGOOD THING\", encodertest.class);\n// manager.register(\"colortest2222222222\", seenpush.class);\n //manager.register(\"encode\", encodertest.class);\n//manager.register(\"encode\", encode.class);\n// manager.register(\"TESTR4LIN3D3T3CT!!!!\", linedetect.class);\n// manager.register(\"gyro test\", gyro.class);\n // manager.register(\"Kierian's teleop\", teleoptest.class);\n // manager.register(\"I2CCHANGER bottom\", LinearI2cColorSensorAddressChange9915.class);\n // manager.register(\"I2CCHANGER top\", Lineari2cchange2.class);\n// manager.register(\"pushbutton\", pushbutton.class);\n// manager.register(\"right\", practice.class);\n//manager.register(\"left\",left.class);\n// manager.register(\"rightclimber\", rightclimber.class);\n// manager.register(\"leftclimber\", leftclimber.class);\n// manager.register(\"leftreg\", regleft.class);/\n// / manager.register(\"rightreg\", regright.class);\n// manager.register(\"gyrotest\", gyro.class);\n// manager.register(\"THISISGONNAWORK\", thisisgonnawork.class);\n// manager.register(\"auto\", thisisgonnaworkods.class);\n// manager.register(\"ods test\", odstest.class);\n// manager.register(\"real\", realauto.class);\n //manager.register(\"right aka blue WITH THE LINE FOLLOW\", bluepid.class);\n //manager.register(\"right aka blue\", blue.class);\n// manager.register(\"line follow\", linefoolow.class);\n// manager.register(\"right\", radicalnewideablue.class);\n // manager.register(\"rightrmi\", rniblue.class);\n // manager.register(\"leftrmi\", rnired.class);\n // manager.register(\"they're running right\", theysayitsbetterblue.class);\n // manager.register(\"they're running left\", theysayitsbetterred.class);\n// manager.register(\"color\", button.class);\n // manager.register(\"left aka red (use at own risk)\", red.class);\n// manager.register(\"rightest\", bluetest.class);\n// manager.register(\"fake\", fakeauto.class);\n// manager.register(\"button\", temp.class);\n// manager.register(\"tot\", tot.class);\n// manager.register(\"left\", red.class);\n }", "public NormalSearch() throws InstantiationException, IllegalAccessException, ClassNotFoundException, SQLException {\n super();\n //ins = new globalInstance();\n // TODO Auto-generated constructor stub\n }", "public void newConfig ()\n {\n Class<?> clazz = group.getRawConfigClasses().get(0);\n try {\n ManagedConfig cfg = (ManagedConfig)PreparedEditable.PREPARER.apply(\n clazz.newInstance());\n if (cfg instanceof DerivedConfig) {\n ((DerivedConfig)cfg).cclass = group.getConfigClass();\n }\n newNode(cfg);\n } catch (Exception e) {\n log.warning(\"Failed to instantiate config [class=\" + clazz + \"].\", e);\n }\n }", "public LogicManager() {\n model = new ModelManager();\n conversationManager = new ConversationManager();\n }", "public GameManager( GameFrame gameFrame ){\r\n\t\tpassedLevelIds = new ArrayList<Integer>();\r\n\t\tthis.gameFrame = gameFrame;\r\n\t\tcollectionManager = new CollectionManager(this);\r\n\t\tlevelManager = new LevelManager(this);\r\n\t\tmusicOn = true;\r\n\t\tcurrentLevelId = levelManager.getCurrentLevelId();\r\n\t\tsoundManager = new SoundManager();\r\n\t\tobservers = new ArrayList<GameManagerObserver>();\r\n\t}", "private UpdateManager () {}", "public DBManager() {\n\t\t\n\t}", "private void importState() {\n SpeakerManager s = new SpeakerManager();\n this.speakerManager = s.importState();\n\n RoomManager r = new RoomManager();\n this.roomManager = r.importState();\n\n OrganizerManager o = new OrganizerManager();\n this.organizerManager = o.importState();\n\n EventManager e = new EventManager();\n this.eventManager = e.importState();\n\n ChatManager c = new ChatManager();\n this.chatManager = c.importState();\n\n AttendeeManager a = new AttendeeManager();\n this.attendeeManager = a.importState();\n\n\n }", "public SPManager() {\n \tmyCon = new DBManager();\n }", "private void registerManagers() {\n registerProviders();\n\n // Cast Managers\n if (worldGuardManager.isEnabled()) castManagers.add(worldGuardManager);\n if (preciousStonesManager.isEnabled()) castManagers.add(preciousStonesManager);\n if (redProtectManager != null && redProtectManager.isFlagsEnabled()) castManagers.add(redProtectManager);\n\n // Entity Targeting Managers\n if (preciousStonesManager.isEnabled()) targetingProviders.add(preciousStonesManager);\n if (townyManager.isEnabled()) targetingProviders.add(townyManager);\n if (residenceManager != null) targetingProviders.add(residenceManager);\n if (redProtectManager != null) targetingProviders.add(redProtectManager);\n\n // PVP Managers\n if (worldGuardManager.isEnabled()) pvpManagers.add(worldGuardManager);\n if (pvpManager.isEnabled()) pvpManagers.add(pvpManager);\n if (multiverseManager.isEnabled()) pvpManagers.add(multiverseManager);\n if (preciousStonesManager.isEnabled()) pvpManagers.add(preciousStonesManager);\n if (townyManager.isEnabled()) pvpManagers.add(townyManager);\n if (griefPreventionManager.isEnabled()) pvpManagers.add(griefPreventionManager);\n if (factionsManager.isEnabled()) pvpManagers.add(factionsManager);\n if (residenceManager != null) pvpManagers.add(residenceManager);\n if (redProtectManager != null) pvpManagers.add(redProtectManager);\n\n // Build Managers\n if (worldGuardManager.isEnabled()) blockBuildManagers.add(worldGuardManager);\n if (factionsManager.isEnabled()) blockBuildManagers.add(factionsManager);\n if (locketteManager.isEnabled()) blockBuildManagers.add(locketteManager);\n if (preciousStonesManager.isEnabled()) blockBuildManagers.add(preciousStonesManager);\n if (townyManager.isEnabled()) blockBuildManagers.add(townyManager);\n if (griefPreventionManager.isEnabled()) blockBuildManagers.add(griefPreventionManager);\n if (mobArenaManager != null && mobArenaManager.isProtected()) blockBuildManagers.add(mobArenaManager);\n if (residenceManager != null) blockBuildManagers.add(residenceManager);\n if (redProtectManager != null) blockBuildManagers.add(redProtectManager);\n if (landsManager != null) blockBuildManagers.add(landsManager);\n\n // Break Managers\n if (worldGuardManager.isEnabled()) blockBreakManagers.add(worldGuardManager);\n if (factionsManager.isEnabled()) blockBreakManagers.add(factionsManager);\n if (locketteManager.isEnabled()) blockBreakManagers.add(locketteManager);\n if (preciousStonesManager.isEnabled()) blockBreakManagers.add(preciousStonesManager);\n if (townyManager.isEnabled()) blockBreakManagers.add(townyManager);\n if (griefPreventionManager.isEnabled()) blockBreakManagers.add(griefPreventionManager);\n if (mobArenaManager != null && mobArenaManager.isProtected()) blockBreakManagers.add(mobArenaManager);\n if (citadelManager != null) blockBreakManagers.add(citadelManager);\n if (residenceManager != null) blockBreakManagers.add(residenceManager);\n if (redProtectManager != null) blockBreakManagers.add(redProtectManager);\n if (landsManager != null) blockBreakManagers.add(landsManager);\n\n // Team providers\n if (heroesManager != null && heroesManager.useParties()) teamProviders.add(heroesManager);\n if (skillAPIManager != null && skillAPIManager.usesAllies()) teamProviders.add(skillAPIManager);\n if (useScoreboardTeams) teamProviders.add(new ScoreboardTeamProvider());\n if (permissionTeams != null && !permissionTeams.isEmpty()) {\n teamProviders.add(new PermissionsTeamProvider(permissionTeams));\n }\n if (factionsManager != null) teamProviders.add(factionsManager);\n if (battleArenaManager != null && useBattleArenaTeams) teamProviders.add(battleArenaManager);\n if (ultimateClansManager != null) teamProviders.add(ultimateClansManager);\n\n // Player warp providers\n if (preciousStonesManager != null && preciousStonesManager.isEnabled()) {\n playerWarpManagers.put(\"fields\", preciousStonesManager);\n }\n if (redProtectManager != null) playerWarpManagers.put(\"redprotect\", redProtectManager);\n if (residenceManager != null) playerWarpManagers.put(\"residence\", residenceManager);\n }", "public <R extends IQueryRequest> LSMEngineBuilder<T> buildQueryManager(\n QueryManager<T, R> queryManager) {\n lsmEngine.setQueryManager(queryManager);\n return this;\n }", "public static void build ()\r\n {\r\n lgt.insert(1);\r\n lgt.insert(2);\r\n lgt.insert(5);\r\n \r\n lgt.findRoot();\r\n lgt.insert(3);\r\n \r\n lgt.findRoot();\r\n lgt.insert(4);\r\n \r\n lgt.insert(6);\r\n lgt.findParent();\r\n lgt.insert(7);\r\n \r\n }", "public void start() {\n System.out.println(\"OBRMAN started\");\n ApamManagers.addManager(this, 3);\n OBRMan.obr = new OBRManager(null, repoAdmin);\n obr.startWatchingRepository();\n }", "EMInitializer() {\r\n try {\r\n emf = Persistence.createEntityManagerFactory(\"pl.polsl_MatchStatist\"\r\n + \"icsWeb_war_4.0-SNAPSHOTPU\");\r\n em = emf.createEntityManager();\r\n } catch (Exception e) {\r\n em = null;\r\n emf = null;\r\n }\r\n\r\n }", "private void initEmulator() {\n From from;\n\n from = new From();\n Random rnd = new Random();\n int n = rnd.nextInt(900000);\n\n //TODO poner estos datos en configuraciones\n from.setId(\"DL-USER\" + n);\n from.setName(\"CogDLUser\" + n);\n\n mEmulator = new Emulator(from);\n }", "public GameManagerAstratta init(Giocatore[] nomiGiocatori, int numGiocatori,\r\n String nomeConfigurazione) throws SQLException {\n return null;\r\n }", "private ScriptInstanceManager() {\n\t\tsuper();\n\t}", "public Engine(){\n name = \"Basic Engine\";\n moveDeduction = 1;\n }", "public static void insLns() throws ClassNotFoundException, SQLException {\r\n Statement s = DBConnect.connection.createStatement();\r\n for (int w = 1; w < 11; w++) {\r\n String insLines = \"INSERT INTO \" + StFrmNm\r\n + \"(Line) \"\r\n + \"VALUES(\"\r\n + \"'\" + w + \"'\"\r\n + \")\";\r\n s.execute(insLines);\r\n }\r\n }", "public interface DatabaseManager {\r\n\r\n // NOTE: this is a draft of the interface. More methods will likely be\r\n // added.\r\n\r\n /**\r\n * Uploads the specified feature to the database.\r\n * \r\n * @param file the shapefile (*.shp) to upload\r\n * @param project the project to associate the shapefile with\r\n * @return the id of the feature in the database\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n int uploadFeature(File file, String project) throws IOException, SQLException;\r\n\r\n /**\r\n * Uploads the specified modis tile to the database.\r\n * \r\n * @param file the .hdf to upload\r\n * @param product the modis product\r\n * @param date the date the data was captured\r\n * @param downloaded the date the data was downloaded from the host\r\n * @param horz the horizontal tile number\r\n * @param vert the vertical tile number\r\n * @return the id of the Modis raster in the database\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n int uploadModis(File file, ModisProduct product, DataDate date, DataDate updated, int horz, int vert) throws IOException, SQLException;\r\n\r\n /**\r\n * Uploads the specified ETo file to the database.\r\n * \r\n * @param file the\r\n * @param date\r\n * @param updated\r\n * @return the id of the ETo raster in the database\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n int uploadEto(File file, DataDate date, DataDate updated) throws IOException, SQLException;\r\n\r\n /**\r\n * Uploads the specified TRMM file to the database.\r\n * \r\n * @param file\r\n * @param date\r\n * @param updated\r\n * @return the id of the TRMM raster in the database\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n int uploadTrmm(File file, DataDate date, DataDate updated) throws IOException, SQLException;\r\n\r\n /**\r\n * Uploads the specified projected Modis product to the database.\r\n * \r\n * @param file\r\n * @param project\r\n * @param product\r\n * @param date\r\n * @param updated\r\n * @return the id of the projected Modis raster in the database\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n int uploadProjectedModis(File file, String project, ModisProduct product, DataDate date, DataDate updated) throws IOException, SQLException;\r\n\r\n /**\r\n * Uploads the specified projected ETo product to the database.\r\n * \r\n * @param file\r\n * @param project\r\n * @param date\r\n * @param updated\r\n * @return the id of the projected ETo raster in the database\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n int uploadProjectedEto(File file, String project, DataDate date, DataDate updated) throws IOException, SQLException;\r\n\r\n /**\r\n * Uploads the projected TRMM product to the database.\r\n * \r\n * @param file\r\n * @param project\r\n * @param date\r\n * @param updated\r\n * @return the id of the TRMM raster in the database\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n int uploadProjectedTrmm(File file, String project, DataDate date, DataDate updated) throws IOException, SQLException;\r\n\r\n /**\r\n * Uploads the specified ETa product to the database.\r\n * \r\n * @param file\r\n * @param project\r\n * @param date\r\n * @param updated\r\n * @return the id of the ETa raster in the database\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n int uploadEta(File file, String project, DataDate date, DataDate updated) throws IOException, SQLException;\r\n\r\n /**\r\n * Uploads the specified EVI product to the database.\r\n * \r\n * @param file\r\n * @param project\r\n * @param date\r\n * @param updated\r\n * @return the id of the EVI raster in the database\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n int uploadEvi(File file, String project, DataDate date, DataDate updated) throws IOException, SQLException;\r\n\r\n /**\r\n * Uploads the specified NDVI product to the database.\r\n * \r\n * @param file\r\n * @param project\r\n * @param date\r\n * @param updated\r\n * @return the id of the NDVI raster in the database\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n int uploadNdvi(File file, String project, DataDate date, DataDate updated) throws IOException, SQLException;\r\n\r\n /**\r\n * Uploads the specified NDWI5 product to the database.\r\n * \r\n * @param file\r\n * @param project\r\n * @param date\r\n * @param updated\r\n * @return the id of the NDWI5 raster in the database\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n int uploadNdwi5(File file, String project, DataDate date, DataDate updated) throws IOException, SQLException;\r\n\r\n /**\r\n * Uploads the specified NDWI6 product to the database.\r\n * \r\n * @param file\r\n * @param project\r\n * @param date\r\n * @param updated\r\n * @return the id of the NDWI6 raster in the database\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n int uploadNdwi6(File file, String project, DataDate date, DataDate updated) throws IOException, SQLException;\r\n\r\n /**\r\n * Uploads the specified SAVI product to the database.\r\n * \r\n * @param file\r\n * @param project\r\n * @param date\r\n * @param updated\r\n * @return the id of the SAVI raster in the database\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n int uploadSavi(File file, String project, DataDate date, DataDate updated) throws IOException, SQLException;\r\n\r\n /**\r\n * Downloads the specified feature and places it in the specified file in\r\n * the shapefile.\r\n * \r\n * @param file the location to save the feature\r\n * @param id the id of the feature\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n void downloadFeature(File file, int id) throws IOException, SQLException;\r\n\r\n /**\r\n * Downloads the specified Modis tile from the database.\r\n * \r\n * @param file\r\n * @param product\r\n * @param id\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n void downloadModis(File file, ModisProduct product, int id) throws IOException, SQLException;\r\n\r\n /**\r\n * Downloads the specified ETo raster from the database and saves it to the\r\n * specified file.\r\n * \r\n * @param file\r\n * @param id\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n void downloadEto(File file, int id) throws IOException, SQLException;\r\n\r\n /**\r\n * Downloads the specified TRMM raster from the database and saves it to the\r\n * specified file.\r\n * \r\n * @param file\r\n * @param id\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n void downloadTrmm(File file, int id) throws IOException, SQLException;\r\n\r\n /**\r\n * Downloads the specified projected Modis product from the database.\r\n * \r\n * @param file\r\n * @param product\r\n * @param id\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n void downloadProjectedModis(File file, ModisProduct product, int id) throws IOException, SQLException;\r\n\r\n /**\r\n * Downloads the specified projected ETo product from the database.\r\n * \r\n * @param file\r\n * @param id\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n void downloadProjectedEto(File file, int id) throws IOException, SQLException;\r\n\r\n /**\r\n * Downloads the specified projected TRMM product from the database.\r\n * \r\n * @param file\r\n * @param id\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n void downloadProjectedTrmm(File file, int id) throws IOException, SQLException;\r\n\r\n /**\r\n * Downloads the specified ETa product from the database.\r\n * \r\n * @param file\r\n * @param id\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n void downloadEta(File file, int id) throws IOException, SQLException;\r\n\r\n /**\r\n * Downloads the specified EVI product from the database.\r\n * \r\n * @param file\r\n * @param id\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n void downloadEvi(File file, int id) throws IOException, SQLException;\r\n\r\n /**\r\n * Downloads the specified NDVI product from the database.\r\n * \r\n * @param file\r\n * @param id\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n void downloadNdvi(File file, int id) throws IOException, SQLException;\r\n\r\n /**\r\n * Downloads the specified NDWI5 product from the database.\r\n * \r\n * @param file\r\n * @param id\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n void downloadNdwi5(File file, int id) throws IOException, SQLException;\r\n\r\n /**\r\n * Downloads the specified NDWI6 product from the database.\r\n * \r\n * @param file\r\n * @param id\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n void downloadNdwi6(File file, int id) throws IOException, SQLException;\r\n\r\n /**\r\n * Downloads the specified SAVI product from the database.\r\n * \r\n * @param file\r\n * @param id\r\n * @throws IOException\r\n * @throws SQLException\r\n */\r\n void downloadSavi(File file, int id) throws IOException, SQLException;\r\n\r\n /**\r\n * Returns the id of the MODIS raster for the specified product and date.\r\n * \r\n * @param product\r\n * @param date\r\n * @param horz\r\n * @param vert\r\n * @return the id of the raster or -1 if the raster isn't found\r\n * @throws SQLException\r\n */\r\n int getModisId(ModisProduct product, DataDate date, int horz, int vert) throws SQLException;\r\n\r\n /**\r\n * Returns the id of the ETo for the specified date.\r\n * \r\n * @param date\r\n * @return the id of the raster or -1 if the raster isn't found\r\n * @throws SQLException\r\n */\r\n int getEtoId(DataDate date) throws SQLException;\r\n\r\n /**\r\n * Returns the id of the TRMM for the specified date.\r\n * \r\n * @param date\r\n * @return the id of the raster or -1 if the raster isn't found\r\n * @throws SQLException\r\n */\r\n int getTrmmId(DataDate date) throws SQLException;\r\n\r\n /**\r\n * Returns the id of the reprojected Modis raster for the specified\r\n * project, product, and date.\r\n * \r\n * @param project\r\n * @param product\r\n * @param date\r\n * @return the id of the raster or -1 if the raster isn't found\r\n * @throws SQLException\r\n */\r\n int getReprojectedModisId(String project, DataDate date) throws SQLException;\r\n\r\n /**\r\n * Returns the id of the reprojected ETo raster for the specified project\r\n * and date.\r\n * \r\n * @param project\r\n * @param date\r\n * @return the id of the raster or -1 if the raster isn't found\r\n * @throws SQLException\r\n */\r\n int getReprojectedEtoId(String project, DataDate date) throws SQLException;\r\n\r\n /**\r\n * Returns the id of the reprojected TRMM raster for the specified project\r\n * and date.\r\n * \r\n * @param project\r\n * @param date\r\n * @return the id of the raster or -1 if the raster isn't found\r\n * @throws SQLException\r\n */\r\n int getReprojectedTrmmId(String project, DataDate date) throws SQLException;\r\n\r\n /**\r\n * Returns the id of the ETa raster for the specified project and date.\r\n * \r\n * @param project\r\n * @param date\r\n * @return the id of the raster or -1 if the raster isn't found\r\n * @throws SQLException\r\n */\r\n int getEtaId(String project, DataDate date) throws SQLException;\r\n\r\n /**\r\n * Returns the id of the EVI raster for the specified project and date.\r\n * \r\n * @param project\r\n * @param date\r\n * @return the id of the raster or -1 if the raster isn't found\r\n * @throws SQLException\r\n */\r\n int getEviId(String project, DataDate date) throws SQLException;\r\n\r\n /**\r\n * Returns the id of the NDVI raster for the specified project and date.\r\n * \r\n * @param project\r\n * @param date\r\n * @return the id of the raster or -1 if the raster isn't found\r\n * @throws SQLException\r\n */\r\n int getNdviId(String project, String feature, DataDate date) throws SQLException;\r\n\r\n /**\r\n * Returns the id of the NDWI5 raster for the specified project and date.\r\n * \r\n * @param project\r\n * @param date\r\n * @return the id of the raster or -1 if the raster isn't found\r\n * @throws SQLException\r\n */\r\n int getNdwi5Id(String project, String feature, DataDate date) throws SQLException;\r\n\r\n /**\r\n * Returns the id of the NDWI6 raster for the specified project and date.\r\n * \r\n * @param project\r\n * @param date\r\n * @return the id of the raster or -1 if the raster isn't found\r\n * @throws SQLException\r\n */\r\n int getNdwi6Id(String project, String feature, DataDate date) throws SQLException;\r\n\r\n /**\r\n * Returns the id of the SAVI raster for the specified project and date.\r\n * \r\n * @param project\r\n * @param date\r\n * @return the id of the raster or -1 if the raster isn't found\r\n * @throws SQLException\r\n */\r\n int getSaviId(String project, String feature, DataDate date) throws SQLException;\r\n\r\n /**\r\n * Uploads the specified zonal statistics.\r\n * \r\n * @param project\r\n * @param feature\r\n * @param zoneField\r\n * @param zone\r\n * @param date\r\n * @param index\r\n * @param zonalStatistics\r\n */\r\n void uploadZonalStatistic(String project, String feature, String zoneField,\r\n String zone, DataDate date, EnvironmentalIndex index,\r\n ZonalStatistic zonalStatistics) throws SQLException;\r\n\r\n /**\r\n * Returns the id of the zonal statistics for the specified parameters.\r\n * \r\n * @param project\r\n * @param feature\r\n * @param zoneField\r\n * @param zone\r\n * @param date\r\n * @param index\r\n * @return the id or -1 if it is not found\r\n */\r\n int getZonalStatisticId(String project, String feature, String zoneField,\r\n String zone, DataDate date, EnvironmentalIndex index)\r\n throws SQLException;\r\n\r\n /**\r\n * Returns zonal statistics for the specified zonal statistic id.\r\n * \r\n * @param id\r\n * @return zonal statistics\r\n * @throws SQLException\r\n */\r\n ZonalStatistic getZonalStatistic(int id) throws SQLException;\r\n}", "public LSMEngineBuilder<T> buildLSMManagers(String packageName, WALManager walManager) {\n try {\n ApplicationContext property =\n ApplicationContextGenerator.GeneratePropertyWithAnnotation(packageName);\n buildLSMManagers(property, walManager);\n } catch (Exception e) {\n logger.error(e.getMessage());\n }\n return this;\n }", "private ModuleServiceImpl(){\n\t\t//initialize local data.\n\t\tfactories = new ConcurrentHashMap<String, IModuleFactory>();\n\t\tstorages = new ConcurrentHashMap<String, IModuleStorage>();\n\t\tcache = new ConcurrentHashMap<String, Module>();\n\t\tmoduleListeners = new ConcurrentHashMap<String, IModuleListener>();\n\n\t\tif (LOGGER.isDebugEnabled()) {\n\t\t\tLOGGER.debug(\"Created new ModuleServiceImplementation\");\n\t\t}\n\n\t\tConfigurationManager.INSTANCE.configure(this);\n\t}", "public void initialize() {\n while (il == null)\n try {\n Thread.sleep(1);\n } catch (InterruptedException e) {\n continue;\n }\n\n // Set up command manager (undo and redo)\n commandManager = new ModifySongManager(staff, this);\n \n // Set up staff.\n HBox[] staffLedgerLines = { staffExtLinesHighC, staffExtLinesHighA,\n staffExtLinesLowC, staffExtLinesLowA };\n staff = new Staff(staffLedgerLines, this, il, arrangementList);\n controlPanel = new Controls(staff, this, il, arrangementList);\n staff.setControlPanel(controlPanel);\n \n // HACK\n staffInstrumentEventHandler = new StaffInstrumentEventHandler(staff, il, commandManager);\n \n commandManager.setStaff(staff);\n \n // Set up top line.\n instBLine = new ButtonLine(instLine, selectedInst, il, staff);\n selectedInst.setImage(il.getSpriteFX(ImageIndex.MARIO));\n\n topPanel = new PanelButtons(staff, this, il, instBLine);\n staff.setTopPanel(topPanel);\n\n arrangementList.setEditable(true);\n arrangementList.setStyle(\"-fx-font: 8pt \\\"Arial\\\";\");\n // Hide all arranger features for now.\n arrangementList.setVisible(false);\n addButton.setVisible(false);\n deleteButton.setVisible(false);\n upButton.setVisible(false);\n downButton.setVisible(false);\n \n // Set up clipboard.\n rubberBand = new StaffRubberBand();\n clipboard = new StaffClipboard(rubberBand, staff, this, il);\t\n \n // Fix TextField focus problems.\n new SongNameController(songName, this);\n \n }", "private AdminEntity() {\n \tsuper();\n\n this.emf = Persistence.createEntityManagerFactory(\"entityManager\");\n\tthis.em = this.emf.createEntityManager();\n\tthis.tx = this.em.getTransaction();\n }", "int insertSelective(WfCfgModuleCatalog record);", "@Override\n public void onEnable() {\n plugin = this;\n if(!getServer().getPluginManager().isPluginEnabled(\"BedWars1058\")){\n getLogger().severe(\"Unable to locate Bedwars1058.\");\n getLogger().severe(\"Plugin will be disabled!\");\n getServer().getPluginManager().disablePlugin(this);\n return;\n }else{\n bwAPI = Bukkit.getServicesManager().getRegistration(BedWars .class).getProvider();\n bedwarsEnabled = true;\n }\n if(!getServer().getPluginManager().isPluginEnabled(\"Citizens\")){\n getLogger().severe(\"Citizens is missing shopkeeper won't be used!\");\n getServer().getPluginManager().disablePlugin(this);\n return;\n }else{\n npcRegistry = CitizensAPI.getNPCRegistry();\n citizensEnabled = true;\n getLogger().info(\"Hooked with Citizens for shopkeeper\");\n }\n /*commandManager = new BukkitCommandManager(this);\n if(commandManager == null){\n getLogger().severe(\"Unable to intialize BukkitCommandManager.\");\n getLogger().severe(\"Plugin will be disabled!\");\n getServer().getPluginManager().disablePlugin(this);\n return;\n }*/\n fileUtils = new FileUtils();\n configuration = new Configuration();\n if(!configuration.createConfiguration(this)){\n getLogger().severe(\"Unable to create configuration file.\");\n getLogger().severe(\"Plugin will be disabled!\");\n getServer().getPluginManager().disablePlugin(this);\n return;\n }\n messages = new Messages();\n if(!messages.generateMessages()){\n getLogger().severe(\"Unable to create messages.yml file.\");\n getLogger().severe(\"Plugin will be disabled!\");\n getServer().getPluginManager().disablePlugin(this);\n return;\n }\n cacheManager = new CacheManager(this);\n if(!cacheManager.buildCache()){\n getLogger().severe(\"Unable to create cache file.\");\n getLogger().severe(\"Plugin will be disabled!\");\n getServer().getPluginManager().disablePlugin(this);\n return;\n }\n scheduler = new WorkloadScheduler();\n scheduler.intializeThread();\n storage = new Storage(this,getConfiguration().isUsingMysql());\n storage.build();\n storage.tryConnection();\n storage.createDatabase();\n randomUtility = new RandomUtility(this);\n cosmeticManager = new CosmeticManager();\n cosmeticManager.loadCosmetics();\n playerManager = new PlayerCosmeticsManager();\n registerListeners();\n cooldownTasks = new Cooldowns();\n cooldownTasks.runTaskTimerAsynchronously(this,100L,20L);\n registerCommands();\n getLogger().info(\"------------------------------------------------\");\n getLogger().info(\"Enabled Plugin\");\n getLogger().info(\"------------------------------------------------\");\n\n }", "abstract void initPersistance();", "public StorageManagerImpl()\n {\n if (log.isDebugEnabled())\n {\n log.debug(\"Creating Instance of StorageManagerImpl\");\n }\n storageProxyHolder = new Hashtable();\n\n try\n {\n initializeStorageProxies();\n nRegister();\n }\n catch (Throwable throwable)\n {\n if (log.isErrorEnabled())\n {\n log.error(\"Failed to create StorageManager object\", throwable);\n }\n throwable.printStackTrace();\n }\n }", "private static void InitTagger() {\n\t\ttagger = new MaxentTagger(\"models/english-left3words-distsim.tagger\");\n\t}", "private UnitManager() {\r\n\t\tUM = new UnitMap(); // create an object\r\n\t}", "public ChunkManager() {\n instance = this;\n\n durabilityDir = new File(ObsidianDestroyer.getInstance().getDataFolder(), \"data\" + File.separator + \"durabilities\");\n if (!durabilityDir.exists()) {\n durabilityDir.mkdirs();\n }\n\n load();\n }", "public EntityManager(WeaponModule playerWeapon) {\n player = new PlayerEntity(\n Settings.game_width/2 - PlayerEntity.DEF_PLAYER_WIDTH/2,\n Settings.game_height/2 - PlayerEntity.DEF_PLAYER_HEIGHT/2,\n playerWeapon\n// new MainBlasterModule(Settings.player_gun_lock)\n// new SideBlasterModule()\n );\n\n ents = new ArrayList<Entity>();\n sub_queue = new ArrayList<Entity>();\n unsub_queue = new ArrayList<Entity>();\n\n cols = new ArrayList<CollisionBox>();\n sub_cueue = new ArrayList<CollisionBox>();\n unsub_cueue = new ArrayList<CollisionBox>();\n\n particles = new ArrayList<Particle>();\n p_sub_queue = new ArrayList<Particle>();\n p_unsub_queue = new ArrayList<Particle>();\n }", "@Override\n public void initialise(GameEngine engine, Context rootContext) {\n TypeHandlerLibrary typeHandlerLibrary = rootContext.get(TypeHandlerLibrary.class);\n Gson gson = new GsonBuilder().setPrettyPrinting().create();\n Serializer<GsonPersistedData> serializer = new Serializer<>(\n typeHandlerLibrary,\n new GsonPersistedDataSerializer(),\n new GsonPersistedDataWriter(gson),\n new GsonPersistedDataReader(gson)\n );\n autoConfigManager = new AutoConfigManager(serializer);\n typeHandlerLibrary.addTypeHandlerFactory(new AutoConfigTypeHandlerFactory(typeHandlerLibrary));\n rootContext.put(AutoConfigManager.class, autoConfigManager);\n\n autoConfigManager.loadConfigsIn(rootContext);\n }", "private void createAgent() {\n logger.info(\"Creating agent\");\n iteration = 0;\n aiManager = new AIManager(configDialogInfo);\n aiManager.getAgent().addObserver(\"gameEngine\", this);\n AIBirth.generate(aiManager.getAgent());\n aiManager.start();\n }", "public interface Manager {\n\n}", "@Override\n public void onEnable() {\n // Config\n getConfig().options().copyDefaults(true);\n saveConfig();\n\n // Get and load the libraries\n LIBRARIES = new LibraryHandler(this);\n\n // Evo-inflector\n LIBRARIES.addMavenLibrary(LibraryHandler.MAVEN_CENTRAL, Depends.ORG_ATTEO, Depends.EVO, Depends.EVO_VER);\n\n if (Setting.MONGODB_PERSISTENCE) {\n LIBRARIES.addMavenLibrary(LibraryHandler.MAVEN_CENTRAL, Depends.ORG_MONGO, Depends.MONGODB,\n Depends.MONGODB_VER);\n }\n\n // Enable\n new DGGame(this);\n }", "private void createFrameworkManipulator() {\n \t\tFrameworkAdmin admin = getFrameworkAdmin();\n \t\tif (admin == null)\n \t\t\tthrow new RuntimeException(\"Framework admin service not found\"); //$NON-NLS-1$\n \t\tmanipulator = admin.getManipulator();\n \t\tif (manipulator == null)\n \t\t\tthrow new RuntimeException(\"Framework manipulator not found\"); //$NON-NLS-1$\n \t}", "public Session(){\n\t\tdb = ALiteOrmBuilder.getInstance().openWritableDatabase();\n\t\texternalsCallbacks = new ArrayList<EntityListener>();\n\t}", "private void initManagers() {\n\t\t// TODO Auto-generated method stub\n\t\tvenueManager = new VenueManager();\n\t\tadView = new AdView(this, AdSize.SMART_BANNER,\n\t\t\t\tConstants.AppConstants.ADDMOB);\n\t\tanimationSounds = new AnimationSounds(VenuesActivity.this);\n\n\t}", "@Override\n public void onEnable() {\n log.info(\"Loading players file\");\n try {\n players = this.load(PLAYERS_CONF_PATH);\n } catch (Exception e) {\n }\n if (players == null) {\n log.info(\"players == null, creating Map\");\n players = new HashMap<String, PlayerConfig>();\n }\n log.info(\"Enabling CanBadia Plugin\");\n\n PluginManager pm = this.getServer().getPluginManager();\n\n\n getCommand(\"trade\").setExecutor(tradeCommandExecutor);\n getCommand(\"god\").setExecutor(godCommandExecutor);\n getCommand(\"godsfullpower\").setExecutor(godCommandExecutor);\n getCommand(\"market\").setExecutor(marketCommandExecutor);\n getCommand(\"class\").setExecutor(godCommandExecutor);\n getCommand(\"wall\").setExecutor(wallCommandExecutor);\n\n\n /*Some other example listeners\n pm.registerEvent(Event.Type.PLAYER_MOVE, playerListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.BLOCK_PLACE, blockListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.ENTITY_DAMAGE, entityListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.BLOCK_BREAK, blockListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.ENTITY_EXPLODE, entityListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.BLOCK_BREAK, blockListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.CREATURE_SPAWN, spawnListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.ENTITY_EXPLODE, entityListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.BLOCK_BURN, blockListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.BLOCK_IGNITE, blockListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.PLAYER_JOIN, playerListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.PLAYER_INTERACT, playerListener, Event.Priority.Normal, this);\n */\n\n }", "public interface AvanceSalaireManager\r\n extends GenericManager<AvanceSalaire, Long>\r\n{\r\n\r\n public final static String SERVICE_NAME = \"AvanceSalaireManager\";\r\n \r\n public AvanceSalaire generereglement(AvanceSalaire entity);\r\n \r\n public AvanceSalaire confirme(AvanceSalaire entity);\r\n \r\n public AvanceSalaire annule(AvanceSalaire entity);\r\n\r\n}", "public ExamMagicDataModule(Configuration config){\r\n\t\tthis.config = config;\r\n\t}", "private TSLManager() {\n\t\tsuper();\n\t}", "@StartStep(localName=\"command-engineering\", after={\"config\"})\n public static void startCommandEngineering(LifecycleContext context) \n {\n // for each class that is a Catalog or Command, create an entry for those in the context.\n ClassScanner classScanner = new ClassScanner(context);\n classScanner.scan();\n }", "@Before\n\tpublic void onSetUpBeforeTransaction() throws Exception {\n\t\t// load the spring created dao class bean from the Spring Application\n\t\t// Context\n\t\tQnaDao dao = (QnaDao) applicationContext.getBean(\"org.sakaiproject.qna.dao.impl.QnaDaoTarget\");\n\t\tif (dao == null) {\n\t\t\tlog.error(\"onSetUpBeforeTransaction: DAO could not be retrieved from spring context\");\n\t\t}\n\t\t\t\n\t\tpermissionLogic = new PermissionLogicImpl();\n\t\tpermissionLogic.setExternalLogic(externalLogicStub);\n\t\t\n\t\t// create and setup options\n\t\toptionsLogic = new OptionsLogicImpl();\n\t\toptionsLogic.setDao(dao);\n\t\toptionsLogic.setPermissionLogic(permissionLogic);\n\t\toptionsLogic.setExternalLogic(externalLogicStub);\n\t\toptionsLogic.setExternalEventLogic(externalEventLogicStub);\n\t\toptionsLogic.setServerConfigurationService(serverConfigurationServiceStub);\n\t\t\n\t\t// create and setup category logic\n\t\tcategoryLogic = new CategoryLogicImpl();\n\t\tcategoryLogic.setDao(dao);\n\t\tcategoryLogic.setExternalEventLogic(externalEventLogicStub);\n\t\tcategoryLogic.setExternalLogic(externalLogicStub);\n\t\tcategoryLogic.setPermissionLogic(permissionLogic);\n\t\tcategoryLogic.setQnaBundleLogic(bundleLogicStub);\n\t\t\n\t\t// create and setup the question logic\n\t\tquestionLogic = new QuestionLogicImpl();\n\t\tquestionLogic.setDao(dao);\n\t\tquestionLogic.setPermissionLogic(permissionLogic);\n\t\tquestionLogic.setOptionsLogic(optionsLogic);\n\t\tquestionLogic.setExternalLogic(externalLogicStub);\n\t\tquestionLogic.setExternalEventLogic(externalEventLogicStub);\n\t\tquestionLogic.setDeveloperHelperService(developerHelperServiceStub);\n\t\tquestionLogic.setNotificationLogic(notificationLogicStub);\n\t\tquestionLogic.setCategoryLogic(categoryLogic);\n\t\t\n\t\tquestionSmsCommand = new QuestionSmsCommand();\n\t\tquestionSmsCommand.setOptionsLogic(optionsLogic);\n\t\tquestionSmsCommand.setQnaBundleLogic(bundleLogicStub);\n\t\tquestionSmsCommand.setQuestionLogic(questionLogic);\n\t\tquestionSmsCommand.setCategoryLogic(categoryLogic);\n\t\tquestionSmsCommand.setExternalLogic(externalLogicStub);\n\t\tquestionSmsCommand.setPermissionLogic(permissionLogic);\n\n\t}", "private WrappedEngine() {\n logger = new ONDEXCoreLogger();\n addONDEXListener(logger);\n pluginLogger = new ONDEXPluginLogger();\n EnvironmentVariable ev = new EnvironmentVariable(\"ONDEX VAR=\" + Config.ondexDir);\n ev.setLog4jLevel(Level.INFO);\n fireEventOccurred(ev);\n }", "public TManagerImp() {\n transactions = new ConcurrentHashMap<>();\n }", "private DatarouterStoragePlugin(DatarouterStorageDaosModule daosModule){\n\t\tthis(null, null, null, null, null, null, null, daosModule, null, null, null, null);\n\t}", "private DaoManager() {\n }", "public void init() {\r\n\tlog.info(\"OsylManagerServiceImpl service init() \");\r\n\t// register functions\r\n\tfor (Iterator<String> i = functionsToRegister.iterator(); i.hasNext();) {\r\n\t String function = i.next();\r\n\t functionManager.registerFunction(function);\r\n\t}\r\n }", "public LazyKeyManager(Configuration config, KeyManager prevMgr) {\n super(config);\n keyList = prevMgr.keyList;\n }", "public interface Constants {\n\n /**\n * Add new modules\n * params: \"Title\", \"Description\", \"Module Tag\", \"Image url\"\n */\n Module moduleMaps = new Module(\"Maps\", \"Google map integrations with geofencing & more...\", \"\", \"http://3.bp.blogspot.com/_ZaGO7GjCqAI/Rh47v0ZvaoI/AAAAAAAABjA/20hcUi_0XVo/s640/maps-building-layer.png\");\n Module moduleVolley = new Module(\"Volley\", \"Network calls, caching & queuing...\", \"personal.aron.devstuff.views.VolleyActivity\", \"http://4.bp.blogspot.com/-K7j65NVErX4/Vg1fo0yVl5I/AAAAAAAACIM/e9vbLaxqA-U/s1600/image00.png\");\n Module moduleDynamicForms = new Module(\"Dynamic Forms\", \"Creating forms using json...\", \"personal.aron.devstuff.views.DynamicFormActivity\", \"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQEXcK-FALJ2WYj0GM015I70-al_Xxe7rkXRqtczHs6bZqRiau1xQ\");\n Module modulePermissions = new Module(\"App Permissions\", \"Asking permissions and handling it...\", \"personal.aron.devstuff.views.PermissionsActivity\", \"https://i.kinja-img.com/gawker-media/image/upload/s--Mjlv9Tan--/c_fill,fl_progressive,g_center,h_450,q_80,w_800/18hvgdkyebym4jpg.jpg\");\n\n public Module[] moduleList = {moduleMaps, moduleVolley, moduleDynamicForms, modulePermissions};\n\n public int numColumnsGridHome = 2;\n public String homeBackDrop = \"http://wallarthd.com/wp-content/uploads/2014/08/Art-Android-Wallpaper-Background.jpg\";\n\n}", "public SQLManager(Context context) {\n handler = new SQLHandler(context);\n }", "private void instantiate(){\n inputAddressList = new LinkedList<Address>();\n inputGroupList = new LinkedList<Group>();\n root = new Group(\"root\", 0);\n }", "protected abstract void createDatabaseData(EntityManager entityManager);", "public interface ImportBaseManager {\n @Transactional\n void readFile(File file);\n\n void addUnitUser(Map<String, User> userMap, Map<String, Unit> unitMap);\n\n @Transactional\n Map<String,User> addUser(List<ImportBaseVO> vos, Map<String, Corp> unitCorpMap);\n\n @Transactional\n void addCostomerInfo(List<ImportBaseVO> vos, Map<String, Corp> customerMap, Map<String, Unit> unitMap);\n\n @Transactional\n Map<String,Corp> addCorp(List<ImportBaseVO> vos);\n\n @Transactional\n Map<String, Unit> addUnit(List<ImportBaseVO> vos, Map<String, Corp> customerMap,\n Map<String, City> provinceMap, Map<String, City> cityMap);\n\n // 保存客户公司\n Map<String,Corp> addCustomer(List<ImportBaseVO> vos);\n}", "public static void initManager() {\n theManager = new LevelManager();\n lives = 3;\n }", "private DbManager() {\n \t\tquestions = new ArrayList<Question>();\n \t\tanswers = new ArrayList<Answer>();\n \t\tcomments = new ArrayList<Comment>();\n \t\tusers = new ArrayList<User>();\n \t\ttags = new ArrayList<String>();\n \t\tthis.userCounterIdCounter = 0;\n \t\tthis.questionIdCounter = 0;\n \t\tthis.answerIdCounter = 0;\n \t\tthis.commentIdCounter = 0;\n \t\treputations = new ArrayList[3];\n \t\treputations[0] = new ArrayList<User>();\n \t\treputations[1] = new ArrayList<Date>();\n \t\treputations[2] = new ArrayList<Integer>();\n \t}", "@PreInit\n\tpublic void preInit(FMLPreInitializationEvent evt) {\n\t\tmanHelper.checkManPack(evt.getModMetadata().name);\n\t\n\t// If Manager Pack is installed, then...\n\t\tif (manHelper.loading) {\n\t\t\t\n\t\t// init managers\n\t\t\tString[] ver = evt.getModMetadata().version.split(\"\\\\.\");\n\t\t\tmanHelper.initMan(\n\t\t\t\t\tnew SAP_ConfigManagerII(\"Turret Mod 3\", \"TurretMod3.txt\", \"/sanandreasp/\"),\n\t\t\t\t\tnew SAP_LanguageManager(\"/sanandreasp/TurretMod3\", \"1.0\", \"Turret Mod 3\"),\n\t\t\t\t\tnew SAP_UpdateManager(\"Turret Mod 3\", Integer.parseInt(ver[0]), Integer.parseInt(ver[1]), Integer.parseInt(ver[2]), \"https://dl.dropboxusercontent.com/u/56920617/TurretMod_latest.txt\", \"http://www.minecraftforum.net/topic/562836-\")\n\t\t\t);\n\t\t\t\n\t\t// init Creative Tab\n\t\t\ttabTurret = new CreativeTabTurrets(\"turretTab\");\n\t\t\t\n\t\t// create helper instance for the Config Manager (CFGMan)\n\t\t\tSAP_ConfigManagerII cfgman = manHelper.getCfgMan();\n\t\t\t\n\t\t// add Config Groups to CFGMan\n\t\t\tcfgman.addGroup(\"Other Settings (Doubles)\", DataTypes.DOUBLE);\n\t\t\tcfgman.addGroup(\"Other Settings (Booleans)\", DataTypes.BOOL);\n\t\t\t\n\t\t// set pre-defined config values and value names to CFGMan\n\t\t\tcfgman.addStaticItemIDs(itemIDs.keySet().toArray(new String[itemIDs.size()]), itemIDs.values().toArray(new Integer[itemIDs.size()]));\n\t\t\tcfgman.addStaticBlockIDs(blockIDs.keySet().toArray(new String[blockIDs.size()]), blockIDs.values().toArray(new Integer[blockIDs.size()]));\n\t\t\tcfgman.addAchievementIDs(AchievementPageTM.achieveNames, AchievementPageTM.achievementIDs);\n\t\t\tcfgman.addProperty(\"Label Render Range\", \"Other Settings (Doubles)\", (double) labelRenderRange);\n\t\t\tcfgman.addProperty(\"can Collector collect XP orbs\", \"Other Settings (Booleans)\", canCollectorGetXP);\n\t\t\t\n\t\t// load Config\n\t\t\tcfgman.loadConfig();\n\t\t\t\n\t\t\tfor (String propName : itemIDs.keySet()) {\n\t\t\t\titemIDs.put(propName, cfgman.getItemID(propName));\n\t\t\t}\n\t\t\tfor (String propName : blockIDs.keySet()) {\n\t\t\t\tblockIDs.put(propName, cfgman.getBlockID(propName));\n\t\t\t}\n\t\t\t\n\t\t\tAchievementPageTM.achievementIDs = cfgman.getAchievementIDs(AchievementPageTM.achieveNames);\n\t\t\t\n\t\t\tdouble d = cfgman.getProperty(\"Label Render Range\", \"Other Settings (Doubles)\");\n\t\t\tlabelRenderRange = (float) d;\t\t\t\n\t\t\tboolean b = cfgman.getProperty(\"can Collector collect XP orbs\", \"Other Settings (Booleans)\");\n\t\t\tcanCollectorGetXP = b;\n\t\t\t\n\t\t// register Forge Events and Handlers\n\t\t\tif (FMLCommonHandler.instance().getSide().isClient()) {\n\t\t\t\tMinecraftForge.EVENT_BUS.register(new SoundRegistry());\n\t\t\t\tTickRegistry.registerTickHandler(new TickHandlerClientRnd(), Side.CLIENT);\n\t\t\t\tKeyBindingRegistry.registerKeyBinding(new KeyBindHandler());\n\t\t\t}\n\t\t\t\n\t\t\tMinecraftForge.EVENT_BUS.register(new ServerEvents());\n\t\t\tTickRegistry.registerScheduledTickHandler(new SchedTickHandlerWorld(), Side.SERVER);\n\t\t\t\n\t\t// add Icon to the IconCache-Item\n\t\t\tItemIconCache.iconList.put(0, \"TurretMod3:ach_piercing\");\n\t\t\tItemIconCache.iconList.put(1, \"TurretMod3:redFlame\");\n\t\t\tItemIconCache.iconList.put(2, \"TurretMod3:blueFlame\");\n\n\t\t// register Ammo-Item types\n\t\t\tItemAmmunitions.addAmmoItem(0, \"arrowPack\", \"Arrow Pack\");\n\t\t\tItemAmmunitions.addAmmoItem(1, \"pebbles\", \"Pebbles\");\n\t\t\tItemAmmunitions.addAmmoItem(2, \"pebble\", \"Pebble\");\n\t\t\tItemAmmunitions.addAmmoItem(3, \"bullets\", \"Bullets\");\n\t\t\tItemAmmunitions.addAmmoItem(4, \"bulletPack\", \"Bullet Pack\");\n\t\t\tItemAmmunitions.addAmmoItem(5, \"tank\", \"FT Fuel\");\n\t\t\tItemAmmunitions.addAmmoItem(6, \"tankPack\", \"FT Fuel Pack\");\n\t\t\tItemAmmunitions.addAmmoItem(7, \"gMelonPack\", \"Glistering Melon Bundle\");\n\t\t\tItemAmmunitions.addAmmoItem(8, \"enderPearlPack\", \"Ender Pearl Bundle\");\n\t\t\t\t\n\t\t// initialize items\n\t\t\tinitItems();\n\t\t\t\n\t\t// register Achievement Page and initialize Achievements\n\t\t\tAchievementPageTM.initAchievementPage();\n\t\t\t\n\t\t// register optional Main Menu, if MainMenuAPI is installed\n\t\t\tregisterMainMenu();\n\t// ... else set the Enabled-State to false\n\t\t} else {\n\t\t\tLoader.instance().getIndexedModList().get(TM3ModRegistry.modID).setEnabledState(false);\n\t\t}\n\t}", "private void setup(Command cmd) throws RuntimeException, PropertyException, IOException, EngineException{\n\t\tbaseRec = new BaseRecognizer(((JSGFGrammar) cm.lookup(\"jsgfGrammar\")).getGrammarManager());\n\t\trecognizer = (Recognizer) cm.lookup(\"recognizer\");\n\t\tmicrophone = (Microphone) cm.lookup(\"microphone\");\n\n\t\tbaseRec.allocate();\n\t\trecognizer.allocate();\n\t}", "@Override\n\tpublic void insertProcess() {\n\t\t\n\t}", "public void initPersistence (){\n\t\tif (!this._onAppInit){\n\t\t\t/*\n\t\t\t * Evita stackoverflow\n\t\t\t */\n\t\t\tcloseActiveStoreData ();\n\t\t}\n\t\tsetDatastoreProperties ();\n\t\tfinal Properties properties = this._dataStoreEnvironment.getDataStoreProperties ();\n\t\tfinal PersistenceManagerFactory pmf =\n\t\t\t\t\t JDOHelper.getPersistenceManagerFactory(properties);\n\t\t\n//\t\tSystem.out.println (\"Setting persistent manager from \"+properties);\n\t\t\n\t\tthis.pm = pmf.getPersistenceManager();\n\t\t\n\t\tif (this.pm.currentTransaction().isActive ()){\n\t\t\tthis.pm.currentTransaction().commit();\n\t\t}\n\t\tthis.pm.currentTransaction().setOptimistic (false);\n//\t\tthis.pm.currentTransaction().begin();\n\t}", "public ColocatePreloader (PersistenceManager pm) {\n\t\tthis.pm = pm;\n\t}", "public SUMOQueryParser(SUMOQueryParserTokenManager tm) {\n token_source = tm;\n token = new Token();\n jj_ntk = -1;\n jj_gen = 0;\n for (int i = 0; i < 11; i++) jj_la1[i] = -1;\n for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();\n }", "public void startPlugin() {\n classesDisponibles = new HashMap[types.length];\n try { // enregistrer le service d'acces aux depot de jars\n ServicesRegisterManager.registerService(Parameters.JAR_REPOSITORY_MANAGER, this);\n rescanRepository(); // creer les listes de classes disponibles a partir du depot\n }\n catch (ServiceInUseException mbiue) {\n System.err.println(\"Jar Repository Manager service created twice\");\n }\n }", "private static void init(){\n entityManager = HibernateUtil.getEntityManager();\n transaction = entityManager.getTransaction();\n }", "public void initialize() {\n warpController = new WarpController(this);\n kitController = new KitController(this);\n crafting = new CraftingController(this);\n mobs = new MobController(this);\n items = new ItemController(this);\n enchanting = new EnchantingController(this);\n anvil = new AnvilController(this);\n blockController = new BlockController(this);\n hangingController = new HangingController(this);\n entityController = new EntityController(this);\n playerController = new PlayerController(this);\n inventoryController = new InventoryController(this);\n explosionController = new ExplosionController(this);\n requirementsController = new RequirementsController(this);\n worldController = new WorldController(this);\n arenaController = new ArenaController(this);\n arenaController.start();\n if (CompatibilityLib.hasStatistics() && !CompatibilityLib.hasJumpEvent()) {\n jumpController = new JumpController(this);\n }\n File examplesFolder = new File(getPlugin().getDataFolder(), \"examples\");\n examplesFolder.mkdirs();\n\n File urlMapFile = getDataFile(URL_MAPS_FILE);\n File imageCache = new File(dataFolder, \"imagemapcache\");\n imageCache.mkdirs();\n maps = new MapController(this, urlMapFile, imageCache);\n\n // Initialize EffectLib.\n if (com.elmakers.mine.bukkit.effect.EffectPlayer.initialize(plugin, getLogger())) {\n getLogger().info(\"EffectLib initialized\");\n } else {\n getLogger().warning(\"Failed to initialize EffectLib\");\n }\n\n // Pre-create schematic folder\n File magicSchematicFolder = new File(plugin.getDataFolder(), \"schematics\");\n magicSchematicFolder.mkdirs();\n\n // One-time migration of legacy configurations\n migrateConfig(\"enchanting\", \"paths\");\n migrateConfig(\"automata\", \"blocks\");\n migrateDataFile(\"automata\", \"blocks\");\n\n // Ready to load\n load();\n resourcePacks.startResourcePackChecks();\n }", "private OperatorManager() {}", "public SQLManager(FileConfiguration config) {\n ConfigurationSection sql = config.getConfigurationSection(\"sql\");\n if (sql == null) {\n Logger.log(LogType.ERROR, \"No SQL Section in \" + config.getName());\n return;\n }\n\n String host = sql.getString(\"host\");\n int port = sql.getInt(\"port\", 3306);\n String database = sql.getString(\"database\");\n String user = sql.getString(\"user\");\n String password = sql.getString(\"password\");\n\n HikariConfig hikariConfig = new HikariConfig();\n hikariConfig.setJdbcUrl(\"jdbc:mysql://\" + host + \":\" + port + \"/\" + database);\n hikariConfig.setDriverClassName(\"com.mysql.jdbc.Driver\");\n hikariConfig.setUsername(user);\n hikariConfig.setPassword(password);\n hikariConfig.setMinimumIdle(1);\n hikariConfig.setMaximumPoolSize(10);\n hikariConfig.setConnectionTimeout(10000);\n\n this.dataSource = new HikariDataSource(hikariConfig);\n this.queryThread = new QueryThread(this);\n\n initTables();\n }", "protected abstract DatabaseInitializer createInitializer();", "@Override public void init() {\n /// Important Step 2: Get access to a list of Expansion Hub Modules to enable changing caching methods.\n all_hubs_ = hardwareMap.getAll(LynxModule.class);\n /// Important Step 3: Option B. Set all Expansion hubs to use the MANUAL Bulk Caching mode\n for (LynxModule module : all_hubs_ ) {\n switch (motor_read_mode_) {\n case BULK_READ_AUTO:\n module.setBulkCachingMode(LynxModule.BulkCachingMode.AUTO);\n break;\n case BULK_READ_MANUAL:\n module.setBulkCachingMode(LynxModule.BulkCachingMode.MANUAL);\n break;\n case BULK_READ_OFF:\n default:\n module.setBulkCachingMode(LynxModule.BulkCachingMode.OFF);\n break;\n }\n }\n\n /// Use the hardwareMap to get the dc motors and servos by name.\n\n motorLF_ = hardwareMap.get(DcMotorEx.class, lfName);\n motorLB_ = hardwareMap.get(DcMotorEx.class, lbName);\n motorRF_ = hardwareMap.get(DcMotorEx.class, rfName);\n motorRB_ = hardwareMap.get(DcMotorEx.class, rbName);\n motorLF_.setDirection(DcMotor.Direction.REVERSE);\n motorLB_.setDirection(DcMotor.Direction.REVERSE);\n\n // map odometry encoders\n verticalLeftEncoder = hardwareMap.get(DcMotorEx.class, verticalLeftEncoderName);\n verticalRightEncoder = hardwareMap.get(DcMotorEx.class, verticalRightEncoderName);\n horizontalEncoder = hardwareMap.get(DcMotorEx.class, horizontalEncoderName);\n\n if( USE_ENCODER_FOR_TELEOP ) {\n motorLF_.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorLF_.setMode ( DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n motorLB_.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorLB_.setMode ( DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n motorRF_.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorRF_.setMode ( DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n motorRB_.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorRB_.setMode ( DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n\n verticalLeftEncoder.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n verticalRightEncoder.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n horizontalEncoder.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n\n motorLF_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n motorLB_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n motorRF_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n motorRB_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n }\n\n if( USE_INTAKE ) {\n motor_left_intake_ = hardwareMap.get(DcMotorEx.class, \"motorLeftIntake\");\n motor_right_intake_ = hardwareMap.get(DcMotorEx.class, \"motorRightIntake\");\n motor_right_intake_.setDirection(DcMotor.Direction.REVERSE) ;\n\n motor_left_intake_.setMode( DcMotor.RunMode.STOP_AND_RESET_ENCODER );\n motor_left_intake_.setMode( DcMotor.RunMode.RUN_USING_ENCODER );\n motor_right_intake_.setMode( DcMotor.RunMode.STOP_AND_RESET_ENCODER );\n motor_right_intake_.setMode( DcMotor.RunMode.RUN_USING_ENCODER );\n\n servo_left_intake_ = hardwareMap.servo.get(\"servoLeftIntake\");\n servo_left_intake_pos_ = CR_SERVO_STOP ;\n servo_left_intake_.setPosition(CR_SERVO_STOP);\n servo_right_intake_ = hardwareMap.servo.get(\"servoRightIntake\");\n servo_right_intake_pos_ = CR_SERVO_STOP ;\n servo_right_intake_.setPosition(CR_SERVO_STOP);\n }\n if( USE_LIFT ) {\n motor_lift_ = hardwareMap.get(DcMotorEx.class, \"motorLift\");\n motor_lift_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n motor_lift_.setMode( DcMotor.RunMode.STOP_AND_RESET_ENCODER );\n power_lift_ = 0.0;\n if( USE_RUN_TO_POS_FOR_LIFT ) {\n motor_lift_.setTargetPosition(0);\n motor_lift_.setMode( DcMotor.RunMode.RUN_TO_POSITION ); // must call setTargetPosition() before switching to RUN_TO_POSISTION\n } else {\n motor_lift_.setMode( DcMotor.RunMode.RUN_USING_ENCODER);\n }\n last_stone_lift_enc_ = -1;\n }\n\n if( USE_STONE_PUSHER ) {\n servo_pusher_ = hardwareMap.servo.get(\"servoPusher\");\n servo_pusher_.setPosition(PUSHER_INIT);\n servo_pusher_pos_ = PUSHER_INIT;\n }\n if( USE_STONE_GATER ) {\n servo_gater_ = hardwareMap.servo.get(\"servoGater\");\n servo_gater_.setPosition(GATER_INIT);\n servo_gater_pos_ = GATER_INIT;\n }\n\n if( USE_ARM ) {\n servo_arm_ = hardwareMap.servo.get(\"servoArm\");\n servo_arm_.setPosition(ARM_INIT);\n servo_arm_pos_ = ARM_INIT;\n servo_claw_ = hardwareMap.servo.get(\"servoClaw\");\n servo_claw_.setPosition(CLAW_OPEN);\n servo_claw_pos_ = CLAW_OPEN;\n }\n\n if( USE_HOOKS ) {\n servo_left_hook_ = hardwareMap.servo.get(\"servoLeftHook\");\n servo_left_hook_.setPosition(LEFT_HOOK_UP);\n servo_left_hook_pos_ = LEFT_HOOK_UP;\n servo_right_hook_ = hardwareMap.servo.get(\"servoRightHook\");\n servo_right_hook_.setPosition(RIGHT_HOOK_UP);\n servo_right_hook_pos_ = RIGHT_HOOK_UP;\n }\n\n if( USE_PARKING_STICKS ) {\n servo_left_park_ = hardwareMap.servo.get(\"servoLeftPark\");\n servo_left_park_.setPosition(LEFT_PARK_IN);\n servo_left_park_pos_ = LEFT_PARK_IN;\n servo_right_park_ = hardwareMap.servo.get(\"servoRightPark\");\n servo_right_park_.setPosition(RIGHT_PARK_IN);\n servo_right_park_pos_ = RIGHT_PARK_IN;\n }\n\n if( USE_RGB_FOR_STONE ) {\n rev_rgb_range_ = hardwareMap.get(LynxI2cColorRangeSensor.class, \"stoneColor\");\n //rev_rgb_range_ = hardwareMap.get(LynxI2cColorRangeSensor.class, \"stoneColorV3\"); // different interface for V3, can't define it as LynxI2cColorRangeSensor anymore, 2020/02/29\n if( rev_rgb_range_!=null ) {\n if( AUTO_CALIBRATE_RGB ) {\n int alpha = rev_rgb_range_.alpha();\n //double dist = rev_rgb_range_.getDistance(DistanceUnit.CM);\n double dist = rev_rgb_range_.getDistance(DistanceUnit.METER);\n if( alpha>=MIN_RGB_ALPHA && alpha<100000 ) {\n rev_rgb_alpha_init_ = alpha;\n }\n if( AUTO_CALIBRATE_RGB_RANGE && !Double.isNaN(dist) ) {\n if( dist>MIN_RGB_RANGE_DIST && dist<MAX_RGB_RANGE_DIST ) {\n rev_rgb_dist_init_ = dist;\n }\n }\n }\n }\n }\n if( USE_RGBV3_FOR_STONE ) {\n //rgb_color_stone_ = hardwareMap.get(ColorSensor.class, \"stoneColorV3\");\n rgb_range_stone_ = hardwareMap.get(DistanceSensor.class, \"stoneColorV3\");\n if( AUTO_CALIBRATE_RANGE && rgb_range_stone_!=null ) {\n while(true) { // wait till range sensor gets a valid reading\n double dis = getRangeDist(RangeName.RGB_RANGE_STONE);\n if( dis>0.0 && dis<0.2 ) {\n rgb_range_stone_dist_init_ = dis;\n break;\n }\n }\n }\n }\n\n if( USE_RIGHT_RANGE ) {\n range_right_ = (Rev2mDistanceSensor) (hardwareMap.get(DistanceSensor.class, \"rightRange\"));\n if( AUTO_CALIBRATE_RANGE && range_right_!=null ) {\n while(true) { // wait till range sensor gets a valid reading\n double dis = getRangeDist(RangeName.RANGE_RIGHT);\n if( dis>0.01 && dis<2.0 ) {\n range_right_dist_init_ = dis;\n break;\n }\n }\n }\n }\n if( USE_LEFT_RANGE ) {\n range_left_ = (Rev2mDistanceSensor) (hardwareMap.get(DistanceSensor.class, \"leftRange\"));\n if( AUTO_CALIBRATE_RANGE && range_left_!=null ) {\n while(true) { // wait till range sensor gets a valid reading\n double dis = getRangeDist(RangeName.RANGE_LEFT);\n if( dis>0.01 && dis<2.0 ) {\n range_left_dist_init_ = dis;\n break;\n }\n }\n }\n }\n\n if( USE_RANGE_FOR_STONE) {\n range_stone_ = (Rev2mDistanceSensor) (hardwareMap.get(DistanceSensor.class, \"stoneRange\"));\n if( AUTO_CALIBRATE_RANGE && range_stone_!=null ) {\n while(true) { // wait till range sensor gets a valid reading\n double dis = getRangeDist(RangeName.RANGE_STONE);\n if( dis>0.01 && dis<0.5 ) {\n range_stone_dist_init_ = dis;\n break;\n }\n }\n }\n }\n\n if( USE_INTAKE_MAG_SWITCH ) {\n intake_mag_switch_ = hardwareMap.get(DigitalChannel.class, \"intake_mag_switch\");\n intake_mag_switch_.setMode(DigitalChannelController.Mode.INPUT);\n intake_mag_prev_state_ = intake_mag_switch_.getState();\n intake_mag_change_time_ = 0.0;\n }\n if( USE_STONE_LIMIT_SWITCH ) {\n stone_limit_switch_ = hardwareMap.get(DigitalChannel.class, \"stone_limit_switch\");\n stone_limit_switch_.setMode(DigitalChannelController.Mode.INPUT);\n stone_limit_switch_prev_state_ = stone_limit_switch_.getState();\n }\n\n\n /////***************************** JOY STICKS *************************************/////\n\n /// Set joystick deadzone, any value below this threshold value will be considered as 0; moved from init() to init_loop() to aovid crash\n if(gamepad1!=null) gamepad1.setJoystickDeadzone( JOYSTICK_DEAD_ZONE );\n if(gamepad2!=null) gamepad2.setJoystickDeadzone( JOYSTICK_DEAD_ZONE );\n\n resetControlVariables();\n }", "public CommandManager() {}", "public CollisionManager(){\n\t\tcollidables \t\t= new HashMap<Integer, List<CollidableObject>>() ;\n\t\tcollisionsTypes \t= new HashMap<Integer, List<Integer>>() ;\n\t\tcollisionHandlers \t= new HashMap<String, CollisionHandler>() ;\n\t}", "public void onEnable(){\n new File(getDataFolder().toString()).mkdir();\n playerFile = new File(getDataFolder().toString() + \"/playerList.txt\");\n commandFile = new File(getDataFolder().toString() + \"/commands.txt\");\n blockFile = new File(getDataFolder().toString() + \"/blockList.txt\");\n deathFile = new File(getDataFolder().toString() + \"/deathList.txt\");\n startupFile = new File(getDataFolder().toString() + \"/startupCommands.txt\");\n \n //Load the player file data\n playerCommandMap = new HashMap<String, String>();\n try{\n BufferedReader br = new BufferedReader(new FileReader(playerFile));\n StringTokenizer st;\n String input;\n String name;\n String command;\n while((input = br.readLine()) != null){\n if(input.compareToIgnoreCase(\"<Player> <Command>\") == 0){\n continue;\n }\n st = new StringTokenizer(input, \" \");\n name = st.nextToken();\n command = st.nextToken();\n playerCommandMap.put(name, command);\n }\n \n }catch(FileNotFoundException e){\n log.info(\"No original player command file, creating new one.\");\n }catch(IOException e){\n log.info(\"Error reading player command file\");\n }catch(Exception e){\n log.info(\"Incorrectly formatted player command file\");\n }\n \n //Load the block file data\n blockCommandMap = new HashMap<Location, String>();\n try{\n BufferedReader br = new BufferedReader(new FileReader(blockFile));\n StringTokenizer st;\n String input;\n String command;\n Location loc = null;\n \n while((input = br.readLine()) != null){\n if(input.compareToIgnoreCase(\"<Block Location> <Command>\") == 0){\n continue;\n }\n st = new StringTokenizer(input, \" \");\n loc = new Location(getServer().getWorld(UUID.fromString(st.nextToken())), Double.parseDouble(st.nextToken()), Double.parseDouble(st.nextToken()), Double.parseDouble(st.nextToken()));\n command = st.nextToken();\n blockCommandMap.put(loc, command);\n }\n \n }catch(FileNotFoundException e){\n log.info(\"No original block command file, creating new one.\");\n }catch(IOException e){\n log.info(\"Error reading block command file\");\n }catch(Exception e){\n log.info(\"Incorrectly formatted block command file\");\n }\n \n //Load the player death file data\n deathCommandMap = new HashMap<String, String>();\n try{\n BufferedReader br = new BufferedReader(new FileReader(deathFile));\n StringTokenizer st;\n String input;\n String name;\n String command;\n while((input = br.readLine()) != null){\n if(input.compareToIgnoreCase(\"<Player> <Command>\") == 0){\n continue;\n }\n st = new StringTokenizer(input, \" \");\n name = st.nextToken();\n command = st.nextToken();\n deathCommandMap.put(name, command);\n }\n \n }catch(FileNotFoundException e){\n log.info(\"No original player death command file, creating new one.\");\n }catch(IOException e){\n log.info(\"Error reading player death command file\");\n }catch(Exception e){\n log.info(\"Incorrectly formatted player death command file\");\n }\n \n //Load the start up data\n startupCommands = \"\";\n try{\n BufferedReader br = new BufferedReader(new FileReader(startupFile));\n String input;\n while((input = br.readLine()) != null){\n if(input.compareToIgnoreCase(\"<Command>\") == 0){\n continue;\n }\n startupCommands += \":\" + input;\n }\n \n }catch(FileNotFoundException e){\n log.info(\"No original start up command file, creating new one.\");\n }catch(IOException e){\n log.info(\"Error reading start up command file\");\n }catch(Exception e){\n log.info(\"Incorrectly formatted start up command file\");\n }\n \n //Load the command file data\n commandMap = new HashMap<String, String>();\n try{\n BufferedReader br = new BufferedReader(new FileReader(commandFile));\n StringTokenizer st;\n String input;\n String args;\n String name;\n \n //Assumes that the name is only one token long\n while((input = br.readLine()) != null){\n if(input.compareToIgnoreCase(\"<Identifing name> <Command>\") == 0){\n continue;\n }\n st = new StringTokenizer(input, \" \");\n name = st.nextToken();\n args = st.nextToken();\n while(st.hasMoreTokens()){\n args += \" \" + st.nextToken();\n }\n commandMap.put(name, args);\n }\n \n }catch(FileNotFoundException e){\n log.info(\"No original command file, creating new one.\");\n }catch(IOException e){\n log.info(\"Error reading command file\");\n }catch(Exception e){\n log.info(\"Incorrectly formatted command file\");\n }\n \n placeBlock = false;\n startupDone = false;\n blockCommand = \"\";\n playerPosMap = new HashMap<String, Location>();\n \n //Set up the listeners\n PluginManager pm = this.getServer().getPluginManager();\n pm.registerEvent(Event.Type.PLAYER_INTERACT_ENTITY, playerListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.PLAYER_INTERACT, playerListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.PLAYER_MOVE, playerListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.PLAYER_JOIN, playerListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.PLAYER_QUIT, playerListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.ENTITY_DEATH, entityListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.BLOCK_BREAK, blockListener, Event.Priority.Normal, this);\n pm.registerEvent(Event.Type.PLUGIN_ENABLE, serverListener, Event.Priority.Normal, this);\n \n log.info(\"Autorun Commands v2.3 is enabled\");\n }", "@SuppressWarnings(\"unchecked\")\n @Override\n public void postRun(MobConfig eConfig, Configuration config) {\n eConfig.save();\n \n // Register mob\n Class<? extends EntityLiving> clazz = (Class<? extends EntityLiving>) eConfig.ELEMENT;\n if (Helpers.isClientSide())\n ClientProxy.ENTITY_RENDERERS.put(clazz, eConfig.getRender());\n EntityRegistry.registerGlobalEntityID(clazz, eConfig.NAMEDID, EntityRegistry.findGlobalUniqueEntityId(), eConfig.getBackgroundEggColor(), eConfig.getForegroundEggColor());\n EntityRegistry.registerModEntity(clazz, eConfig.NAMEDID, eConfig.ID, EvilCraft._instance, 80, 3, true);\n \n // Add I18N\n LanguageRegistry.instance().addStringLocalization(\"entity.\" + Reference.MOD_ID + \".instance.\" + eConfig.NAMEDID + \".name\", eConfig.NAME);\n LanguageRegistry.instance().addStringLocalization(\"entity.\" + Reference.MOD_ID + \".\" + eConfig.NAMEDID + \".name\", eConfig.NAME);\n LanguageRegistry.instance().addStringLocalization(\"entity.\" + eConfig.NAMEDID + \".name\", eConfig.NAME); // For global registering\n }", "private DatabaseManager() {}" ]
[ "0.6145228", "0.5664951", "0.55841464", "0.51995546", "0.5199383", "0.5157945", "0.5114132", "0.50838023", "0.50182563", "0.50182563", "0.50051254", "0.4986448", "0.49760306", "0.49751934", "0.49065998", "0.48828202", "0.4841622", "0.48217833", "0.48171994", "0.4806318", "0.4803182", "0.47803554", "0.47640166", "0.4758562", "0.47173366", "0.46991625", "0.46795654", "0.46710417", "0.46688992", "0.4635557", "0.46351212", "0.4631041", "0.4625205", "0.46133712", "0.46002373", "0.4572102", "0.45704904", "0.4566168", "0.45628425", "0.45599133", "0.4552589", "0.45493805", "0.4549326", "0.4545771", "0.45445642", "0.45444632", "0.45412785", "0.4541261", "0.4540036", "0.45316437", "0.45198676", "0.45153734", "0.45151028", "0.45136622", "0.4512404", "0.45115718", "0.4507626", "0.4504042", "0.45025277", "0.4499891", "0.4498314", "0.4497558", "0.44965416", "0.44949448", "0.44933257", "0.44922167", "0.44891092", "0.44887432", "0.44814754", "0.4479395", "0.4469705", "0.4464603", "0.44617453", "0.4453146", "0.4452423", "0.44517732", "0.44447523", "0.44436842", "0.444025", "0.4437427", "0.4423967", "0.4419968", "0.44148174", "0.4409964", "0.44052017", "0.44051492", "0.4404358", "0.44010702", "0.4400303", "0.43976626", "0.43945506", "0.4384173", "0.43828458", "0.4380028", "0.4377837", "0.43726116", "0.4368926", "0.43651158", "0.4365064", "0.43632308" ]
0.69431514
0
build DeletionManager for lsmEngine
public <R extends IDeletionRequest> LSMEngineBuilder<T> buildDeletionManager( LevelProcessorChain<T, R, DeleteRequestContext> levelProcessChain) { DeletionManager<T, R> deletionManager = new DeletionManager<>(lsmEngine.getWalManager()); deletionManager.setLevelProcessorsChain(levelProcessChain); buildDeletionManager(deletionManager); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public <R extends IDeletionRequest> LSMEngineBuilder<T> buildDeletionManager(\n DeletionManager<T, R> deletionManager) {\n lsmEngine.setDeletionManager(deletionManager);\n return this;\n }", "public void EliminarManager() {\n\n\t\tsendSelect(DELETE_SQL_MANAGER);\n\n\t}", "@Override\n\tpublic void deleteModule() throws Exception {\n\n\t}", "void deleteModule(Module module);", "@Override // ohos.agp.render.render3d.impl.CoreComponentManager\r\n public void delete() {\r\n synchronized (this.delLock) {\r\n if (this.agpCptrMorphComponentMgr != 0) {\r\n if (!this.isAgpCmemOwn) {\r\n this.agpCptrMorphComponentMgr = 0;\r\n } else {\r\n this.isAgpCmemOwn = false;\r\n throw new UnsupportedOperationException(\"C++ destructor does not have public access\");\r\n }\r\n }\r\n super.delete();\r\n }\r\n }", "private PackageDeleteObserver2(cm.android.mdm.manager.PackageManager2 r1) {\n /*\n // Can't load method instructions: Load method exception: null in method: cm.android.mdm.manager.PackageManager2.PackageDeleteObserver2.<init>(cm.android.mdm.manager.PackageManager2):void, dex: in method: cm.android.mdm.manager.PackageManager2.PackageDeleteObserver2.<init>(cm.android.mdm.manager.PackageManager2):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: cm.android.mdm.manager.PackageManager2.PackageDeleteObserver2.<init>(cm.android.mdm.manager.PackageManager2):void\");\n }", "ImplementationManager createManager();", "public static void deleteInstance()\r\n\t{\r\n\t\tlightManager = null;\r\n\t}", "@Override\n\tpublic void deleteModule(String mac) throws HFModuleException {\n\t\tLog.d(\"HFModuleManager\", \"deleteModule\");\n\t\t\n\n\t\ttry {\n\t\t\tModuleInfo mi = getHFModuleHelper().getRemoteModuleInfoByMac(mac);\n\t\t\t// *******\n\t\t\tif (mi == null) {\n\t\t\t\tmi = getHFModuleHelper().getMyLocalModuleInfoByMac(mac);\n\t\t\t\tif (mi == null) {\n\t\t\t\t\tmi = getHFModuleHelper().getLocalModuleInfoByMac(mac);\n\t\t\t\t\tif (mi == null) {\n\t\t\t\t\t\tthrow new HFModuleException(\n\t\t\t\t\t\t\t\tHFModuleException.ERR_DELETE_MODULE,\n\t\t\t\t\t\t\t\t\"can not find this module\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tgetHFModuleHelper().removeLocalModuleInfoByMac(mac);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tgetHFModuleHelper().removeMyLocalModuleInfoByMac(mac);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (mi.getModuleId() == null) {\n\t\t\t\t\tgetHFModuleHelper().removeRemoteModuleInfoByMac(mac);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (!this.isCloudChannelLive()) {\n\t\t\t\t\tgetHFModuleHelper().removeRemoteModuleInfoByMac(mac);\n\t\t\t\t\treturn ;\n\t\t\t\t}\n\t\t\t\t// ***\n\t\t\t\tString reqTemplate = \"{'PL':{'moduleId':'#moduleId#'},'CID':30021,'SID':'#SID#'}\";\n\t\t\t\tString req = reqTemplate.replaceFirst(\"#moduleId#\", mi.getModuleId())\n\t\t\t\t\t\t.replaceFirst(\"#SID#\", getsid());\n\n\t\t\t\tString rsp = HttpProxy.reqByHttpPost(req);\n\t\t\t\tJSONObject jo = new JSONObject(rsp);\n\t\t\t\tif (jo.isNull(\"RC\")) {\n\t\t\t\t\tthrow new HFModuleException(\n\t\t\t\t\t\t\tHFModuleException.ERR_DELETE_MODULE,\n\t\t\t\t\t\t\t\"delete module err\");\n\t\t\t\t}\n\t\t\t\tif (jo.getInt(\"RC\") != 1) {\n\t\t\t\t\tthrow new HFModuleException(\n\t\t\t\t\t\t\tHFModuleException.ERR_DELETE_MODULE,\n\t\t\t\t\t\t\t\"delete module err\");\n\t\t\t\t} else {\n\t\t\t\t\tgetHFModuleHelper().removeRemoteModuleInfoByMac(mac);\n\t\t\t\t\tgetHFModuleHelper().removeMyLocalModuleInfoByMac(mac);\n\t\t\t\t\tgetHFModuleHelper().removeLocalModuleInfoByMac(mac);\n\t\t\t\t\tgetHFModuleHelper().removeNewModuleInfoByMac(mac);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (JSONException e) {\n\t\t\tthrow new HFModuleException(HFModuleException.ERR_DELETE_MODULE,\n\t\t\t\t\t\"delete module err\");\n\t\t}\n\t}", "private GroupManager() {\r\n\t\tqueueManagers = new HashMap<Integer,QueueManager>();\r\n\t\tqueueManagerDeletionTimeout = -1;\r\n\t\thousekeepingSleep = HOUSEKEEPING_SLEEP;\r\n\t\thouseKeeper = new HouseKeeper(\"GroupManager_HouseKeeper\");\r\n\t\thouseKeeper.start();\r\n\t}", "private Delete() {}", "private Delete() {}", "public static void scriptDelete() {\n List<BeverageEntity> beverages = (List<BeverageEntity>) adminFacade.getAllBeverages();\n for (int i = 0; i < beverages.size(); i++) {\n System.out.println(\"delete : \" + beverages.get(i));\n adminFacade.removeBeverage(beverages.get(i));\n }\n List<DecorationEntity> decos = (List<DecorationEntity>) adminFacade.getAllDecorations();\n for (int i = 0; i < decos.size(); i++) {\n System.out.println(\"delete : \" + decos.get(i));\n adminFacade.removeDecoration(decos.get(i));\n }\n\n /* Check that there isn't any other cocktails, and delete remaining */\n List<CocktailEntity> cocktails = (List<CocktailEntity>) adminFacade.getAllCocktails();\n if (cocktails.size() > 0) {\n System.err.println(\"Les cocktails n'ont pas été tous supprimés... \"\n + cocktails.size() + \" cocktails restants :\");\n }\n for (int i = 0; i < cocktails.size(); i++) {\n CocktailEntity cocktail = adminFacade.getCocktailFull(cocktails.get(i));\n System.err.println(cocktail.getName() + \" : \"\n + cocktail.getDeliverables());\n adminFacade.removeCocktail(cocktail);\n }\n\n /* Remove client accounts */\n List<ClientAccountEntity> clients = (List<ClientAccountEntity>) adminFacade.getAllClients();\n for (int i = 0; i < clients.size(); i++) {\n adminFacade.removeClient(clients.get(i));\n }\n\n /* Remove addresses */\n List<AddressEntity> addresses = (List<AddressEntity>) adminFacade.getAllAddresses();\n for (int i = 0; i < addresses.size(); i++) {\n adminFacade.removeAddress(addresses.get(i));\n }\n\n /* TODO :\n * * Remove orders\n */\n }", "protected void cmdRemove() throws Exception{\n\t\t//Determinamos los elementos a eliminar. De cada uno sacamos el id y el timestamp\n\t\tVector entities = new Vector();\n\t\tStringTokenizer claves = new StringTokenizer(conectorParametro(\"idSelection\"), \"|\");\n\t\tStringTokenizer timestamps = new StringTokenizer(conectorParametro(\"timestamp\"), \"|\");\n\t\ttraza(\"MMG::Se van a borrar \" + claves.countTokens() + \" y son \" + conectorParametro(\"idSelection\"));\n\t\twhile(claves.hasMoreTokens() && timestamps.hasMoreTokens()){\n\t\t\tCobGrupoUsuarCobraData cobGrupoUsuarCobra = new CobGrupoUsuarCobraData();\n\t\t\tcobGrupoUsuarCobra.setId(new Long(claves.nextToken()));\n\t\t\t//cobGrupoUsuarCobra.jdoSetTimeStamp(Long.parseLong(timestamps.nextToken()));\n\t\t\tentities.addElement(cobGrupoUsuarCobra);\n\t\t}\n\t\t\n\t\t//Construimos el DTO para realizar la llamada\n\t\tVector datos = new Vector();\n\t\tMareDTO dto = new MareDTO();\n\t\tdto.addProperty(\"entities\", entities);\n\t\tdatos.add(dto);\n\t\tdatos.add(new MareBusinessID(BUSINESSID_REMOVE));\n\t\t\n\t\t\n\t\t\n\t\t//Invocamos la lógica de negocio\n\t\ttraza(\"MMG:: Iniciada ejecución Remove de entidad CobGrupoUsuarCobra\");\n\t\tDruidaConector conectorCreate = conectar(CONECTOR_REMOVE, datos);\n\t\ttraza(\"MMG:: Finalizada ejecución Remove de entidad CobGrupoUsuarCobra\");\n\t\t\n\t\t\n\n\t\t//metemos en la sesión las query para realizar la requery\n\t\tconectorParametroSesion(SESSION_ATTRIBUTE_LAST_QUERY, conectorParametro(VAR_LAST_QUERY_TO_SESSION));\n\t\t\n\t\t//Redirigimos a la LP de StartUp con la acción de StartUp y requery\n\t\tconectorAction(\"CobGrupoUsuarCobraLPStartUp\");\n\t\tconectorActionParametro(PARAMETRO_GENERICO_ORIGEN, \"menu\");\n\t\tconectorActionParametro(PARAMETRO_GENERICO_ACCION, ACCION_REMOVE);\n\t\tconectorActionParametro(VAR_PERFORM_REQUERY, \"true\");\n\t}", "@Override\n public void onDisable() {\n try {\n System.out.println(\"Cleaning Dynamic Server System Processes.\");\n for (MinigameServer minigameServer : dynamicServerSystemManager.getServers())\n minigameServer.deleteServer();\n\n // Clean the output directory.\n FileUtils.deleteDirectory(new File(\"../minigameservers\"));\n new File(\"../minigameservers\").mkdirs();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n plugin = null;\n }", "int deleteByPrimaryKey(String managerId);", "private SummonerSpellsDao() {\n\t\tconnectionManager = new ConnectionManager();\n\t}", "@Override\n\tpublic void doDelete() {\n\t\tLOG.info(\"deleting agent\");\n\t\tsuper.doDelete();\n\t}", "private DaoManager() {\n }", "private DepartmentManager() {\n }", "private void initDLManager() {\n //TODO poner estos datos en configuraciones\n final String botName = \"DL-MS+A\";\n final String directlinePrimaryKey =\n //\"5Cx8OLT2X98.cwA.1j4.FGE7LsMoVuBtww9vQYNuC6lwoVBWYrb-5DHGzBbOeO0\"; // J\n //\"sccvRjdQVbw.cwA.8tQ.3tw3MFQtgG9bcqYf5xxHgW-lUYKymaoSFNCoIzI-SJY\"; //MS+A\n //\"IWixc2S5WaU.cwA.DEw.DV8nbC-BijSw5TbtNimDJuvrp45GpsKCRW4wPTtqYeY\"; //MP-AURA DEV\n \"QyKjl6KL-XQ.cwA.UTM.puyqrjpLvO1Briz7TjM7q_VqqAOflJ3jN0ryBGvkEiU\";\n mDLManager =\n DLManager.getInstance(this, directlinePrimaryKey);\n }", "public StorageManager() {\n makeDirectory();\n }", "@Override\n\tpublic void delete(EntityManagerFactory emf, Stop entity) {\n\t\t\n\t}", "public abstract void delete() throws ArchEException;", "@Override\n\tpublic int delete(ElectricalCheck entity) throws Exception {\n\t\treturn 0;\n\t}", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/lib/IR/Module.cpp\", line = 58,\n FQN=\"llvm::Module::~Module\", NM=\"_ZN4llvm6ModuleD0Ev\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/Module.cpp -nm=_ZN4llvm6ModuleD0Ev\")\n //</editor-fold>\n public void $destroy() {\n Context.removeModule(this);\n dropAllReferences();\n GlobalList.clear();\n FunctionList.clear();\n AliasList.clear();\n IFuncList.clear();\n NamedMDList.clear();\n /*delete*/Destructors.$destroy((Destructors.ClassWithDestructor)ValSymTab);\n /*delete*/Destructors.$destroy((Destructors.ClassWithDestructor)((/*static_cast*/StringMap<NamedMDNode /*P*/ > /*P*/)(NamedMDSymTab)));\n //START JDestroy\n DL.$destroy();\n TargetTriple.$destroy();\n SourceFileName.$destroy();\n ModuleID.$destroy();\n Materializer.$destroy();\n ComdatSymTab.$destroy();\n GlobalScopeAsm.$destroy();\n NamedMDList.$destroy();\n IFuncList.$destroy();\n AliasList.$destroy();\n FunctionList.$destroy();\n GlobalList.$destroy();\n //END JDestroy\n }", "private void delete() {\n\n\t}", "@Test\n public void testDeletionWithExpiredAndValidLocks() throws BackendException {\n\n final int lockCount = 10;\n final int expiredCount = 3;\n assertTrue(expiredCount + 2 <= lockCount);\n final long timeIncr = 1L;\n final long timeStart = 0L;\n final long timeCutoff = timeStart + (expiredCount * timeIncr);\n\n ImmutableList.Builder<Entry> locksBuilder = ImmutableList.builder();\n ImmutableList.Builder<Entry> delsBuilder = ImmutableList.builder();\n\n for (int i = 0; i < lockCount; i++) {\n final long ts = timeStart + (timeIncr * i);\n Entry lock = StaticArrayEntry.of(\n codec.toLockCol(ts, defaultLockRid),\n BufferUtil.getIntBuffer(0));\n\n if (ts < timeCutoff) {\n delsBuilder.add(lock);\n }\n\n locksBuilder.add(lock);\n }\n\n EntryList locks = StaticArrayEntryList.of(locksBuilder.build());\n EntryList dels = StaticArrayEntryList.of(delsBuilder.build());\n assertTrue(expiredCount == dels.size());\n\n del = new StandardLockCleanerRunnable(store, kc, tx, codec, timeCutoff);\n\n expect(store.getSlice(eq(ksq), eq(tx))).andReturn(locks);\n\n store.mutate(\n eq(key),\n eq(ImmutableList.<Entry> of()),\n eq(columnsOf(dels)),\n anyObject(StoreTransaction.class));\n\n ctrl.replay();\n del.run();\n }", "public static synchronized void deleteInstance() {\n if (eventManager != null) { eventManager = null; }\n }", "DeleteType createDeleteType();", "public ChunkManager() {\n instance = this;\n\n durabilityDir = new File(ObsidianDestroyer.getInstance().getDataFolder(), \"data\" + File.separator + \"durabilities\");\n if (!durabilityDir.exists()) {\n durabilityDir.mkdirs();\n }\n\n load();\n }", "abstract public void deleteAfterBetaReduction();", "@Override\n protected Void doInBackground(Void... params) {\n DataManager dataManager = DataManager.getInstance(weakReference.get());\n dataManager.deleteNote(noteId);\n return null;\n }", "private IndexingManager() {\n Provider provider = new BouncyCastleProvider();\n Security.addProvider(provider);\n utility = Database_Utility.getInstance();\n conn = utility.getConnection();\n IMbuffer = IndexingManagerBuffer.getInstance();\n\n // This statement is to create purge table.\n\n boolean k = checkTable1(\"PurgeTable\");\n if (!k) {\n utility.createtable2(\"PurgeTable\");\n }\n boolean k1 = checkTable1(\"UserToCertMap\");\n if (!k1) {\n utility.createtable1();\n }\n\n // This statement is to run maintenance thread on loading of class to purge entries whose timer has expired.\n\n //maintenancethread();\n\n // This statement is to run maintenance thread on loading of class to ascertain root nodes.\n\n // maintenancethread1();\n\n // This statement is to run maintenance thread on loading of class to delete entries from purge table.\n\n // maintenancethread2();\n\n }", "@Override\n public int delete(Uri uri, String arg1, String[] arg2) {\n SQLiteDatabase db;\n\t// Modifyed by amt_chenjing for switchui-2192 20120715 begin\n try {\n db = mOpenHelper.getWritableDatabase();\n } catch (Exception e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n return 0;\n }\n\t// Modifyed by amt_chenjing for switchui-2192 20120715 end\n int count = 0;\n long rowId = 0;\n switch (graphyUri.match(uri)) {\n case ALL_APPS:\n db.beginTransaction();\n count = db.delete(Apps.TABLE_NAME, arg1, arg2);\n db.setTransactionSuccessful();\n db.endTransaction();\n break;\n case ONE_APP:\n String segment = uri.getPathSegments().get(1);\n //String segment = arg2[0];\n rowId = Long.getLong(segment);\n if (TextUtils.isEmpty(arg1)) {\n arg1 = \"_id=\" + segment;\n } else {\n arg1 = \"_id=\" + segment + \" AND (\" + arg1 + \")\";\n }\n count = db.delete(Apps.TABLE_NAME, arg1, arg2);\n break;\n case ALL_RANKS:\n db.beginTransaction();\n count = db.delete(Ranks.TABLE_NAME, arg1, arg2);\n db.setTransactionSuccessful();\n db.endTransaction();\n break;\n case ONE_RANK:\n String segment1 = uri.getPathSegments().get(1);\n rowId = Long.getLong(segment1);\n if (TextUtils.isEmpty(arg1)) {\n arg1 = \"_id=\" + segment1;\n } else {\n arg1 = \"_id=\" + segment1 + \" AND (\" + arg1 + \")\";\n }\n count = db.delete(Ranks.TABLE_NAME, arg1, arg2);\n break;\n case ALL_MANUALS:\n db.beginTransaction();\n count = db.delete(ManualList.TABLE_NAME, arg1, arg2);\n db.setTransactionSuccessful();\n db.endTransaction();\n break;\n case ONE_MANUAL:\n String segment2 = arg2[0]; //uri.getPathSegments().get(1);\n rowId = Long.getLong(segment2);\n if (TextUtils.isEmpty(arg1)) {\n arg1 = \"_id=\" + segment2;\n } else {\n arg1 = \"_id=\" + segment2 + \" AND (\" + arg1 + \")\";\n }\n count = db.delete(ManualList.TABLE_NAME, arg1, arg2);\n break;\t\n default:\n throw new IllegalArgumentException(\"cannot delete from uri:\"+uri);\n }\n if (count>0 && (graphyUri.match(uri) == ALL_MANUALS\n || graphyUri.match(uri) == ONE_MANUAL)) {\n getContext().getContentResolver().notifyChange(uri, null);\n }\n return count;\n }", "void delete(LogicalDatastoreType store, P path);", "public void managerRemoved(ManagerEvent e);", "@After\n public void after() {\n pl.getEntityManager().clear();\n }", "ReturnCode deleteMenus(MmtConfig cfg);", "@Test\r\n\tpublic void testExecuteCommandsDeleteAdl() throws Exception {\r\n\t\t\r\n\t\tadvertising.executeCommand(advertising, \"adl delete --Name L1-r-medical\");\r\n\t\tassertTrue(\"adc all\", true);\r\n\t\t\r\n\t}", "private static MenuItem createTreeViewDeleteMenuItem(SongManager model,\n MusicPlayerManager musicPlayerManager,\n DatabaseManager databaseManager,\n TreeView<Item> treeView) {\n MenuItem delete = new MenuItem(DELETE);\n\n delete.setOnAction((event) -> {\n List<Item> selectedItems = FileTreeUtils.getItems(treeView.getSelectionModel().getSelectedItems());\n List<File> filesToDelete = new ArrayList<>();\n for (Item item: selectedItems) {\n filesToDelete.add(item.getFile());\n }\n UserInterfaceUtils.deleteFileAction(model, musicPlayerManager, databaseManager, filesToDelete);\n });\n\n return delete;\n }", "CdapDeleteArtifact createCdapDeleteArtifact();", "int deleteByExample(ReleaseSystemExample example);", "@Override\n public void onDestroy() {\n super.onDestroy();\n handler.removeMessages(UpdateConfig.NET_MSG_GETLENTH);\n // if (mModel != null) {\n // mModel.cancelLoadData();\n // }\n if (mTask != null) {\n mTask.cancel(true);\n }\n if (mNotificationManager != null) {\n mNotificationManager.cancel(UpdateConfig.NOTIFY_DOWNLOADING_ID);\n }\n }", "public CommandManager() {}", "@Override\r\n public void deleteEntity(String entityName) {\n\r\n }", "private void deleteObjects(Context context, StringList strLstFLToDel) throws Exception\r\n\t{\r\n\r\n\t try {\r\n\r\n\t\t// Iterate the stringList containing the FeatureLists Objects to delete\r\n\t\tString [] strFLToDel = new String[strLstFLToDel.size()];\r\n\r\n\t for (int m = 0; m < strLstFLToDel.size(); m++) {\r\n\t \tstrFLToDel[m] = (String) strLstFLToDel.get(m);\r\n\t }\r\n\r\n\t // Call DomainObject's deleteObjects method to delete all the Objects in the String array in a single transaction\r\n DomainObject.deleteObjects(context, strFLToDel);\r\n\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tthrow new FrameworkException(\"Object Delete Failed :\"+e.getMessage());\r\n\t\t}\r\n\t}", "void deleteExam(Module module, Exam target);", "@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n \tprivate CriteriaDeleteImpl constructDeleteQuery(CriteriaBuilderImpl cb, CommonTree tree) {\n \t\tfinal CriteriaDeleteImpl q = new CriteriaDeleteImpl(this.metamodel);\n \n \t\tfinal Tree deleteDef = tree.getChild(0);\n \n \t\tfinal Tree aliasedDef = deleteDef.getChild(0);\n \t\tfinal Aliased aliased = new Aliased(aliasedDef);\n \n \t\tfinal EntityTypeImpl entity = this.getEntity(aliased.getQualified().toString());\n \t\tfinal RootImpl<?> r = (RootImpl<?>) q.from(entity);\n \t\tthis.putAlias(q, aliasedDef, aliased, r);\n \n \t\tif (tree.getChildCount() == 2) {\n \t\t\tq.where(this.constructJunction(cb, q, deleteDef.getChild(1)));\n \t\t}\n \n \t\treturn q;\n \t}", "public void doDelete ( RunData data)\n\t{\n\t\tSessionState state = ((JetspeedRunData)data).getPortletSessionState (((JetspeedRunData)data).getJs_peid ());\n\n\t\t// cancel copy if there is one in progress\n\t\tif(! Boolean.FALSE.toString().equals(state.getAttribute (STATE_COPY_FLAG)))\n\t\t{\n\t\t\tinitCopyContext(state);\n\t\t}\n\n\t\t// cancel move if there is one in progress\n\t\tif(! Boolean.FALSE.toString().equals(state.getAttribute (STATE_MOVE_FLAG)))\n\t\t{\n\t\t\tinitMoveContext(state);\n\t\t}\n\n\t\tParameterParser params = data.getParameters ();\n\n\t\tList Items = (List) state.getAttribute(STATE_DELETE_ITEMS);\n\n\t\t// Vector deleteIds = (Vector) state.getAttribute (STATE_DELETE_IDS);\n\n\t\t// delete the lowest item in the hireachy first\n\t\tHashtable deleteItems = new Hashtable();\n\t\t// String collectionId = (String) state.getAttribute (STATE_COLLECTION_ID);\n\t\tint maxDepth = 0;\n\t\tint depth = 0;\n\n\t\tIterator it = Items.iterator();\n\t\twhile(it.hasNext())\n\t\t{\n\t\t\tBrowseItem item = (BrowseItem) it.next();\n\t\t\tdepth = ContentHostingService.getDepth(item.getId(), item.getRoot());\n\t\t\tif (depth > maxDepth)\n\t\t\t{\n\t\t\t\tmaxDepth = depth;\n\t\t\t}\n\t\t\tList v = (List) deleteItems.get(new Integer(depth));\n\t\t\tif(v == null)\n\t\t\t{\n\t\t\t\tv = new Vector();\n\t\t\t}\n\t\t\tv.add(item);\n\t\t\tdeleteItems.put(new Integer(depth), v);\n\t\t}\n\n\t\tboolean isCollection = false;\n\t\tfor (int j=maxDepth; j>0; j--)\n\t\t{\n\t\t\tList v = (List) deleteItems.get(new Integer(j));\n\t\t\tif (v==null)\n\t\t\t{\n\t\t\t\tv = new Vector();\n\t\t\t}\n\t\t\tIterator itemIt = v.iterator();\n\t\t\twhile(itemIt.hasNext())\n\t\t\t{\n\t\t\t\tBrowseItem item = (BrowseItem) itemIt.next();\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tif (item.isFolder())\n\t\t\t\t\t{\n\t\t\t\t\t\tContentHostingService.removeCollection(item.getId());\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tContentHostingService.removeResource(item.getId());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (PermissionException e)\n\t\t\t\t{\n\t\t\t\t\taddAlert(state, rb.getString(\"notpermis6\") + \" \" + item.getName() + \". \");\n\t\t\t\t}\n\t\t\t\tcatch (IdUnusedException e)\n\t\t\t\t{\n\t\t\t\t\taddAlert(state,RESOURCE_NOT_EXIST_STRING);\n\t\t\t\t}\n\t\t\t\tcatch (TypeException e)\n\t\t\t\t{\n\t\t\t\t\taddAlert(state, rb.getString(\"deleteres\") + \" \" + item.getName() + \" \" + rb.getString(\"wrongtype\"));\n\t\t\t\t}\n\t\t\t\tcatch (ServerOverloadException e)\n\t\t\t\t{\n\t\t\t\t\taddAlert(state, rb.getString(\"failed\"));\n\t\t\t\t}\n\t\t\t\tcatch (InUseException e)\n\t\t\t\t{\n\t\t\t\t\taddAlert(state, rb.getString(\"deleteres\") + \" \" + item.getName() + \" \" + rb.getString(\"locked\"));\n\t\t\t\t}// try - catch\n\t\t\t\tcatch(RuntimeException e)\n\t\t\t\t{\n\t\t\t\t\tlogger.debug(\"ResourcesAction.doDelete ***** Unknown Exception ***** \" + e.getMessage());\n\t\t\t\t\taddAlert(state, rb.getString(\"failed\"));\n\t\t\t\t}\n\t\t\t}\t// for\n\n\t\t}\t// for\n\n\t\tif (state.getAttribute(STATE_MESSAGE) == null)\n\t\t{\n\t\t\t// delete sucessful\n\t\t\tstate.setAttribute (STATE_MODE, MODE_LIST);\n\n\t\t\tif (((String) state.getAttribute (STATE_SELECT_ALL_FLAG)).equals (Boolean.TRUE.toString()))\n\t\t\t{\n\t\t\t\tstate.setAttribute (STATE_SELECT_ALL_FLAG, Boolean.FALSE.toString());\n\t\t\t}\n\n\t\t}\t// if-else\n\n\t}", "private DataManager() {\n }", "@Override\n\tpublic void removeGameInstanceCreationRights(RevocableToken adminToken,\n\t\t\tGameUId gameuid, AccountUId accountuid)\n\t\t\tthrows RevokedTokenException, InvalidAccountUIdException,\n\t\t\tRightsManagementException {\n\n\t}", "@Override\r\n\tpublic void delete(int eno) {\n\r\n\t}", "public void deletar() {\n\t\tClienteDAO Clientedao = new ClienteDAO();\t\r\n\t\tClientedao.delete(this);\r\n\t\t\r\n\t\tnovoRegistro();\r\n\t\tnotifyObservers();\r\n\t}", "void delete(MountPoint mountPoint);", "public JobManagerHolder() {\n this.instance = null;\n }", "public void deleteLUC() {\r\n/* 135 */ this._has_LUC = false;\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}", "public boolean deleteManager(final Info mng)\n\t{\n\t\tint index;\n\t\tfor (index = 0; index < nowNum; ++ index)\n\t\t{\n\t\t\tif (mng == manager[index])\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t/*The given account is not a manager*/\n\t\tif (index == nowNum)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t/*Remove the manager situation of mng*/\n\t\tfor (int i = index; i < nowNum - 1; ++ i)\n\t\t{\n\t\t\t/*The target is the last one*/\n\t\t\tif (index == nowNum - 1)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tmanager[i] = manager[i + 1];\n\t\t}\n\t\t-- nowNum;\n\t\treturn true;\n\t}", "private void deletejob() {\n\t\tjob.delete(new UpdateListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void done(BmobException e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif (e==null) {\n\t\t\t\t\ttoast(\"删除成功\");\n\t\t\t\t\tUpdateJobActivity.this.finish();\n\t\t\t\t} else {\n\t\t\t\t\ttoast(\"错误:\"+e.getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "private DatabaseManager() {\r\n }", "private void populateEntityToDeletetList()\r\n\t{\r\n\t\tentityNameListDelete = new ArrayList<String>();\r\n\t\tentityNameListDelete.add(\"edu.wustl.catissuecore.domain.Quantity\");\r\n\t\tentityNameListDelete\r\n\t\t\t\t.add(\"edu.wustl.catissuecore.domain.SpecimenCollectionRequirementGroup\");\r\n\t}", "@Override\n\t\tpublic void delete() {\n\n\t\t}", "public Inventory inventoryDelete (TheGroceryStore g, LinkedList<Inventory> deleter) throws ItemNotFoundException;", "int deleteByExample(WfCfgModuleCatalogExample example);", "private DingnedDealManager() {}", "alluxio.proto.journal.KeyValue.DeleteStoreEntry getDeleteStore();", "protected void attemptDeletion()\n {\n if ( this.nmsEntity != null )\n {\n this.nmsEntity.destroyHologramEntity();\n }\n // Setting all variables to null\n this.nmsEntity = null;\n this.location = null;\n }", "public final void delete( ) throws Exception\n\t{\n\t\tDatastore.getInstance( ).deleteOnServer( this );\n\t}", "public void deleteCommands() {\n\t\tcommands = new ArrayList<Command>();\n\t\tassert(commands.size() == 0);\n\t}", "public Destroyer() {\n super(DS_SIZE);\n }", "public StorageManagerImpl()\n {\n if (log.isDebugEnabled())\n {\n log.debug(\"Creating Instance of StorageManagerImpl\");\n }\n storageProxyHolder = new Hashtable();\n\n try\n {\n initializeStorageProxies();\n nRegister();\n }\n catch (Throwable throwable)\n {\n if (log.isErrorEnabled())\n {\n log.error(\"Failed to create StorageManager object\", throwable);\n }\n throwable.printStackTrace();\n }\n }", "private DatabaseManager() {}", "protected int deleteOrphanedAddons() {\n final SQLiteDatabase db = this.helper.getWritableDatabase();\n return deleteOrphanedAddons(db);\n }", "@After\n public void cleanup()\n throws Exception\n {\n moduleManager.stop();\n }", "public void deleteAlgorithm(){\r\n \ttry {\r\n\t\t\tConnectionFactory.createConnection().deleteAlgorithm(this.getSelectedAlgorithmID());\r\n\t\t\tinitAlgorithmList(-1);\r\n\r\n\t\t} catch (DataStorageException e) {\r\n\t\t\tthis.getLog().error(e.getMessage());\r\n\t\t}\r\n }", "@Override\n public boolean deleteDataStore(DataStore dataStore) {\n List<StoragePoolHostVO> hostPoolRecords = storagePoolHostDao.listByPoolId(dataStore.getId());\n\n HypervisorType hypervisorType = null;\n\n if (hostPoolRecords.size() > 0 ) {\n hypervisorType = getHypervisorType(hostPoolRecords.get(0).getHostId());\n }\n\n if (!isSupportedHypervisorType(hypervisorType)) {\n throw new CloudRuntimeException(hypervisorType + \" is not a supported hypervisor type.\");\n }\n\n StoragePool storagePool = (StoragePool)dataStore;\n StoragePoolVO storagePoolVO = primaryDataStoreDao.findById(storagePool.getId());\n List<VMTemplateStoragePoolVO> unusedTemplatesInPool = tmpltMgr.getUnusedTemplatesInPool(storagePoolVO);\n\n for (VMTemplateStoragePoolVO templatePoolVO : unusedTemplatesInPool) {\n tmpltMgr.evictTemplateFromStoragePool(templatePoolVO);\n }\n\n Long clusterId = null;\n Long hostId = null;\n\n for (StoragePoolHostVO host : hostPoolRecords) {\n DeleteStoragePoolCommand deleteCmd = new DeleteStoragePoolCommand(storagePool);\n\n if (HypervisorType.VMware.equals(hypervisorType)) {\n deleteCmd.setRemoveDatastore(true);\n\n Map<String, String> details = new HashMap<>();\n\n StoragePoolDetailVO storagePoolDetail = storagePoolDetailsDao.findDetail(storagePool.getId(), SolidFireUtil.DATASTORE_NAME);\n\n details.put(DeleteStoragePoolCommand.DATASTORE_NAME, storagePoolDetail.getValue());\n\n storagePoolDetail = storagePoolDetailsDao.findDetail(storagePool.getId(), SolidFireUtil.IQN);\n\n details.put(DeleteStoragePoolCommand.IQN, storagePoolDetail.getValue());\n\n storagePoolDetail = storagePoolDetailsDao.findDetail(storagePool.getId(), SolidFireUtil.STORAGE_VIP);\n\n details.put(DeleteStoragePoolCommand.STORAGE_HOST, storagePoolDetail.getValue());\n\n storagePoolDetail = storagePoolDetailsDao.findDetail(storagePool.getId(), SolidFireUtil.STORAGE_PORT);\n\n details.put(DeleteStoragePoolCommand.STORAGE_PORT, storagePoolDetail.getValue());\n\n deleteCmd.setDetails(details);\n }\n\n final Answer answer = agentMgr.easySend(host.getHostId(), deleteCmd);\n\n if (answer != null && answer.getResult()) {\n LOGGER.info(\"Successfully deleted storage pool using Host ID \" + host.getHostId());\n\n HostVO hostVO = hostDao.findById(host.getHostId());\n\n if (hostVO != null) {\n clusterId = hostVO.getClusterId();\n hostId = hostVO.getId();\n }\n\n break;\n }\n else {\n if (answer != null) {\n LOGGER.error(\"Failed to delete storage pool using Host ID \" + host.getHostId() + \": \" + answer.getResult());\n }\n else {\n LOGGER.error(\"Failed to delete storage pool using Host ID \" + host.getHostId());\n }\n }\n }\n\n if (clusterId != null) {\n ClusterVO cluster = clusterDao.findById(clusterId);\n\n GlobalLock lock = GlobalLock.getInternLock(cluster.getUuid());\n\n if (!lock.lock(SolidFireUtil.LOCK_TIME_IN_SECONDS)) {\n String errMsg = \"Couldn't lock the DB on the following string: \" + cluster.getUuid();\n\n LOGGER.debug(errMsg);\n\n throw new CloudRuntimeException(errMsg);\n }\n\n try {\n long sfVolumeId = getVolumeId(storagePool.getId());\n\n SolidFireUtil.SolidFireConnection sfConnection = SolidFireUtil.getSolidFireConnection(storagePool.getId(), storagePoolDetailsDao);\n\n List<SolidFireUtil.SolidFireVag> sfVags = SolidFireUtil.getAllVags(sfConnection);\n\n for (SolidFireUtil.SolidFireVag sfVag : sfVags) {\n if (SolidFireUtil.sfVagContains(sfVag, sfVolumeId, clusterId, hostDao)) {\n SolidFireUtil.removeVolumeIdsFromSolidFireVag(sfConnection, sfVag.getId(), new Long[] { sfVolumeId });\n }\n }\n }\n finally {\n lock.unlock();\n lock.releaseRef();\n }\n }\n\n if (hostId != null) {\n handleTargetsForVMware(hostId, storagePool.getId());\n }\n\n deleteSolidFireVolume(storagePool.getId());\n\n return primaryDataStoreHelper.deletePrimaryDataStore(dataStore);\n }", "@Override\n\tprotected void performRemoveObjects( ManagerEJB manager, Map params ) throws JaloBusinessException\n\t{\n\t\t// no-op by now\n\t}", "@Override\n\tprotected void performRemoveObjects( ManagerEJB manager, Map params ) throws JaloBusinessException\n\t{\n\t\t// no-op by now\n\t}", "public OFMeterMod meterBuildDelete(int meterID) {\n\t\t\t// return meterBuild(OFMeterModCommand.DELETE, meterID, METER_RATE_DEFAULT,\n\t\t\t// METER_BURST_SIZE_DEFAULT, true, true);\n\t\t\treturn factory.buildMeterMod().setCommand(OFMeterModCommand.DELETE).setMeterId(meterID).build();\n\t\t}", "public void deleteDir() throws Exception\n{\n if(_repo!=null) _repo.close(); _repo = null;\n _gdir.delete();\n _gdir.setProp(GitDir.class.getName(), null);\n}", "public void destroy(PluginNode node, DMConnection con, ALogger logger) {\n\r\n\t}", "public void destroy(PluginNode node, DMConnection con, ALogger logger) {\n\r\n\t}", "private UnitManager() {\r\n\t\tUM = new UnitMap(); // create an object\r\n\t}", "protected void onDestroy()\n {\n super.onDestroy();\n\n // Cancelar las tareas asíncronas que pueden estar en segundo plano:\n // inicializar QCAR y cargar los Trackers\n if (mIniciarQCARTask != null &&\n mIniciarQCARTask.getStatus() != IniciarQCARTask.Status.FINISHED)\n {\n mIniciarQCARTask.cancel(true);\n mIniciarQCARTask = null;\n }\n\n if (mCargarTrackerTask != null &&\n mCargarTrackerTask.getStatus() != CargarTrackerTask.Status.FINISHED)\n {\n mCargarTrackerTask.cancel(true);\n mCargarTrackerTask = null;\n }\n\n // Se utiliza este cerrojo para asegurar que no se están ejecutando\n // aún las dos tareas asíncronas para inicizalizar QCAR y para\n // cargar los Trackers.\n synchronized (mCerrojo) \n {\n destruirAplicacionNativa();\n \n mTextures.clear();\n mTextures = null;\n\n destruirDatosTracker();\n destruirTracker();\n\n QCAR.deinit();\n }\n \n // Se limpia la memoría generada por el soundPool\n if(mReproductor != null)\n \tmReproductor.limpiar();\n \n System.gc();\n }", "@Override\n protected void onDestroy() {\n mManager.clearLocalServices(mChannel, null);\n super.onDestroy();\n }", "public abstract void deletedConcepts(long ms, int n);", "@Override\n\tpublic void deleteEntityObj(StdMilkRate e) {\n\t\t\n\t}", "private DataManager() {\n databaseManager = DatabaseManager.getInstance();\n }", "public abstract void delete(Context context);", "int deleteByExample(TLinkmanExample example);", "@Override\n\tpublic void onDestroy() {\n\t\tsuper.DeInit();\n\t\tsuper.onDestroy();\n\t}", "void garbageCollector() {\n Enemy ETR = null;\n Sprite BTR = null;\n Medkit MTR = null;\n for (Enemy e: enemies) {\n if (e.eTank.getX() < -100) {\n ETR = e;\n }\n }\n for (Sprite c: smBullets) {\n if (c.getX() > width + 100) {\n BTR = c;\n }\n if (c.getY() > height + 100) {\n BTR = c;\n }\n if (c.getX() < -100) {\n BTR = c;\n }\n if (c.getY() < -100) {\n BTR = c;\n }\n }\n \n for (Medkit med : health) {\n if (med.timer <= 0) {\n MTR = med;\n }\n }\n //gets rid of bullets that went off-screen\n if (BTR != null) {\n smBullets.remove(BTR);\n println(\"Deleted bullet\");\n }\n if (ETR != null) {\n enemies.remove(ETR);\n }\n //Medkits to despawn\n if (MTR != null) {\n health.remove(MTR);\n }\n}", "@Override\n public void deleteRuleAR() {\n }", "private Singletion3() {}", "public HierarchyManager createHierarchyManager() throws ServiceException {\t\t\r\n initialize(); \r\n return new HierarchyManager(multiDomainMetaService, multiDomainService); \r\n\t}", "public synchronized boolean DeleteManager(String Model_Name,String Option_Name_){\n\t\tif(this.Model.equalsIgnoreCase(Model_Name.toUpperCase(Locale.getDefault()))){\n\t\t\ttry{\n\t\t\t\topset.remove(Search_List(Option_Name_));\n\t\t\t\tMaxIndex-=1;\t\t//Decrease TotalIndex 1\n return true;\n\t\t\t\t}\n\t\t\tcatch(ArrayIndexOutOfBoundsException e) {\n\t\t\t\tSystem.out.print(\"The index you are looking for is invalid\\n\");\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public void delete() \n\t\t\t\tthrows model.ConsistencyException, PersistenceException{\n //TODO Check delegation to abstract class and overwrite if necessary!\n this.getMyCONCMModelItem().delete();\n }", "private void actionDelete(final ImageDataModel modelData) {\r\n // Remove the item from Current List of GalleryHelperBaseOnId.class\r\n if (SharedPref.getListType(MediaVaultController.getSharedPreferencesInstance()).equals(Constant.LIST_VIEW)) {\r\n if (Constant.ALL_VIEW.equalsIgnoreCase(SharedPref.getAllType(sharedPreferences))) {\r\n GalleryHelper.imageDataModelList.remove(modelData);\r\n } else if (Constant.VIDEO_VIEW.equalsIgnoreCase(SharedPref.getVideoType(sharedPreferences))) {\r\n VideoViewData.imageDataModelList.remove(modelData);\r\n } else if (Constant.AUDIO_VIEW.equalsIgnoreCase(SharedPref.getAudioType(sharedPreferences))) {\r\n AudioViewData.imageDataModelList.remove(modelData);\r\n } else if (Constant.PHOTO_VIEW.equalsIgnoreCase(SharedPref.getPhotoType(sharedPreferences))) {\r\n PhotoViewData.imageDataModelList.remove(modelData);\r\n }\r\n }\r\n\r\n if (SharedPref.getAlbumType(MediaVaultController.getSharedPreferencesInstance()).equals(Constant.ALBUM_VIEW)) {\r\n if (Constant.ALL_VIEW.equalsIgnoreCase(SharedPref.getAllType(sharedPreferences))) {\r\n GalleryHelperBaseOnId.dataModelArrayList.remove(modelData);\r\n // Remove the item from Main List of GalleryHelper.class\r\n GalleryHelper.imageFolderMap.get(nameKey).remove(modelData);\r\n } else if (Constant.VIDEO_VIEW.equalsIgnoreCase(SharedPref.getVideoType(sharedPreferences))) {\r\n VideoViewDataOnIdBasis.dataModelArrayList.remove(modelData);\r\n VideoViewData.imageFolderMap.get(nameKey).remove(modelData);\r\n } else if (Constant.AUDIO_VIEW.equalsIgnoreCase(SharedPref.getAudioType(sharedPreferences))) {\r\n AudioViewData.imageFolderMap.get(nameKey).remove(modelData);\r\n AudioViewDataOnIdBasis.dataModelArrayList.remove(modelData);\r\n } else if (Constant.PHOTO_VIEW.equalsIgnoreCase(SharedPref.getPhotoType(sharedPreferences))) {\r\n PhotoViewData.imageFolderMap.get(nameKey).remove(modelData);\r\n PhotoViewDataOnIdBasis.dataModelArrayList.remove(modelData);\r\n }\r\n }\r\n\r\n\r\n final String message = String.format(getString(R.string.delete_success_message));\r\n try {\r\n // method to deleting the selected file\r\n FileUtils.deleteFile(modelData.getFile());\r\n FileUtils.deleteDirectory(modelData.getFile().getParentFile());\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n // method to scan the file and update its position\r\n FileUtils.scanFile(PhotoViewActivity.this, modelData.getFile());\r\n\r\n SDKUtils.showToast(PhotoViewActivity.this, message);\r\n // notify viewpager adapter\r\n notifyAdapter();\r\n if (CustomPagerAdapter != null)\r\n CustomPagerAdapter.itemCheckInList();\r\n }", "int deleteByExample(NjOrderWork2Example example);" ]
[ "0.6697359", "0.57320434", "0.555115", "0.5247156", "0.5207023", "0.5089545", "0.5046223", "0.5036565", "0.49898183", "0.49497876", "0.49362615", "0.49362615", "0.49057415", "0.48895523", "0.4860385", "0.48575404", "0.48517317", "0.4851389", "0.48513287", "0.4846864", "0.48411798", "0.48407087", "0.4839629", "0.48030296", "0.48024675", "0.4788609", "0.47757894", "0.4767253", "0.47586447", "0.475493", "0.47471923", "0.47459203", "0.47338653", "0.4733516", "0.47092855", "0.4702865", "0.47023904", "0.46982732", "0.4694919", "0.4684302", "0.4682678", "0.46778506", "0.4677836", "0.46766186", "0.4670224", "0.46626547", "0.4652278", "0.46231458", "0.46204364", "0.46187037", "0.46159324", "0.46138743", "0.46113056", "0.46070462", "0.46068686", "0.46061426", "0.46059594", "0.46026433", "0.46014526", "0.45914912", "0.45855802", "0.4584824", "0.45815948", "0.45814916", "0.4579615", "0.45680538", "0.45618832", "0.45603365", "0.4558559", "0.4557967", "0.45560968", "0.45540503", "0.4551733", "0.4550935", "0.4544768", "0.4541779", "0.45353052", "0.45327878", "0.45327878", "0.45315677", "0.45308456", "0.45240995", "0.45240995", "0.451956", "0.45189628", "0.4516704", "0.4516276", "0.4513388", "0.45082662", "0.4505214", "0.45000365", "0.4489145", "0.4486749", "0.44860613", "0.4485449", "0.44842094", "0.44841433", "0.44838536", "0.44837973", "0.44727018" ]
0.6423897
1
build DeletionManager for lsmEngine
public <R extends IDeletionRequest> LSMEngineBuilder<T> buildDeletionManager( DeletionManager<T, R> deletionManager) { lsmEngine.setDeletionManager(deletionManager); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public <R extends IDeletionRequest> LSMEngineBuilder<T> buildDeletionManager(\n LevelProcessorChain<T, R, DeleteRequestContext> levelProcessChain) {\n DeletionManager<T, R> deletionManager = new DeletionManager<>(lsmEngine.getWalManager());\n deletionManager.setLevelProcessorsChain(levelProcessChain);\n buildDeletionManager(deletionManager);\n return this;\n }", "public void EliminarManager() {\n\n\t\tsendSelect(DELETE_SQL_MANAGER);\n\n\t}", "@Override\n\tpublic void deleteModule() throws Exception {\n\n\t}", "void deleteModule(Module module);", "@Override // ohos.agp.render.render3d.impl.CoreComponentManager\r\n public void delete() {\r\n synchronized (this.delLock) {\r\n if (this.agpCptrMorphComponentMgr != 0) {\r\n if (!this.isAgpCmemOwn) {\r\n this.agpCptrMorphComponentMgr = 0;\r\n } else {\r\n this.isAgpCmemOwn = false;\r\n throw new UnsupportedOperationException(\"C++ destructor does not have public access\");\r\n }\r\n }\r\n super.delete();\r\n }\r\n }", "private PackageDeleteObserver2(cm.android.mdm.manager.PackageManager2 r1) {\n /*\n // Can't load method instructions: Load method exception: null in method: cm.android.mdm.manager.PackageManager2.PackageDeleteObserver2.<init>(cm.android.mdm.manager.PackageManager2):void, dex: in method: cm.android.mdm.manager.PackageManager2.PackageDeleteObserver2.<init>(cm.android.mdm.manager.PackageManager2):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: cm.android.mdm.manager.PackageManager2.PackageDeleteObserver2.<init>(cm.android.mdm.manager.PackageManager2):void\");\n }", "ImplementationManager createManager();", "public static void deleteInstance()\r\n\t{\r\n\t\tlightManager = null;\r\n\t}", "@Override\n\tpublic void deleteModule(String mac) throws HFModuleException {\n\t\tLog.d(\"HFModuleManager\", \"deleteModule\");\n\t\t\n\n\t\ttry {\n\t\t\tModuleInfo mi = getHFModuleHelper().getRemoteModuleInfoByMac(mac);\n\t\t\t// *******\n\t\t\tif (mi == null) {\n\t\t\t\tmi = getHFModuleHelper().getMyLocalModuleInfoByMac(mac);\n\t\t\t\tif (mi == null) {\n\t\t\t\t\tmi = getHFModuleHelper().getLocalModuleInfoByMac(mac);\n\t\t\t\t\tif (mi == null) {\n\t\t\t\t\t\tthrow new HFModuleException(\n\t\t\t\t\t\t\t\tHFModuleException.ERR_DELETE_MODULE,\n\t\t\t\t\t\t\t\t\"can not find this module\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tgetHFModuleHelper().removeLocalModuleInfoByMac(mac);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tgetHFModuleHelper().removeMyLocalModuleInfoByMac(mac);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (mi.getModuleId() == null) {\n\t\t\t\t\tgetHFModuleHelper().removeRemoteModuleInfoByMac(mac);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (!this.isCloudChannelLive()) {\n\t\t\t\t\tgetHFModuleHelper().removeRemoteModuleInfoByMac(mac);\n\t\t\t\t\treturn ;\n\t\t\t\t}\n\t\t\t\t// ***\n\t\t\t\tString reqTemplate = \"{'PL':{'moduleId':'#moduleId#'},'CID':30021,'SID':'#SID#'}\";\n\t\t\t\tString req = reqTemplate.replaceFirst(\"#moduleId#\", mi.getModuleId())\n\t\t\t\t\t\t.replaceFirst(\"#SID#\", getsid());\n\n\t\t\t\tString rsp = HttpProxy.reqByHttpPost(req);\n\t\t\t\tJSONObject jo = new JSONObject(rsp);\n\t\t\t\tif (jo.isNull(\"RC\")) {\n\t\t\t\t\tthrow new HFModuleException(\n\t\t\t\t\t\t\tHFModuleException.ERR_DELETE_MODULE,\n\t\t\t\t\t\t\t\"delete module err\");\n\t\t\t\t}\n\t\t\t\tif (jo.getInt(\"RC\") != 1) {\n\t\t\t\t\tthrow new HFModuleException(\n\t\t\t\t\t\t\tHFModuleException.ERR_DELETE_MODULE,\n\t\t\t\t\t\t\t\"delete module err\");\n\t\t\t\t} else {\n\t\t\t\t\tgetHFModuleHelper().removeRemoteModuleInfoByMac(mac);\n\t\t\t\t\tgetHFModuleHelper().removeMyLocalModuleInfoByMac(mac);\n\t\t\t\t\tgetHFModuleHelper().removeLocalModuleInfoByMac(mac);\n\t\t\t\t\tgetHFModuleHelper().removeNewModuleInfoByMac(mac);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (JSONException e) {\n\t\t\tthrow new HFModuleException(HFModuleException.ERR_DELETE_MODULE,\n\t\t\t\t\t\"delete module err\");\n\t\t}\n\t}", "private GroupManager() {\r\n\t\tqueueManagers = new HashMap<Integer,QueueManager>();\r\n\t\tqueueManagerDeletionTimeout = -1;\r\n\t\thousekeepingSleep = HOUSEKEEPING_SLEEP;\r\n\t\thouseKeeper = new HouseKeeper(\"GroupManager_HouseKeeper\");\r\n\t\thouseKeeper.start();\r\n\t}", "private Delete() {}", "private Delete() {}", "public static void scriptDelete() {\n List<BeverageEntity> beverages = (List<BeverageEntity>) adminFacade.getAllBeverages();\n for (int i = 0; i < beverages.size(); i++) {\n System.out.println(\"delete : \" + beverages.get(i));\n adminFacade.removeBeverage(beverages.get(i));\n }\n List<DecorationEntity> decos = (List<DecorationEntity>) adminFacade.getAllDecorations();\n for (int i = 0; i < decos.size(); i++) {\n System.out.println(\"delete : \" + decos.get(i));\n adminFacade.removeDecoration(decos.get(i));\n }\n\n /* Check that there isn't any other cocktails, and delete remaining */\n List<CocktailEntity> cocktails = (List<CocktailEntity>) adminFacade.getAllCocktails();\n if (cocktails.size() > 0) {\n System.err.println(\"Les cocktails n'ont pas été tous supprimés... \"\n + cocktails.size() + \" cocktails restants :\");\n }\n for (int i = 0; i < cocktails.size(); i++) {\n CocktailEntity cocktail = adminFacade.getCocktailFull(cocktails.get(i));\n System.err.println(cocktail.getName() + \" : \"\n + cocktail.getDeliverables());\n adminFacade.removeCocktail(cocktail);\n }\n\n /* Remove client accounts */\n List<ClientAccountEntity> clients = (List<ClientAccountEntity>) adminFacade.getAllClients();\n for (int i = 0; i < clients.size(); i++) {\n adminFacade.removeClient(clients.get(i));\n }\n\n /* Remove addresses */\n List<AddressEntity> addresses = (List<AddressEntity>) adminFacade.getAllAddresses();\n for (int i = 0; i < addresses.size(); i++) {\n adminFacade.removeAddress(addresses.get(i));\n }\n\n /* TODO :\n * * Remove orders\n */\n }", "protected void cmdRemove() throws Exception{\n\t\t//Determinamos los elementos a eliminar. De cada uno sacamos el id y el timestamp\n\t\tVector entities = new Vector();\n\t\tStringTokenizer claves = new StringTokenizer(conectorParametro(\"idSelection\"), \"|\");\n\t\tStringTokenizer timestamps = new StringTokenizer(conectorParametro(\"timestamp\"), \"|\");\n\t\ttraza(\"MMG::Se van a borrar \" + claves.countTokens() + \" y son \" + conectorParametro(\"idSelection\"));\n\t\twhile(claves.hasMoreTokens() && timestamps.hasMoreTokens()){\n\t\t\tCobGrupoUsuarCobraData cobGrupoUsuarCobra = new CobGrupoUsuarCobraData();\n\t\t\tcobGrupoUsuarCobra.setId(new Long(claves.nextToken()));\n\t\t\t//cobGrupoUsuarCobra.jdoSetTimeStamp(Long.parseLong(timestamps.nextToken()));\n\t\t\tentities.addElement(cobGrupoUsuarCobra);\n\t\t}\n\t\t\n\t\t//Construimos el DTO para realizar la llamada\n\t\tVector datos = new Vector();\n\t\tMareDTO dto = new MareDTO();\n\t\tdto.addProperty(\"entities\", entities);\n\t\tdatos.add(dto);\n\t\tdatos.add(new MareBusinessID(BUSINESSID_REMOVE));\n\t\t\n\t\t\n\t\t\n\t\t//Invocamos la lógica de negocio\n\t\ttraza(\"MMG:: Iniciada ejecución Remove de entidad CobGrupoUsuarCobra\");\n\t\tDruidaConector conectorCreate = conectar(CONECTOR_REMOVE, datos);\n\t\ttraza(\"MMG:: Finalizada ejecución Remove de entidad CobGrupoUsuarCobra\");\n\t\t\n\t\t\n\n\t\t//metemos en la sesión las query para realizar la requery\n\t\tconectorParametroSesion(SESSION_ATTRIBUTE_LAST_QUERY, conectorParametro(VAR_LAST_QUERY_TO_SESSION));\n\t\t\n\t\t//Redirigimos a la LP de StartUp con la acción de StartUp y requery\n\t\tconectorAction(\"CobGrupoUsuarCobraLPStartUp\");\n\t\tconectorActionParametro(PARAMETRO_GENERICO_ORIGEN, \"menu\");\n\t\tconectorActionParametro(PARAMETRO_GENERICO_ACCION, ACCION_REMOVE);\n\t\tconectorActionParametro(VAR_PERFORM_REQUERY, \"true\");\n\t}", "@Override\n public void onDisable() {\n try {\n System.out.println(\"Cleaning Dynamic Server System Processes.\");\n for (MinigameServer minigameServer : dynamicServerSystemManager.getServers())\n minigameServer.deleteServer();\n\n // Clean the output directory.\n FileUtils.deleteDirectory(new File(\"../minigameservers\"));\n new File(\"../minigameservers\").mkdirs();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n plugin = null;\n }", "int deleteByPrimaryKey(String managerId);", "private SummonerSpellsDao() {\n\t\tconnectionManager = new ConnectionManager();\n\t}", "private DaoManager() {\n }", "@Override\n\tpublic void doDelete() {\n\t\tLOG.info(\"deleting agent\");\n\t\tsuper.doDelete();\n\t}", "private DepartmentManager() {\n }", "private void initDLManager() {\n //TODO poner estos datos en configuraciones\n final String botName = \"DL-MS+A\";\n final String directlinePrimaryKey =\n //\"5Cx8OLT2X98.cwA.1j4.FGE7LsMoVuBtww9vQYNuC6lwoVBWYrb-5DHGzBbOeO0\"; // J\n //\"sccvRjdQVbw.cwA.8tQ.3tw3MFQtgG9bcqYf5xxHgW-lUYKymaoSFNCoIzI-SJY\"; //MS+A\n //\"IWixc2S5WaU.cwA.DEw.DV8nbC-BijSw5TbtNimDJuvrp45GpsKCRW4wPTtqYeY\"; //MP-AURA DEV\n \"QyKjl6KL-XQ.cwA.UTM.puyqrjpLvO1Briz7TjM7q_VqqAOflJ3jN0ryBGvkEiU\";\n mDLManager =\n DLManager.getInstance(this, directlinePrimaryKey);\n }", "public StorageManager() {\n makeDirectory();\n }", "@Override\n\tpublic void delete(EntityManagerFactory emf, Stop entity) {\n\t\t\n\t}", "public abstract void delete() throws ArchEException;", "@Override\n\tpublic int delete(ElectricalCheck entity) throws Exception {\n\t\treturn 0;\n\t}", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/lib/IR/Module.cpp\", line = 58,\n FQN=\"llvm::Module::~Module\", NM=\"_ZN4llvm6ModuleD0Ev\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/Module.cpp -nm=_ZN4llvm6ModuleD0Ev\")\n //</editor-fold>\n public void $destroy() {\n Context.removeModule(this);\n dropAllReferences();\n GlobalList.clear();\n FunctionList.clear();\n AliasList.clear();\n IFuncList.clear();\n NamedMDList.clear();\n /*delete*/Destructors.$destroy((Destructors.ClassWithDestructor)ValSymTab);\n /*delete*/Destructors.$destroy((Destructors.ClassWithDestructor)((/*static_cast*/StringMap<NamedMDNode /*P*/ > /*P*/)(NamedMDSymTab)));\n //START JDestroy\n DL.$destroy();\n TargetTriple.$destroy();\n SourceFileName.$destroy();\n ModuleID.$destroy();\n Materializer.$destroy();\n ComdatSymTab.$destroy();\n GlobalScopeAsm.$destroy();\n NamedMDList.$destroy();\n IFuncList.$destroy();\n AliasList.$destroy();\n FunctionList.$destroy();\n GlobalList.$destroy();\n //END JDestroy\n }", "private void delete() {\n\n\t}", "@Test\n public void testDeletionWithExpiredAndValidLocks() throws BackendException {\n\n final int lockCount = 10;\n final int expiredCount = 3;\n assertTrue(expiredCount + 2 <= lockCount);\n final long timeIncr = 1L;\n final long timeStart = 0L;\n final long timeCutoff = timeStart + (expiredCount * timeIncr);\n\n ImmutableList.Builder<Entry> locksBuilder = ImmutableList.builder();\n ImmutableList.Builder<Entry> delsBuilder = ImmutableList.builder();\n\n for (int i = 0; i < lockCount; i++) {\n final long ts = timeStart + (timeIncr * i);\n Entry lock = StaticArrayEntry.of(\n codec.toLockCol(ts, defaultLockRid),\n BufferUtil.getIntBuffer(0));\n\n if (ts < timeCutoff) {\n delsBuilder.add(lock);\n }\n\n locksBuilder.add(lock);\n }\n\n EntryList locks = StaticArrayEntryList.of(locksBuilder.build());\n EntryList dels = StaticArrayEntryList.of(delsBuilder.build());\n assertTrue(expiredCount == dels.size());\n\n del = new StandardLockCleanerRunnable(store, kc, tx, codec, timeCutoff);\n\n expect(store.getSlice(eq(ksq), eq(tx))).andReturn(locks);\n\n store.mutate(\n eq(key),\n eq(ImmutableList.<Entry> of()),\n eq(columnsOf(dels)),\n anyObject(StoreTransaction.class));\n\n ctrl.replay();\n del.run();\n }", "public static synchronized void deleteInstance() {\n if (eventManager != null) { eventManager = null; }\n }", "DeleteType createDeleteType();", "public ChunkManager() {\n instance = this;\n\n durabilityDir = new File(ObsidianDestroyer.getInstance().getDataFolder(), \"data\" + File.separator + \"durabilities\");\n if (!durabilityDir.exists()) {\n durabilityDir.mkdirs();\n }\n\n load();\n }", "abstract public void deleteAfterBetaReduction();", "private IndexingManager() {\n Provider provider = new BouncyCastleProvider();\n Security.addProvider(provider);\n utility = Database_Utility.getInstance();\n conn = utility.getConnection();\n IMbuffer = IndexingManagerBuffer.getInstance();\n\n // This statement is to create purge table.\n\n boolean k = checkTable1(\"PurgeTable\");\n if (!k) {\n utility.createtable2(\"PurgeTable\");\n }\n boolean k1 = checkTable1(\"UserToCertMap\");\n if (!k1) {\n utility.createtable1();\n }\n\n // This statement is to run maintenance thread on loading of class to purge entries whose timer has expired.\n\n //maintenancethread();\n\n // This statement is to run maintenance thread on loading of class to ascertain root nodes.\n\n // maintenancethread1();\n\n // This statement is to run maintenance thread on loading of class to delete entries from purge table.\n\n // maintenancethread2();\n\n }", "@Override\n protected Void doInBackground(Void... params) {\n DataManager dataManager = DataManager.getInstance(weakReference.get());\n dataManager.deleteNote(noteId);\n return null;\n }", "@Override\n public int delete(Uri uri, String arg1, String[] arg2) {\n SQLiteDatabase db;\n\t// Modifyed by amt_chenjing for switchui-2192 20120715 begin\n try {\n db = mOpenHelper.getWritableDatabase();\n } catch (Exception e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n return 0;\n }\n\t// Modifyed by amt_chenjing for switchui-2192 20120715 end\n int count = 0;\n long rowId = 0;\n switch (graphyUri.match(uri)) {\n case ALL_APPS:\n db.beginTransaction();\n count = db.delete(Apps.TABLE_NAME, arg1, arg2);\n db.setTransactionSuccessful();\n db.endTransaction();\n break;\n case ONE_APP:\n String segment = uri.getPathSegments().get(1);\n //String segment = arg2[0];\n rowId = Long.getLong(segment);\n if (TextUtils.isEmpty(arg1)) {\n arg1 = \"_id=\" + segment;\n } else {\n arg1 = \"_id=\" + segment + \" AND (\" + arg1 + \")\";\n }\n count = db.delete(Apps.TABLE_NAME, arg1, arg2);\n break;\n case ALL_RANKS:\n db.beginTransaction();\n count = db.delete(Ranks.TABLE_NAME, arg1, arg2);\n db.setTransactionSuccessful();\n db.endTransaction();\n break;\n case ONE_RANK:\n String segment1 = uri.getPathSegments().get(1);\n rowId = Long.getLong(segment1);\n if (TextUtils.isEmpty(arg1)) {\n arg1 = \"_id=\" + segment1;\n } else {\n arg1 = \"_id=\" + segment1 + \" AND (\" + arg1 + \")\";\n }\n count = db.delete(Ranks.TABLE_NAME, arg1, arg2);\n break;\n case ALL_MANUALS:\n db.beginTransaction();\n count = db.delete(ManualList.TABLE_NAME, arg1, arg2);\n db.setTransactionSuccessful();\n db.endTransaction();\n break;\n case ONE_MANUAL:\n String segment2 = arg2[0]; //uri.getPathSegments().get(1);\n rowId = Long.getLong(segment2);\n if (TextUtils.isEmpty(arg1)) {\n arg1 = \"_id=\" + segment2;\n } else {\n arg1 = \"_id=\" + segment2 + \" AND (\" + arg1 + \")\";\n }\n count = db.delete(ManualList.TABLE_NAME, arg1, arg2);\n break;\t\n default:\n throw new IllegalArgumentException(\"cannot delete from uri:\"+uri);\n }\n if (count>0 && (graphyUri.match(uri) == ALL_MANUALS\n || graphyUri.match(uri) == ONE_MANUAL)) {\n getContext().getContentResolver().notifyChange(uri, null);\n }\n return count;\n }", "void delete(LogicalDatastoreType store, P path);", "public void managerRemoved(ManagerEvent e);", "@After\n public void after() {\n pl.getEntityManager().clear();\n }", "ReturnCode deleteMenus(MmtConfig cfg);", "@Test\r\n\tpublic void testExecuteCommandsDeleteAdl() throws Exception {\r\n\t\t\r\n\t\tadvertising.executeCommand(advertising, \"adl delete --Name L1-r-medical\");\r\n\t\tassertTrue(\"adc all\", true);\r\n\t\t\r\n\t}", "private static MenuItem createTreeViewDeleteMenuItem(SongManager model,\n MusicPlayerManager musicPlayerManager,\n DatabaseManager databaseManager,\n TreeView<Item> treeView) {\n MenuItem delete = new MenuItem(DELETE);\n\n delete.setOnAction((event) -> {\n List<Item> selectedItems = FileTreeUtils.getItems(treeView.getSelectionModel().getSelectedItems());\n List<File> filesToDelete = new ArrayList<>();\n for (Item item: selectedItems) {\n filesToDelete.add(item.getFile());\n }\n UserInterfaceUtils.deleteFileAction(model, musicPlayerManager, databaseManager, filesToDelete);\n });\n\n return delete;\n }", "CdapDeleteArtifact createCdapDeleteArtifact();", "int deleteByExample(ReleaseSystemExample example);", "@Override\n public void onDestroy() {\n super.onDestroy();\n handler.removeMessages(UpdateConfig.NET_MSG_GETLENTH);\n // if (mModel != null) {\n // mModel.cancelLoadData();\n // }\n if (mTask != null) {\n mTask.cancel(true);\n }\n if (mNotificationManager != null) {\n mNotificationManager.cancel(UpdateConfig.NOTIFY_DOWNLOADING_ID);\n }\n }", "public CommandManager() {}", "@Override\r\n public void deleteEntity(String entityName) {\n\r\n }", "private void deleteObjects(Context context, StringList strLstFLToDel) throws Exception\r\n\t{\r\n\r\n\t try {\r\n\r\n\t\t// Iterate the stringList containing the FeatureLists Objects to delete\r\n\t\tString [] strFLToDel = new String[strLstFLToDel.size()];\r\n\r\n\t for (int m = 0; m < strLstFLToDel.size(); m++) {\r\n\t \tstrFLToDel[m] = (String) strLstFLToDel.get(m);\r\n\t }\r\n\r\n\t // Call DomainObject's deleteObjects method to delete all the Objects in the String array in a single transaction\r\n DomainObject.deleteObjects(context, strFLToDel);\r\n\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tthrow new FrameworkException(\"Object Delete Failed :\"+e.getMessage());\r\n\t\t}\r\n\t}", "void deleteExam(Module module, Exam target);", "@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n \tprivate CriteriaDeleteImpl constructDeleteQuery(CriteriaBuilderImpl cb, CommonTree tree) {\n \t\tfinal CriteriaDeleteImpl q = new CriteriaDeleteImpl(this.metamodel);\n \n \t\tfinal Tree deleteDef = tree.getChild(0);\n \n \t\tfinal Tree aliasedDef = deleteDef.getChild(0);\n \t\tfinal Aliased aliased = new Aliased(aliasedDef);\n \n \t\tfinal EntityTypeImpl entity = this.getEntity(aliased.getQualified().toString());\n \t\tfinal RootImpl<?> r = (RootImpl<?>) q.from(entity);\n \t\tthis.putAlias(q, aliasedDef, aliased, r);\n \n \t\tif (tree.getChildCount() == 2) {\n \t\t\tq.where(this.constructJunction(cb, q, deleteDef.getChild(1)));\n \t\t}\n \n \t\treturn q;\n \t}", "public void doDelete ( RunData data)\n\t{\n\t\tSessionState state = ((JetspeedRunData)data).getPortletSessionState (((JetspeedRunData)data).getJs_peid ());\n\n\t\t// cancel copy if there is one in progress\n\t\tif(! Boolean.FALSE.toString().equals(state.getAttribute (STATE_COPY_FLAG)))\n\t\t{\n\t\t\tinitCopyContext(state);\n\t\t}\n\n\t\t// cancel move if there is one in progress\n\t\tif(! Boolean.FALSE.toString().equals(state.getAttribute (STATE_MOVE_FLAG)))\n\t\t{\n\t\t\tinitMoveContext(state);\n\t\t}\n\n\t\tParameterParser params = data.getParameters ();\n\n\t\tList Items = (List) state.getAttribute(STATE_DELETE_ITEMS);\n\n\t\t// Vector deleteIds = (Vector) state.getAttribute (STATE_DELETE_IDS);\n\n\t\t// delete the lowest item in the hireachy first\n\t\tHashtable deleteItems = new Hashtable();\n\t\t// String collectionId = (String) state.getAttribute (STATE_COLLECTION_ID);\n\t\tint maxDepth = 0;\n\t\tint depth = 0;\n\n\t\tIterator it = Items.iterator();\n\t\twhile(it.hasNext())\n\t\t{\n\t\t\tBrowseItem item = (BrowseItem) it.next();\n\t\t\tdepth = ContentHostingService.getDepth(item.getId(), item.getRoot());\n\t\t\tif (depth > maxDepth)\n\t\t\t{\n\t\t\t\tmaxDepth = depth;\n\t\t\t}\n\t\t\tList v = (List) deleteItems.get(new Integer(depth));\n\t\t\tif(v == null)\n\t\t\t{\n\t\t\t\tv = new Vector();\n\t\t\t}\n\t\t\tv.add(item);\n\t\t\tdeleteItems.put(new Integer(depth), v);\n\t\t}\n\n\t\tboolean isCollection = false;\n\t\tfor (int j=maxDepth; j>0; j--)\n\t\t{\n\t\t\tList v = (List) deleteItems.get(new Integer(j));\n\t\t\tif (v==null)\n\t\t\t{\n\t\t\t\tv = new Vector();\n\t\t\t}\n\t\t\tIterator itemIt = v.iterator();\n\t\t\twhile(itemIt.hasNext())\n\t\t\t{\n\t\t\t\tBrowseItem item = (BrowseItem) itemIt.next();\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tif (item.isFolder())\n\t\t\t\t\t{\n\t\t\t\t\t\tContentHostingService.removeCollection(item.getId());\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tContentHostingService.removeResource(item.getId());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (PermissionException e)\n\t\t\t\t{\n\t\t\t\t\taddAlert(state, rb.getString(\"notpermis6\") + \" \" + item.getName() + \". \");\n\t\t\t\t}\n\t\t\t\tcatch (IdUnusedException e)\n\t\t\t\t{\n\t\t\t\t\taddAlert(state,RESOURCE_NOT_EXIST_STRING);\n\t\t\t\t}\n\t\t\t\tcatch (TypeException e)\n\t\t\t\t{\n\t\t\t\t\taddAlert(state, rb.getString(\"deleteres\") + \" \" + item.getName() + \" \" + rb.getString(\"wrongtype\"));\n\t\t\t\t}\n\t\t\t\tcatch (ServerOverloadException e)\n\t\t\t\t{\n\t\t\t\t\taddAlert(state, rb.getString(\"failed\"));\n\t\t\t\t}\n\t\t\t\tcatch (InUseException e)\n\t\t\t\t{\n\t\t\t\t\taddAlert(state, rb.getString(\"deleteres\") + \" \" + item.getName() + \" \" + rb.getString(\"locked\"));\n\t\t\t\t}// try - catch\n\t\t\t\tcatch(RuntimeException e)\n\t\t\t\t{\n\t\t\t\t\tlogger.debug(\"ResourcesAction.doDelete ***** Unknown Exception ***** \" + e.getMessage());\n\t\t\t\t\taddAlert(state, rb.getString(\"failed\"));\n\t\t\t\t}\n\t\t\t}\t// for\n\n\t\t}\t// for\n\n\t\tif (state.getAttribute(STATE_MESSAGE) == null)\n\t\t{\n\t\t\t// delete sucessful\n\t\t\tstate.setAttribute (STATE_MODE, MODE_LIST);\n\n\t\t\tif (((String) state.getAttribute (STATE_SELECT_ALL_FLAG)).equals (Boolean.TRUE.toString()))\n\t\t\t{\n\t\t\t\tstate.setAttribute (STATE_SELECT_ALL_FLAG, Boolean.FALSE.toString());\n\t\t\t}\n\n\t\t}\t// if-else\n\n\t}", "private DataManager() {\n }", "@Override\n\tpublic void removeGameInstanceCreationRights(RevocableToken adminToken,\n\t\t\tGameUId gameuid, AccountUId accountuid)\n\t\t\tthrows RevokedTokenException, InvalidAccountUIdException,\n\t\t\tRightsManagementException {\n\n\t}", "@Override\r\n\tpublic void delete(int eno) {\n\r\n\t}", "public JobManagerHolder() {\n this.instance = null;\n }", "public void deletar() {\n\t\tClienteDAO Clientedao = new ClienteDAO();\t\r\n\t\tClientedao.delete(this);\r\n\t\t\r\n\t\tnovoRegistro();\r\n\t\tnotifyObservers();\r\n\t}", "public void deleteLUC() {\r\n/* 135 */ this._has_LUC = false;\r\n/* */ }", "void delete(MountPoint mountPoint);", "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}", "public boolean deleteManager(final Info mng)\n\t{\n\t\tint index;\n\t\tfor (index = 0; index < nowNum; ++ index)\n\t\t{\n\t\t\tif (mng == manager[index])\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t/*The given account is not a manager*/\n\t\tif (index == nowNum)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t/*Remove the manager situation of mng*/\n\t\tfor (int i = index; i < nowNum - 1; ++ i)\n\t\t{\n\t\t\t/*The target is the last one*/\n\t\t\tif (index == nowNum - 1)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tmanager[i] = manager[i + 1];\n\t\t}\n\t\t-- nowNum;\n\t\treturn true;\n\t}", "private void deletejob() {\n\t\tjob.delete(new UpdateListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void done(BmobException e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif (e==null) {\n\t\t\t\t\ttoast(\"删除成功\");\n\t\t\t\t\tUpdateJobActivity.this.finish();\n\t\t\t\t} else {\n\t\t\t\t\ttoast(\"错误:\"+e.getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}", "private DatabaseManager() {\r\n }", "private void populateEntityToDeletetList()\r\n\t{\r\n\t\tentityNameListDelete = new ArrayList<String>();\r\n\t\tentityNameListDelete.add(\"edu.wustl.catissuecore.domain.Quantity\");\r\n\t\tentityNameListDelete\r\n\t\t\t\t.add(\"edu.wustl.catissuecore.domain.SpecimenCollectionRequirementGroup\");\r\n\t}", "public Inventory inventoryDelete (TheGroceryStore g, LinkedList<Inventory> deleter) throws ItemNotFoundException;", "@Override\n\t\tpublic void delete() {\n\n\t\t}", "int deleteByExample(WfCfgModuleCatalogExample example);", "private DingnedDealManager() {}", "alluxio.proto.journal.KeyValue.DeleteStoreEntry getDeleteStore();", "protected void attemptDeletion()\n {\n if ( this.nmsEntity != null )\n {\n this.nmsEntity.destroyHologramEntity();\n }\n // Setting all variables to null\n this.nmsEntity = null;\n this.location = null;\n }", "public Destroyer() {\n super(DS_SIZE);\n }", "public void deleteCommands() {\n\t\tcommands = new ArrayList<Command>();\n\t\tassert(commands.size() == 0);\n\t}", "public final void delete( ) throws Exception\n\t{\n\t\tDatastore.getInstance( ).deleteOnServer( this );\n\t}", "public StorageManagerImpl()\n {\n if (log.isDebugEnabled())\n {\n log.debug(\"Creating Instance of StorageManagerImpl\");\n }\n storageProxyHolder = new Hashtable();\n\n try\n {\n initializeStorageProxies();\n nRegister();\n }\n catch (Throwable throwable)\n {\n if (log.isErrorEnabled())\n {\n log.error(\"Failed to create StorageManager object\", throwable);\n }\n throwable.printStackTrace();\n }\n }", "private DatabaseManager() {}", "protected int deleteOrphanedAddons() {\n final SQLiteDatabase db = this.helper.getWritableDatabase();\n return deleteOrphanedAddons(db);\n }", "@After\n public void cleanup()\n throws Exception\n {\n moduleManager.stop();\n }", "public void deleteAlgorithm(){\r\n \ttry {\r\n\t\t\tConnectionFactory.createConnection().deleteAlgorithm(this.getSelectedAlgorithmID());\r\n\t\t\tinitAlgorithmList(-1);\r\n\r\n\t\t} catch (DataStorageException e) {\r\n\t\t\tthis.getLog().error(e.getMessage());\r\n\t\t}\r\n }", "@Override\n public boolean deleteDataStore(DataStore dataStore) {\n List<StoragePoolHostVO> hostPoolRecords = storagePoolHostDao.listByPoolId(dataStore.getId());\n\n HypervisorType hypervisorType = null;\n\n if (hostPoolRecords.size() > 0 ) {\n hypervisorType = getHypervisorType(hostPoolRecords.get(0).getHostId());\n }\n\n if (!isSupportedHypervisorType(hypervisorType)) {\n throw new CloudRuntimeException(hypervisorType + \" is not a supported hypervisor type.\");\n }\n\n StoragePool storagePool = (StoragePool)dataStore;\n StoragePoolVO storagePoolVO = primaryDataStoreDao.findById(storagePool.getId());\n List<VMTemplateStoragePoolVO> unusedTemplatesInPool = tmpltMgr.getUnusedTemplatesInPool(storagePoolVO);\n\n for (VMTemplateStoragePoolVO templatePoolVO : unusedTemplatesInPool) {\n tmpltMgr.evictTemplateFromStoragePool(templatePoolVO);\n }\n\n Long clusterId = null;\n Long hostId = null;\n\n for (StoragePoolHostVO host : hostPoolRecords) {\n DeleteStoragePoolCommand deleteCmd = new DeleteStoragePoolCommand(storagePool);\n\n if (HypervisorType.VMware.equals(hypervisorType)) {\n deleteCmd.setRemoveDatastore(true);\n\n Map<String, String> details = new HashMap<>();\n\n StoragePoolDetailVO storagePoolDetail = storagePoolDetailsDao.findDetail(storagePool.getId(), SolidFireUtil.DATASTORE_NAME);\n\n details.put(DeleteStoragePoolCommand.DATASTORE_NAME, storagePoolDetail.getValue());\n\n storagePoolDetail = storagePoolDetailsDao.findDetail(storagePool.getId(), SolidFireUtil.IQN);\n\n details.put(DeleteStoragePoolCommand.IQN, storagePoolDetail.getValue());\n\n storagePoolDetail = storagePoolDetailsDao.findDetail(storagePool.getId(), SolidFireUtil.STORAGE_VIP);\n\n details.put(DeleteStoragePoolCommand.STORAGE_HOST, storagePoolDetail.getValue());\n\n storagePoolDetail = storagePoolDetailsDao.findDetail(storagePool.getId(), SolidFireUtil.STORAGE_PORT);\n\n details.put(DeleteStoragePoolCommand.STORAGE_PORT, storagePoolDetail.getValue());\n\n deleteCmd.setDetails(details);\n }\n\n final Answer answer = agentMgr.easySend(host.getHostId(), deleteCmd);\n\n if (answer != null && answer.getResult()) {\n LOGGER.info(\"Successfully deleted storage pool using Host ID \" + host.getHostId());\n\n HostVO hostVO = hostDao.findById(host.getHostId());\n\n if (hostVO != null) {\n clusterId = hostVO.getClusterId();\n hostId = hostVO.getId();\n }\n\n break;\n }\n else {\n if (answer != null) {\n LOGGER.error(\"Failed to delete storage pool using Host ID \" + host.getHostId() + \": \" + answer.getResult());\n }\n else {\n LOGGER.error(\"Failed to delete storage pool using Host ID \" + host.getHostId());\n }\n }\n }\n\n if (clusterId != null) {\n ClusterVO cluster = clusterDao.findById(clusterId);\n\n GlobalLock lock = GlobalLock.getInternLock(cluster.getUuid());\n\n if (!lock.lock(SolidFireUtil.LOCK_TIME_IN_SECONDS)) {\n String errMsg = \"Couldn't lock the DB on the following string: \" + cluster.getUuid();\n\n LOGGER.debug(errMsg);\n\n throw new CloudRuntimeException(errMsg);\n }\n\n try {\n long sfVolumeId = getVolumeId(storagePool.getId());\n\n SolidFireUtil.SolidFireConnection sfConnection = SolidFireUtil.getSolidFireConnection(storagePool.getId(), storagePoolDetailsDao);\n\n List<SolidFireUtil.SolidFireVag> sfVags = SolidFireUtil.getAllVags(sfConnection);\n\n for (SolidFireUtil.SolidFireVag sfVag : sfVags) {\n if (SolidFireUtil.sfVagContains(sfVag, sfVolumeId, clusterId, hostDao)) {\n SolidFireUtil.removeVolumeIdsFromSolidFireVag(sfConnection, sfVag.getId(), new Long[] { sfVolumeId });\n }\n }\n }\n finally {\n lock.unlock();\n lock.releaseRef();\n }\n }\n\n if (hostId != null) {\n handleTargetsForVMware(hostId, storagePool.getId());\n }\n\n deleteSolidFireVolume(storagePool.getId());\n\n return primaryDataStoreHelper.deletePrimaryDataStore(dataStore);\n }", "public OFMeterMod meterBuildDelete(int meterID) {\n\t\t\t// return meterBuild(OFMeterModCommand.DELETE, meterID, METER_RATE_DEFAULT,\n\t\t\t// METER_BURST_SIZE_DEFAULT, true, true);\n\t\t\treturn factory.buildMeterMod().setCommand(OFMeterModCommand.DELETE).setMeterId(meterID).build();\n\t\t}", "@Override\n\tprotected void performRemoveObjects( ManagerEJB manager, Map params ) throws JaloBusinessException\n\t{\n\t\t// no-op by now\n\t}", "@Override\n\tprotected void performRemoveObjects( ManagerEJB manager, Map params ) throws JaloBusinessException\n\t{\n\t\t// no-op by now\n\t}", "public void deleteDir() throws Exception\n{\n if(_repo!=null) _repo.close(); _repo = null;\n _gdir.delete();\n _gdir.setProp(GitDir.class.getName(), null);\n}", "public void destroy(PluginNode node, DMConnection con, ALogger logger) {\n\r\n\t}", "public void destroy(PluginNode node, DMConnection con, ALogger logger) {\n\r\n\t}", "private UnitManager() {\r\n\t\tUM = new UnitMap(); // create an object\r\n\t}", "protected void onDestroy()\n {\n super.onDestroy();\n\n // Cancelar las tareas asíncronas que pueden estar en segundo plano:\n // inicializar QCAR y cargar los Trackers\n if (mIniciarQCARTask != null &&\n mIniciarQCARTask.getStatus() != IniciarQCARTask.Status.FINISHED)\n {\n mIniciarQCARTask.cancel(true);\n mIniciarQCARTask = null;\n }\n\n if (mCargarTrackerTask != null &&\n mCargarTrackerTask.getStatus() != CargarTrackerTask.Status.FINISHED)\n {\n mCargarTrackerTask.cancel(true);\n mCargarTrackerTask = null;\n }\n\n // Se utiliza este cerrojo para asegurar que no se están ejecutando\n // aún las dos tareas asíncronas para inicizalizar QCAR y para\n // cargar los Trackers.\n synchronized (mCerrojo) \n {\n destruirAplicacionNativa();\n \n mTextures.clear();\n mTextures = null;\n\n destruirDatosTracker();\n destruirTracker();\n\n QCAR.deinit();\n }\n \n // Se limpia la memoría generada por el soundPool\n if(mReproductor != null)\n \tmReproductor.limpiar();\n \n System.gc();\n }", "@Override\n protected void onDestroy() {\n mManager.clearLocalServices(mChannel, null);\n super.onDestroy();\n }", "public abstract void deletedConcepts(long ms, int n);", "@Override\n\tpublic void deleteEntityObj(StdMilkRate e) {\n\t\t\n\t}", "private DataManager() {\n databaseManager = DatabaseManager.getInstance();\n }", "public abstract void delete(Context context);", "int deleteByExample(TLinkmanExample example);", "@Override\n\tpublic void onDestroy() {\n\t\tsuper.DeInit();\n\t\tsuper.onDestroy();\n\t}", "void garbageCollector() {\n Enemy ETR = null;\n Sprite BTR = null;\n Medkit MTR = null;\n for (Enemy e: enemies) {\n if (e.eTank.getX() < -100) {\n ETR = e;\n }\n }\n for (Sprite c: smBullets) {\n if (c.getX() > width + 100) {\n BTR = c;\n }\n if (c.getY() > height + 100) {\n BTR = c;\n }\n if (c.getX() < -100) {\n BTR = c;\n }\n if (c.getY() < -100) {\n BTR = c;\n }\n }\n \n for (Medkit med : health) {\n if (med.timer <= 0) {\n MTR = med;\n }\n }\n //gets rid of bullets that went off-screen\n if (BTR != null) {\n smBullets.remove(BTR);\n println(\"Deleted bullet\");\n }\n if (ETR != null) {\n enemies.remove(ETR);\n }\n //Medkits to despawn\n if (MTR != null) {\n health.remove(MTR);\n }\n}", "private Singletion3() {}", "@Override\n public void deleteRuleAR() {\n }", "public HierarchyManager createHierarchyManager() throws ServiceException {\t\t\r\n initialize(); \r\n return new HierarchyManager(multiDomainMetaService, multiDomainService); \r\n\t}", "public synchronized boolean DeleteManager(String Model_Name,String Option_Name_){\n\t\tif(this.Model.equalsIgnoreCase(Model_Name.toUpperCase(Locale.getDefault()))){\n\t\t\ttry{\n\t\t\t\topset.remove(Search_List(Option_Name_));\n\t\t\t\tMaxIndex-=1;\t\t//Decrease TotalIndex 1\n return true;\n\t\t\t\t}\n\t\t\tcatch(ArrayIndexOutOfBoundsException e) {\n\t\t\t\tSystem.out.print(\"The index you are looking for is invalid\\n\");\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private void actionDelete(final ImageDataModel modelData) {\r\n // Remove the item from Current List of GalleryHelperBaseOnId.class\r\n if (SharedPref.getListType(MediaVaultController.getSharedPreferencesInstance()).equals(Constant.LIST_VIEW)) {\r\n if (Constant.ALL_VIEW.equalsIgnoreCase(SharedPref.getAllType(sharedPreferences))) {\r\n GalleryHelper.imageDataModelList.remove(modelData);\r\n } else if (Constant.VIDEO_VIEW.equalsIgnoreCase(SharedPref.getVideoType(sharedPreferences))) {\r\n VideoViewData.imageDataModelList.remove(modelData);\r\n } else if (Constant.AUDIO_VIEW.equalsIgnoreCase(SharedPref.getAudioType(sharedPreferences))) {\r\n AudioViewData.imageDataModelList.remove(modelData);\r\n } else if (Constant.PHOTO_VIEW.equalsIgnoreCase(SharedPref.getPhotoType(sharedPreferences))) {\r\n PhotoViewData.imageDataModelList.remove(modelData);\r\n }\r\n }\r\n\r\n if (SharedPref.getAlbumType(MediaVaultController.getSharedPreferencesInstance()).equals(Constant.ALBUM_VIEW)) {\r\n if (Constant.ALL_VIEW.equalsIgnoreCase(SharedPref.getAllType(sharedPreferences))) {\r\n GalleryHelperBaseOnId.dataModelArrayList.remove(modelData);\r\n // Remove the item from Main List of GalleryHelper.class\r\n GalleryHelper.imageFolderMap.get(nameKey).remove(modelData);\r\n } else if (Constant.VIDEO_VIEW.equalsIgnoreCase(SharedPref.getVideoType(sharedPreferences))) {\r\n VideoViewDataOnIdBasis.dataModelArrayList.remove(modelData);\r\n VideoViewData.imageFolderMap.get(nameKey).remove(modelData);\r\n } else if (Constant.AUDIO_VIEW.equalsIgnoreCase(SharedPref.getAudioType(sharedPreferences))) {\r\n AudioViewData.imageFolderMap.get(nameKey).remove(modelData);\r\n AudioViewDataOnIdBasis.dataModelArrayList.remove(modelData);\r\n } else if (Constant.PHOTO_VIEW.equalsIgnoreCase(SharedPref.getPhotoType(sharedPreferences))) {\r\n PhotoViewData.imageFolderMap.get(nameKey).remove(modelData);\r\n PhotoViewDataOnIdBasis.dataModelArrayList.remove(modelData);\r\n }\r\n }\r\n\r\n\r\n final String message = String.format(getString(R.string.delete_success_message));\r\n try {\r\n // method to deleting the selected file\r\n FileUtils.deleteFile(modelData.getFile());\r\n FileUtils.deleteDirectory(modelData.getFile().getParentFile());\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n // method to scan the file and update its position\r\n FileUtils.scanFile(PhotoViewActivity.this, modelData.getFile());\r\n\r\n SDKUtils.showToast(PhotoViewActivity.this, message);\r\n // notify viewpager adapter\r\n notifyAdapter();\r\n if (CustomPagerAdapter != null)\r\n CustomPagerAdapter.itemCheckInList();\r\n }", "public void delete() \n\t\t\t\tthrows model.ConsistencyException, PersistenceException{\n //TODO Check delegation to abstract class and overwrite if necessary!\n this.getMyCONCMModelItem().delete();\n }", "int deleteByExample(NjOrderWork2Example example);" ]
[ "0.642262", "0.57291704", "0.55499756", "0.52459496", "0.52046555", "0.5086945", "0.50471205", "0.5035348", "0.49875", "0.49496543", "0.49339128", "0.49339128", "0.4903273", "0.4888723", "0.48585877", "0.48542583", "0.48519582", "0.4851373", "0.48485982", "0.48472452", "0.48409063", "0.48405257", "0.4837565", "0.48007542", "0.48005167", "0.47895807", "0.47738534", "0.4766843", "0.47567385", "0.47537753", "0.47474465", "0.47456956", "0.47346663", "0.47314298", "0.47069454", "0.47002596", "0.46997908", "0.46975878", "0.46931317", "0.46823153", "0.46815756", "0.46777487", "0.4677622", "0.46749225", "0.4669976", "0.46603152", "0.46507618", "0.46228537", "0.46192724", "0.46158323", "0.46155336", "0.46128008", "0.46088824", "0.46059427", "0.46050367", "0.4604738", "0.46031788", "0.46023098", "0.4598198", "0.4589632", "0.45860952", "0.45841065", "0.45797807", "0.45788935", "0.4578314", "0.4567784", "0.4558698", "0.4558245", "0.45563316", "0.45559", "0.4555747", "0.45541638", "0.45520642", "0.4548637", "0.45447028", "0.4540825", "0.4532804", "0.4530741", "0.4530721", "0.4530721", "0.452846", "0.45225856", "0.45225856", "0.4521434", "0.45190147", "0.45150226", "0.4514399", "0.45113114", "0.4507299", "0.45020056", "0.44986784", "0.44883952", "0.44864324", "0.4486029", "0.44850972", "0.44843686", "0.44815955", "0.44813424", "0.44805217", "0.44707" ]
0.6696617
0
build QueryManager for lsmEngine
public <R extends IQueryRequest> LSMEngineBuilder<T> buildQueryManager( LevelProcessorChain<T, R, QueryRequestContext> levelProcessChain) { QueryManager<T, R> queryManager = new QueryManager<>(); queryManager.setLevelProcessorsChain(levelProcessChain); buildQueryManager(queryManager); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public <R extends IQueryRequest> LSMEngineBuilder<T> buildQueryManager(\n QueryManager<T, R> queryManager) {\n lsmEngine.setQueryManager(queryManager);\n return this;\n }", "private RunQueriesEx setupQueries() {\n RunQueriesEx queries = new RunQueriesEx();\n \n //for each column in our table, update one of our lists\n for(int i = 0; i < this.dataTable.getColumnCount(); i++) {\n this.updateList(i);\n }\n \n updateEmptyLists(); //pads any lists that didn't get updates with empty strings\n \n //add a new query for each row in the table\n for(int i = 0; i < this.dataTable.getRowCount(); i++) {\n queries.add(this.createQueryFromRow(i));\n }\n \n return queries;\n }", "public interface SearchQuerySet extends QuerySet\n{\n\n // for AbstractSearch\n public static final int STAT_MODELS = 1;\n public static final int STAT_CLUSTERS = 2;\n public static final int STAT_GENOMES = 4;\n public static final int STAT_MODEL_CLUSTERS = 8;\n\n public String getStatsById(Collection data);\n public String getStatsByQuery(String query);\n public String getStatsById(Collection data,int stats);\n public String getStatsByQuery(String query,int stats);\n \n // for BlastSearch\n public String getBlastSearchQuery(Collection dbNames, Collection keys, KeyTypeUser.KeyType keyType);\n \n //for ClusterIDSearch\n public String getClusterIDSearchQuery(Collection input, int limit, int[] DBs, KeyTypeUser.KeyType keyType);\n \n // for ClusterNameSearch\n public String getClusterNameSearchQuery(Collection input, int limit, int[] DBs, KeyTypeUser.KeyType keyType);\n \n // for DescriptionSearch\n public String getDescriptionSearchQuery(Collection input, int limit, int[] DBs, KeyTypeUser.KeyType keyType);\n \n // for GoSearch \n public String getGoSearchQuery(Collection input, int limit, KeyTypeUser.KeyType keyType);\n \n // for GoTextSearch\n public String getGoTextSearchQuery(Collection input, int limit, KeyTypeUser.KeyType keyType);\n \n // for IdSearch\n public String getIdSearchQuery(Collection input, int limit, int[] DBs, KeyTypeUser.KeyType keyType);\n \n // for QueryCompSearch\n public String getQueryCompSearchQuery(String comp_id, String status, KeyTypeUser.KeyType keyType);\n \n // for QuerySearch\n public String getQuerySearchQuery(String queries_id, KeyTypeUser.KeyType keyType); \n \n // for SeqModelSearch\n public String getSeqModelSearchQuery(Collection model_ids, KeyTypeUser.KeyType keyType);\n \n // for UnknowclusterIdSearch\n public String getUnknownClusterIdSearchQuery(int cluster_id, KeyTypeUser.KeyType keyType);\n \n // for ProbeSetSearch\n public String getProbeSetSearchQuery(Collection input, int limit, KeyTypeUser.KeyType keyType);\n \n // for ProbeSetKeySearch\n public String getProbeSetKeySearchQuery(Collection input, int limit, KeyTypeUser.KeyType keyType);\n \n // for QueryTestSearch\n public String getQueryTestSearchQuery(String query_id, String version, String genome_id);\n \n // for QueryStatsSearch\n public String getQueryStatsSearchQuery(List query_ids,List DBs);\n \n // for PskClusterSearch\n public String getPskClusterSearchQuery(int cluster_id,KeyTypeUser.KeyType keyType);\n \n // for ClusterCorrSearch\n public String getClusterCorrSearchQuery(int cluster_id, int psk_id, KeyTypeUser.KeyType keyType);\n \n // for UnknownGenesSearch\n public String getUnknownGenesSearchQuery(Collection sources, KeyTypeUser.KeyType keyType);\n \n}", "public abstract String createQuery();", "public abstract DatabaseQuery createDatabaseQuery(ParseTreeContext context);", "public Query createQuery() {\n\n String queryString = getQueryString();\n\n if (debug == true) {\n logger.info( \"Query String: {0}\", queryString);\n logger.info( \"Parameters: Max Results: {0}, First result: {1}, Order By: {2}, Restrictions: {3}, Joins: {4}\", new Object[]{maxResults, firstResult, orderBy, normalizedRestrictions, joins});\n }\n\n Query query = entityManager.createQuery(queryString);\n\n List<QueryParameter> parameters = getQueryParameters();\n for (QueryParameter parameter : parameters) {\n //dates (Date and Calendar)\n if (parameter.getTemporalType() != null && (parameter.getValue() instanceof Date || parameter.getValue() instanceof Calendar)) {\n if (parameter.getValue() instanceof Date) {\n if (parameter.getPosition() != null) {\n query.setParameter(parameter.getPosition(), (Date) parameter.getValue(), parameter.getTemporalType());\n } else {\n if (parameter.getProperty() != null) {\n query.setParameter(parameter.getProperty(), (Date) parameter.getValue(), parameter.getTemporalType());\n }\n }\n } else if (parameter.getValue() instanceof Calendar) {\n if (parameter.getPosition() != null) {\n query.setParameter(parameter.getPosition(), (Calendar) parameter.getValue(), parameter.getTemporalType());\n } else {\n if (parameter.getProperty() != null) {\n query.setParameter(parameter.getProperty(), (Calendar) parameter.getValue(), parameter.getTemporalType());\n }\n }\n }\n } else {\n if (parameter.getPosition() != null) {\n query.setParameter(parameter.getPosition(), parameter.getValue());\n } else {\n if (parameter.getProperty() != null) {\n query.setParameter(parameter.getProperty(), parameter.getValue());\n }\n }\n }\n }\n\n if (maxResults != null) {\n query.setMaxResults(maxResults);\n }\n if (firstResult != null) {\n query.setFirstResult(firstResult);\n }\n return query;\n }", "protected JPAQuery<T> createQuery() {\n\t\tJPAQuery<T> query = new JPAQuery<>(entityManager);\n\t\tquery.from(getDslRoot());\n\t\treturn query;\n\t}", "Query query();", "public abstract List createQuery(String query);", "public void testUsingQueriesFromQueryManger(){\n\t\tSet<String> names = testDataMap.keySet();\n\t\tUtils.prtObMess(this.getClass(), \"atm query\");\n\t\tDseInputQuery<BigDecimal> atmq = \n\t\t\t\tqm.getQuery(new AtmDiot());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> bdResult = \n\t\t\t\tatmq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(bdResult);\n\n\t\tUtils.prtObMess(this.getClass(), \"vol query\");\n\t\tDseInputQuery<BigDecimal> volq = \n\t\t\t\tqm.getQuery(new VolDiotForTest());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> dbResult = \n\t\t\t\tvolq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(dbResult);\n\t\n\t\tUtils.prtObMess(this.getClass(), \"integer query\");\n\t\tDseInputQuery<BigDecimal> strikeq = \n\t\t\t\tqm.getQuery(new StrikeDiotForTest());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> strikeResult = \n\t\t\t\tstrikeq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(strikeResult);\n\t\n\t}", "private Queries() {\n // prevent instantiation\n }", "public abstract DbQuery getQuery(String queryName);", "public QueryCore buildQuery() throws SQLException\n {\n if(l != null)\n {\n for(int i=0;i<l.size();i++)\n {\n prepStm.setObject(i+1,l.get(i));\n }\n }\n return this;\n }", "private DbQuery() {}", "public QueryHandler ensureQueryHandler(XmlElement xmlConfig, XmlElement xmlQuery, long lBatch)\n {\n QueryHandler qh = m_queryHandler;\n if (qh == null)\n {\n qh = new JMXQueryHandler();\n qh.setContext(xmlQuery, xmlConfig);\n m_queryHandler = qh;\n }\n\n ((JMXQueryHandler)qh).setBatch(lBatch);\n\n return qh;\n }", "public abstract Query<T> setQuery(String oql);", "public QueryExecutorMDB() {\n\t}", "@Override\n\tpublic TypedQuery<Plan> constructQuery(Map<String, String> customQuery) {\n\t\tCriteriaBuilder cb = null;\n\t\ttry {\n\t\t\tcb = em.getCriteriaBuilder();\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tCriteriaQuery<Plan> cq = cb.createQuery(Plan.class);\n\t\tRoot<Plan> plan = cq.from(Plan.class);\n\t\tPredicate existingpredicate = null;\n\t\tint predicateCount=0;\n\t\tPredicate masterPredicate=null;\n\n\t\ttry {\n\n\t\t\tfor (Map.Entry<String,String> entry : customQuery.entrySet()) \n\t\t\t{\n\t\t\t\tif(plan.get(entry.getKey().toString()) != null)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t//Query for range values with comma(,) as delimiter\n\t\t\t\t\tif(entry.getValue().contains(\",\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tint minRange=Integer.parseInt(customQuery.get(entry.getKey().toString()).split(\",\")[0]);\n\t\t\t\t\t\tint maxRange=Integer.parseInt(customQuery.get(entry.getKey().toString()).split(\",\")[1]);\n\t\t\t\t\t\tif(predicateCount==0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmasterPredicate = cb.between(plan.get(entry.getKey().toString()),minRange, maxRange );\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\texistingpredicate = cb.between(plan.get(entry.getKey().toString()),minRange, maxRange );\n\t\t\t\t\t\t\tmasterPredicate=cb.and(masterPredicate,existingpredicate);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tpredicateCount++;\n\t\t\t\t\t}\n\t\t\t\t\t//Query for equals values\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(predicateCount==0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmasterPredicate = cb.equal(plan.get(entry.getKey().toString()), customQuery.get(entry.getKey().toString()));\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\texistingpredicate = cb.equal(plan.get(entry.getKey().toString()), customQuery.get(entry.getKey().toString()));\n\t\t\t\t\t\t\tmasterPredicate=cb.and(masterPredicate,existingpredicate);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tpredicateCount++;\n\t\t\t\t\t\t//cq.where(predicate);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tcq.where(masterPredicate);\n\t\tTypedQuery<Plan> query = em.createQuery(cq);\n\t\treturn query;\n\t}", "CampusSearchQuery generateQuery();", "List<JModuleInfo> queryAll();", "private void addQueries(String query){\n ArrayList <String> idsFullSet = new ArrayList <String>(searchIDs);\n while(idsFullSet.size() > 0){\n ArrayList <String> idsSmallSet = new ArrayList <String>(); \n if(debugMode) {\n System.out.println(\"\\t Pmids not used in query available : \" + idsFullSet.size());\n }\n idsSmallSet.addAll(idsFullSet.subList(0,Math.min(getSearchIdsLimit(), idsFullSet.size())));\n idsFullSet.removeAll(idsSmallSet);\n String idsConstrain =\"\";\n idsConstrain = idsConstrain(idsSmallSet);\n addQuery(query,idsConstrain);\n }\n }", "public static QueryInterface createQuery() {\n return new XmlQuery();\n }", "@Override\n\tpublic Query createQuery(String qlString) {\n\t\treturn null;\n\t}", "public Query() {\n initComponents();\n }", "Query createQuery(final String query);", "public QueryCore setup(String query, List<Object> l,Connection c) throws SQLException\n {\n loadQuery(query,l).init(c);\n return this;\n }", "public QueryRegistry() {\r\n }", "public interface GafisNormalqueryQueryqueService {\n void sendQuery(QueryQueueVO queryQueueVO);\n int getErrorMsgCount();\n Vector<String> getProcessMessage();\n Vector<String> getProcessErrorMessage();\n void setClearCollect();\n\n String getMatchResult(QueryQueueVO queryQueueVO);\n\n List<String> getValidSuccessList(List<String> keysList, QueryQueueVO queryQueueVO);\n\n GafisDakuQueryqueEntity getGafisDakuQueryqueEntity(String pkId);\n\n /**\n * 获取所有比对队列\n * @return\n */\n List<GafisDakuQueryqueEntity> getQueryqueue();\n\n /**\n * 分页获取所有比对队列\n * @return\n */\n Page<GafisDakuQueryqueEntity> getPageQueryqueue(int page, int size);\n\n /**\n * 获取未完成比对队列\n * @return\n */\n List<GafisDakuQueryqueEntity> getQueryqueueNotMatched();\n\n /**\n * 队列任务是否全部比对完成\n */\n void queryMatchFinish(GafisDakuQueryqueEntity queryqueEntity);\n\n void modifyQueryCandListDirByPkId(String queryCandListDir, String pkId);\n\n AnalyzeVO getAnalyzeResult(List<String> truePairList, String pkid);\n}", "static public void register () { QueryEngineRegistry.addFactory( factory ); }", "public Query() {\n\n// oriToRwt = new HashMap();\n// oriToRwt.put(); // TODO\n }", "public void newQuery(String query){\n\t\tparser = new Parser(query);\n\t\tQueryClass parsedQuery = parser.createQueryClass();\n\t\tqueryList.add(parsedQuery);\n\t\t\n\t\tparsedQuery.matchFpcRegister((TreeRegistry)ps.getRegistry());\n\t\tparsedQuery.matchAggregatorRegister();\n\t\t\n\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n \tpublic <T> QueryImpl<T> createTypedQuery(EntityManagerImpl entityManager) {\n \t\tif (this.lastUsed != Long.MAX_VALUE) {\n \t\t\tthis.lastUsed = System.currentTimeMillis();\n \t\t}\n \n \t\tfinal QueryImpl<T> typedQuery = new QueryImpl<T>((BaseQuery<T>) this.q, entityManager);\n \n \t\tif (this.lockMode != null) {\n \t\t\ttypedQuery.setLockMode(this.lockMode);\n \t\t}\n \n \t\tif (this.hints != null) {\n \t\t\tfor (final Entry<String, Object> entry : this.hints.entrySet()) {\n \t\t\t\ttypedQuery.setHint(entry.getKey(), entry.getValue());\n \t\t\t}\n \t\t}\n \n \t\treturn typedQuery;\n \t}", "java.util.List<WorldUps.UQuery> \n getQueriesList();", "@Override\n public void constructQuery() {\n try {\n super.constructQuery();\n sqlQueryBuilder.append(Constants.QUERY_SELECT);\n appendColumnName();\n appendPrimaryTableName();\n appendConditions(getJoinType());\n appendClause(joinQueryInputs.clauses, true);\n sqlQueryBuilder.append(Constants.SEMI_COLON);\n queryDisplayListener.displayConstructedQuery(sqlQueryBuilder.toString());\n } catch (NoSuchClauseFoundException noSuchClauseFoundException) {\n queryDisplayListener.showException(noSuchClauseFoundException.getExceptionMessage());\n }\n }", "@Override\n\tpublic <T> TypedQuery<T> createQuery(String qlString, Class<T> resultClass) {\n\t\treturn null;\n\t}", "public QueryExecution createQueryExecution(Query qry);", "public SUMOQueryParser(SUMOQueryParserTokenManager tm) {\n token_source = tm;\n token = new Token();\n jj_ntk = -1;\n jj_gen = 0;\n for (int i = 0; i < 11; i++) jj_la1[i] = -1;\n for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();\n }", "public Query<T, R> build() {\n // if criteria.size == 0, rootCriterion = null\n Criterion rootCriterion = null;\n if (criteria.size() == 1) {\n rootCriterion = criteria.get(0);\n } else if (criteria.size() > 1) {\n rootCriterion = Restrictions.and(criteria\n .toArray(new Criterion[criteria.size()]));\n }\n return new QueryImpl<T, R>(entityClass, returnType, rootCriterion,\n orderings, maxResults, returnFields);\n }", "void runQueries();", "public QueryParser(QueryParserTokenManager tm) {\n token_source = tm;\n token = new Token();\n jj_ntk = -1;\n jj_gen = 0;\n for (int i = 0; i < 117; i++) jj_la1[i] = -1;\n for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();\n }", "public abstract List createNativeSQLQuery(String query);", "public interface BaseQueryBuilder {\n\n /**\n * \n * 查询构建完成\n * \n * @return {@link EsdslBuilder}\n * @since JDK 1.8\n */\n EsdslBuilder queryDone();\n}", "SQLQuery createSQLQuery(final String query);", "public LSMEngine<T> build() {\n return lsmEngine;\n }", "GroupQuery createQuery();", "public QueryCore(String query,List<Object> l)\n {\n this.query = query;\n this.l = l;\n }", "public Query() {\r\n }", "public QueryCore(String query)\n {\n this.query = query;\n }", "private void montaQuery(Publicacao object, Query q) {\t\t\n\t}", "protected abstract void onQueryStart();", "public void createQuery(String s) throws HibException;", "public WorldUps.UQuery.Builder addQueriesBuilder() {\n return getQueriesFieldBuilder().addBuilder(\n WorldUps.UQuery.getDefaultInstance());\n }", "SelectQuery createSelectQuery();", "QueryType createQueryType();", "WorldUps.UQuery getQueries(int index);", "public void Query() {\n }", "public abstract <T> List<? extends T> createQuery(String query, Class<T> type, int firstResult, int maxResult);", "private void queryList (String query) {\n\t\tmemoListAdapter.query(query);\n\t}", "public interface SettingsEventQuery {\r\n public static final String[] COLUMNS = {\"keyField\", \"keyValue\"};\r\n public static final String CREATE_TABLE = (\"CREATE TABLE IF NOT EXISTS Settings(\" + COLUMNS[0] + \" TEXT, \" + COLUMNS[1] + \" TEXT )\");\r\n public static final String DROP_TABLE = \"DROP TABLE IF EXISTS Settings\";\r\n public static final int KEY_FIELD = 0;\r\n public static final int KEY_VALUE = 1;\r\n public static final String TABLE = \"Settings\";\r\n }", "public Query createQuery(String hql, Object... params) ;", "public interface MySQLDBQuery {\n\n\tString QUERY_ADD_SLOT = \"insert into slot (s_size) values (?)\";\n\tString QUERY_FIND_SLOT = \"select s_id, s_size, s_covered from slot where s_size = ? and s_covered = ? and s_id not in (select s_id from slot_has_vehicle) limit 1\";\n\tString QUERY_GET_SLOT_STATISTICS = \"select count(1) as all_slot, (select count(1) from slot where s_covered > 0) as reserve_slot from slot\";\n\tString QUERY_GET_FIND_A_SLOT = \"select s_id, s_size, s_covered from slot where s_id = ?\";\n\tString QUERY_FREE_SLOT_RESERVATION = \"update slot_has_vehicle set sl_end = now() where sl_id = ?\";\n\tString QUERY_OCCUPY_A_SLOT = \"insert into slot_has_vehicle (s_id, v_id) values (?,?)\";\n\tString QUERY_GET_SLOT_RESERVATION_BY_ID = \"select sl_id, s_id, v_id, sl_start, sl_end from slot_has_vehicle where sl_id = ?\";\n\tString QUERY_FIND_SLOT_OCCUPIED_BY_VEHICLE = \"select sl_id, s_id, v_id, sl_start, sl_end from slot_has_vehicle where v_id = (select v_id from vehicle where v_reg_num = ?) and sl_end IS NULL\";\n\tString QUERY_GET_VEHICLE_BY_REG_NUMBER = \"select v_id, v_reg_num, v_type from vehicle where v_reg_num=?\";\n\tString QUERY_CREATE_A_VEHICLE = \"insert into vehicle (v_reg_num, v_type) values (?,?)\";\n\tString QUERY_DELETE_SLOT_RESERVATION = \"delete from slot_has_vehicle where sl_id=?\";\n}", "public Queries loadQueries() {\r\n\t\tQueries queries = null;\r\n\t try {\r\n queries = Queries.unmarshalAsQueries();\r\n\t } catch (Exception e) {\r\n\t e.printStackTrace();\r\n\t }\r\n\t return queries;\r\n\t}", "public N_TIME_BEAR01MQuery() {\n\t\tsuper();\n\n\t\t// Add design-time configured components.\n\t\tinitComponents();\n\t\tEmpsn_DscField.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tdoQuery();\n\t\t\t}\n\t\t});\n\t}", "IQuery getQuery();", "public JpqlQuery(EntityManagerFactoryImpl entityManagerFactory, CriteriaBuilderImpl cb, NamedQueryMetadata metadata) {\n \t\tthis(entityManagerFactory, metadata.getQuery(), cb);\n \n \t\tthis.lastUsed = Long.MAX_VALUE;\n \n \t\t// force sql compilation\n \t\tthis.q.getSql();\n \n \t\tthis.lockMode = metadata.getLockMode();\n \t\tif (metadata.getHints().size() > 0) {\n \t\t\tthis.hints = Maps.newHashMap();\n \t\t\tthis.hints.putAll(metadata.getHints());\n \t\t}\n \n \t\tentityManagerFactory.addNamedQuery(metadata.getName(), this);\n \t}", "public Query(){\n this(new MongoQueryFilter.MongoQueryFilterBuilder());\n }", "private MetaSparqlRequest createQueryMT2() {\n\t\treturn createQueryMT1();\n\t}", "private BaseQueryImpl<?> construct(CriteriaBuilderImpl cb, CommonTree tree) {\n \t\tfinal Tree type = tree.getChild(0);\n \t\tif (type.getType() == JpqlParser.SELECT) {\n \t\t\treturn this.constructSelectQuery(cb, tree);\n \t\t}\n \t\telse if (type.getType() == JpqlParser.DELETE) {\n \t\t\treturn this.constructDeleteQuery(cb, tree);\n \t\t}\n \t\telse {\n \t\t\treturn this.constructUpdateQuery(cb, tree);\n \t\t}\n \t}", "private Query getQuery(String index, String type, String query){\r\n\t\tSearchQuery esQuery = new SearchQuery();\r\n\t\tesQuery.setIndex(this.indexName);\r\n\t\t\r\n\t\tif(StringUtils.isNotEmpty(type))\r\n\t\t\tesQuery.setType(type);\r\n\t\t\r\n\t\tesQuery.setQuery(query);\r\n\t\t\r\n\t\treturn esQuery;\t\t\r\n\t}", "public interface Query {\n\n\t/**\n\t * @return ID of the given query\n\t */\n\tint queryID();\n\t\n\t/**\n\t * @return given query\n\t */\n\tString query();\n\t\n\t/**\n\t * @return list of relevant documents to the corresponding query\n\t */\n\tList<RelevanceInfo> listOfRelevantDocuments();\n\t\n\t/**\n\t * @return list of results to the corresponding query after running one of the retrieval models\n\t */\n\tList<Result> resultList();\n\t\n\t/**\n\t * @param resultList\n\t * @Effects adds results to the result list of the corresponding query\n\t */\n\tvoid putResultList(List<Result> resultList);\n}", "private LSMEngineBuilder<T> buildLevelProcessors(ApplicationContext applicationContext) {\n LevelProcessorChain<T, IInsertionRequest, InsertRequestContext> insertionLevelProcessChain =\n generateLevelProcessorsChain(applicationContext.getInsertionLevelProcessClass());\n LevelProcessorChain<T, IDeletionRequest, DeleteRequestContext> deletionLevelProcessChain =\n generateLevelProcessorsChain(applicationContext.getDeletionLevelProcessClass());\n LevelProcessorChain<T, IQueryRequest, QueryRequestContext> queryLevelProcessChain =\n generateLevelProcessorsChain(applicationContext.getQueryLevelProcessClass());\n return buildQueryManager(queryLevelProcessChain)\n .buildInsertionManager(insertionLevelProcessChain)\n .buildDeletionManager(deletionLevelProcessChain);\n }", "public QueryExecution createQueryExecution(String qryStr);", "private ASTQuery() {\r\n dataset = Dataset.create();\r\n }", "@Override\n protected Map<String, String> initializeCommonQueries() {\n Map<String, String> commonQueries = new HashMap<>();\n\n commonQueries.put(SELECT_ALL_QUERY_KEY, SELECT_ALL_QUERY);\n commonQueries.put(SELECT_BY_ID_QUERY_KEY, SELECT_BY_ID_QUERY);\n commonQueries.put(DELETE_BY_ID_QUERY_KEY, DELETE_BY_ID_QUERY);\n commonQueries.put(INSERT_ENTITY_QUERY_KEY, INSERT_ENTITY_QUERY);\n commonQueries.put(UPDATE_ENTITY_QUERY_KEY, UPDATE_ENTITY_QUERY);\n\n return commonQueries;\n }", "private RealmQuery buildRealmQuery(Realm realm, Class myClass) {\n RealmQuery query = RealmQuery.createQuery(realm, myClass);\n return query;\n }", "private SearchRequestBuilder createSearchBuilder(StoreURL storeURL, EsQuery esQuery) {\n SearchRequestBuilder searchBuilder = this.getClient(storeURL)\n .prepareSearch(esQuery.getGraph())\n .setQuery(RootBuilder.get(esQuery))\n .setFetchSource(true)\n .setFrom(esQuery.getPageNo())\n .setSize(esQuery.getPageSize());\n if(CollectionUtils.isNotEmpty(esQuery.getSchemas())){\n searchBuilder.setTypes(esQuery.getSchemas().toArray(new String[]{}));\n }\n this.addAggregations(esQuery, searchBuilder); // aggregation\n this.addSortFields(esQuery, searchBuilder); // sort\n this.addHighlightFields(esQuery, searchBuilder); // highlight\n return searchBuilder;\n }", "public static void main (String[] args) {\n EntityQuery query = new EntityQuery();\n Harvestable res = new OaiPmhResource();\n query.setFilter(\"test\", res);\n query.setAcl(\"diku\");\n query.setStartsWith(\"cf\",\"name\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"a\"));\n query.setQuery(\"(usedBy=library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"x\"));\n\n query = new EntityQuery();\n query.setQuery(\"(usedBy=library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"b\"));\n query.setQuery(\"usedBy=*library\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"c\"));\n query.setQuery(\"(=library\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"d\"));\n query.setQuery(\"usedBy=\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"e\"));\n query.setQuery(\"(usedBy!=library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"f\"));\n query.setQuery(\"(usedBy==library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"g\"));\n query.setQuery(\"(usedBy===library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"h\"));\n }", "protected void initQueryFromNamedDefinition(Query query, NamedQueryDefinition nqd) {\n\t\tquery.setCacheable( nqd.isCacheable() );\n\t\tquery.setCacheRegion( nqd.getCacheRegion() );\n\t\tquery.setReadOnly( nqd.isReadOnly() );\n\n\t\tif ( nqd.getTimeout() != null ) {\n\t\t\tquery.setTimeout( nqd.getTimeout() );\n\t\t}\n\t\tif ( nqd.getFetchSize() != null ) {\n\t\t\tquery.setFetchSize( nqd.getFetchSize() );\n\t\t}\n\t\tif ( nqd.getCacheMode() != null ) {\n\t\t\tquery.setCacheMode( nqd.getCacheMode() );\n\t\t}\n\t\tif ( nqd.getComment() != null ) {\n\t\t\tquery.setComment( nqd.getComment() );\n\t\t}\n\t\tif ( nqd.getFirstResult() != null ) {\n\t\t\tquery.setFirstResult( nqd.getFirstResult() );\n\t\t}\n\t\tif ( nqd.getMaxResults() != null ) {\n\t\t\tquery.setMaxResults( nqd.getMaxResults() );\n\t\t}\n\t\tif ( nqd.getFlushMode() != null ) {\n\t\t\tquery.setHibernateFlushMode( nqd.getFlushMode() );\n\t\t}\n\t}", "public QueryBuilder()\n {\n\tlabel = null;\n\tqueryCondition = null;\n\tselectionLimiter = null;\n\tselectionSorter = null;\n\n\tvariablesMap = new HashMap<String, Expression>();\n\tselectionLabelsReferencedByStats = new HashSet<String>();\n }", "MessageQuery createMessageQuery();", "private MetaSparqlRequest createQueryMT3() {\n\t\t\treturn createQueryMT1();\n\t\t}", "private static void executeQuery4(PersistenceManager pm) {\n Query query = pm.newQuery(Category.class);\n query.declareParameters(\"int length\");\n query.declareVariables(\"Item item\");\n query.setFilter(\n \"elements.contains(item) && item.name.length() <= length\");\n Collection results = (Collection)query.execute(new Integer(10));\n printCollection(\"Categories containing an item with a short name: \",\n results.iterator());\n query.closeAll();\n }", "public ProductIndexQuery() {\n\t}", "public DydraQueryEngine(@NotNull final Repository repository,\n @NotNull final Query query) {\n this(repository.name, query.toString());\n }", "public interface IQueryResolver {\n List<Field> equalCondition = new ArrayList();\n List<Field> greaterEqualCondition = new ArrayList();\n List<Field> lesserEqualCondition = new ArrayList();\n\n String getTableName();\n}", "protected static IQueryExecutor getMultiClassQueryExecutor(IQuery query, IStorageEngine engine, IInstanceBuilder instanceBuilder) {\r\n\r\n\t\tif (CriteriaQuery.class == query.getClass()) {\r\n\t\t\treturn new MultiClassGenericQueryExecutor(new CriteriaQueryExecutor(query, engine));\r\n\t\t}\r\n\t\tif (ValuesCriteriaQuery.class == query.getClass()) {\r\n\t\t\treturn new MultiClassGenericQueryExecutor(new ValuesCriteriaQueryExecutor(query, engine));\r\n\t\t}\r\n\r\n\t\tif (NativeQuery.class.isAssignableFrom(query.getClass())) {\r\n\t\t\treturn new MultiClassGenericQueryExecutor(new NativeQueryExecutor(query, engine, instanceBuilder));\r\n\t\t}\r\n\r\n\t\tif (SimpleNativeQuery.class.isAssignableFrom(query.getClass())) {\r\n\t\t\treturn new MultiClassGenericQueryExecutor(new NativeQueryExecutor(query, engine, instanceBuilder));\r\n\t\t}\r\n\r\n\t\tthrow new ODBRuntimeException(NeoDatisError.QUERY_TYPE_NOT_IMPLEMENTED.addParameter(query.getClass().getName()));\r\n\t}", "public void start() {\n \n for (Object obj: bufferedQueries) {\n \n switch(obj.getClass().getName()) {\n case \"uzh.tomdb.db.operations.Insert\":\n if (inserts == null) {\n inserts = new ArrayList<>();\n }\n inserts.add((Insert) obj);\n break;\n case \"uzh.tomdb.db.operations.CreateTable\":\n if (creates == null) {\n creates = new ArrayList<>();\n }\n creates.add((CreateTable) obj);\n break;\n case \"uzh.tomdb.db.operations.Update\":\n if (updates == null) {\n updates = new ArrayList<>();\n }\n updates.add((Update) obj);\n break;\n case \"uzh.tomdb.db.operations.Delete\":\n if (deletes == null) {\n deletes = new ArrayList<>();\n }\n deletes.add((Delete) obj);\n break;\n }\n }\n \n if (inserts != null) {\n inserts();\n }\n if (creates != null) {\n creates();\n }\n if (updates != null) {\n updates();\n }\n if (deletes != null) {\n deletes();\n }\n }", "public ResultSet CargarManager() {\n\n\t\trs = sendSelect(SELECT_SQL_MANAGER);\n\n\t\treturn rs;\n\n\t}", "public DydraQueryEngine(@NotNull final String repositoryName,\n @NotNull final Query query) {\n this(repositoryName, query.toString());\n }", "public PseudoQuery() {\r\n\t}", "public Query advancedQuery() \n {\n return null;\n }", "public void constructQuery(String query) {\n\t\tQuery q = QueryFactory.create(query);\n\t\tQueryExecution qe = QueryExecutionFactory.create(q, model);\n\t\tModel result = qe.execConstruct();\n\t\tprintModel(result);\n\t\tmodel.add(result);\n\t\tqe.close();\n\t}", "public List<Record> executeNativeFinder(String queryName, Object context);", "private void initializeQueryProperties() {\n defaultQueryProperties.put(\":allowed-rules\", makeCycSymbol(\n \":all\"));\n defaultQueryProperties.put(\":result-uniqueness\",\n makeCycSymbol(\":bindings\"));\n defaultQueryProperties.put(\":allow-hl-predicate-transformation?\", false);\n defaultQueryProperties.put(\":allow-unbound-predicate-transformation?\", false);\n defaultQueryProperties.put(\":allow-evaluatable-predicate-transformation?\", false);\n defaultQueryProperties.put(\":intermediate-step-validation-level\", makeCycSymbol(\":all\"));\n defaultQueryProperties.put(\":negation-by-failure?\", false);\n defaultQueryProperties.put(\":allow-indeterminate-results?\", true);\n defaultQueryProperties.put(\":allow-abnormality-checking?\", true);\n defaultQueryProperties.put(\":disjunction-free-el-vars-policy\",\n makeCycSymbol(\":compute-intersection\"));\n defaultQueryProperties.put(\":allowed-modules\", makeCycSymbol(\":all\"));\n defaultQueryProperties.put(\":completeness-minimization-allowed?\", true);\n defaultQueryProperties.put(\":direction\", makeCycSymbol(\":backward\"));\n defaultQueryProperties.put(\":equality-reasoning-method\", makeCycSymbol(\":czer-equal\"));\n defaultQueryProperties.put(\":equality-reasoning-domain\", makeCycSymbol(\":all\"));\n defaultQueryProperties.put(\":max-problem-count\", Long.valueOf(100000));\n defaultQueryProperties.put(\":transformation-allowed?\", false);\n defaultQueryProperties.put(\":add-restriction-layer-of-indirection?\", true);\n defaultQueryProperties.put(\":evaluate-subl-allowed?\", true);\n defaultQueryProperties.put(\":rewrite-allowed?\", false);\n defaultQueryProperties.put(\":abduction-allowed?\", false);\n defaultQueryProperties.put(\":removal-backtracking-productivity-limit\", Long.valueOf(2000000));\n // dynamic query properties\n defaultQueryProperties.put(\":max-number\", null);\n defaultQueryProperties.put(\":max-time\", 120);\n defaultQueryProperties.put(\":max-transformation-depth\", 0);\n defaultQueryProperties.put(\":block?\", false);\n defaultQueryProperties.put(\":max-proof-depth\", null);\n defaultQueryProperties.put(\":cache-inference-results?\", false);\n defaultQueryProperties.put(\":answer-language\", makeCycSymbol(\":el\"));\n defaultQueryProperties.put(\":continuable?\", false);\n defaultQueryProperties.put(\":browsable?\", false);\n defaultQueryProperties.put(\":productivity-limit\", Long.valueOf(2000000));\n\n final CycArrayList<CycSymbolImpl> queryPropertiesList = new CycArrayList(\n defaultQueryProperties.keySet());\n final String command = makeSublStmt(\"mapcar\", makeCycSymbol(\n \"query-property-p\"), queryPropertiesList);\n try {\n CycList results = getConverse().converseList(command);\n for (int i = 0, size = results.size(); i < size; i++) {\n if (results.get(i).equals(CycObjectFactory.nil)) {\n final String badProperty = queryPropertiesList.get(i).toCanonicalString();\n System.err.println(badProperty + \" is not a query-property-p\");\n defaultQueryProperties.remove(badProperty);\n }\n }\n } catch (Exception e) {\n System.err.println(e.getMessage());\n }\n queryPropertiesInitialized = true;\n }", "@SuppressWarnings(\"unchecked\")\n\tprivate CompoundQuery handleQuery() throws Exception{\n\t\tif (this.resultant != null && this.resultant.getResultsContainer() != null){\n\t\t\t//compoundQuery = (CompoundQuery) resultant.getAssociatedQuery();\n\t\t\tViewable view = newCompoundQuery.getAssociatedView();\n\t\t\tResultsContainer resultsContainer = this.resultant.getResultsContainer();\n\t\t\tsampleCrit = null;\n\t Collection sampleIDs = new ArrayList(); \n\t\t\t//Get the samples from the resultset object\n\t\t\tif(resultsContainer!= null){\n\t\t\t\tCollection samples = null;\n\t\t\t\tif(resultsContainer != null &&resultsContainer instanceof DimensionalViewContainer){\t\t\t\t\n\t\t\t\t\tDimensionalViewContainer dimensionalViewContainer = (DimensionalViewContainer)resultsContainer;\n\t\t\t\t\t\tCopyNumberSingleViewResultsContainer copyNumberSingleViewContainer = dimensionalViewContainer.getCopyNumberSingleViewContainer();\n\t\t\t\t\t\tGeneExprSingleViewResultsContainer geneExprSingleViewContainer = dimensionalViewContainer.getGeneExprSingleViewContainer();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(copyNumberSingleViewContainer!= null){\n\t\t\t\t\t\t\tSet<BioSpecimenIdentifierDE> biospecimenIDs = copyNumberSingleViewContainer.getAllBiospecimenLabels();\n\t\t\t\t \t\tfor (BioSpecimenIdentifierDE bioSpecimen: biospecimenIDs) {\n\t\t\t\t \t\t\tif(bioSpecimen.getSpecimenName()!= null){\n\t\t\t\t \t\t\t\tsampleIDs.add(new SampleIDDE(bioSpecimen.getSpecimenName()));\n\t\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\tif(geneExprSingleViewContainer!= null){\n\t\t\t\t\t\t\tSet<BioSpecimenIdentifierDE> biospecimenIDs = geneExprSingleViewContainer.getAllBiospecimenLabels();\n\t\t\t\t \t\tfor (BioSpecimenIdentifierDE bioSpecimen: biospecimenIDs) {\n\t\t\t\t \t\t\tif(bioSpecimen.getSpecimenName()!= null){\n\t\t\t\t \t\t\t\t\tsampleIDs.add(new SampleIDDE(bioSpecimen.getSpecimenName()));\n\t\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 \t\tsampleCrit = new SampleCriteria();\n\t\t \t\t\tsampleCrit.setSampleIDs(sampleIDs);\n\n AddConstrainsToQueriesHelper constrainedSamplesHandler= new AddConstrainsToQueriesHelper();\n constrainedSamplesHandler.constrainQueryWithSamples(newCompoundQuery,sampleCrit);\n\t\t\t\tnewCompoundQuery = getShowAllValuesQuery(newCompoundQuery);\n\t\t\t\tnewCompoundQuery.setAssociatedView(view);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn newCompoundQuery;\n\t\t}", "public StatementQueryMechanism(DatabaseQuery query) {\n super(query);\n }", "private static Boolean specialQueries(String query) throws ClassNotFoundException, InstantiationException, IllegalAccessException {\n clickList = false;\n //newCorpus = true;\n\n if (query.equals(\"q\")) {\n\n System.exit(0);\n return true;\n }\n\n String[] subqueries = query.split(\"\\\\s+\"); //split around white space\n\n if (subqueries[0].equals(\"stem\")) //first term in subqueries tells computer what to do \n {\n GUI.JListModel.clear();\n GUI.ResultsLabel.setText(\"\");\n TokenProcessor processor = new NewTokenProcessor();\n if (subqueries.length > 1) //user meant to stem the token not to search stem\n {\n List<String> stems = processor.processToken(subqueries[1]);\n\n //clears list and repopulates it \n String stem = \"Stem of query '\" + subqueries[1] + \"' is '\" + stems.get(0) + \"'\";\n\n GUI.ResultsLabel.setText(stem);\n\n return true;\n }\n\n } else if (subqueries[0].equals(\"vocab\")) {\n List<String> vocabList = Disk_posIndex.getVocabulary();\n GUI.JListModel.clear();\n GUI.ResultsLabel.setText(\"\");\n\n int vocabCount = 0;\n for (String v : vocabList) {\n if (vocabCount < 1000) {\n vocabCount++;\n GUI.JListModel.addElement(v);\n }\n }\n GUI.ResultsLabel.setText(\"Total size of vocabulary: \" + vocabCount);\n return true;\n }\n\n return false;\n }", "public void doBuild() throws TorqueException\n {\n dbMap = Torque.getDatabaseMap(\"cream\");\n\n dbMap.addTable(\"OPPORTUNITY\");\n TableMap tMap = dbMap.getTable(\"OPPORTUNITY\");\n\n tMap.setPrimaryKeyMethod(TableMap.NATIVE);\n\n\n tMap.addPrimaryKey(\"OPPORTUNITY.OPPORTUNITY_ID\", new Integer(0));\n tMap.addColumn(\"OPPORTUNITY.OPPORTUNITY_CODE\", \"\");\n tMap.addColumn(\"OPPORTUNITY.STATUS\", new Integer(0));\n tMap.addColumn(\"OPPORTUNITY.PRIORITY\", new Integer(0));\n tMap.addColumn(\"OPPORTUNITY.OPPORTUNITY_TYPE\", new Integer(0));\n tMap.addColumn(\"OPPORTUNITY.OPPORTUNITY_NAME\", \"\");\n tMap.addForeignKey(\n \"OPPORTUNITY.OPPORTUNITY_CAT_ID\", new Integer(0) , \"OPPORTUNITY_CATEGORY\" ,\n \"OPPORTUNITY_CAT_ID\");\n tMap.addForeignKey(\n \"OPPORTUNITY.LEAD_SOURCE_ID\", new Integer(0) , \"LEAD_SOURCE\" ,\n \"LEAD_SOURCE_ID\");\n tMap.addColumn(\"OPPORTUNITY.ISSUED_DATE\", new Date());\n tMap.addColumn(\"OPPORTUNITY.EXPECTED_DATE\", new Date());\n tMap.addColumn(\"OPPORTUNITY.CLOSED_DATE\", new Date());\n tMap.addForeignKey(\n \"OPPORTUNITY.CUSTOMER_ID\", new Integer(0) , \"CUSTOMER\" ,\n \"CUSTOMER_ID\");\n tMap.addForeignKey(\n \"OPPORTUNITY.PROJECT_ID\", new Integer(0) , \"PROJECT\" ,\n \"PROJECT_ID\");\n tMap.addForeignKey(\n \"OPPORTUNITY.CURRENCY_ID\", new Integer(0) , \"CURRENCY\" ,\n \"CURRENCY_ID\");\n tMap.addColumn(\"OPPORTUNITY.CURRENCY_AMOUNT\", new BigDecimal(0));\n tMap.addColumn(\"OPPORTUNITY.SALES_STAGE\", new Integer(0));\n tMap.addColumn(\"OPPORTUNITY.PROBABILITY\", new Integer(0));\n tMap.addColumn(\"OPPORTUNITY.SUBJECT\", \"\");\n tMap.addColumn(\"OPPORTUNITY.NEXT_STEPS\", \"\");\n tMap.addColumn(\"OPPORTUNITY.NOTES\", \"\");\n tMap.addColumn(\"OPPORTUNITY.CREATED\", new Date());\n tMap.addColumn(\"OPPORTUNITY.MODIFIED\", new Date());\n tMap.addColumn(\"OPPORTUNITY.CREATED_BY\", \"\");\n tMap.addColumn(\"OPPORTUNITY.MODIFIED_BY\", \"\");\n }", "ObstacleQuery createObstacleQuery();", "public String buildSearchQuery() throws Exception\r\n { \r\n String query;\r\n \r\n searchContext.setText(getSearchString());\r\n \r\n if(!locations.isEmpty())\r\n {\r\n searchContext.setLocations(locations);\r\n }\r\n\r\n if (ext != null) {\r\n for (AdvancedSearchOptions option : ext.getAdvOptionsExtensions()) {\r\n option.setSearchParam(searchContext);\r\n }\r\n }\r\n \r\n // we always want to exclude CAT ignore & hidden rendition aspects\r\n searchContext.setAspectToExclude(VeloConstants.ASPECT_IGNORE);\r\n searchContext.setAspectToExclude(VeloConstants.ASPECT_HIDDEN_RENDITION);\r\n\r\n // we always want to exclude thumbnail types\r\n searchContext.addTypeToExclude(VeloConstants.TYPE_THUMBNAIL);\r\n \r\n query = searchContext.buildQuery(2);\r\n logger.debug(\"AdvancedSearchQuery:\" + query);\r\n \r\n return query;\r\n \r\n }" ]
[ "0.691607", "0.59432787", "0.582269", "0.5772451", "0.57504475", "0.5724639", "0.569235", "0.5660655", "0.5647562", "0.56225216", "0.5614944", "0.5553533", "0.5519577", "0.5518117", "0.548699", "0.5472197", "0.54486465", "0.5440374", "0.5423225", "0.54207623", "0.5404304", "0.5403176", "0.5392676", "0.5391751", "0.5391545", "0.5384788", "0.5382068", "0.537561", "0.5367718", "0.5350205", "0.53405976", "0.53210676", "0.5309688", "0.5298935", "0.5282091", "0.5274264", "0.52626705", "0.5259892", "0.5250866", "0.52442575", "0.5241722", "0.52350247", "0.522945", "0.5224913", "0.5223933", "0.5197757", "0.51857245", "0.5179413", "0.51773876", "0.5164462", "0.51569426", "0.5155121", "0.5152242", "0.5149663", "0.51464546", "0.5141827", "0.51343644", "0.51301044", "0.51283747", "0.5112209", "0.5108263", "0.5103541", "0.50975466", "0.50906914", "0.50895745", "0.508724", "0.5081659", "0.50769997", "0.5062666", "0.50624776", "0.50620174", "0.50581664", "0.50504714", "0.50358963", "0.50354815", "0.5024942", "0.5021148", "0.50106287", "0.50052", "0.49964234", "0.49934855", "0.49756768", "0.49669033", "0.49662247", "0.49576718", "0.49531865", "0.4952464", "0.4951476", "0.4939778", "0.4937505", "0.49374488", "0.4933923", "0.4932951", "0.49320126", "0.49244854", "0.49209613", "0.49116442", "0.4906587", "0.48929122", "0.48924875" ]
0.64588296
1
build QueryManager for lsmEngine
public <R extends IQueryRequest> LSMEngineBuilder<T> buildQueryManager( QueryManager<T, R> queryManager) { lsmEngine.setQueryManager(queryManager); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public <R extends IQueryRequest> LSMEngineBuilder<T> buildQueryManager(\n LevelProcessorChain<T, R, QueryRequestContext> levelProcessChain) {\n QueryManager<T, R> queryManager = new QueryManager<>();\n queryManager.setLevelProcessorsChain(levelProcessChain);\n buildQueryManager(queryManager);\n return this;\n }", "private RunQueriesEx setupQueries() {\n RunQueriesEx queries = new RunQueriesEx();\n \n //for each column in our table, update one of our lists\n for(int i = 0; i < this.dataTable.getColumnCount(); i++) {\n this.updateList(i);\n }\n \n updateEmptyLists(); //pads any lists that didn't get updates with empty strings\n \n //add a new query for each row in the table\n for(int i = 0; i < this.dataTable.getRowCount(); i++) {\n queries.add(this.createQueryFromRow(i));\n }\n \n return queries;\n }", "public interface SearchQuerySet extends QuerySet\n{\n\n // for AbstractSearch\n public static final int STAT_MODELS = 1;\n public static final int STAT_CLUSTERS = 2;\n public static final int STAT_GENOMES = 4;\n public static final int STAT_MODEL_CLUSTERS = 8;\n\n public String getStatsById(Collection data);\n public String getStatsByQuery(String query);\n public String getStatsById(Collection data,int stats);\n public String getStatsByQuery(String query,int stats);\n \n // for BlastSearch\n public String getBlastSearchQuery(Collection dbNames, Collection keys, KeyTypeUser.KeyType keyType);\n \n //for ClusterIDSearch\n public String getClusterIDSearchQuery(Collection input, int limit, int[] DBs, KeyTypeUser.KeyType keyType);\n \n // for ClusterNameSearch\n public String getClusterNameSearchQuery(Collection input, int limit, int[] DBs, KeyTypeUser.KeyType keyType);\n \n // for DescriptionSearch\n public String getDescriptionSearchQuery(Collection input, int limit, int[] DBs, KeyTypeUser.KeyType keyType);\n \n // for GoSearch \n public String getGoSearchQuery(Collection input, int limit, KeyTypeUser.KeyType keyType);\n \n // for GoTextSearch\n public String getGoTextSearchQuery(Collection input, int limit, KeyTypeUser.KeyType keyType);\n \n // for IdSearch\n public String getIdSearchQuery(Collection input, int limit, int[] DBs, KeyTypeUser.KeyType keyType);\n \n // for QueryCompSearch\n public String getQueryCompSearchQuery(String comp_id, String status, KeyTypeUser.KeyType keyType);\n \n // for QuerySearch\n public String getQuerySearchQuery(String queries_id, KeyTypeUser.KeyType keyType); \n \n // for SeqModelSearch\n public String getSeqModelSearchQuery(Collection model_ids, KeyTypeUser.KeyType keyType);\n \n // for UnknowclusterIdSearch\n public String getUnknownClusterIdSearchQuery(int cluster_id, KeyTypeUser.KeyType keyType);\n \n // for ProbeSetSearch\n public String getProbeSetSearchQuery(Collection input, int limit, KeyTypeUser.KeyType keyType);\n \n // for ProbeSetKeySearch\n public String getProbeSetKeySearchQuery(Collection input, int limit, KeyTypeUser.KeyType keyType);\n \n // for QueryTestSearch\n public String getQueryTestSearchQuery(String query_id, String version, String genome_id);\n \n // for QueryStatsSearch\n public String getQueryStatsSearchQuery(List query_ids,List DBs);\n \n // for PskClusterSearch\n public String getPskClusterSearchQuery(int cluster_id,KeyTypeUser.KeyType keyType);\n \n // for ClusterCorrSearch\n public String getClusterCorrSearchQuery(int cluster_id, int psk_id, KeyTypeUser.KeyType keyType);\n \n // for UnknownGenesSearch\n public String getUnknownGenesSearchQuery(Collection sources, KeyTypeUser.KeyType keyType);\n \n}", "public abstract String createQuery();", "public abstract DatabaseQuery createDatabaseQuery(ParseTreeContext context);", "public Query createQuery() {\n\n String queryString = getQueryString();\n\n if (debug == true) {\n logger.info( \"Query String: {0}\", queryString);\n logger.info( \"Parameters: Max Results: {0}, First result: {1}, Order By: {2}, Restrictions: {3}, Joins: {4}\", new Object[]{maxResults, firstResult, orderBy, normalizedRestrictions, joins});\n }\n\n Query query = entityManager.createQuery(queryString);\n\n List<QueryParameter> parameters = getQueryParameters();\n for (QueryParameter parameter : parameters) {\n //dates (Date and Calendar)\n if (parameter.getTemporalType() != null && (parameter.getValue() instanceof Date || parameter.getValue() instanceof Calendar)) {\n if (parameter.getValue() instanceof Date) {\n if (parameter.getPosition() != null) {\n query.setParameter(parameter.getPosition(), (Date) parameter.getValue(), parameter.getTemporalType());\n } else {\n if (parameter.getProperty() != null) {\n query.setParameter(parameter.getProperty(), (Date) parameter.getValue(), parameter.getTemporalType());\n }\n }\n } else if (parameter.getValue() instanceof Calendar) {\n if (parameter.getPosition() != null) {\n query.setParameter(parameter.getPosition(), (Calendar) parameter.getValue(), parameter.getTemporalType());\n } else {\n if (parameter.getProperty() != null) {\n query.setParameter(parameter.getProperty(), (Calendar) parameter.getValue(), parameter.getTemporalType());\n }\n }\n }\n } else {\n if (parameter.getPosition() != null) {\n query.setParameter(parameter.getPosition(), parameter.getValue());\n } else {\n if (parameter.getProperty() != null) {\n query.setParameter(parameter.getProperty(), parameter.getValue());\n }\n }\n }\n }\n\n if (maxResults != null) {\n query.setMaxResults(maxResults);\n }\n if (firstResult != null) {\n query.setFirstResult(firstResult);\n }\n return query;\n }", "protected JPAQuery<T> createQuery() {\n\t\tJPAQuery<T> query = new JPAQuery<>(entityManager);\n\t\tquery.from(getDslRoot());\n\t\treturn query;\n\t}", "Query query();", "public abstract List createQuery(String query);", "public void testUsingQueriesFromQueryManger(){\n\t\tSet<String> names = testDataMap.keySet();\n\t\tUtils.prtObMess(this.getClass(), \"atm query\");\n\t\tDseInputQuery<BigDecimal> atmq = \n\t\t\t\tqm.getQuery(new AtmDiot());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> bdResult = \n\t\t\t\tatmq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(bdResult);\n\n\t\tUtils.prtObMess(this.getClass(), \"vol query\");\n\t\tDseInputQuery<BigDecimal> volq = \n\t\t\t\tqm.getQuery(new VolDiotForTest());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> dbResult = \n\t\t\t\tvolq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(dbResult);\n\t\n\t\tUtils.prtObMess(this.getClass(), \"integer query\");\n\t\tDseInputQuery<BigDecimal> strikeq = \n\t\t\t\tqm.getQuery(new StrikeDiotForTest());\n\t\tMap<String, ComplexQueryResult<BigDecimal>> strikeResult = \n\t\t\t\tstrikeq.get(names, 1, TimeUnit.SECONDS);\n\t\tCollectionsStaticMethods.prtMapItems(strikeResult);\n\t\n\t}", "private Queries() {\n // prevent instantiation\n }", "public abstract DbQuery getQuery(String queryName);", "public QueryCore buildQuery() throws SQLException\n {\n if(l != null)\n {\n for(int i=0;i<l.size();i++)\n {\n prepStm.setObject(i+1,l.get(i));\n }\n }\n return this;\n }", "private DbQuery() {}", "public QueryHandler ensureQueryHandler(XmlElement xmlConfig, XmlElement xmlQuery, long lBatch)\n {\n QueryHandler qh = m_queryHandler;\n if (qh == null)\n {\n qh = new JMXQueryHandler();\n qh.setContext(xmlQuery, xmlConfig);\n m_queryHandler = qh;\n }\n\n ((JMXQueryHandler)qh).setBatch(lBatch);\n\n return qh;\n }", "public abstract Query<T> setQuery(String oql);", "public QueryExecutorMDB() {\n\t}", "@Override\n\tpublic TypedQuery<Plan> constructQuery(Map<String, String> customQuery) {\n\t\tCriteriaBuilder cb = null;\n\t\ttry {\n\t\t\tcb = em.getCriteriaBuilder();\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tCriteriaQuery<Plan> cq = cb.createQuery(Plan.class);\n\t\tRoot<Plan> plan = cq.from(Plan.class);\n\t\tPredicate existingpredicate = null;\n\t\tint predicateCount=0;\n\t\tPredicate masterPredicate=null;\n\n\t\ttry {\n\n\t\t\tfor (Map.Entry<String,String> entry : customQuery.entrySet()) \n\t\t\t{\n\t\t\t\tif(plan.get(entry.getKey().toString()) != null)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t//Query for range values with comma(,) as delimiter\n\t\t\t\t\tif(entry.getValue().contains(\",\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tint minRange=Integer.parseInt(customQuery.get(entry.getKey().toString()).split(\",\")[0]);\n\t\t\t\t\t\tint maxRange=Integer.parseInt(customQuery.get(entry.getKey().toString()).split(\",\")[1]);\n\t\t\t\t\t\tif(predicateCount==0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmasterPredicate = cb.between(plan.get(entry.getKey().toString()),minRange, maxRange );\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\texistingpredicate = cb.between(plan.get(entry.getKey().toString()),minRange, maxRange );\n\t\t\t\t\t\t\tmasterPredicate=cb.and(masterPredicate,existingpredicate);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tpredicateCount++;\n\t\t\t\t\t}\n\t\t\t\t\t//Query for equals values\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(predicateCount==0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmasterPredicate = cb.equal(plan.get(entry.getKey().toString()), customQuery.get(entry.getKey().toString()));\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\texistingpredicate = cb.equal(plan.get(entry.getKey().toString()), customQuery.get(entry.getKey().toString()));\n\t\t\t\t\t\t\tmasterPredicate=cb.and(masterPredicate,existingpredicate);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tpredicateCount++;\n\t\t\t\t\t\t//cq.where(predicate);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tcq.where(masterPredicate);\n\t\tTypedQuery<Plan> query = em.createQuery(cq);\n\t\treturn query;\n\t}", "CampusSearchQuery generateQuery();", "List<JModuleInfo> queryAll();", "private void addQueries(String query){\n ArrayList <String> idsFullSet = new ArrayList <String>(searchIDs);\n while(idsFullSet.size() > 0){\n ArrayList <String> idsSmallSet = new ArrayList <String>(); \n if(debugMode) {\n System.out.println(\"\\t Pmids not used in query available : \" + idsFullSet.size());\n }\n idsSmallSet.addAll(idsFullSet.subList(0,Math.min(getSearchIdsLimit(), idsFullSet.size())));\n idsFullSet.removeAll(idsSmallSet);\n String idsConstrain =\"\";\n idsConstrain = idsConstrain(idsSmallSet);\n addQuery(query,idsConstrain);\n }\n }", "public static QueryInterface createQuery() {\n return new XmlQuery();\n }", "@Override\n\tpublic Query createQuery(String qlString) {\n\t\treturn null;\n\t}", "Query createQuery(final String query);", "public Query() {\n initComponents();\n }", "public QueryCore setup(String query, List<Object> l,Connection c) throws SQLException\n {\n loadQuery(query,l).init(c);\n return this;\n }", "public QueryRegistry() {\r\n }", "public interface GafisNormalqueryQueryqueService {\n void sendQuery(QueryQueueVO queryQueueVO);\n int getErrorMsgCount();\n Vector<String> getProcessMessage();\n Vector<String> getProcessErrorMessage();\n void setClearCollect();\n\n String getMatchResult(QueryQueueVO queryQueueVO);\n\n List<String> getValidSuccessList(List<String> keysList, QueryQueueVO queryQueueVO);\n\n GafisDakuQueryqueEntity getGafisDakuQueryqueEntity(String pkId);\n\n /**\n * 获取所有比对队列\n * @return\n */\n List<GafisDakuQueryqueEntity> getQueryqueue();\n\n /**\n * 分页获取所有比对队列\n * @return\n */\n Page<GafisDakuQueryqueEntity> getPageQueryqueue(int page, int size);\n\n /**\n * 获取未完成比对队列\n * @return\n */\n List<GafisDakuQueryqueEntity> getQueryqueueNotMatched();\n\n /**\n * 队列任务是否全部比对完成\n */\n void queryMatchFinish(GafisDakuQueryqueEntity queryqueEntity);\n\n void modifyQueryCandListDirByPkId(String queryCandListDir, String pkId);\n\n AnalyzeVO getAnalyzeResult(List<String> truePairList, String pkid);\n}", "static public void register () { QueryEngineRegistry.addFactory( factory ); }", "public Query() {\n\n// oriToRwt = new HashMap();\n// oriToRwt.put(); // TODO\n }", "public void newQuery(String query){\n\t\tparser = new Parser(query);\n\t\tQueryClass parsedQuery = parser.createQueryClass();\n\t\tqueryList.add(parsedQuery);\n\t\t\n\t\tparsedQuery.matchFpcRegister((TreeRegistry)ps.getRegistry());\n\t\tparsedQuery.matchAggregatorRegister();\n\t\t\n\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n \tpublic <T> QueryImpl<T> createTypedQuery(EntityManagerImpl entityManager) {\n \t\tif (this.lastUsed != Long.MAX_VALUE) {\n \t\t\tthis.lastUsed = System.currentTimeMillis();\n \t\t}\n \n \t\tfinal QueryImpl<T> typedQuery = new QueryImpl<T>((BaseQuery<T>) this.q, entityManager);\n \n \t\tif (this.lockMode != null) {\n \t\t\ttypedQuery.setLockMode(this.lockMode);\n \t\t}\n \n \t\tif (this.hints != null) {\n \t\t\tfor (final Entry<String, Object> entry : this.hints.entrySet()) {\n \t\t\t\ttypedQuery.setHint(entry.getKey(), entry.getValue());\n \t\t\t}\n \t\t}\n \n \t\treturn typedQuery;\n \t}", "java.util.List<WorldUps.UQuery> \n getQueriesList();", "@Override\n public void constructQuery() {\n try {\n super.constructQuery();\n sqlQueryBuilder.append(Constants.QUERY_SELECT);\n appendColumnName();\n appendPrimaryTableName();\n appendConditions(getJoinType());\n appendClause(joinQueryInputs.clauses, true);\n sqlQueryBuilder.append(Constants.SEMI_COLON);\n queryDisplayListener.displayConstructedQuery(sqlQueryBuilder.toString());\n } catch (NoSuchClauseFoundException noSuchClauseFoundException) {\n queryDisplayListener.showException(noSuchClauseFoundException.getExceptionMessage());\n }\n }", "@Override\n\tpublic <T> TypedQuery<T> createQuery(String qlString, Class<T> resultClass) {\n\t\treturn null;\n\t}", "public QueryExecution createQueryExecution(Query qry);", "public Query<T, R> build() {\n // if criteria.size == 0, rootCriterion = null\n Criterion rootCriterion = null;\n if (criteria.size() == 1) {\n rootCriterion = criteria.get(0);\n } else if (criteria.size() > 1) {\n rootCriterion = Restrictions.and(criteria\n .toArray(new Criterion[criteria.size()]));\n }\n return new QueryImpl<T, R>(entityClass, returnType, rootCriterion,\n orderings, maxResults, returnFields);\n }", "public SUMOQueryParser(SUMOQueryParserTokenManager tm) {\n token_source = tm;\n token = new Token();\n jj_ntk = -1;\n jj_gen = 0;\n for (int i = 0; i < 11; i++) jj_la1[i] = -1;\n for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();\n }", "void runQueries();", "public abstract List createNativeSQLQuery(String query);", "public QueryParser(QueryParserTokenManager tm) {\n token_source = tm;\n token = new Token();\n jj_ntk = -1;\n jj_gen = 0;\n for (int i = 0; i < 117; i++) jj_la1[i] = -1;\n for (int i = 0; i < jj_2_rtns.length; i++) jj_2_rtns[i] = new JJCalls();\n }", "public interface BaseQueryBuilder {\n\n /**\n * \n * 查询构建完成\n * \n * @return {@link EsdslBuilder}\n * @since JDK 1.8\n */\n EsdslBuilder queryDone();\n}", "SQLQuery createSQLQuery(final String query);", "GroupQuery createQuery();", "public LSMEngine<T> build() {\n return lsmEngine;\n }", "public QueryCore(String query,List<Object> l)\n {\n this.query = query;\n this.l = l;\n }", "public Query() {\r\n }", "public QueryCore(String query)\n {\n this.query = query;\n }", "private void montaQuery(Publicacao object, Query q) {\t\t\n\t}", "protected abstract void onQueryStart();", "public void createQuery(String s) throws HibException;", "public WorldUps.UQuery.Builder addQueriesBuilder() {\n return getQueriesFieldBuilder().addBuilder(\n WorldUps.UQuery.getDefaultInstance());\n }", "SelectQuery createSelectQuery();", "QueryType createQueryType();", "WorldUps.UQuery getQueries(int index);", "public void Query() {\n }", "public abstract <T> List<? extends T> createQuery(String query, Class<T> type, int firstResult, int maxResult);", "private void queryList (String query) {\n\t\tmemoListAdapter.query(query);\n\t}", "public interface SettingsEventQuery {\r\n public static final String[] COLUMNS = {\"keyField\", \"keyValue\"};\r\n public static final String CREATE_TABLE = (\"CREATE TABLE IF NOT EXISTS Settings(\" + COLUMNS[0] + \" TEXT, \" + COLUMNS[1] + \" TEXT )\");\r\n public static final String DROP_TABLE = \"DROP TABLE IF EXISTS Settings\";\r\n public static final int KEY_FIELD = 0;\r\n public static final int KEY_VALUE = 1;\r\n public static final String TABLE = \"Settings\";\r\n }", "public Query createQuery(String hql, Object... params) ;", "public interface MySQLDBQuery {\n\n\tString QUERY_ADD_SLOT = \"insert into slot (s_size) values (?)\";\n\tString QUERY_FIND_SLOT = \"select s_id, s_size, s_covered from slot where s_size = ? and s_covered = ? and s_id not in (select s_id from slot_has_vehicle) limit 1\";\n\tString QUERY_GET_SLOT_STATISTICS = \"select count(1) as all_slot, (select count(1) from slot where s_covered > 0) as reserve_slot from slot\";\n\tString QUERY_GET_FIND_A_SLOT = \"select s_id, s_size, s_covered from slot where s_id = ?\";\n\tString QUERY_FREE_SLOT_RESERVATION = \"update slot_has_vehicle set sl_end = now() where sl_id = ?\";\n\tString QUERY_OCCUPY_A_SLOT = \"insert into slot_has_vehicle (s_id, v_id) values (?,?)\";\n\tString QUERY_GET_SLOT_RESERVATION_BY_ID = \"select sl_id, s_id, v_id, sl_start, sl_end from slot_has_vehicle where sl_id = ?\";\n\tString QUERY_FIND_SLOT_OCCUPIED_BY_VEHICLE = \"select sl_id, s_id, v_id, sl_start, sl_end from slot_has_vehicle where v_id = (select v_id from vehicle where v_reg_num = ?) and sl_end IS NULL\";\n\tString QUERY_GET_VEHICLE_BY_REG_NUMBER = \"select v_id, v_reg_num, v_type from vehicle where v_reg_num=?\";\n\tString QUERY_CREATE_A_VEHICLE = \"insert into vehicle (v_reg_num, v_type) values (?,?)\";\n\tString QUERY_DELETE_SLOT_RESERVATION = \"delete from slot_has_vehicle where sl_id=?\";\n}", "public Queries loadQueries() {\r\n\t\tQueries queries = null;\r\n\t try {\r\n queries = Queries.unmarshalAsQueries();\r\n\t } catch (Exception e) {\r\n\t e.printStackTrace();\r\n\t }\r\n\t return queries;\r\n\t}", "public N_TIME_BEAR01MQuery() {\n\t\tsuper();\n\n\t\t// Add design-time configured components.\n\t\tinitComponents();\n\t\tEmpsn_DscField.addActionListener(new ActionListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tdoQuery();\n\t\t\t}\n\t\t});\n\t}", "IQuery getQuery();", "public JpqlQuery(EntityManagerFactoryImpl entityManagerFactory, CriteriaBuilderImpl cb, NamedQueryMetadata metadata) {\n \t\tthis(entityManagerFactory, metadata.getQuery(), cb);\n \n \t\tthis.lastUsed = Long.MAX_VALUE;\n \n \t\t// force sql compilation\n \t\tthis.q.getSql();\n \n \t\tthis.lockMode = metadata.getLockMode();\n \t\tif (metadata.getHints().size() > 0) {\n \t\t\tthis.hints = Maps.newHashMap();\n \t\t\tthis.hints.putAll(metadata.getHints());\n \t\t}\n \n \t\tentityManagerFactory.addNamedQuery(metadata.getName(), this);\n \t}", "public Query(){\n this(new MongoQueryFilter.MongoQueryFilterBuilder());\n }", "private MetaSparqlRequest createQueryMT2() {\n\t\treturn createQueryMT1();\n\t}", "private BaseQueryImpl<?> construct(CriteriaBuilderImpl cb, CommonTree tree) {\n \t\tfinal Tree type = tree.getChild(0);\n \t\tif (type.getType() == JpqlParser.SELECT) {\n \t\t\treturn this.constructSelectQuery(cb, tree);\n \t\t}\n \t\telse if (type.getType() == JpqlParser.DELETE) {\n \t\t\treturn this.constructDeleteQuery(cb, tree);\n \t\t}\n \t\telse {\n \t\t\treturn this.constructUpdateQuery(cb, tree);\n \t\t}\n \t}", "private Query getQuery(String index, String type, String query){\r\n\t\tSearchQuery esQuery = new SearchQuery();\r\n\t\tesQuery.setIndex(this.indexName);\r\n\t\t\r\n\t\tif(StringUtils.isNotEmpty(type))\r\n\t\t\tesQuery.setType(type);\r\n\t\t\r\n\t\tesQuery.setQuery(query);\r\n\t\t\r\n\t\treturn esQuery;\t\t\r\n\t}", "public interface Query {\n\n\t/**\n\t * @return ID of the given query\n\t */\n\tint queryID();\n\t\n\t/**\n\t * @return given query\n\t */\n\tString query();\n\t\n\t/**\n\t * @return list of relevant documents to the corresponding query\n\t */\n\tList<RelevanceInfo> listOfRelevantDocuments();\n\t\n\t/**\n\t * @return list of results to the corresponding query after running one of the retrieval models\n\t */\n\tList<Result> resultList();\n\t\n\t/**\n\t * @param resultList\n\t * @Effects adds results to the result list of the corresponding query\n\t */\n\tvoid putResultList(List<Result> resultList);\n}", "private LSMEngineBuilder<T> buildLevelProcessors(ApplicationContext applicationContext) {\n LevelProcessorChain<T, IInsertionRequest, InsertRequestContext> insertionLevelProcessChain =\n generateLevelProcessorsChain(applicationContext.getInsertionLevelProcessClass());\n LevelProcessorChain<T, IDeletionRequest, DeleteRequestContext> deletionLevelProcessChain =\n generateLevelProcessorsChain(applicationContext.getDeletionLevelProcessClass());\n LevelProcessorChain<T, IQueryRequest, QueryRequestContext> queryLevelProcessChain =\n generateLevelProcessorsChain(applicationContext.getQueryLevelProcessClass());\n return buildQueryManager(queryLevelProcessChain)\n .buildInsertionManager(insertionLevelProcessChain)\n .buildDeletionManager(deletionLevelProcessChain);\n }", "public QueryExecution createQueryExecution(String qryStr);", "private ASTQuery() {\r\n dataset = Dataset.create();\r\n }", "@Override\n protected Map<String, String> initializeCommonQueries() {\n Map<String, String> commonQueries = new HashMap<>();\n\n commonQueries.put(SELECT_ALL_QUERY_KEY, SELECT_ALL_QUERY);\n commonQueries.put(SELECT_BY_ID_QUERY_KEY, SELECT_BY_ID_QUERY);\n commonQueries.put(DELETE_BY_ID_QUERY_KEY, DELETE_BY_ID_QUERY);\n commonQueries.put(INSERT_ENTITY_QUERY_KEY, INSERT_ENTITY_QUERY);\n commonQueries.put(UPDATE_ENTITY_QUERY_KEY, UPDATE_ENTITY_QUERY);\n\n return commonQueries;\n }", "private RealmQuery buildRealmQuery(Realm realm, Class myClass) {\n RealmQuery query = RealmQuery.createQuery(realm, myClass);\n return query;\n }", "private SearchRequestBuilder createSearchBuilder(StoreURL storeURL, EsQuery esQuery) {\n SearchRequestBuilder searchBuilder = this.getClient(storeURL)\n .prepareSearch(esQuery.getGraph())\n .setQuery(RootBuilder.get(esQuery))\n .setFetchSource(true)\n .setFrom(esQuery.getPageNo())\n .setSize(esQuery.getPageSize());\n if(CollectionUtils.isNotEmpty(esQuery.getSchemas())){\n searchBuilder.setTypes(esQuery.getSchemas().toArray(new String[]{}));\n }\n this.addAggregations(esQuery, searchBuilder); // aggregation\n this.addSortFields(esQuery, searchBuilder); // sort\n this.addHighlightFields(esQuery, searchBuilder); // highlight\n return searchBuilder;\n }", "public static void main (String[] args) {\n EntityQuery query = new EntityQuery();\n Harvestable res = new OaiPmhResource();\n query.setFilter(\"test\", res);\n query.setAcl(\"diku\");\n query.setStartsWith(\"cf\",\"name\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"a\"));\n query.setQuery(\"(usedBy=library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"x\"));\n\n query = new EntityQuery();\n query.setQuery(\"(usedBy=library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"b\"));\n query.setQuery(\"usedBy=*library\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"c\"));\n query.setQuery(\"(=library\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"d\"));\n query.setQuery(\"usedBy=\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"e\"));\n query.setQuery(\"(usedBy!=library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"f\"));\n query.setQuery(\"(usedBy==library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"g\"));\n query.setQuery(\"(usedBy===library)\");\n System.out.println(query.asUrlParameters());\n System.out.println(query.asWhereClause(\"h\"));\n }", "protected void initQueryFromNamedDefinition(Query query, NamedQueryDefinition nqd) {\n\t\tquery.setCacheable( nqd.isCacheable() );\n\t\tquery.setCacheRegion( nqd.getCacheRegion() );\n\t\tquery.setReadOnly( nqd.isReadOnly() );\n\n\t\tif ( nqd.getTimeout() != null ) {\n\t\t\tquery.setTimeout( nqd.getTimeout() );\n\t\t}\n\t\tif ( nqd.getFetchSize() != null ) {\n\t\t\tquery.setFetchSize( nqd.getFetchSize() );\n\t\t}\n\t\tif ( nqd.getCacheMode() != null ) {\n\t\t\tquery.setCacheMode( nqd.getCacheMode() );\n\t\t}\n\t\tif ( nqd.getComment() != null ) {\n\t\t\tquery.setComment( nqd.getComment() );\n\t\t}\n\t\tif ( nqd.getFirstResult() != null ) {\n\t\t\tquery.setFirstResult( nqd.getFirstResult() );\n\t\t}\n\t\tif ( nqd.getMaxResults() != null ) {\n\t\t\tquery.setMaxResults( nqd.getMaxResults() );\n\t\t}\n\t\tif ( nqd.getFlushMode() != null ) {\n\t\t\tquery.setHibernateFlushMode( nqd.getFlushMode() );\n\t\t}\n\t}", "public QueryBuilder()\n {\n\tlabel = null;\n\tqueryCondition = null;\n\tselectionLimiter = null;\n\tselectionSorter = null;\n\n\tvariablesMap = new HashMap<String, Expression>();\n\tselectionLabelsReferencedByStats = new HashSet<String>();\n }", "MessageQuery createMessageQuery();", "private MetaSparqlRequest createQueryMT3() {\n\t\t\treturn createQueryMT1();\n\t\t}", "private static void executeQuery4(PersistenceManager pm) {\n Query query = pm.newQuery(Category.class);\n query.declareParameters(\"int length\");\n query.declareVariables(\"Item item\");\n query.setFilter(\n \"elements.contains(item) && item.name.length() <= length\");\n Collection results = (Collection)query.execute(new Integer(10));\n printCollection(\"Categories containing an item with a short name: \",\n results.iterator());\n query.closeAll();\n }", "public ProductIndexQuery() {\n\t}", "public DydraQueryEngine(@NotNull final Repository repository,\n @NotNull final Query query) {\n this(repository.name, query.toString());\n }", "public interface IQueryResolver {\n List<Field> equalCondition = new ArrayList();\n List<Field> greaterEqualCondition = new ArrayList();\n List<Field> lesserEqualCondition = new ArrayList();\n\n String getTableName();\n}", "protected static IQueryExecutor getMultiClassQueryExecutor(IQuery query, IStorageEngine engine, IInstanceBuilder instanceBuilder) {\r\n\r\n\t\tif (CriteriaQuery.class == query.getClass()) {\r\n\t\t\treturn new MultiClassGenericQueryExecutor(new CriteriaQueryExecutor(query, engine));\r\n\t\t}\r\n\t\tif (ValuesCriteriaQuery.class == query.getClass()) {\r\n\t\t\treturn new MultiClassGenericQueryExecutor(new ValuesCriteriaQueryExecutor(query, engine));\r\n\t\t}\r\n\r\n\t\tif (NativeQuery.class.isAssignableFrom(query.getClass())) {\r\n\t\t\treturn new MultiClassGenericQueryExecutor(new NativeQueryExecutor(query, engine, instanceBuilder));\r\n\t\t}\r\n\r\n\t\tif (SimpleNativeQuery.class.isAssignableFrom(query.getClass())) {\r\n\t\t\treturn new MultiClassGenericQueryExecutor(new NativeQueryExecutor(query, engine, instanceBuilder));\r\n\t\t}\r\n\r\n\t\tthrow new ODBRuntimeException(NeoDatisError.QUERY_TYPE_NOT_IMPLEMENTED.addParameter(query.getClass().getName()));\r\n\t}", "public void start() {\n \n for (Object obj: bufferedQueries) {\n \n switch(obj.getClass().getName()) {\n case \"uzh.tomdb.db.operations.Insert\":\n if (inserts == null) {\n inserts = new ArrayList<>();\n }\n inserts.add((Insert) obj);\n break;\n case \"uzh.tomdb.db.operations.CreateTable\":\n if (creates == null) {\n creates = new ArrayList<>();\n }\n creates.add((CreateTable) obj);\n break;\n case \"uzh.tomdb.db.operations.Update\":\n if (updates == null) {\n updates = new ArrayList<>();\n }\n updates.add((Update) obj);\n break;\n case \"uzh.tomdb.db.operations.Delete\":\n if (deletes == null) {\n deletes = new ArrayList<>();\n }\n deletes.add((Delete) obj);\n break;\n }\n }\n \n if (inserts != null) {\n inserts();\n }\n if (creates != null) {\n creates();\n }\n if (updates != null) {\n updates();\n }\n if (deletes != null) {\n deletes();\n }\n }", "public ResultSet CargarManager() {\n\n\t\trs = sendSelect(SELECT_SQL_MANAGER);\n\n\t\treturn rs;\n\n\t}", "public Query advancedQuery() \n {\n return null;\n }", "public DydraQueryEngine(@NotNull final String repositoryName,\n @NotNull final Query query) {\n this(repositoryName, query.toString());\n }", "public PseudoQuery() {\r\n\t}", "public void constructQuery(String query) {\n\t\tQuery q = QueryFactory.create(query);\n\t\tQueryExecution qe = QueryExecutionFactory.create(q, model);\n\t\tModel result = qe.execConstruct();\n\t\tprintModel(result);\n\t\tmodel.add(result);\n\t\tqe.close();\n\t}", "private void initializeQueryProperties() {\n defaultQueryProperties.put(\":allowed-rules\", makeCycSymbol(\n \":all\"));\n defaultQueryProperties.put(\":result-uniqueness\",\n makeCycSymbol(\":bindings\"));\n defaultQueryProperties.put(\":allow-hl-predicate-transformation?\", false);\n defaultQueryProperties.put(\":allow-unbound-predicate-transformation?\", false);\n defaultQueryProperties.put(\":allow-evaluatable-predicate-transformation?\", false);\n defaultQueryProperties.put(\":intermediate-step-validation-level\", makeCycSymbol(\":all\"));\n defaultQueryProperties.put(\":negation-by-failure?\", false);\n defaultQueryProperties.put(\":allow-indeterminate-results?\", true);\n defaultQueryProperties.put(\":allow-abnormality-checking?\", true);\n defaultQueryProperties.put(\":disjunction-free-el-vars-policy\",\n makeCycSymbol(\":compute-intersection\"));\n defaultQueryProperties.put(\":allowed-modules\", makeCycSymbol(\":all\"));\n defaultQueryProperties.put(\":completeness-minimization-allowed?\", true);\n defaultQueryProperties.put(\":direction\", makeCycSymbol(\":backward\"));\n defaultQueryProperties.put(\":equality-reasoning-method\", makeCycSymbol(\":czer-equal\"));\n defaultQueryProperties.put(\":equality-reasoning-domain\", makeCycSymbol(\":all\"));\n defaultQueryProperties.put(\":max-problem-count\", Long.valueOf(100000));\n defaultQueryProperties.put(\":transformation-allowed?\", false);\n defaultQueryProperties.put(\":add-restriction-layer-of-indirection?\", true);\n defaultQueryProperties.put(\":evaluate-subl-allowed?\", true);\n defaultQueryProperties.put(\":rewrite-allowed?\", false);\n defaultQueryProperties.put(\":abduction-allowed?\", false);\n defaultQueryProperties.put(\":removal-backtracking-productivity-limit\", Long.valueOf(2000000));\n // dynamic query properties\n defaultQueryProperties.put(\":max-number\", null);\n defaultQueryProperties.put(\":max-time\", 120);\n defaultQueryProperties.put(\":max-transformation-depth\", 0);\n defaultQueryProperties.put(\":block?\", false);\n defaultQueryProperties.put(\":max-proof-depth\", null);\n defaultQueryProperties.put(\":cache-inference-results?\", false);\n defaultQueryProperties.put(\":answer-language\", makeCycSymbol(\":el\"));\n defaultQueryProperties.put(\":continuable?\", false);\n defaultQueryProperties.put(\":browsable?\", false);\n defaultQueryProperties.put(\":productivity-limit\", Long.valueOf(2000000));\n\n final CycArrayList<CycSymbolImpl> queryPropertiesList = new CycArrayList(\n defaultQueryProperties.keySet());\n final String command = makeSublStmt(\"mapcar\", makeCycSymbol(\n \"query-property-p\"), queryPropertiesList);\n try {\n CycList results = getConverse().converseList(command);\n for (int i = 0, size = results.size(); i < size; i++) {\n if (results.get(i).equals(CycObjectFactory.nil)) {\n final String badProperty = queryPropertiesList.get(i).toCanonicalString();\n System.err.println(badProperty + \" is not a query-property-p\");\n defaultQueryProperties.remove(badProperty);\n }\n }\n } catch (Exception e) {\n System.err.println(e.getMessage());\n }\n queryPropertiesInitialized = true;\n }", "public List<Record> executeNativeFinder(String queryName, Object context);", "@SuppressWarnings(\"unchecked\")\n\tprivate CompoundQuery handleQuery() throws Exception{\n\t\tif (this.resultant != null && this.resultant.getResultsContainer() != null){\n\t\t\t//compoundQuery = (CompoundQuery) resultant.getAssociatedQuery();\n\t\t\tViewable view = newCompoundQuery.getAssociatedView();\n\t\t\tResultsContainer resultsContainer = this.resultant.getResultsContainer();\n\t\t\tsampleCrit = null;\n\t Collection sampleIDs = new ArrayList(); \n\t\t\t//Get the samples from the resultset object\n\t\t\tif(resultsContainer!= null){\n\t\t\t\tCollection samples = null;\n\t\t\t\tif(resultsContainer != null &&resultsContainer instanceof DimensionalViewContainer){\t\t\t\t\n\t\t\t\t\tDimensionalViewContainer dimensionalViewContainer = (DimensionalViewContainer)resultsContainer;\n\t\t\t\t\t\tCopyNumberSingleViewResultsContainer copyNumberSingleViewContainer = dimensionalViewContainer.getCopyNumberSingleViewContainer();\n\t\t\t\t\t\tGeneExprSingleViewResultsContainer geneExprSingleViewContainer = dimensionalViewContainer.getGeneExprSingleViewContainer();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(copyNumberSingleViewContainer!= null){\n\t\t\t\t\t\t\tSet<BioSpecimenIdentifierDE> biospecimenIDs = copyNumberSingleViewContainer.getAllBiospecimenLabels();\n\t\t\t\t \t\tfor (BioSpecimenIdentifierDE bioSpecimen: biospecimenIDs) {\n\t\t\t\t \t\t\tif(bioSpecimen.getSpecimenName()!= null){\n\t\t\t\t \t\t\t\tsampleIDs.add(new SampleIDDE(bioSpecimen.getSpecimenName()));\n\t\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\tif(geneExprSingleViewContainer!= null){\n\t\t\t\t\t\t\tSet<BioSpecimenIdentifierDE> biospecimenIDs = geneExprSingleViewContainer.getAllBiospecimenLabels();\n\t\t\t\t \t\tfor (BioSpecimenIdentifierDE bioSpecimen: biospecimenIDs) {\n\t\t\t\t \t\t\tif(bioSpecimen.getSpecimenName()!= null){\n\t\t\t\t \t\t\t\t\tsampleIDs.add(new SampleIDDE(bioSpecimen.getSpecimenName()));\n\t\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 \t\tsampleCrit = new SampleCriteria();\n\t\t \t\t\tsampleCrit.setSampleIDs(sampleIDs);\n\n AddConstrainsToQueriesHelper constrainedSamplesHandler= new AddConstrainsToQueriesHelper();\n constrainedSamplesHandler.constrainQueryWithSamples(newCompoundQuery,sampleCrit);\n\t\t\t\tnewCompoundQuery = getShowAllValuesQuery(newCompoundQuery);\n\t\t\t\tnewCompoundQuery.setAssociatedView(view);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn newCompoundQuery;\n\t\t}", "public StatementQueryMechanism(DatabaseQuery query) {\n super(query);\n }", "private static Boolean specialQueries(String query) throws ClassNotFoundException, InstantiationException, IllegalAccessException {\n clickList = false;\n //newCorpus = true;\n\n if (query.equals(\"q\")) {\n\n System.exit(0);\n return true;\n }\n\n String[] subqueries = query.split(\"\\\\s+\"); //split around white space\n\n if (subqueries[0].equals(\"stem\")) //first term in subqueries tells computer what to do \n {\n GUI.JListModel.clear();\n GUI.ResultsLabel.setText(\"\");\n TokenProcessor processor = new NewTokenProcessor();\n if (subqueries.length > 1) //user meant to stem the token not to search stem\n {\n List<String> stems = processor.processToken(subqueries[1]);\n\n //clears list and repopulates it \n String stem = \"Stem of query '\" + subqueries[1] + \"' is '\" + stems.get(0) + \"'\";\n\n GUI.ResultsLabel.setText(stem);\n\n return true;\n }\n\n } else if (subqueries[0].equals(\"vocab\")) {\n List<String> vocabList = Disk_posIndex.getVocabulary();\n GUI.JListModel.clear();\n GUI.ResultsLabel.setText(\"\");\n\n int vocabCount = 0;\n for (String v : vocabList) {\n if (vocabCount < 1000) {\n vocabCount++;\n GUI.JListModel.addElement(v);\n }\n }\n GUI.ResultsLabel.setText(\"Total size of vocabulary: \" + vocabCount);\n return true;\n }\n\n return false;\n }", "public void doBuild() throws TorqueException\n {\n dbMap = Torque.getDatabaseMap(\"cream\");\n\n dbMap.addTable(\"OPPORTUNITY\");\n TableMap tMap = dbMap.getTable(\"OPPORTUNITY\");\n\n tMap.setPrimaryKeyMethod(TableMap.NATIVE);\n\n\n tMap.addPrimaryKey(\"OPPORTUNITY.OPPORTUNITY_ID\", new Integer(0));\n tMap.addColumn(\"OPPORTUNITY.OPPORTUNITY_CODE\", \"\");\n tMap.addColumn(\"OPPORTUNITY.STATUS\", new Integer(0));\n tMap.addColumn(\"OPPORTUNITY.PRIORITY\", new Integer(0));\n tMap.addColumn(\"OPPORTUNITY.OPPORTUNITY_TYPE\", new Integer(0));\n tMap.addColumn(\"OPPORTUNITY.OPPORTUNITY_NAME\", \"\");\n tMap.addForeignKey(\n \"OPPORTUNITY.OPPORTUNITY_CAT_ID\", new Integer(0) , \"OPPORTUNITY_CATEGORY\" ,\n \"OPPORTUNITY_CAT_ID\");\n tMap.addForeignKey(\n \"OPPORTUNITY.LEAD_SOURCE_ID\", new Integer(0) , \"LEAD_SOURCE\" ,\n \"LEAD_SOURCE_ID\");\n tMap.addColumn(\"OPPORTUNITY.ISSUED_DATE\", new Date());\n tMap.addColumn(\"OPPORTUNITY.EXPECTED_DATE\", new Date());\n tMap.addColumn(\"OPPORTUNITY.CLOSED_DATE\", new Date());\n tMap.addForeignKey(\n \"OPPORTUNITY.CUSTOMER_ID\", new Integer(0) , \"CUSTOMER\" ,\n \"CUSTOMER_ID\");\n tMap.addForeignKey(\n \"OPPORTUNITY.PROJECT_ID\", new Integer(0) , \"PROJECT\" ,\n \"PROJECT_ID\");\n tMap.addForeignKey(\n \"OPPORTUNITY.CURRENCY_ID\", new Integer(0) , \"CURRENCY\" ,\n \"CURRENCY_ID\");\n tMap.addColumn(\"OPPORTUNITY.CURRENCY_AMOUNT\", new BigDecimal(0));\n tMap.addColumn(\"OPPORTUNITY.SALES_STAGE\", new Integer(0));\n tMap.addColumn(\"OPPORTUNITY.PROBABILITY\", new Integer(0));\n tMap.addColumn(\"OPPORTUNITY.SUBJECT\", \"\");\n tMap.addColumn(\"OPPORTUNITY.NEXT_STEPS\", \"\");\n tMap.addColumn(\"OPPORTUNITY.NOTES\", \"\");\n tMap.addColumn(\"OPPORTUNITY.CREATED\", new Date());\n tMap.addColumn(\"OPPORTUNITY.MODIFIED\", new Date());\n tMap.addColumn(\"OPPORTUNITY.CREATED_BY\", \"\");\n tMap.addColumn(\"OPPORTUNITY.MODIFIED_BY\", \"\");\n }", "ObstacleQuery createObstacleQuery();", "public String buildSearchQuery() throws Exception\r\n { \r\n String query;\r\n \r\n searchContext.setText(getSearchString());\r\n \r\n if(!locations.isEmpty())\r\n {\r\n searchContext.setLocations(locations);\r\n }\r\n\r\n if (ext != null) {\r\n for (AdvancedSearchOptions option : ext.getAdvOptionsExtensions()) {\r\n option.setSearchParam(searchContext);\r\n }\r\n }\r\n \r\n // we always want to exclude CAT ignore & hidden rendition aspects\r\n searchContext.setAspectToExclude(VeloConstants.ASPECT_IGNORE);\r\n searchContext.setAspectToExclude(VeloConstants.ASPECT_HIDDEN_RENDITION);\r\n\r\n // we always want to exclude thumbnail types\r\n searchContext.addTypeToExclude(VeloConstants.TYPE_THUMBNAIL);\r\n \r\n query = searchContext.buildQuery(2);\r\n logger.debug(\"AdvancedSearchQuery:\" + query);\r\n \r\n return query;\r\n \r\n }" ]
[ "0.645971", "0.5947771", "0.58259547", "0.57751405", "0.57528704", "0.57295525", "0.56963253", "0.56647736", "0.56505835", "0.5624607", "0.56170386", "0.5555922", "0.5523821", "0.5521257", "0.54863876", "0.54759234", "0.5449405", "0.5444679", "0.5427366", "0.54210794", "0.5407919", "0.5405827", "0.539731", "0.5395412", "0.5393853", "0.5387324", "0.5383996", "0.537521", "0.53685045", "0.53542465", "0.5342579", "0.532453", "0.5312576", "0.530238", "0.52855724", "0.52760834", "0.526407", "0.52632874", "0.52537555", "0.5244383", "0.52443624", "0.5237417", "0.5232959", "0.522857", "0.5221452", "0.5199979", "0.5188786", "0.51818705", "0.5181642", "0.51670444", "0.5159076", "0.51584804", "0.5157456", "0.51543474", "0.5148531", "0.51445234", "0.51378363", "0.51330674", "0.51301587", "0.51160544", "0.5109577", "0.51063263", "0.5099815", "0.50940716", "0.50927013", "0.50918376", "0.5085953", "0.5079918", "0.50657415", "0.50657123", "0.50609094", "0.5059209", "0.50528276", "0.5041213", "0.5039142", "0.50276256", "0.5022821", "0.50126874", "0.50094956", "0.49988523", "0.4997694", "0.49760917", "0.49695346", "0.4967257", "0.49604413", "0.49536434", "0.49527243", "0.49512184", "0.49438754", "0.49405357", "0.49399522", "0.49359924", "0.49347398", "0.49337944", "0.49266595", "0.49234733", "0.4912841", "0.49082172", "0.48959997", "0.48949695" ]
0.6916504
0
build RecoverManager for lsmEngine
public LSMEngineBuilder<T> buildRecoverManager() { RecoverManager<LSMEngine<T>> recoverManager = new RecoverManager<>(lsmEngine.getWalManager()); lsmEngine.setRecoverManager(recoverManager); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void prepareStoreMirror() {\n /*\n r0 = sStoreMirrorDir;\n if (r0 == 0) goto L_0x0005;\n L_0x0004:\n return;\n L_0x0005:\n r0 = com.duokan.reader.ReaderEnv.get();\n r1 = com.duokan.reader.ReaderEnv.PrivatePref.STORE;\n r2 = \"mirror_version\";\n r3 = \"\";\n r0 = r0.getPrefString(r1, r2, r3);\n r1 = android.text.TextUtils.isEmpty(r0);\n if (r1 != 0) goto L_0x00ab;\n L_0x0019:\n r0 = storeMirrorDirectory(r0);\n L_0x001d:\n r1 = new android.util.TypedValue;\t Catch:{ all -> 0x013a }\n r1.<init>();\t Catch:{ all -> 0x013a }\n r2 = com.duokan.reader.ReaderEnv.get();\t Catch:{ all -> 0x013a }\n r2 = r2.getResources();\t Catch:{ all -> 0x013a }\n r3 = com.duokan.p024c.C0257i.raw__shared__store_mirror;\t Catch:{ all -> 0x013a }\n r4 = 0;\n r2.getValue(r3, r1, r4);\t Catch:{ all -> 0x013a }\n r1 = r1.string;\t Catch:{ all -> 0x013a }\n r1 = r1.toString();\t Catch:{ all -> 0x013a }\n r2 = \"@\";\n r1 = r1.split(r2);\t Catch:{ all -> 0x013a }\n r2 = 1;\n r1 = r1[r2];\t Catch:{ all -> 0x013a }\n r2 = java.lang.Long.parseLong(r1);\t Catch:{ all -> 0x013a }\n r4 = 1000; // 0x3e8 float:1.401E-42 double:4.94E-321;\n r2 = r2 * r4;\n if (r0 == 0) goto L_0x0050;\n L_0x0048:\n r4 = r0.lastModified();\t Catch:{ all -> 0x013a }\n r1 = (r2 > r4 ? 1 : (r2 == r4 ? 0 : -1));\n if (r1 <= 0) goto L_0x00ae;\n L_0x0050:\n r1 = new java.io.File;\t Catch:{ all -> 0x013a }\n r0 = com.duokan.reader.ReaderEnv.get();\t Catch:{ all -> 0x013a }\n r0 = r0.getStoreCacheDirectory();\t Catch:{ all -> 0x013a }\n r4 = \"buildin-mirror.tmp\";\n r1.<init>(r0, r4);\t Catch:{ all -> 0x013a }\n r4 = new java.io.File;\t Catch:{ all -> 0x013a }\n r0 = \"store.arch\";\n r4.<init>(r1, r0);\t Catch:{ all -> 0x013a }\n com.duokan.core.io.C0336a.deleteFile(r1);\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n r1.mkdirs();\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n r5 = new java.io.FileOutputStream;\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n r5.<init>(r4);\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n r0 = com.duokan.reader.DkApp.get();\t Catch:{ all -> 0x00e6 }\n r6 = com.duokan.p024c.C0257i.raw__shared__store_mirror;\t Catch:{ all -> 0x00e6 }\n com.duokan.reader.DkPublic.extractRawResource(r0, r5, r6);\t Catch:{ all -> 0x00e6 }\n r5.flush();\t Catch:{ Throwable -> 0x014b, all -> 0x0141 }\n r5.close();\t Catch:{ Throwable -> 0x014b, all -> 0x0141 }\n L_0x0080:\n r0 = r4.getAbsolutePath();\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n r5 = r1.getAbsolutePath();\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n com.duokan.lib.archive.DkarchLib.extract(r0, r5);\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n r0 = new java.io.File;\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n r5 = \"cache.appcache\";\n r0.<init>(r1, r5);\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n r5 = \"md5\";\n r0 = com.duokan.core.sys.C0366o.m1028a(r0, r5);\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n r5 = android.text.TextUtils.isEmpty(r0);\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n if (r5 == 0) goto L_0x00fc;\n L_0x009e:\n com.duokan.core.io.C0336a.deleteFile(r4);\t Catch:{ all -> 0x013a }\n com.duokan.core.io.C0336a.deleteFile(r1);\t Catch:{ all -> 0x013a }\n r0 = sStoreMirrorReady;\n r0.countDown();\n goto L_0x0004;\n L_0x00ab:\n r0 = 0;\n goto L_0x001d;\n L_0x00ae:\n r1 = new java.io.File;\t Catch:{ all -> 0x013a }\n r4 = \"index.html\";\n r1.<init>(r0, r4);\t Catch:{ all -> 0x013a }\n r4 = \"utf-8\";\n r4 = com.duokan.core.io.C0336a.m769a(r1, r4);\t Catch:{ all -> 0x013a }\n if (r4 == 0) goto L_0x0050;\n L_0x00bd:\n r1 = r4.readLine();\t Catch:{ Throwable -> 0x00dd }\n L_0x00c1:\n r5 = android.text.TextUtils.isEmpty(r1);\t Catch:{ Throwable -> 0x00dd }\n if (r5 != 0) goto L_0x0050;\n L_0x00c7:\n r5 = \"duokan-version\";\n r1 = r1.contains(r5);\t Catch:{ Throwable -> 0x00dd }\n if (r1 == 0) goto L_0x00d8;\n L_0x00cf:\n sStoreMirrorDir = r0;\t Catch:{ Throwable -> 0x00dd }\n r0 = sStoreMirrorReady;\n r0.countDown();\n goto L_0x0004;\n L_0x00d8:\n r1 = r4.readLine();\t Catch:{ Throwable -> 0x00dd }\n goto L_0x00c1;\n L_0x00dd:\n r0 = move-exception;\n r4.close();\t Catch:{ Throwable -> 0x00e3 }\n goto L_0x0050;\n L_0x00e3:\n r0 = move-exception;\n goto L_0x0050;\n L_0x00e6:\n r0 = move-exception;\n r5.flush();\t Catch:{ Throwable -> 0x0149, all -> 0x0141 }\n r5.close();\t Catch:{ Throwable -> 0x0149, all -> 0x0141 }\n L_0x00ed:\n throw r0;\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n L_0x00ee:\n r0 = move-exception;\n com.duokan.core.io.C0336a.deleteFile(r4);\t Catch:{ all -> 0x013a }\n com.duokan.core.io.C0336a.deleteFile(r1);\t Catch:{ all -> 0x013a }\n L_0x00f5:\n r0 = sStoreMirrorReady;\n r0.countDown();\n goto L_0x0004;\n L_0x00fc:\n r5 = storeMirrorDirectory(r0);\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n com.duokan.core.io.C0336a.deleteFile(r5);\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n r6 = r1.renameTo(r5);\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n if (r6 == 0) goto L_0x0133;\n L_0x0109:\n r5.setLastModified(r2);\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n sStoreMirrorDir = r5;\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n r2 = com.duokan.reader.ReaderEnv.get();\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n r3 = com.duokan.reader.ReaderEnv.PrivatePref.STORE;\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n r5 = \"mirror_version\";\n r2.setPrefString(r3, r5, r0);\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n r2 = com.duokan.reader.ReaderEnv.get();\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n r2.commitPrefs();\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n r2 = com.duokan.core.diagnostic.C0328a.m757c();\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n r3 = com.duokan.core.diagnostic.LogLevel.EVENT;\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n r5 = \"store\";\n r6 = \"store mirror unpacked(ver=%s)\";\n r7 = 1;\n r7 = new java.lang.Object[r7];\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n r8 = 0;\n r7[r8] = r0;\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n r2.m749a(r3, r5, r6, r7);\t Catch:{ Throwable -> 0x00ee, all -> 0x0141 }\n L_0x0133:\n com.duokan.core.io.C0336a.deleteFile(r4);\t Catch:{ all -> 0x013a }\n com.duokan.core.io.C0336a.deleteFile(r1);\t Catch:{ all -> 0x013a }\n goto L_0x00f5;\n L_0x013a:\n r0 = move-exception;\n r1 = sStoreMirrorReady;\n r1.countDown();\n throw r0;\n L_0x0141:\n r0 = move-exception;\n com.duokan.core.io.C0336a.deleteFile(r4);\t Catch:{ all -> 0x013a }\n com.duokan.core.io.C0336a.deleteFile(r1);\t Catch:{ all -> 0x013a }\n throw r0;\t Catch:{ all -> 0x013a }\n L_0x0149:\n r2 = move-exception;\n goto L_0x00ed;\n L_0x014b:\n r0 = move-exception;\n goto L_0x0080;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.duokan.reader.ui.general.web.StoreWebController.prepareStoreMirror():void\");\n }", "private void initializeRecallServiceManager() {\n\n }", "private EnsembleProvider buildProvider(Properties properties) {\n //String servers = properties.getProperty(\"host.rest.servers\"); //hosts.servers = 127.0.0.1,127.0.0.2\n \tString servers = \"192.168.31.10\"; //hosts.servers = 127.0.0.1,127.0.0.2\n if (servers == null || servers.isEmpty()) {\n throw new IllegalArgumentException(\"host.servers cant be empty\");\n }\n //List<String> hostnames = Arrays.asList(servers.split(\",\"));\n List<String> hostnames = Arrays.asList(\"192.168.31.10\");\n //String port = properties.getProperty(\"host.rest.port\");\n String port = \"2181\";\n Integer restPort = 80; //default\n if (port != null) {\n restPort = Integer.valueOf(port);\n }\n //final String backupAddress = properties.getProperty(\"host.backup\");//127.0.0.1:2181\n final String backupAddress = \"127.0.0.1:2181\";//127.0.0.1:2181\n //if network is error,you should sepcify a backup zk-connectString\n Exhibitors exhibitors = new Exhibitors(hostnames, restPort, new Exhibitors.BackupConnectionStringProvider() {\n @Override\n public String getBackupConnectionString() throws Exception {\n return backupAddress;\n }\n });\n //rest,as meaning of getting fresh zk-connectString list.\n ExhibitorRestClient restClient = new DefaultExhibitorRestClient();\n //String restUriPath = properties.getProperty(\"host.rest.path\");\n //String period = properties.getProperty(\"host.rest.period\");\n String restUriPath = properties.getProperty(\"host.rest.path\");\n String period = properties.getProperty(\"host.rest.period\");\n Integer pollingMs = 180000; //3 min\n if (period != null) {\n pollingMs = Integer.valueOf(period);\n }\n return new ExhibitorEnsembleProvider(exhibitors, restClient, restUriPath, pollingMs, new RetryNTimes(10, 1000));\n }", "public LSMEngine<T> build() {\n return lsmEngine;\n }", "ImplementationManager createManager();", "public void start() {\n System.out.println(\"OBRMAN started\");\n ApamManagers.addManager(this, 3);\n OBRMan.obr = new OBRManager(null, repoAdmin);\n obr.startWatchingRepository();\n }", "protected void createRepository() throws Exception {\r\n\t\t\r\n\t\t//Creating MLSesame Connection object Using MarkLogicRepositoryConfig\r\n\t\t\r\n\t\tMarkLogicRepositoryConfig adminconfig = new MarkLogicRepositoryConfig();\r\n\t\tadminconfig.setHost(host);\r\n\t\tadminconfig.setAuth(\"DIGEST\");\r\n\t\tadminconfig.setUser(\"admin\");\r\n\t\tadminconfig.setPassword(\"admin\");\r\n\t\tadminconfig.setPort(restPort);\r\n\t\tRepositoryFactory factory = new MarkLogicRepositoryFactory();\r\n Assert.assertEquals(\"marklogic:MarkLogicRepository\", factory.getRepositoryType());\r\n try {\r\n\t\t\ttestAdminRepository = (MarkLogicRepository) factory.getRepository(adminconfig);\r\n\t\t} catch (RepositoryConfigException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n try {\r\n\t\t\ttestAdminRepository.initialize();\r\n\t\t\ttestAdminCon = (MarkLogicRepositoryConnection) testAdminRepository.getConnection();\r\n\t\t} catch (RepositoryException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n \r\n // Creating testAdminCon with MarkLogicRepositoryConfig constructor\r\n testAdminCon.close();\r\n testAdminRepository.shutDown();\r\n testAdminRepository = null; \r\n testAdminCon = null; \r\n \r\n adminconfig = new MarkLogicRepositoryConfig(host,restPort,\"admin\",\"admin\",\"DIGEST\");\r\n Assert.assertEquals(\"marklogic:MarkLogicRepository\", factory.getRepositoryType());\r\n testAdminRepository = (MarkLogicRepository) factory.getRepository(adminconfig);\r\n testAdminRepository.initialize();\r\n \r\n testAdminCon = testAdminRepository.getConnection();\r\n Assert.assertTrue(testAdminCon instanceof MarkLogicRepositoryConnection);\r\n \r\n Repository otherrepo = factory.getRepository(adminconfig);\r\n RepositoryConnection conn = null;\r\n try{\r\n \t //try to get connection without initializing repo, will throw error\r\n conn = otherrepo.getConnection();\r\n Assert.assertTrue(false);\r\n }\r\n catch(Exception e){\r\n \tAssert.assertTrue(e instanceof RepositoryException);\r\n \tAssert.assertTrue(conn == null);\r\n \totherrepo.shutDown();\r\n }\r\n \r\n Assert.assertTrue(testAdminCon instanceof MarkLogicRepositoryConnection);\r\n graph1 = testAdminCon.getValueFactory().createURI(\"http://marklogic.com/Graph1\");\r\n graph2 = testAdminCon.getValueFactory().createURI(\"http://marklogic.com/Graph2\");\r\n dirgraph = testAdminCon.getValueFactory().createURI(\"http://marklogic.com/dirgraph\");\r\n dirgraph1 = testAdminCon.getValueFactory().createURI(\"http://marklogic.com/dirgraph1\");\r\n \r\n \r\n //Creating MLSesame Connection object Using MarkLogicRepository overloaded constructor\r\n if(testReaderCon == null || testReaderRepository ==null){\r\n \ttestReaderRepository = new MarkLogicRepository(host, restPort, \"reader\", \"reader\", \"DIGEST\");\r\n\t try {\r\n\t\t\t\ttestReaderRepository.initialize();\r\n\t\t\t\tAssert.assertNotNull(testReaderRepository);\r\n\t\t\t\ttestReaderCon = (MarkLogicRepositoryConnection) testReaderRepository.getConnection();\r\n\t\t\t} catch (RepositoryException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t Assert.assertTrue(testReaderCon instanceof MarkLogicRepositoryConnection);\r\n\t \r\n\t }\r\n \r\n \r\n //Creating MLSesame Connection object Using MarkLogicRepository(databaseclient) constructor\r\n if (databaseClient == null){\r\n \tdatabaseClient = DatabaseClientFactory.newClient(host, restPort, \"writer\", \"writer\", DatabaseClientFactory.Authentication.valueOf(\"DIGEST\"));\r\n }\r\n \t\t\r\n\t\tif(testWriterCon == null || testWriterRepository ==null){\r\n\t\t\ttestWriterRepository = new MarkLogicRepository(databaseClient);\r\n\t\t\tqmgr = databaseClient.newQueryManager();\r\n\t\t\t\r\n\t\t\ttry {\r\n\t\t\t\ttestWriterRepository.initialize();\r\n\t\t\t\tAssert.assertNotNull(testWriterRepository);\r\n\t\t\t\ttestWriterCon = (MarkLogicRepositoryConnection) testWriterRepository.getConnection();\r\n\t\t\t} catch (RepositoryException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}", "public CheckEngineLightBuilder() {\r\n checkEngineLight = new CheckEngineLight();\r\n }", "Lighter build();", "@Override public void init() {\n /// Important Step 2: Get access to a list of Expansion Hub Modules to enable changing caching methods.\n all_hubs_ = hardwareMap.getAll(LynxModule.class);\n /// Important Step 3: Option B. Set all Expansion hubs to use the MANUAL Bulk Caching mode\n for (LynxModule module : all_hubs_ ) {\n switch (motor_read_mode_) {\n case BULK_READ_AUTO:\n module.setBulkCachingMode(LynxModule.BulkCachingMode.AUTO);\n break;\n case BULK_READ_MANUAL:\n module.setBulkCachingMode(LynxModule.BulkCachingMode.MANUAL);\n break;\n case BULK_READ_OFF:\n default:\n module.setBulkCachingMode(LynxModule.BulkCachingMode.OFF);\n break;\n }\n }\n\n /// Use the hardwareMap to get the dc motors and servos by name.\n\n motorLF_ = hardwareMap.get(DcMotorEx.class, lfName);\n motorLB_ = hardwareMap.get(DcMotorEx.class, lbName);\n motorRF_ = hardwareMap.get(DcMotorEx.class, rfName);\n motorRB_ = hardwareMap.get(DcMotorEx.class, rbName);\n motorLF_.setDirection(DcMotor.Direction.REVERSE);\n motorLB_.setDirection(DcMotor.Direction.REVERSE);\n\n // map odometry encoders\n verticalLeftEncoder = hardwareMap.get(DcMotorEx.class, verticalLeftEncoderName);\n verticalRightEncoder = hardwareMap.get(DcMotorEx.class, verticalRightEncoderName);\n horizontalEncoder = hardwareMap.get(DcMotorEx.class, horizontalEncoderName);\n\n if( USE_ENCODER_FOR_TELEOP ) {\n motorLF_.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorLF_.setMode ( DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n motorLB_.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorLB_.setMode ( DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n motorRF_.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorRF_.setMode ( DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n motorRB_.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorRB_.setMode ( DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n\n verticalLeftEncoder.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n verticalRightEncoder.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n horizontalEncoder.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n\n motorLF_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n motorLB_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n motorRF_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n motorRB_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n }\n\n if( USE_INTAKE ) {\n motor_left_intake_ = hardwareMap.get(DcMotorEx.class, \"motorLeftIntake\");\n motor_right_intake_ = hardwareMap.get(DcMotorEx.class, \"motorRightIntake\");\n motor_right_intake_.setDirection(DcMotor.Direction.REVERSE) ;\n\n motor_left_intake_.setMode( DcMotor.RunMode.STOP_AND_RESET_ENCODER );\n motor_left_intake_.setMode( DcMotor.RunMode.RUN_USING_ENCODER );\n motor_right_intake_.setMode( DcMotor.RunMode.STOP_AND_RESET_ENCODER );\n motor_right_intake_.setMode( DcMotor.RunMode.RUN_USING_ENCODER );\n\n servo_left_intake_ = hardwareMap.servo.get(\"servoLeftIntake\");\n servo_left_intake_pos_ = CR_SERVO_STOP ;\n servo_left_intake_.setPosition(CR_SERVO_STOP);\n servo_right_intake_ = hardwareMap.servo.get(\"servoRightIntake\");\n servo_right_intake_pos_ = CR_SERVO_STOP ;\n servo_right_intake_.setPosition(CR_SERVO_STOP);\n }\n if( USE_LIFT ) {\n motor_lift_ = hardwareMap.get(DcMotorEx.class, \"motorLift\");\n motor_lift_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n motor_lift_.setMode( DcMotor.RunMode.STOP_AND_RESET_ENCODER );\n power_lift_ = 0.0;\n if( USE_RUN_TO_POS_FOR_LIFT ) {\n motor_lift_.setTargetPosition(0);\n motor_lift_.setMode( DcMotor.RunMode.RUN_TO_POSITION ); // must call setTargetPosition() before switching to RUN_TO_POSISTION\n } else {\n motor_lift_.setMode( DcMotor.RunMode.RUN_USING_ENCODER);\n }\n last_stone_lift_enc_ = -1;\n }\n\n if( USE_STONE_PUSHER ) {\n servo_pusher_ = hardwareMap.servo.get(\"servoPusher\");\n servo_pusher_.setPosition(PUSHER_INIT);\n servo_pusher_pos_ = PUSHER_INIT;\n }\n if( USE_STONE_GATER ) {\n servo_gater_ = hardwareMap.servo.get(\"servoGater\");\n servo_gater_.setPosition(GATER_INIT);\n servo_gater_pos_ = GATER_INIT;\n }\n\n if( USE_ARM ) {\n servo_arm_ = hardwareMap.servo.get(\"servoArm\");\n servo_arm_.setPosition(ARM_INIT);\n servo_arm_pos_ = ARM_INIT;\n servo_claw_ = hardwareMap.servo.get(\"servoClaw\");\n servo_claw_.setPosition(CLAW_OPEN);\n servo_claw_pos_ = CLAW_OPEN;\n }\n\n if( USE_HOOKS ) {\n servo_left_hook_ = hardwareMap.servo.get(\"servoLeftHook\");\n servo_left_hook_.setPosition(LEFT_HOOK_UP);\n servo_left_hook_pos_ = LEFT_HOOK_UP;\n servo_right_hook_ = hardwareMap.servo.get(\"servoRightHook\");\n servo_right_hook_.setPosition(RIGHT_HOOK_UP);\n servo_right_hook_pos_ = RIGHT_HOOK_UP;\n }\n\n if( USE_PARKING_STICKS ) {\n servo_left_park_ = hardwareMap.servo.get(\"servoLeftPark\");\n servo_left_park_.setPosition(LEFT_PARK_IN);\n servo_left_park_pos_ = LEFT_PARK_IN;\n servo_right_park_ = hardwareMap.servo.get(\"servoRightPark\");\n servo_right_park_.setPosition(RIGHT_PARK_IN);\n servo_right_park_pos_ = RIGHT_PARK_IN;\n }\n\n if( USE_RGB_FOR_STONE ) {\n rev_rgb_range_ = hardwareMap.get(LynxI2cColorRangeSensor.class, \"stoneColor\");\n //rev_rgb_range_ = hardwareMap.get(LynxI2cColorRangeSensor.class, \"stoneColorV3\"); // different interface for V3, can't define it as LynxI2cColorRangeSensor anymore, 2020/02/29\n if( rev_rgb_range_!=null ) {\n if( AUTO_CALIBRATE_RGB ) {\n int alpha = rev_rgb_range_.alpha();\n //double dist = rev_rgb_range_.getDistance(DistanceUnit.CM);\n double dist = rev_rgb_range_.getDistance(DistanceUnit.METER);\n if( alpha>=MIN_RGB_ALPHA && alpha<100000 ) {\n rev_rgb_alpha_init_ = alpha;\n }\n if( AUTO_CALIBRATE_RGB_RANGE && !Double.isNaN(dist) ) {\n if( dist>MIN_RGB_RANGE_DIST && dist<MAX_RGB_RANGE_DIST ) {\n rev_rgb_dist_init_ = dist;\n }\n }\n }\n }\n }\n if( USE_RGBV3_FOR_STONE ) {\n //rgb_color_stone_ = hardwareMap.get(ColorSensor.class, \"stoneColorV3\");\n rgb_range_stone_ = hardwareMap.get(DistanceSensor.class, \"stoneColorV3\");\n if( AUTO_CALIBRATE_RANGE && rgb_range_stone_!=null ) {\n while(true) { // wait till range sensor gets a valid reading\n double dis = getRangeDist(RangeName.RGB_RANGE_STONE);\n if( dis>0.0 && dis<0.2 ) {\n rgb_range_stone_dist_init_ = dis;\n break;\n }\n }\n }\n }\n\n if( USE_RIGHT_RANGE ) {\n range_right_ = (Rev2mDistanceSensor) (hardwareMap.get(DistanceSensor.class, \"rightRange\"));\n if( AUTO_CALIBRATE_RANGE && range_right_!=null ) {\n while(true) { // wait till range sensor gets a valid reading\n double dis = getRangeDist(RangeName.RANGE_RIGHT);\n if( dis>0.01 && dis<2.0 ) {\n range_right_dist_init_ = dis;\n break;\n }\n }\n }\n }\n if( USE_LEFT_RANGE ) {\n range_left_ = (Rev2mDistanceSensor) (hardwareMap.get(DistanceSensor.class, \"leftRange\"));\n if( AUTO_CALIBRATE_RANGE && range_left_!=null ) {\n while(true) { // wait till range sensor gets a valid reading\n double dis = getRangeDist(RangeName.RANGE_LEFT);\n if( dis>0.01 && dis<2.0 ) {\n range_left_dist_init_ = dis;\n break;\n }\n }\n }\n }\n\n if( USE_RANGE_FOR_STONE) {\n range_stone_ = (Rev2mDistanceSensor) (hardwareMap.get(DistanceSensor.class, \"stoneRange\"));\n if( AUTO_CALIBRATE_RANGE && range_stone_!=null ) {\n while(true) { // wait till range sensor gets a valid reading\n double dis = getRangeDist(RangeName.RANGE_STONE);\n if( dis>0.01 && dis<0.5 ) {\n range_stone_dist_init_ = dis;\n break;\n }\n }\n }\n }\n\n if( USE_INTAKE_MAG_SWITCH ) {\n intake_mag_switch_ = hardwareMap.get(DigitalChannel.class, \"intake_mag_switch\");\n intake_mag_switch_.setMode(DigitalChannelController.Mode.INPUT);\n intake_mag_prev_state_ = intake_mag_switch_.getState();\n intake_mag_change_time_ = 0.0;\n }\n if( USE_STONE_LIMIT_SWITCH ) {\n stone_limit_switch_ = hardwareMap.get(DigitalChannel.class, \"stone_limit_switch\");\n stone_limit_switch_.setMode(DigitalChannelController.Mode.INPUT);\n stone_limit_switch_prev_state_ = stone_limit_switch_.getState();\n }\n\n\n /////***************************** JOY STICKS *************************************/////\n\n /// Set joystick deadzone, any value below this threshold value will be considered as 0; moved from init() to init_loop() to aovid crash\n if(gamepad1!=null) gamepad1.setJoystickDeadzone( JOYSTICK_DEAD_ZONE );\n if(gamepad2!=null) gamepad2.setJoystickDeadzone( JOYSTICK_DEAD_ZONE );\n\n resetControlVariables();\n }", "public static void rebuildPool() throws SQLException {\n // Close pool connections when plugin disables\n if (poolMgr != null) {\n poolMgr.dispose();\n }\n poolMgr = new GameModeInventoriesPoolManager(dataSource, 10);\n }", "public void rescanRepository() { // recree les liste de classes connues a partir du depot\n // cette methode peut etre invoquee si on sait que le depot a ete modifie\n for (int i=0; i<types.length; i++) {\n classesDisponibles[i] = new HashMap<String, String>();\n scanRepository(types[i], classesDisponibles[i]);\n }\n }", "private void startEMDKManager() {\n // Clear the existing states\n mEmdkManager = null;\n mBarcodeManager = null;\n try {\n// The EMDKManager object will be created and returned in the callback.\n EMDKResults emdkResults = EMDKManager.getEMDKManager(mContext, this); // This causes the instrumentation test to fail\n// try {\n// initializeScanner();\n// } catch (Exception e) {\n// e.printStackTrace();\n// }\n System.out.println(\"EMDKResults.STATUS_CODE is: \" + emdkResults.statusCode);\n } catch (RuntimeException e) {\n Log.d(\"EMDK\",\"EMDK Scanner library not available\");\n }\n }", "private void importState() {\n SpeakerManager s = new SpeakerManager();\n this.speakerManager = s.importState();\n\n RoomManager r = new RoomManager();\n this.roomManager = r.importState();\n\n OrganizerManager o = new OrganizerManager();\n this.organizerManager = o.importState();\n\n EventManager e = new EventManager();\n this.eventManager = e.importState();\n\n ChatManager c = new ChatManager();\n this.chatManager = c.importState();\n\n AttendeeManager a = new AttendeeManager();\n this.attendeeManager = a.importState();\n\n\n }", "public CheckEngineLight build() {\r\n return checkEngineLight;\r\n }", "public void setupSubscriptions()\n {\n String debug = System.getProperty(\"SAFE.debug\");\n if (debug != null && debug.equalsIgnoreCase(\"true\")) {\n _debug = true;\n }\n \n // get handle to message transport service \n try {\n MessageTransportService mts = (MessageTransportService) this.getBindingSite().getServiceBroker().getService(this,\n MessageTransportService.class,\n null);\n \n // get the name of the domain we are managing\n String domainName = System.getProperty(\"org.cougaar.safe.domainName\");\n if (domainName == null) {\n throw new NullPointerException(\"System property org.cougaar.safe.domainName is not set\");\n } \n\n // create MessageSender and MessageReceiver for DM\n // create local locator and bind MessageReceiver to it\n CougaarMessageTransportService messageTransport = new CougaarMessageTransportService(mts);\n MessageSender sender = messageTransport.newMessageSender();\n MessageReceiver receiver = messageTransport.newMessageReceiver(); \n CougaarLocator myLocator = new CougaarLocator(domainName);\n receiver.bindToLocalLocator(myLocator);\n \n // create Domain Manager\n _dm = new MyDomainManager(domainName,\n receiver,\n sender);\n \n }\n catch (Exception xcp) {\n xcp.printStackTrace();\n }\n \n // BEGIN rehydrate \n \n // rehydrate: get entity descriptions from the blackboard and register them\n // with the domain manager\n Iterator entityDescriptions = query(_entityDescriptionPredicate).iterator();\n Vector nonGuardDescrips = new Vector();\n while (entityDescriptions.hasNext()) { \n KAoSEntityDescription entityDescrip = (KAoSEntityDescription) entityDescriptions.next();\n // register all the guards first\n if (entityDescrip.getEntityType().equals(KAoSConstants.GUARD)) { \n _dm.register(entityDescrip, true);\n }\n else {\n nonGuardDescrips.addElement(entityDescrip);\n }\n }\n // then register the other entities\n for (int i=0; i<nonGuardDescrips.size(); i++) {\n _dm.register((KAoSEntityDescription) nonGuardDescrips.elementAt(i), true);\n }\n \n // rehydrate: get policies from the blackboard and give\n // them to the domain manager\n Iterator policyMsgs = query(_policyMsgPredicate).iterator();\n Vector policyMsgsV = new Vector();\n while (policyMsgs.hasNext()) {\n policyMsgsV.addElement(policyMsgs.next());\n }\n _dm.rehydratePolicies(policyMsgsV);\n \n // END rehydrate\n \n _proposedPolicyUpdate = (IncrementalSubscription) subscribe(_proposedPolicyUpdatePredicate); \n }", "public void mo55177a() {\n long unused = C3615m3.this.f1452k = System.currentTimeMillis();\n if (C3615m3.this.f1443b) {\n C3615m3.this.m1171c(new MDExternalError(MDExternalError.ExternalError.SDK_INITIALIZATION_IN_PROGRESS), this.f1467a);\n } else if (!C3615m3.this.f1447f.mo55921b() || C3615m3.this.f1447f.mo55918a()) {\n C3615m3.this.f1449h.updateFilePath(C3595k3.m1060d().mo55511a());\n boolean unused2 = C3615m3.this.f1443b = true;\n C3615m3.this.f1448g.mo55372a(C3615m3.this.f1442a, C3615m3.this.f1443b);\n if (C3723s4.m1629b() || C3723s4.m1628a()) {\n C3490e3.m665e(\"SDK Upgrade - delete UUID and local configuration storage\");\n C3661o5.m1405a();\n Pair<String, Boolean> a = C3729t0.m1642a();\n if (a != null) {\n AnalyticsBridge.getInstance().reportDeleteStorageEvent((String) a.first, ((Boolean) a.second).booleanValue());\n }\n }\n C3723s4.m1630c();\n C3615m3.this.m1172c(this.f1467a);\n C3580j createApiToken = ModelFactory.getInstance().createApiToken(this.f1468b);\n if (createApiToken == null) {\n boolean unused3 = C3615m3.this.f1443b = false;\n C3615m3.this.f1448g.mo55372a(C3615m3.this.f1442a, C3615m3.this.f1443b);\n C3615m3.this.m1158a((C3665p2) new C3593k1(C3586j3.C3587a.API_TOKEN_PARSE_ERROR), this.f1467a);\n C3615m3.this.clearAndDisconnect();\n } else if (!C3615m3.this.f1442a || C3604l2.m1115c().mo55538b() == null || !C3604l2.m1115c().mo55538b().mo55850a().equals(createApiToken.mo55850a())) {\n C3604l2.m1115c().mo55537a(createApiToken);\n if (!C3604l2.m1115c().mo55538b().mo55850a().equals(C3659o3.m1391f().mo55687a(C3815z4.C3816a.API_TOKEN))) {\n C3659o3.m1391f().mo55689a(C3815z4.C3816a.API_TOKEN, C3604l2.m1115c().mo55538b().mo55850a());\n C3659o3.m1391f().mo55689a(C3815z4.C3816a.ACCESS_TOKEN, (String) null);\n }\n C3490e3.m665e(\"SDK init started\");\n AnalyticsBridge.getInstance().reportInitEvent();\n C3767w0.m1812b().mo55893a();\n C3646n3.m1337m().mo55661a(60000, 3, 60000, 0, 512, 3);\n C3615m3.this.m1150a(this.f1467a);\n } else {\n boolean unused4 = C3615m3.this.f1443b = false;\n C3615m3.this.f1448g.mo55372a(C3615m3.this.f1442a, C3615m3.this.f1443b);\n C3615m3.this.m1163b(new MDExternalError(MDExternalError.ExternalError.SDK_IS_ALREADY_INITIALIZED), this.f1467a);\n }\n } else {\n C3615m3.this.m1163b(new MDExternalError(MDExternalError.ExternalError.SDK_IS_KILLED), this.f1467a);\n C3461c3.m562g().clearAndDisconnect();\n }\n }", "public void recreateLdapEntryManager(@Observes @LdapConfigurationReload String event) {\n \tLdapEntryManager oldLdapEntryManager = CdiUtil.getContextBean(beanManager, LdapEntryManager.class, LDAP_ENTRY_MANAGER_NAME);\n\n \t// Recreate components\n \tcreateConnectionProvider();\n\n // Close existing connections\n \tcloseLdapEntryManager(oldLdapEntryManager);\n\n // Force to create new bean\n \tLdapEntryManager ldapEntryManager = ldapEntryManagerInstance.get();\n ldapEntryManagerInstance.destroy(ldapEntryManager);\n log.info(\"Recreated instance {}: {}\", LDAP_ENTRY_MANAGER_NAME, ldapEntryManager);\n }", "private static void createOnlineManager(Context context) throws LogonCoreException {\n try\n {\n ODataOnlineManager.openOnlineStore(context);\n\n }\n catch (OnlineODataStoreException e)\n {\n e.printStackTrace();\n Log.e(TAG, context.getString(R.string.unable_to_open_store));\n }\n\n }", "protected void build() {\n // Make sure we have a fresh build of everything needed to run a JAM session\n // - bootstrap, translator and agent suites\n builder(\"clean\");\n builder(\"\");\n buildBootstrap();\n }", "private LoginRepository(LoginDataSource dataSource) {\n this.dataSource = dataSource;\n //Mobyra instance\n mobyraInstance = MobyraInstance.getInstance();\n }", "public ResManager()\n {\n }", "public interface ILSMEngine extends IRecoverable {\n\n /**\n * Use this ILSMEngine to insert data\n *\n * @param insertionRequest Encapsulates the data to be inserted\n * @param <K> The type of key in the request data\n * @param <V> The type of value in the request data\n * @param <R> type of response\n */\n <K, V, R extends IResponse> R insert(IInsertionRequest<K, V> insertionRequest);\n\n /**\n * Use this ILSMEngine to query\n *\n * @param queryRequest Encapsulates query data\n * @param <K> The type of key in the request data\n * @param <R> type of response\n */\n <K, R extends IResponse> R query(IQueryRequest<K> queryRequest);\n\n /**\n * Use this ILSMEngine to delete data\n *\n * @param deletionRequest Encapsulates the data to be deleted\n * @param <K> The type of key in the request data\n * @param <V> The type of value in the request data\n * @param <R> type of response\n */\n <K, V, R extends IResponse> R delete(IDeletionRequest<K, V> deletionRequest);\n\n /** recover the ILSMEngine */\n void recover();\n\n /**\n * Close all open resources\n *\n * @throws IOException\n */\n @TestOnly\n void clear() throws IOException;\n}", "private void initDLManager() {\n //TODO poner estos datos en configuraciones\n final String botName = \"DL-MS+A\";\n final String directlinePrimaryKey =\n //\"5Cx8OLT2X98.cwA.1j4.FGE7LsMoVuBtww9vQYNuC6lwoVBWYrb-5DHGzBbOeO0\"; // J\n //\"sccvRjdQVbw.cwA.8tQ.3tw3MFQtgG9bcqYf5xxHgW-lUYKymaoSFNCoIzI-SJY\"; //MS+A\n //\"IWixc2S5WaU.cwA.DEw.DV8nbC-BijSw5TbtNimDJuvrp45GpsKCRW4wPTtqYeY\"; //MP-AURA DEV\n \"QyKjl6KL-XQ.cwA.UTM.puyqrjpLvO1Briz7TjM7q_VqqAOflJ3jN0ryBGvkEiU\";\n mDLManager =\n DLManager.getInstance(this, directlinePrimaryKey);\n }", "private void buildAdmin()\n {\n User admin = userServiceImpl.getUserByUsername(adminUsername);\n try\n {\n //If the application is started for the first time (e.g., the admin is not in the DB)\n if(admin==null)\n { \n \t registerUserService.save(adminUsername,password,Role.Admin); \n }\n //if the application has previously been started (e.g., the admin is already present in the DB)\n else\n {\n \t //Do nothing!! \n }\n \n //Always add this retails when started the application.\n \n \tCountry mexico = new Country();\n \tmexico.setCountryId(1);\n \tmexico.setCountryName(\"México\");\n\t\t\tmexico.setCurrency(\"Peso MXN\");\n\t\t\tmexico.setNickname(\"MX\");\n\t\t\taddCountryService.saveCountry(mexico);\t\n\t\t\t\n\t\t\t\n\t\t\tCountry usa = new Country();\n\t\t\tusa.setCountryId(2);\n\t\t\tusa.setCountryName(\"United States\");\n\t\t\tusa.setCurrency(\"USD\");\n\t\t\tusa.setNickname(\"US\");\n\t\t\taddCountryService.saveCountry(usa);\n\t\t\t\n\t\t\t\n\t\t\tRetail retail1 = new Retail();\n\t\t\tretail1.setRetailId(1);\n\t\t\tretail1.setRetailName(\"Amazon\");\n\t\t\tretail1.setCrawlerName(\"Amazon\");\n\t\t\tretail1.setCountry(mexico);\t\t\n\t\t\taddRetailService.saveRetail(retail1);\n\t\t\t\n\t\t\t\n\t\t\tRetail retail2 = new Retail();\n\t\t\tretail2.setRetailId(2);\n\t\t\tretail2.setRetailName(\"Arome\");\n\t\t\tretail2.setCrawlerName(\"Arome\");\n\t\t\tretail2.setCountry(mexico);\t\t\n\t\t\taddRetailService.saveRetail(retail2);\n\t\t\t\n\t\t\t\n\t\t\tRetail retail3 = new Retail();\n\t\t\tretail3.setRetailId(3);\n\t\t\tretail3.setRetailName(\"Chedraui\");\n\t\t\tretail3.setCrawlerName(\"Chedraui\");\n\t\t\tretail3.setCountry(mexico);\t\t\n\t\t\taddRetailService.saveRetail(retail3);\n\t\t\t\n\t\t\t\n\t\t\tRetail retail4 = new Retail();\n\t\t\tretail4.setRetailId(4);\n\t\t\tretail4.setRetailName(\"Laeuropea\");\n\t\t\tretail4.setCrawlerName(\"Laeuropea\");\n\t\t\tretail4.setCountry(mexico);\t\t\n\t\t\taddRetailService.saveRetail(retail4);\n\t\t\t\n\t\t\tRetail retail5 = new Retail();\n\t\t\tretail5.setRetailId(5);\n\t\t\tretail5.setRetailName(\"Linio\");\n\t\t\tretail5.setCrawlerName(\"Linio\");\n\t\t\tretail5.setCountry(mexico);\t\t\n\t\t\taddRetailService.saveRetail(retail5);\n\t\t\t\n\t\t\tRetail retail6 = new Retail();\n\t\t\tretail6.setRetailId(6);\n\t\t\tretail6.setRetailName(\"Liverpool\");\n\t\t\tretail6.setCrawlerName(\"Liverpool\");\n\t\t\tretail6.setCountry(mexico);\t\t\n\t\t\taddRetailService.saveRetail(retail6);\n\t\t\t\n\t\t\tRetail retail7 = new Retail();\n\t\t\tretail7.setRetailId(7);\n\t\t\tretail7.setRetailName(\"MercadoLibre\");\n\t\t\tretail7.setCrawlerName(\"MercadoLibre\");\n\t\t\tretail7.setCountry(mexico);\t\t\n\t\t\taddRetailService.saveRetail(retail7);\n\t\t\t\n\t\t\tRetail retail8 = new Retail();\n\t\t\tretail8.setRetailId(8);\n\t\t\tretail8.setRetailName(\"NutritionDepot\");\n\t\t\tretail8.setCrawlerName(\"NutritionDepot\");\n\t\t\tretail8.setCountry(mexico);\t\t\n\t\t\taddRetailService.saveRetail(retail8);\n\t\t\t\n\t\t\tRetail retail9 = new Retail();\n\t\t\tretail9.setRetailId(9);\n\t\t\tretail9.setRetailName(\"Osom\");\n\t\t\tretail9.setCrawlerName(\"Osom\");\n\t\t\tretail9.setCountry(mexico);\t\t\n\t\t\taddRetailService.saveRetail(retail9);\n\t\t\t\n\t\t\tRetail retail10 = new Retail();\n\t\t\tretail10.setRetailId(10);\n\t\t\tretail10.setRetailName(\"PerfumesMexico\");\n\t\t\tretail10.setCrawlerName(\"PerfumesMexico\");\n\t\t\tretail10.setCountry(mexico);\t\t\n\t\t\taddRetailService.saveRetail(retail10);\n\t\t\t\n\t\t\tRetail retail11 = new Retail();\n\t\t\tretail11.setRetailId(11);\n\t\t\tretail11.setRetailName(\"PerfumesOnline\");\n\t\t\tretail11.setCrawlerName(\"PerfumesOnline\");\n\t\t\tretail11.setCountry(mexico);\t\t\n\t\t\taddRetailService.saveRetail(retail11);\n\t\t\t\n\t\t\t\n\t\t\tRetail retail12 = new Retail();\n\t\t\tretail12.setRetailId(12);\n\t\t\tretail12.setRetailName(\"Prissa\");\n\t\t\tretail12.setCrawlerName(\"Prissa\");\n\t\t\tretail12.setCountry(mexico);\t\t\n\t\t\taddRetailService.saveRetail(retail12);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tRetail retail13 = new Retail();\n\t\t\tretail13.setRetailId(13);\n\t\t\tretail13.setRetailName(\"Sanborns\");\n\t\t\tretail13.setCrawlerName(\"Sanborns\");\n\t\t\tretail13.setCountry(mexico);\t\t\n\t\t\taddRetailService.saveRetail(retail13);\n\t\t\t\n\t\t\t\n\t\t\tRetail retail14 = new Retail();\n\t\t\tretail14.setRetailId(14);\n\t\t\tretail14.setRetailName(\"Soriana\");\n\t\t\tretail14.setCrawlerName(\"Soriana\");\n\t\t\tretail14.setCountry(mexico);\t\t\n\t\t\taddRetailService.saveRetail(retail14);\n\t\t\t\n\t\t\t\n\t\t\tRetail retail15 = new Retail();\n\t\t\tretail15.setRetailId(15);\n\t\t\tretail15.setRetailName(\"SuperWalmart\");\n\t\t\tretail15.setCrawlerName(\"SuperWalmart\");\n\t\t\tretail15.setCountry(mexico);\t\t\n\t\t\taddRetailService.saveRetail(retail15);\n\t\t\t\n\t\t\t\n\t\t\tRetail retail16 = new Retail();\n\t\t\tretail16.setRetailId(16);\n\t\t\tretail16.setRetailName(\"SuplementosFitness\");\n\t\t\tretail16.setCrawlerName(\"SuplementosFitness\");\n\t\t\tretail16.setCountry(mexico);\t\t\n\t\t\taddRetailService.saveRetail(retail16);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tRetail retail17 = new Retail();\n\t\t\tretail17.setRetailId(17);\n\t\t\tretail17.setRetailName(\"Walmart\");\n\t\t\tretail17.setCrawlerName(\"Walmart\");\n\t\t\tretail17.setCountry(mexico);\t\t\n\t\t\taddRetailService.saveRetail(retail17);\n }\n catch (Exception e)\n {\n e.printStackTrace();\n System.out.println(\"Errors occurred during initialization. System verification is required.\");\n }\n }", "private ISketchModder initModder() throws ServiceLocator.ServiceLocatorException {\n \n ISketchModder sketchModder = (ISketchModder) ServiceLocator.getSerivce(ServiceLocator.SVC_BASIC_SKETCH_MODDER);\n \n sketchModder.setOnModderActionListener(new MyOnModderActionListener());\n \n sketchModder.setSourceCodeFormatter(mEditor.createFormatter());\n return sketchModder;\n }", "public synchronized io.fabric.sdk.android.services.settings.Settings m58818a(io.fabric.sdk.android.C15611g r23, io.fabric.sdk.android.services.common.IdManager r24, io.fabric.sdk.android.services.network.HttpRequestFactory r25, java.lang.String r26, java.lang.String r27, java.lang.String r28) {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r22 = this;\n r1 = r22;\n r3 = r23;\n monitor-enter(r22);\n r2 = r1.f48448d;\t Catch:{ all -> 0x0095 }\n if (r2 == 0) goto L_0x000b;\n L_0x0009:\n monitor-exit(r22);\n return r1;\n L_0x000b:\n r2 = r1.f48447c;\t Catch:{ all -> 0x0095 }\n r9 = 1;\t Catch:{ all -> 0x0095 }\n if (r2 != 0) goto L_0x0091;\t Catch:{ all -> 0x0095 }\n L_0x0010:\n r2 = r23.getContext();\t Catch:{ all -> 0x0095 }\n r4 = r24.m58638c();\t Catch:{ all -> 0x0095 }\n r5 = new io.fabric.sdk.android.services.common.f;\t Catch:{ all -> 0x0095 }\n r5.<init>();\t Catch:{ all -> 0x0095 }\n r11 = r5.m58689a(r2);\t Catch:{ all -> 0x0095 }\n r5 = r24.m58644i();\t Catch:{ all -> 0x0095 }\n r6 = new io.fabric.sdk.android.services.common.m;\t Catch:{ all -> 0x0095 }\n r6.<init>();\t Catch:{ all -> 0x0095 }\n r7 = new io.fabric.sdk.android.services.settings.j;\t Catch:{ all -> 0x0095 }\n r7.<init>();\t Catch:{ all -> 0x0095 }\n r8 = new io.fabric.sdk.android.services.settings.h;\t Catch:{ all -> 0x0095 }\n r8.<init>(r3);\t Catch:{ all -> 0x0095 }\n r20 = io.fabric.sdk.android.services.common.CommonUtils.m58625k(r2);\t Catch:{ all -> 0x0095 }\n r10 = java.util.Locale.US;\t Catch:{ all -> 0x0095 }\n r12 = \"https://settings.crashlytics.com/spi/v2/platforms/android/apps/%s/settings\";\t Catch:{ all -> 0x0095 }\n r13 = new java.lang.Object[r9];\t Catch:{ all -> 0x0095 }\n r14 = 0;\t Catch:{ all -> 0x0095 }\n r13[r14] = r4;\t Catch:{ all -> 0x0095 }\n r4 = java.lang.String.format(r10, r12, r13);\t Catch:{ all -> 0x0095 }\n r15 = new io.fabric.sdk.android.services.settings.k;\t Catch:{ all -> 0x0095 }\n r10 = r25;\t Catch:{ all -> 0x0095 }\n r12 = r28;\t Catch:{ all -> 0x0095 }\n r15.<init>(r3, r12, r4, r10);\t Catch:{ all -> 0x0095 }\n r12 = r24.m58642g();\t Catch:{ all -> 0x0095 }\n r13 = r24.m58641f();\t Catch:{ all -> 0x0095 }\n r4 = r24.m58640e();\t Catch:{ all -> 0x0095 }\n r16 = r24.m58637b();\t Catch:{ all -> 0x0095 }\n r10 = new java.lang.String[r9];\t Catch:{ all -> 0x0095 }\n r2 = io.fabric.sdk.android.services.common.CommonUtils.m58627m(r2);\t Catch:{ all -> 0x0095 }\n r10[r14] = r2;\t Catch:{ all -> 0x0095 }\n r2 = io.fabric.sdk.android.services.common.CommonUtils.m58598a(r10);\t Catch:{ all -> 0x0095 }\n r5 = io.fabric.sdk.android.services.common.DeliveryMechanism.determineFrom(r5);\t Catch:{ all -> 0x0095 }\n r19 = r5.getId();\t Catch:{ all -> 0x0095 }\n r5 = new io.fabric.sdk.android.services.settings.r;\t Catch:{ all -> 0x0095 }\n r10 = r5;\t Catch:{ all -> 0x0095 }\n r14 = r4;\t Catch:{ all -> 0x0095 }\n r21 = r15;\t Catch:{ all -> 0x0095 }\n r15 = r16;\t Catch:{ all -> 0x0095 }\n r16 = r2;\t Catch:{ all -> 0x0095 }\n r17 = r27;\t Catch:{ all -> 0x0095 }\n r18 = r26;\t Catch:{ all -> 0x0095 }\n r10.<init>(r11, r12, r13, r14, r15, r16, r17, r18, r19, r20);\t Catch:{ all -> 0x0095 }\n r10 = new io.fabric.sdk.android.services.settings.i;\t Catch:{ all -> 0x0095 }\n r2 = r10;\t Catch:{ all -> 0x0095 }\n r4 = r5;\t Catch:{ all -> 0x0095 }\n r5 = r6;\t Catch:{ all -> 0x0095 }\n r6 = r7;\t Catch:{ all -> 0x0095 }\n r7 = r8;\t Catch:{ all -> 0x0095 }\n r8 = r21;\t Catch:{ all -> 0x0095 }\n r2.<init>(r3, r4, r5, r6, r7, r8);\t Catch:{ all -> 0x0095 }\n r1.f48447c = r10;\t Catch:{ all -> 0x0095 }\n L_0x0091:\n r1.f48448d = r9;\t Catch:{ all -> 0x0095 }\n monitor-exit(r22);\n return r1;\n L_0x0095:\n r0 = move-exception;\n r2 = r0;\n monitor-exit(r22);\n throw r2;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: io.fabric.sdk.android.services.settings.Settings.a(io.fabric.sdk.android.g, io.fabric.sdk.android.services.common.IdManager, io.fabric.sdk.android.services.network.HttpRequestFactory, java.lang.String, java.lang.String, java.lang.String):io.fabric.sdk.android.services.settings.Settings\");\n }", "public static void reset() {\n LeanplumInternal.setCalledStart(false);\n LeanplumInternal.setHasStarted(false);\n TestClassUtil.setField(LeanplumInternal.class, \"issuedStart\", false);\n TestClassUtil.setField(LeanplumInternal.class, \"hasStartedAndRegisteredAsDeveloper\", false);\n LeanplumInternal.setStartSuccessful(false);\n List startHandlersField = (List) TestClassUtil.getField(Leanplum.class, \"startHandlers\");\n startHandlersField.clear();\n List list = (List) TestClassUtil.getField(LeanplumInternal.class, \"startIssuedHandlers\");\n list.clear();\n\n List variablesChangedHandlers = (List) TestClassUtil.getField(Leanplum.class,\n \"variablesChangedHandlers\");\n variablesChangedHandlers.clear();\n List noDownloadsHandlers = (List) TestClassUtil.getField(Leanplum.class, \"noDownloadsHandlers\");\n noDownloadsHandlers.clear();\n List onceNoDownloadsHandlers = (List) TestClassUtil.getField(Leanplum.class,\n \"onceNoDownloadsHandlers\");\n onceNoDownloadsHandlers.clear();\n\n LeanplumInternal.getUserAttributeChanges().clear();\n Leanplum.countAggregator().getAndClearCounts();\n\n TestClassUtil.setField(Leanplum.class, \"registerDeviceHandler\", null);\n TestClassUtil.setField(Leanplum.class, \"registerDeviceFinishedHandler\", null);\n LeanplumInternal.setIsPaused(false);\n TestClassUtil.setField(Leanplum.class, \"deviceIdMode\", LeanplumDeviceIdMode.MD5_MAC_ADDRESS);\n TestClassUtil.setField(Leanplum.class, \"customDeviceId\", null);\n TestClassUtil.setField(Leanplum.class, \"userSpecifiedDeviceId\", false);\n LeanplumInternal.setStartedInBackground(false);\n TestClassUtil.setField(LeanplumInternal.class, \"inForeground\", false);\n\n TestClassUtil.setField(Leanplum.class, \"context\", null);\n\n LeanplumInbox newsfeed = (LeanplumInbox) TestClassUtil.getField(LeanplumInbox.class,\n \"instance\");\n TestClassUtil.setField(LeanplumInbox.class, newsfeed, \"unreadCount\", 0);\n Map messages = (Map) TestClassUtil.getField(LeanplumInbox.class, newsfeed, \"messages\");\n messages.clear();\n List newsfeedChangedHandlers = (List) TestClassUtil.getField(LeanplumInbox.class, newsfeed,\n \"changedCallbacks\");\n newsfeedChangedHandlers.clear();\n TestClassUtil.setField(LeanplumInbox.class, newsfeed, \"didLoad\", false);\n\n VarCache.reset();\n // Reset the map values in ActionManager.\n TestClassUtil.setField(ActionManager.getInstance(), \"messageImpressionOccurrences\", new HashMap<>());\n TestClassUtil.setField(ActionManager.getInstance(), \"messageTriggerOccurrences\", new HashMap<>());\n TestClassUtil.setField(ActionManager.getInstance(), \"sessionOccurrences\", new HashMap<>());\n\n TestClassUtil.setField(MessageTemplates.class, \"registered\", false);\n }", "protected abstract Nfa buildInternal();", "public DynamicModelPart rebuild() {\n this.cuboids = new ObjectArrayList<DynamicModelPart.DynamicCuboid>();\n return addCuboidsUsingSeeds();\n }", "private void collectDependencies() throws Exception {\n backupModAnsSumFiles();\n CommandResults goGraphResult = goDriver.modGraph(true);\n String cachePath = getCachePath();\n String[] dependenciesGraph = goGraphResult.getRes().split(\"\\\\r?\\\\n\");\n for (String entry : dependenciesGraph) {\n String moduleToAdd = entry.split(\" \")[1];\n addModuleDependencies(moduleToAdd, cachePath);\n }\n restoreModAnsSumFiles();\n }", "public interface MRConnectionManagerContainer {\n\n\n String MR_GROUP_PATH = \"/zk/mr/\";\n\n void start() throws Exception;\n\n void start(Map<String, MRMessageListener> messageListenerMap) throws Exception;\n\n void register();\n\n void add(Map.Entry<String, String> entry) throws Exception;\n\n void update(Map.Entry<String, String> entry);\n\n void addListener(String topic, MRMessageListener mrMessageListener);\n\n void remove(Map.Entry<String, String> entry);\n\n void refresh();\n\n void shutdown();\n\n void shutdownAndWait() throws InterruptedException;\n\n Map<String, MRConnectionManager> getMrConnectionManagerCache();\n\n static String groupPath(String group) {\n return String.format(\"%s%s\", MR_GROUP_PATH, group);\n }\n\n void setPerfetchSize(int perfetchSize);\n\n\n}", "@Override\n public synchronized ItfMotorDeReglas crearMotorDeReglas(AgenteCognitivo agent, InputStream reglas, String ficheroReglas){\n kbuilder = compilarReglas( agent.getIdentAgente(), reglas,ficheroReglas);\n if (kbuilder==null){\n trazas.aceptaNuevaTraza(new InfoTraza(agent.getIdentAgente(),\"Motor de reglas Drools: ERROR en la compilacion de las reglas al crear el agente \" ,InfoTraza.NivelTraza.error));\n return null;\n }\n MotorDeReglasDroolsImp5 motorDrools = new MotorDeReglasDroolsImp5(agent,this);\n motorDrools.crearSesionConConfiguracionStandard(kbuilder);\n // KbuildersObtenidos.add(kbuilder); \n return motorDrools;\n }", "public abstract GrapesNotification newAutoInstance(AbstractBuild<?, ?> build);", "public static RemoteObject _class_globals(RemoteObject __ref) throws Exception{\nconfigparameters._cfg_allow_front_camera = BA.numberCast(int.class, 0);__ref.setField(\"_cfg_allow_front_camera\",configparameters._cfg_allow_front_camera);\n //BA.debugLineNum = 10;BA.debugLine=\"Public CFG_COPY_IMAGE_TO_GALLERY As Int = 1\";\nconfigparameters._cfg_copy_image_to_gallery = BA.numberCast(int.class, 1);__ref.setField(\"_cfg_copy_image_to_gallery\",configparameters._cfg_copy_image_to_gallery);\n //BA.debugLineNum = 11;BA.debugLine=\"Public CFG_TAKE_PICTURE_ALWAYS_AS_NEW As Int = 1\";\nconfigparameters._cfg_take_picture_always_as_new = BA.numberCast(int.class, 1);__ref.setField(\"_cfg_take_picture_always_as_new\",configparameters._cfg_take_picture_always_as_new);\n //BA.debugLineNum = 13;BA.debugLine=\"Private ConfigFileName As String = \\\"config.json\\\"\";\nconfigparameters._configfilename = BA.ObjectToString(\"config.json\");__ref.setField(\"_configfilename\",configparameters._configfilename);\n //BA.debugLineNum = 14;BA.debugLine=\"End Sub\";\nreturn RemoteObject.createImmutable(\"\");\n}", "@Override\r\n\tpublic void makerear() {\n\t\t\r\n\t}", "ProviderManagerExt()\n {\n load();\n }", "private ReducedCFGBuilder() {\n\t}", "private void loadManager() {\n LOGGER.info(\"Load metricManager, type: {}\", METRIC_CONFIG.getMetricFrameType());\n ServiceLoader<AbstractMetricManager> metricManagers =\n ServiceLoader.load(AbstractMetricManager.class);\n int size = 0;\n for (AbstractMetricManager mf : metricManagers) {\n size++;\n if (mf.getClass()\n .getName()\n .toLowerCase()\n .contains(METRIC_CONFIG.getMetricFrameType().name().toLowerCase())) {\n metricManager = mf;\n break;\n }\n }\n\n // if no more implementations, we use nothingManager.\n if (size == 0 || metricManager == null) {\n metricManager = new DoNothingMetricManager();\n } else if (size > 1) {\n LOGGER.info(\n \"Detect more than one MetricManager, will use {}\", metricManager.getClass().getName());\n }\n }", "@Mod.EventHandler\n public void preInit(FMLPreInitializationEvent e) {\n logger = e.getModLog();\n mainConfigDir = e.getModConfigurationDirectory();\n modConfigDir = new File(mainConfigDir.getPath() + File.separator + \"deepresonance\");\n config = new Configuration(new File(modConfigDir, \"main.cfg\"));\n proxy.preInit(e);\n\n// FMLInterModComms.sendMessage(\"Waila\", \"register\", \"mcjty.wailasupport.WailaCompatibility.load\");\n }", "private LSMEngineBuilder<T> buildLevelProcessors(ApplicationContext applicationContext) {\n LevelProcessorChain<T, IInsertionRequest, InsertRequestContext> insertionLevelProcessChain =\n generateLevelProcessorsChain(applicationContext.getInsertionLevelProcessClass());\n LevelProcessorChain<T, IDeletionRequest, DeleteRequestContext> deletionLevelProcessChain =\n generateLevelProcessorsChain(applicationContext.getDeletionLevelProcessClass());\n LevelProcessorChain<T, IQueryRequest, QueryRequestContext> queryLevelProcessChain =\n generateLevelProcessorsChain(applicationContext.getQueryLevelProcessClass());\n return buildQueryManager(queryLevelProcessChain)\n .buildInsertionManager(insertionLevelProcessChain)\n .buildDeletionManager(deletionLevelProcessChain);\n }", "public PackageManager2(android.content.Context r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e8 in method: cm.android.mdm.manager.PackageManager2.<init>(android.content.Context):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: cm.android.mdm.manager.PackageManager2.<init>(android.content.Context):void\");\n }", "private void loadRules2() {\n\t\t\r\n\t\tint type = Integer.valueOf(env.getProperty(\"sentinel.server.type\")) ;\r\n\t\t\r\n String appId = \"sentinel-demo\";\r\n String apolloMetaServerAddress = \"http://10.1.77.106:8080\";\r\n System.setProperty(\"app.id\", appId);\r\n System.setProperty(\"apollo.meta\", apolloMetaServerAddress);\r\n\r\n String namespaceName = \"application\";\r\n String flowRuleKey = \"flowRules\";\r\n // It's better to provide a meaningful default value.\r\n String defaultFlowRules = \"[]\";\r\n\r\n ReadableDataSource<String, List<FlowRule>> flowRuleDataSource = new ApolloDataSource<>(namespaceName,\r\n flowRuleKey, defaultFlowRules, source -> JSON.parseObject(source, new TypeReference<List<FlowRule>>() {\r\n }));\r\n FlowRuleManager.register2Property(flowRuleDataSource.getProperty());\r\n ClusterFlowRuleManager.setPropertySupplier(namespace ->flowRuleDataSource.getProperty());\r\n \r\n\r\n\t\tif (ClusterStateManager.CLUSTER_SERVER == type) \r\n\t\t{\r\n\t\t\tClusterStateManager.applyState(ClusterStateManager.CLUSTER_SERVER);\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\tClusterStateManager.applyState(ClusterStateManager.CLUSTER_CLIENT);\r\n\t\t\tinitClientConfigProperty(namespaceName);\r\n\t\t\tinitClientServerAssignProperty(namespaceName);\r\n\t\t}\r\n \r\n \r\n \r\n \r\n }", "private void createImageCache(){\n ImageCacheManager.getInstance().init(this,\n this.getPackageCodePath()\n , DISK_IMAGECACHE_SIZE\n , DISK_IMAGECACHE_COMPRESS_FORMAT\n , DISK_IMAGECACHE_QUALITY\n , ImageCacheManager.CacheType.MEMORY);\n }", "public void register(OpModeManager manager) {\n //manager.register(\"INFO: ver. 3.51.01 (pre-summer version)\", infoclass.class);\n// manager.register(\"NullOp\", NullOp.class);\n// manager.register(\"newTeleOp\", newTeleOp.class);\n// manager.register(\"ARMTESTER\", armsinglestick.class);\n// manager.register(\"BOTv1\", botv1.class);\n// manager.register(\"TURNLEFT\", auto2.class);\n// manager.register(\"TURNRIGHT\", auto3.class);\n// manager.register(\"ColorTest\", ColorTest.class);\n // manager.register(\"basicLineFollow\", basicLineFollow.class);\n // manager.register(\"basicLineAlign\", basicLineAlign.class);\n manager.register(\"TeleOp\", Teleop.class);\n // manager.register(\"JupiterTeleOp\", JupiterBotTeleOp.class);\n manager.register(\"PushTeleOp\", PushBotTest.class);\n // manager.register(\"PushTeleOp42\", PushBotTest42.class);\n// manager.register(\"colortest\", onecolortesst.class);\n// manager.register(\"AUTOENCODERS\", autoencode.class);\n// manager.register(\"autotestfour\", auto4.class);\n// manager.register(\"theGOOD THING\", encodertest.class);\n// manager.register(\"colortest2222222222\", seenpush.class);\n //manager.register(\"encode\", encodertest.class);\n//manager.register(\"encode\", encode.class);\n// manager.register(\"TESTR4LIN3D3T3CT!!!!\", linedetect.class);\n// manager.register(\"gyro test\", gyro.class);\n // manager.register(\"Kierian's teleop\", teleoptest.class);\n // manager.register(\"I2CCHANGER bottom\", LinearI2cColorSensorAddressChange9915.class);\n // manager.register(\"I2CCHANGER top\", Lineari2cchange2.class);\n// manager.register(\"pushbutton\", pushbutton.class);\n// manager.register(\"right\", practice.class);\n//manager.register(\"left\",left.class);\n// manager.register(\"rightclimber\", rightclimber.class);\n// manager.register(\"leftclimber\", leftclimber.class);\n// manager.register(\"leftreg\", regleft.class);/\n// / manager.register(\"rightreg\", regright.class);\n// manager.register(\"gyrotest\", gyro.class);\n// manager.register(\"THISISGONNAWORK\", thisisgonnawork.class);\n// manager.register(\"auto\", thisisgonnaworkods.class);\n// manager.register(\"ods test\", odstest.class);\n// manager.register(\"real\", realauto.class);\n //manager.register(\"right aka blue WITH THE LINE FOLLOW\", bluepid.class);\n //manager.register(\"right aka blue\", blue.class);\n// manager.register(\"line follow\", linefoolow.class);\n// manager.register(\"right\", radicalnewideablue.class);\n // manager.register(\"rightrmi\", rniblue.class);\n // manager.register(\"leftrmi\", rnired.class);\n // manager.register(\"they're running right\", theysayitsbetterblue.class);\n // manager.register(\"they're running left\", theysayitsbetterred.class);\n// manager.register(\"color\", button.class);\n // manager.register(\"left aka red (use at own risk)\", red.class);\n// manager.register(\"rightest\", bluetest.class);\n// manager.register(\"fake\", fakeauto.class);\n// manager.register(\"button\", temp.class);\n// manager.register(\"tot\", tot.class);\n// manager.register(\"left\", red.class);\n }", "public void startPlugin() {\n classesDisponibles = new HashMap[types.length];\n try { // enregistrer le service d'acces aux depot de jars\n ServicesRegisterManager.registerService(Parameters.JAR_REPOSITORY_MANAGER, this);\n rescanRepository(); // creer les listes de classes disponibles a partir du depot\n }\n catch (ServiceInUseException mbiue) {\n System.err.println(\"Jar Repository Manager service created twice\");\n }\n }", "@Override\n\tpublic Rezervare build() {\n\t\treturn rezervare;\n\t}", "@Override\n public SysvDb2Role build() {\n return getInstance();\n }", "private static AndroidNClassLoader createAndroidNClassLoader(PathClassLoader original, Application application) throws Exception {\n AndroidNClassLoader androidNClassLoader = new AndroidNClassLoader(\"\", original, application);\n Field originPathList = ShareReflectUtil.findField(original, \"pathList\");\n Object originPathListObject = originPathList.get(original);\n //should reflect definingContext also\n Field originClassloader = ShareReflectUtil.findField(originPathListObject, \"definingContext\");\n originClassloader.set(originPathListObject, androidNClassLoader);\n //copy pathList\n Field pathListField = ShareReflectUtil.findField(androidNClassLoader, \"pathList\");\n //just use PathClassloader's pathList\n pathListField.set(androidNClassLoader, originPathListObject);\n\n //we must recreate dexFile due to dexCache\n List<File> additionalClassPathEntries = new ArrayList<>();\n Field dexElement = ShareReflectUtil.findField(originPathListObject, \"dexElements\");\n Object[] originDexElements = (Object[]) dexElement.get(originPathListObject);\n for (Object element : originDexElements) {\n DexFile dexFile = (DexFile) ShareReflectUtil.findField(element, \"dexFile\").get(element);\n if (dexFile == null) {\n continue;\n }\n additionalClassPathEntries.add(new File(dexFile.getName()));\n //protect for java.lang.AssertionError: Failed to close dex file in finalizer.\n oldDexFiles.add(dexFile);\n }\n Method makePathElements = ShareReflectUtil.findMethod(originPathListObject, \"makePathElements\", List.class, File.class,\n List.class);\n ArrayList<IOException> suppressedExceptions = new ArrayList<>();\n Object[] newDexElements = (Object[]) makePathElements.invoke(originPathListObject, additionalClassPathEntries, null, suppressedExceptions);\n dexElement.set(originPathListObject, newDexElements);\n\n try {\n Class.forName(CHECK_CLASSLOADER_CLASS, true, androidNClassLoader);\n } catch (Throwable thr) {\n Log.e(TAG, \"load TinkerTestAndroidNClassLoader fail, try to fixDexElementsForProtectedApp\");\n fixDexElementsForProtectedApp(application, newDexElements);\n }\n\n return androidNClassLoader;\n }", "private PackageInstallObserver2(cm.android.mdm.manager.PackageManager2 r1) {\n /*\n // Can't load method instructions: Load method exception: null in method: cm.android.mdm.manager.PackageManager2.PackageInstallObserver2.<init>(cm.android.mdm.manager.PackageManager2):void, dex: in method: cm.android.mdm.manager.PackageManager2.PackageInstallObserver2.<init>(cm.android.mdm.manager.PackageManager2):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: cm.android.mdm.manager.PackageManager2.PackageInstallObserver2.<init>(cm.android.mdm.manager.PackageManager2):void\");\n }", "default void buildMainSpace() throws Exception {\n buildMainBuildModules();\n buildMainCheckModules();\n buildMainGenerateAPIDocumentation();\n buildMainGenerateCustomRuntimeImage();\n }", "public BasicHttpClientConnectionManager buildBasicHttpClientConnectionManager()\n/* */ {\n/* 61 */ BasicHttpClientConnectionManager connectionManager = new BasicHttpClientConnectionManager();\n/* 62 */ return connectionManager;\n/* */ }", "public void reConfigure();", "void rebuildIfNecessary();", "public ColocatePreloader (PersistenceManager pm) {\n\t\tthis.pm = pm;\n\t}", "private void populateRepositories() throws Exception {\n\t\t\n\t\t// Cleaning Repositories\n\t\trepositories.clear();\n\n\t\t// Validating that RepositoryAdmin exists\n\t\tValidate.notNull(getRepositoryAdmin(), \"RepositoryAdmin not found\");\n\t\t\n\t\t// Checking if exists installed Repos and adding to repositories\n\t\tEnumeration persistedRepos = installedRepos.keys();\n\t\twhile(persistedRepos.hasMoreElements()){\n\t\t\tString repositoryURL = (String) persistedRepos.nextElement();\n\t\t\t// Checking if is a valid URL\n\t\t\tif(repositoryURL.startsWith(\"http\") || repositoryURL.startsWith(\"file\")){\n\t\t\t\t// Installing persisted repositories \n\t\t\t\tgetRepositoryAdmin().addRepository(repositoryURL);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor (Repository repo : getRepositoryAdmin().listRepositories()) {\n\t\t\trepositories.add(repo);\n\t\t}\n\t}", "@Override\n\t\tpublic Repository loadRepository()\n\t\t{\n\t\t\tMemoryStore store = new MemoryStore(IWBFileUtil.getFileInDataFolder(Config.getConfig().getRepositoryName()));\n\t\t\t\n\t\t\t// create a lucenesail to wrap the memorystore\n\t\t\tLuceneSail luceneSail = new LuceneSail();\n\t\t\t// let the lucene index store its data in ram\n\t\t\tluceneSail.setParameter(LuceneSail.LUCENE_RAMDIR_KEY, \"true\");\n\t\t\t// wrap memorystore in a lucenesail\n\t\t\tluceneSail.setBaseSail(store);\n\t\t\t\n\t\t\t// create a Repository to access the sails\n\t\t\treturn new SailRepository(luceneSail);\n\t\t}", "public void refresh() {\n\n saveDefaultConfig();\n reloadConfig();\n\n getServer().getScheduler().cancelTasks(this);\n getServer().getScheduler().scheduleSyncRepeatingTask(this, this::trackEnderpearls, 0L, 1L);\n\n if (getConfig().getBoolean(\"metadata.autosave.enabled\")) {\n int interval = Math.max(60, getConfig().getInt(\"metadata.autosave.interval\")) * 20;\n getServer().getScheduler().scheduleSyncRepeatingTask(this, this::saveDataYaml, interval, interval);\n }\n\n Recipe recipe;\n NamespacedKey recipeKey = TeleportalsPlugin.getKey(\"gateway_prism\");\n {\n int amount = Math.max(1, getConfig().getInt(\"gateway-prism.amount\"));\n ItemStack item = makeGatewayPrism(amount);\n\n try {\n recipe = Utils.createRecipe(recipeKey, item, getConfig(), \"gateway-prism\");\n }\n catch (Exception ex) {\n getLogger().warning(String.format(\"[Config] The Gateway Prism recipe defined in the config was malformed: %s\", ex.getMessage()));\n getLogger().warning(\"[Config] Using the default recipe instead.\");\n\n recipe = new ShapedRecipe(recipeKey, item);\n ((ShapedRecipe) recipe).shape(\"OwO\", \"*u*\", \"-v-\");\n ((ShapedRecipe) recipe).setIngredient('O', Material.ENDER_EYE);\n ((ShapedRecipe) recipe).setIngredient('*', Material.SHULKER_SHELL);\n ((ShapedRecipe) recipe).setIngredient('-', Material.GOLD_INGOT);\n ((ShapedRecipe) recipe).setIngredient('w', Material.DRAGON_HEAD);\n ((ShapedRecipe) recipe).setIngredient('u', Material.END_CRYSTAL);\n ((ShapedRecipe) recipe).setIngredient('v', Material.BEACON);\n }\n }\n final Recipe addedRecipe = recipe;\n getServer().removeRecipe(((Keyed) recipe).getKey());\n getServer().getScheduler().runTaskLater(this, () -> getServer().addRecipe(addedRecipe), 2L);\n }", "public void prepare_local() throws Exception {\r\n\t\tvendorMaster = new VendorMaster();\r\n\t\tvendorMaster.setMenuCode(639);\r\n\r\n\t}", "public KafkaOffsetManager build() {\n\n String err = \"All required parameters were not set: \";\n if (instance.kc == null) {\n throw new IllegalStateException(err + \"failed to setup kafkacluster instance, invalid brokerlist?\");\n }\n if (StringUtils.isBlank(instance.groupid)) {\n throw new IllegalStateException(err + \"Groupid cannot be null or blank.\");\n }\n if (instance.topicList.isEmpty()) {\n throw new IllegalStateException(err + \"Topic needs to be set.\");\n }\n if (instance.dao == null) {\n throw new IllegalStateException(err + \"OffsetManagerDAO not set.\");\n }\n if (!instance.startFrom.equals(\"earliest\") && !instance.startFrom.equals(\"latest\")) {\n throw new IllegalStateException(err + \"StarFrom needs to be either 'earliest' or 'latest'.\");\n }\n\n return instance;\n }", "public final void run() {\n /*\n r14 = this;\n a.d.a.a.i.b.s4 r0 = r14.f2497c\n a.d.a.a.i.b.p4 r1 = r0.f2513b\n java.lang.String r0 = r0.f2512a\n a.d.a.a.h.g.a2 r2 = r14.f2495a\n android.content.ServiceConnection r3 = r14.f2496b\n a.d.a.a.i.b.c5 r4 = r1.f2455a\n a.d.a.a.i.b.v4 r4 = r4.f()\n r4.b()\n r4 = 0\n if (r2 != 0) goto L_0x0024\n a.d.a.a.i.b.c5 r0 = r1.f2455a\n a.d.a.a.i.b.x3 r0 = r0.i()\n a.d.a.a.i.b.z3 r0 = r0.i\n java.lang.String r2 = \"Attempting to use Install Referrer Service while it is not initialized\"\n r0.a(r2)\n goto L_0x0054\n L_0x0024:\n android.os.Bundle r5 = new android.os.Bundle\n r5.<init>()\n java.lang.String r6 = \"package_name\"\n r5.putString(r6, r0)\n android.os.Bundle r0 = r2.f(r5) // Catch:{ Exception -> 0x0042 }\n if (r0 != 0) goto L_0x0055\n a.d.a.a.i.b.c5 r0 = r1.f2455a // Catch:{ Exception -> 0x0042 }\n a.d.a.a.i.b.x3 r0 = r0.i() // Catch:{ Exception -> 0x0042 }\n a.d.a.a.i.b.z3 r0 = r0.f // Catch:{ Exception -> 0x0042 }\n java.lang.String r2 = \"Install Referrer Service returned a null response\"\n r0.a(r2) // Catch:{ Exception -> 0x0042 }\n goto L_0x0054\n L_0x0042:\n r0 = move-exception\n a.d.a.a.i.b.c5 r2 = r1.f2455a\n a.d.a.a.i.b.x3 r2 = r2.i()\n a.d.a.a.i.b.z3 r2 = r2.f\n java.lang.String r0 = r0.getMessage()\n java.lang.String r5 = \"Exception occurred while retrieving the Install Referrer\"\n r2.b(r5, r0)\n L_0x0054:\n r0 = r4\n L_0x0055:\n a.d.a.a.i.b.c5 r2 = r1.f2455a\n a.d.a.a.i.b.v4 r2 = r2.f()\n r2.b()\n if (r0 == 0) goto L_0x0178\n r5 = 0\n java.lang.String r2 = \"install_begin_timestamp_seconds\"\n long r7 = r0.getLong(r2, r5)\n r9 = 1000(0x3e8, double:4.94E-321)\n long r7 = r7 * r9\n int r2 = (r7 > r5 ? 1 : (r7 == r5 ? 0 : -1))\n if (r2 != 0) goto L_0x007c\n a.d.a.a.i.b.c5 r0 = r1.f2455a\n a.d.a.a.i.b.x3 r0 = r0.i()\n a.d.a.a.i.b.z3 r0 = r0.i\n java.lang.String r2 = \"Service response is missing Install Referrer install timestamp\"\n goto L_0x0175\n L_0x007c:\n java.lang.String r2 = \"install_referrer\"\n java.lang.String r2 = r0.getString(r2)\n if (r2 == 0) goto L_0x016b\n boolean r11 = r2.isEmpty()\n if (r11 == 0) goto L_0x008c\n goto L_0x016b\n L_0x008c:\n a.d.a.a.i.b.c5 r11 = r1.f2455a\n a.d.a.a.i.b.x3 r11 = r11.i()\n a.d.a.a.i.b.z3 r11 = r11.n\n java.lang.String r12 = \"InstallReferrer API result\"\n r11.b(r12, r2)\n a.d.a.a.i.b.c5 r11 = r1.f2455a\n a.d.a.a.i.b.v9 r11 = r11.t()\n java.lang.String r12 = \"?\"\n int r13 = r2.length()\n if (r13 == 0) goto L_0x00ac\n java.lang.String r2 = r12.concat(r2)\n goto L_0x00b1\n L_0x00ac:\n java.lang.String r2 = new java.lang.String\n r2.<init>(r12)\n L_0x00b1:\n android.net.Uri r2 = android.net.Uri.parse(r2)\n android.os.Bundle r2 = r11.x(r2)\n if (r2 != 0) goto L_0x00c7\n a.d.a.a.i.b.c5 r0 = r1.f2455a\n a.d.a.a.i.b.x3 r0 = r0.i()\n a.d.a.a.i.b.z3 r0 = r0.f\n java.lang.String r2 = \"No campaign params defined in Install Referrer result\"\n goto L_0x0175\n L_0x00c7:\n java.lang.String r11 = \"medium\"\n java.lang.String r11 = r2.getString(r11)\n if (r11 == 0) goto L_0x00e1\n java.lang.String r12 = \"(not set)\"\n boolean r12 = r12.equalsIgnoreCase(r11)\n if (r12 != 0) goto L_0x00e1\n java.lang.String r12 = \"organic\"\n boolean r11 = r12.equalsIgnoreCase(r11)\n if (r11 != 0) goto L_0x00e1\n r11 = 1\n goto L_0x00e2\n L_0x00e1:\n r11 = 0\n L_0x00e2:\n if (r11 == 0) goto L_0x0101\n java.lang.String r11 = \"referrer_click_timestamp_seconds\"\n long r11 = r0.getLong(r11, r5)\n long r11 = r11 * r9\n int r0 = (r11 > r5 ? 1 : (r11 == r5 ? 0 : -1))\n if (r0 != 0) goto L_0x00fc\n a.d.a.a.i.b.c5 r0 = r1.f2455a\n a.d.a.a.i.b.x3 r0 = r0.i()\n a.d.a.a.i.b.z3 r0 = r0.f\n java.lang.String r2 = \"Install Referrer is missing click timestamp for ad campaign\"\n goto L_0x0175\n L_0x00fc:\n java.lang.String r0 = \"click_timestamp\"\n r2.putLong(r0, r11)\n L_0x0101:\n a.d.a.a.i.b.c5 r0 = r1.f2455a\n a.d.a.a.i.b.k4 r0 = r0.o()\n a.d.a.a.i.b.o4 r0 = r0.k\n long r5 = r0.a()\n int r0 = (r7 > r5 ? 1 : (r7 == r5 ? 0 : -1))\n if (r0 != 0) goto L_0x011c\n a.d.a.a.i.b.c5 r0 = r1.f2455a\n a.d.a.a.i.b.x3 r0 = r0.i()\n a.d.a.a.i.b.z3 r0 = r0.n\n java.lang.String r2 = \"Install Referrer campaign has already been logged\"\n goto L_0x0175\n L_0x011c:\n a.d.a.a.h.g.ma r0 = a.d.a.a.h.g.ma.f1835b\n java.lang.Object r0 = r0.a()\n a.d.a.a.h.g.pa r0 = (a.d.a.a.h.g.pa) r0\n boolean r0 = r0.a()\n if (r0 == 0) goto L_0x013e\n a.d.a.a.i.b.c5 r0 = r1.f2455a\n a.d.a.a.i.b.ka r0 = r0.g\n a.d.a.a.i.b.n3<java.lang.Boolean> r5 = a.d.a.a.i.b.q.v0\n boolean r0 = r0.o(r5)\n if (r0 == 0) goto L_0x013e\n a.d.a.a.i.b.c5 r0 = r1.f2455a\n boolean r0 = r0.d()\n if (r0 == 0) goto L_0x0178\n L_0x013e:\n a.d.a.a.i.b.c5 r0 = r1.f2455a\n a.d.a.a.i.b.k4 r0 = r0.o()\n a.d.a.a.i.b.o4 r0 = r0.k\n r0.b(r7)\n a.d.a.a.i.b.c5 r0 = r1.f2455a\n a.d.a.a.i.b.x3 r0 = r0.i()\n a.d.a.a.i.b.z3 r0 = r0.n\n java.lang.String r5 = \"referrer API\"\n java.lang.String r6 = \"Logging Install Referrer campaign from sdk with \"\n r0.b(r6, r5)\n java.lang.String r0 = \"_cis\"\n r2.putString(r0, r5)\n a.d.a.a.i.b.c5 r0 = r1.f2455a\n a.d.a.a.i.b.f6 r0 = r0.s()\n java.lang.String r5 = \"auto\"\n java.lang.String r6 = \"_cmp\"\n r0.H(r5, r6, r2)\n goto L_0x0178\n L_0x016b:\n a.d.a.a.i.b.c5 r0 = r1.f2455a\n a.d.a.a.i.b.x3 r0 = r0.i()\n a.d.a.a.i.b.z3 r0 = r0.f\n java.lang.String r2 = \"No referrer defined in Install Referrer response\"\n L_0x0175:\n r0.a(r2)\n L_0x0178:\n if (r3 == 0) goto L_0x0189\n a.d.a.a.e.p.a r0 = a.d.a.a.e.p.a.a()\n a.d.a.a.i.b.c5 r1 = r1.f2455a\n android.content.Context r1 = r1.f2123a\n if (r0 == 0) goto L_0x0188\n r1.unbindService(r3)\n goto L_0x0189\n L_0x0188:\n throw r4\n L_0x0189:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: a.d.a.a.i.b.r4.run():void\");\n }", "private Module createModule() throws Exception\n {\n Map headerMap = m_archive.getCurrentRevision().getManifestHeader();\n\n // Create the module instance.\n ModuleImpl module = new ModuleImpl(\n getFramework().getLogger(),\n getFramework().getConfig(),\n getFramework().getResolver(),\n this,\n Long.toString(getBundleId())\n + \".\" + m_archive.getCurrentRevisionNumber().toString(),\n headerMap,\n m_archive.getCurrentRevision().getContent(),\n getFramework().getBundleStreamHandler(),\n getFramework().getBootPackages(),\n getFramework().getBootPackageWildcards());\n\n // Verify that the bundle symbolic name + version is unique.\n if (module.getManifestVersion().equals(\"2\"))\n {\n Version bundleVersion = module.getVersion();\n bundleVersion = (bundleVersion == null) ? Version.emptyVersion : bundleVersion;\n String symName = module.getSymbolicName();\n\n Bundle[] bundles = getFramework().getBundles();\n for (int i = 0; (bundles != null) && (i < bundles.length); i++)\n {\n long id = ((BundleImpl) bundles[i]).getBundleId();\n if (id != getBundleId())\n {\n String sym = bundles[i].getSymbolicName();\n Version ver = ((ModuleImpl)\n ((BundleImpl) bundles[i]).getCurrentModule()).getVersion();\n if ((symName != null) && (sym != null) && symName.equals(sym) && bundleVersion.equals(ver))\n {\n throw new BundleException(\n \"Bundle symbolic name and version are not unique: \"\n + sym + ':' + ver, BundleException.DUPLICATE_BUNDLE_ERROR);\n }\n }\n }\n }\n\n return module;\n }", "private Virtualnetworkmanager createVirtualnetworkmanager() throws DatatypeConfigurationException {\n\t\t\n\t\tVirtualnetworkmanager root = objFactory.createVirtualnetworkmanager();\n\t\t\t\n\t\t// create catalog\n\t\tCatalog catalog = createCatalog();\n\t\t// create nffgs\n\t\tSet<Nffg> nffgs = createNffgs();\n\t\t// create in\n\t\tIn in = createIn();\n\t\t\n\t\t// populate the root element\n\t\troot.setCatalog(catalog);\n\t\tfor(Nffg nffg : nffgs){\n\t\t\troot.getNffg().add(nffg);\n\t\t}\t\t\t\n\t\troot.setIn(in);\n\t\t\n\t\treturn root;\n\t\t\n\t}", "void init() {\n List<Artifact> artifacts = null;\n final List<RepositoryInfo> infos = RepositoryPreferences.getInstance().getRepositoryInfos();\n for (final RepositoryInfo info : infos) {\n if (info.isLocal()) {\n final File localrepo = new File(info.getRepositoryPath() + File.separator\n + DEFAULT_GID_PREFIX.replace('.', '/'));\n if (localrepo.exists()) {\n artifacts = resolveArtifacts(new File(info.getRepositoryPath()), localrepo);\n }\n }\n }\n\n if (artifacts == null) {\n artifacts = new ArrayList<Artifact>(1);\n }\n\n populateLocalTree(artifacts);\n populateAppPane(model.getApps());\n }", "@Override\r\n\tpublic void buildImpl() {\n\t\tint nbLasers =(int)Math.ceil((double)lanesPerLink.length / (double)linksPerLaser);\r\n\t\tlasers = new Laser[nbLasers];\r\n\t\tpoweredChannelForLaserI = new int[nbLasers];\r\n\t\tpoweredHorizonForLaserI = new double[nbLasers];\r\n\t\tcanBeExtended = new boolean[nbLasers];\r\n\t\tboolean timeLine = lue.isWithTimeLine();\r\n\t\tfor (int i = 0; i < nbLasers ; i++) {\r\n\t\t\tlasers[i] = laserTemplate.getCopy(i, nbLasers, timeLine);\r\n\t\t\tlasers[i].setLinkUtilisationExperiment(lue);\r\n\t\t}\r\n\t}", "@Override\n public ItfMotorDeReglas crearMotorDeReglas(AgenteCognitivo agent){\n // return new MotorDeReglasDroolsImp(agent);\n // return new MotorDeReglasDroolsImp2(agent);\n return new MotorDeReglasDroolsImp4(agent);\n }", "@Test\n public void recycle_ReleasesResourcesOfEachManager() {\n mDiffRequestManagerHolder.recycle();\n\n // Then\n then(mDiffRequestManager).should().releaseResources();\n }", "protected void clearCaches() {\n // Primary class LocusDetailProxy cache\n IDaoManager manager = DaoManagerFactory.getManager(getSubsystem());\n if (manager != null) {\n manager.clearCache(org.tair.db.locusdetail.LocusDetailProxy.class.getName());\n }\n\n // Clear nested object caches\n \n // Child LocusUpdateHistory cache\n IDaoManager LocusUpdateHistoryManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocusUpdateHistoryManager != null) {\n LocusUpdateHistoryManager.clearCache(org.tair.db.locusdetail.LocusUpdateHistory.class.getName());\n }\n \n // Child ModelFeature cache\n IDaoManager ModelFeatureManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (ModelFeatureManager != null) {\n ModelFeatureManager.clearCache(org.tair.db.locusdetail.ModelFeature.class.getName());\n }\n \n // Child LocusGeneModelCdnaAlias cache\n IDaoManager LocusGeneModelCdnaAliasManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocusGeneModelCdnaAliasManager != null) {\n LocusGeneModelCdnaAliasManager.clearCache(org.tair.db.locusdetail.LocusGeneModelCdnaAlias.class.getName());\n }\n \n // Child LocusGeneModelCdna cache\n IDaoManager LocusGeneModelCdnaManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocusGeneModelCdnaManager != null) {\n LocusGeneModelCdnaManager.clearCache(org.tair.db.locusdetail.LocusGeneModelCdna.class.getName());\n }\n \n // Child ProteinResourceLink cache\n IDaoManager ProteinResourceLinkManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (ProteinResourceLinkManager != null) {\n ProteinResourceLinkManager.clearCache(org.tair.db.locusdetail.ProteinResourceLink.class.getName());\n }\n \n // Child ProteinModelDomain cache\n IDaoManager ProteinModelDomainManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (ProteinModelDomainManager != null) {\n ProteinModelDomainManager.clearCache(org.tair.db.locusdetail.ProteinModelDomain.class.getName());\n }\n \n // Child ProteinModel Proxy cache\n IDaoManager ProteinModelManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (ProteinModelManager != null) {\n ProteinModelManager.clearCache(org.tair.db.locusdetail.ProteinModel.class.getName());\n }\n \n // Child LocusGeneModelAnnotation cache\n IDaoManager LocusGeneModelAnnotationManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocusGeneModelAnnotationManager != null) {\n LocusGeneModelAnnotationManager.clearCache(org.tair.db.locusdetail.LocusGeneModelAnnotation.class.getName());\n }\n \n // Child PolymorphismSite cache\n IDaoManager PolymorphismSiteManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (PolymorphismSiteManager != null) {\n PolymorphismSiteManager.clearCache(org.tair.db.locusdetail.PolymorphismSite.class.getName());\n }\n \n // Child LocusGeneModel Proxy cache\n IDaoManager LocusGeneModelManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocusGeneModelManager != null) {\n LocusGeneModelManager.clearCache(org.tair.db.locusdetail.LocusGeneModel.class.getName());\n }\n \n // Child LocusOtherName cache\n IDaoManager LocusOtherNameManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocusOtherNameManager != null) {\n LocusOtherNameManager.clearCache(org.tair.db.locusdetail.LocusOtherName.class.getName());\n }\n \n // Child LocusPhysicalMapCoordinates cache\n IDaoManager LocusPhysicalMapCoordinatesManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocusPhysicalMapCoordinatesManager != null) {\n LocusPhysicalMapCoordinatesManager.clearCache(org.tair.db.locusdetail.LocusPhysicalMapCoordinates.class.getName());\n }\n \n // Child LocusResourceLink cache\n IDaoManager LocusResourceLinkManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocusResourceLinkManager != null) {\n LocusResourceLinkManager.clearCache(org.tair.db.locusdetail.LocusResourceLink.class.getName());\n }\n \n // Child LocusComment cache\n IDaoManager LocusCommentManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocusCommentManager != null) {\n LocusCommentManager.clearCache(org.tair.db.locusdetail.LocusComment.class.getName());\n }\n \n // Child LocusAttribution cache\n IDaoManager LocusAttributionManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocusAttributionManager != null) {\n LocusAttributionManager.clearCache(org.tair.db.locusdetail.LocusAttribution.class.getName());\n }\n \n // Child LocusOtherSymbol cache\n IDaoManager LocusOtherSymbolManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocusOtherSymbolManager != null) {\n LocusOtherSymbolManager.clearCache(org.tair.db.locusdetail.LocusOtherSymbol.class.getName());\n }\n \n // Child LocusPolymorphism Proxy cache\n IDaoManager LocusPolymorphismManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocusPolymorphismManager != null) {\n LocusPolymorphismManager.clearCache(org.tair.db.locusdetail.LocusPolymorphism.class.getName());\n }\n \n // Child ReferencedLocus cache\n IDaoManager ReferencedLocusManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (ReferencedLocusManager != null) {\n ReferencedLocusManager.clearCache(org.tair.db.locusdetail.ReferencedLocus.class.getName());\n }\n \n // Child Reference Proxy cache\n IDaoManager ReferenceManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (ReferenceManager != null) {\n ReferenceManager.clearCache(org.tair.db.locusdetail.Reference.class.getName());\n }\n \n // Child LocusBac cache\n IDaoManager LocusBacManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocusBacManager != null) {\n LocusBacManager.clearCache(org.tair.db.locusdetail.LocusBac.class.getName());\n }\n \n // Child LocusEstAlias cache\n IDaoManager LocusEstAliasManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocusEstAliasManager != null) {\n LocusEstAliasManager.clearCache(org.tair.db.locusdetail.LocusEstAlias.class.getName());\n }\n \n // Child LocuslEst cache\n IDaoManager LocuslEstManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocuslEstManager != null) {\n LocuslEstManager.clearCache(org.tair.db.locusdetail.LocuslEst.class.getName());\n }\n \n // Child LocusCdnaAlias cache\n IDaoManager LocusCdnaAliasManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocusCdnaAliasManager != null) {\n LocusCdnaAliasManager.clearCache(org.tair.db.locusdetail.LocusCdnaAlias.class.getName());\n }\n \n // Child LocusCdna cache\n IDaoManager LocusCdnaManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocusCdnaManager != null) {\n LocusCdnaManager.clearCache(org.tair.db.locusdetail.LocusCdna.class.getName());\n }\n \n // Child LocusAnnotation cache\n IDaoManager LocusAnnotationManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocusAnnotationManager != null) {\n LocusAnnotationManager.clearCache(org.tair.db.locusdetail.LocusAnnotation.class.getName());\n }\n }", "public DependencyModulesResult buildTargetDependencyModules(\n CancelChecker cancelChecker, DependencyModulesParams params) {\n return new DependencyModulesResult(Collections.emptyList());\n }", "protected void getCacheManager()\n {\n try\n {\n if ( cacheMgr == null )\n {\n cacheMgr = CompositeCacheManager.getInstance();\n\n if ( log.isDebugEnabled() )\n {\n log.debug( \" groupcache cacheMgr = \" + cacheMgr );\n }\n }\n else\n {\n if ( log.isDebugEnabled() )\n {\n log.debug( \"already got groupcache cacheMgr = \" + cacheMgr );\n }\n }\n }\n catch ( Exception e )\n {\n log.error( e );\n }\n }", "void start() throws Exception {\n vaultManager.start();\n\n cfgManager.start();\n\n // metastorage configuration\n var config = String.format(\"{\\\"node\\\": {\\\"metastorageNodes\\\": [ \\\"%s\\\" ]}}\", addr);\n\n cfgManager.bootstrap(config, ConfigurationType.LOCAL);\n\n Stream.of(clusterService, raftManager, metaStorageManager).forEach(IgniteComponent::start);\n\n // this is needed to avoid assertion errors\n cfgStorage.registerConfigurationListener(changedEntries -> {});\n\n // deploy watches to propagate data from the metastore into the vault\n metaStorageManager.deployWatches();\n }", "public RelationshipManager createRelationshipManager() throws ServiceException {\r\n initialize(); \r\n return new RelationshipManager(multiDomainMetaService, multiDomainService);\r\n\t}", "private IRefinesMachine createRefinesMachine() throws RodinDBException {\n\t\tfinal IMachineRoot mch = createMachine(\"mch\");\n\t\treturn mch.createChild(IRefinesMachine.ELEMENT_TYPE, null, null);\n\t}", "private OptimoveConfig() {\n }", "public abstract CONFIG build();", "public static void initManager() {\n theManager = new LevelManager();\n lives = 3;\n }", "AgentPolicy build();", "public LSMEngineBuilder<T> buildLSMManagers(String packageName, WALManager walManager) {\n try {\n ApplicationContext property =\n ApplicationContextGenerator.GeneratePropertyWithAnnotation(packageName);\n buildLSMManagers(property, walManager);\n } catch (Exception e) {\n logger.error(e.getMessage());\n }\n return this;\n }", "private RoiManager getRoiManager(boolean enReset, boolean enShowNone) {\n Frame frame = WindowManager.getFrame(\"ROI Manager\");\n RoiManager rm = null;\n\n if(frame == null) {\n rm = new RoiManager();\n rm.setVisible(true);\n }\n else {\n rm = (RoiManager)frame;\n }\n\n if(enReset) {\n rm.reset();\n }\n\n if(enShowNone) {\n rm.runCommand(\"Show None\");\n }\n\n return rm;\n }", "public void restoreFromDatabase() throws InitException {\r\n \t\r\n \tlong id = 0L;\r\n \twhile(true) {\r\n\t \tList<ServerJobInstanceMapping> mappingList = null;\r\n\t \ttry {\r\n\t\t\t\tmappingList = serverJobInstanceMappingAccess.loadByServer(serverConfig.getLocalAddress(), id);\r\n\t\t\t} catch (Throwable e) {\r\n\t\t\t\tthrow new InitException(\"[LivingTaskManager]: restoreFromDatabase error, localAddress:\" + serverConfig.getLocalAddress(), e);\r\n\t\t\t}\r\n\t \t\r\n\t \tif(CollectionUtils.isEmpty(mappingList)) {\r\n\t \t\tlogger.warn(\"[LivingTaskManager]: restoreFromDatabase mappingList is empty\");\r\n\t \t\treturn ;\r\n\t \t}\r\n\t \t\r\n\t \tid = ListUtil.acquireLastObject(mappingList).getId();\r\n\t \t\r\n\t \tinitAddJobInstance4IdMap(mappingList);\r\n \t}\r\n }", "public MongoManager()\n\t{\n\t\ttry\n\t\t{\n\t\t/*\tmorphia = new Morphia();\n\t\t\tclient = new MongoClient();\n\t\t\tmorphia.mapPackage(\"com.glenwood.kernai.data.entity\");\n\t\t\tdatastore = morphia.createDatastore(client, \"Kernai\");\n\t\t\tdatastore.ensureIndexes();\n\t\t*/\t\n\t\t}\n\t\tcatch(Exception ex)\n\t\t{\n\t\t\tthrow ex;\n\t\t}\n\t\n\t}", "private IndexingManager() {\n Provider provider = new BouncyCastleProvider();\n Security.addProvider(provider);\n utility = Database_Utility.getInstance();\n conn = utility.getConnection();\n IMbuffer = IndexingManagerBuffer.getInstance();\n\n // This statement is to create purge table.\n\n boolean k = checkTable1(\"PurgeTable\");\n if (!k) {\n utility.createtable2(\"PurgeTable\");\n }\n boolean k1 = checkTable1(\"UserToCertMap\");\n if (!k1) {\n utility.createtable1();\n }\n\n // This statement is to run maintenance thread on loading of class to purge entries whose timer has expired.\n\n //maintenancethread();\n\n // This statement is to run maintenance thread on loading of class to ascertain root nodes.\n\n // maintenancethread1();\n\n // This statement is to run maintenance thread on loading of class to delete entries from purge table.\n\n // maintenancethread2();\n\n }", "public LSMEngineBuilder<T> buildLSMManagers(\n ApplicationContext applicationContext, WALManager walManager) {\n try {\n buildWalManager(walManager).buildLevelProcessors(applicationContext).buildRecoverManager();\n } catch (Exception e) {\n logger.error(e.getMessage());\n }\n return this;\n }", "public static void reInitialize() {\r\n\t\tThread houseKeeperTemp = theInstance.houseKeeper;\r\n\t\ttheInstance.houseKeeper = null;\t\t// shuts down the housekeeper thread\r\n\t\thouseKeeperTemp.interrupt();\r\n\t\ttheInstance = new GroupManager();\t\t\r\n\t}", "@Override\n public synchronized <L> void discoveryCompleted(DiscoveryEvent<L> event) {\n ResourceManager<L> resourceManager = event.getResourceManager();\n ResourceTypeManager<L> resourceTypeManager = event.getResourceTypeManager();\n MonitoredEndpoint<EndpointConfiguration> endpoint = event.getSamplingService().getMonitoredEndpoint();\n String endpointTenantId = endpoint.getEndpointConfiguration().getTenantId();\n String tenantIdToUse = (endpointTenantId != null) ? endpointTenantId : config.getTenantId();\n\n InventoryPayloadBuilder<L> bldr = new InventoryPayloadBuilder<>(tenantIdToUse, feedId);\n\n // Since we know types never change during the lifetime of the agent, we don't have to process\n // types that have already been flagged as having been persisted.\n // We first must persist metric types then resource types (remember, there are no hierarchies,\n // all metric types and resource types are peers to one another).\n List<ResourceType<L>> allResourceTypes = resourceTypeManager.getResourceTypesBreadthFirst()\n .stream()\n .filter(rt -> rt.isPersisted() == false)\n .collect(Collectors.toList());\n Map<MeasurementType<L>, Offline<org.hawkular.inventory.api.model.MetricType.Blueprint>> mtBlueprints;\n mtBlueprints = bldr.buildMetrics(allResourceTypes);\n mtBlueprints.forEach((mt, bp) -> performMetricTypeSync(bp, tenantIdToUse));\n\n Map<ResourceType<L>, Offline<org.hawkular.inventory.api.model.ResourceType.Blueprint>> rtBlueprints;\n rtBlueprints = bldr.build(allResourceTypes);\n rtBlueprints.forEach((rt, bp) -> performResourceTypeSync(bp, tenantIdToUse));\n\n // indicate we persisted the resource types\n allResourceTypes.forEach(rt -> rt.setPersisted(true));\n\n // build the JSON blueprints for the sync resource requests\n // Note that it is possible for a endpoint to define multiple root resources.\n // We have to sync each root resource separately.\n Map<Resource<L>, Offline<org.hawkular.inventory.api.model.Resource.Blueprint>> rBlueprints;\n rBlueprints = bldr.build(resourceManager);\n rBlueprints.forEach((r, bp) -> performResourceSync(bp, tenantIdToUse, resourceManager.size(r)));\n\n // indicate we persisted the resources\n resourceManager.getResourcesBreadthFirst().forEach(r -> r.setPersisted(true));\n }", "public LeaseTermForTurnoverRentFixedImportManager() {\n }", "protected void reinitializeFields()\n\t\tthrows NbaBaseException{\n\t \tsetStatusProvider(new NbaProcessStatusProvider(user, getWork()));\n\t}", "private static void loadConfig() {\n\t\trxID = (Integer) ConfigStoreRedstoneWireless.getInstance(\n\t\t\t\t\"WirelessRedstone\").get(\"Receiver.ID\", Integer.class,\n\t\t\t\tnew Integer(rxID));\n\t\ttxID = (Integer) ConfigStoreRedstoneWireless.getInstance(\n\t\t\t\t\"WirelessRedstone\").get(\"Transmitter.ID\", Integer.class,\n\t\t\t\tnew Integer(txID));\n\t}", "public DuckSourceRemote initialize() throws Exception;", "private void updateModules()\n throws Exception\n {\n LogUtil.put(LogFactory.getInstance(\"Start\", this, \"updateModules\"));\n \n Vector vector = this.findNewModules();\n Iterator iterator = vector.iterator();\n while(iterator.hasNext())\n {\n Bundle bundle = this.install((URL) iterator.next());\n \n if(bundle != null)\n {\n bundle.start(MODULES_START_LEVEL);\n }\n }\n }", "private static boolean loadModuleConfig(java.lang.String r5, java.lang.String r6) {\n /*\n android.util.Pair<java.lang.String, java.util.Set<java.lang.String>> r0 = lastModuleList\n r1 = 1\n if (r0 == 0) goto L_0x0018\n android.util.Pair<java.lang.String, java.util.Set<java.lang.String>> r0 = lastModuleList\n java.lang.Object r0 = r0.first\n java.lang.CharSequence r0 = (java.lang.CharSequence) r0\n boolean r0 = android.text.TextUtils.equals(r0, r6)\n if (r0 == 0) goto L_0x0018\n android.util.Pair<java.lang.String, java.util.Set<java.lang.String>> r0 = lastModuleList\n java.lang.Object r0 = r0.second\n if (r0 == 0) goto L_0x0018\n return r1\n L_0x0018:\n java.io.File r0 = new java.io.File\n java.lang.String r2 = \"de.robv.android.xposed.installer\"\n r0.<init>(r5, r2)\n boolean r5 = r0.exists()\n r2 = 0\n if (r5 != 0) goto L_0x0027\n return r2\n L_0x0027:\n java.io.File r5 = new java.io.File\n java.lang.String r3 = \"exposed_conf/modules.list\"\n r5.<init>(r0, r3)\n boolean r0 = r5.exists()\n if (r0 != 0) goto L_0x003c\n java.lang.String r5 = \"ExposedBridge\"\n java.lang.String r6 = \"xposed installer's modules not exist, ignore.\"\n android.util.Log.d(r5, r6)\n return r2\n L_0x003c:\n r0 = 0\n java.io.BufferedReader r3 = new java.io.BufferedReader // Catch:{ IOException -> 0x0081 }\n java.io.FileReader r4 = new java.io.FileReader // Catch:{ IOException -> 0x0081 }\n r4.<init>(r5) // Catch:{ IOException -> 0x0081 }\n r3.<init>(r4) // Catch:{ IOException -> 0x0081 }\n java.util.HashSet r5 = new java.util.HashSet // Catch:{ IOException -> 0x007b, all -> 0x0079 }\n r5.<init>() // Catch:{ IOException -> 0x007b, all -> 0x0079 }\n L_0x004c:\n java.lang.String r0 = r3.readLine() // Catch:{ IOException -> 0x007b, all -> 0x0079 }\n if (r0 == 0) goto L_0x006a\n java.lang.String r0 = r0.trim() // Catch:{ IOException -> 0x007b, all -> 0x0079 }\n java.lang.String r4 = \"#\"\n boolean r4 = r0.startsWith(r4) // Catch:{ IOException -> 0x007b, all -> 0x0079 }\n if (r4 == 0) goto L_0x005f\n goto L_0x004c\n L_0x005f:\n boolean r4 = r0.isEmpty() // Catch:{ IOException -> 0x007b, all -> 0x0079 }\n if (r4 == 0) goto L_0x0066\n goto L_0x004c\n L_0x0066:\n r5.add(r0) // Catch:{ IOException -> 0x007b, all -> 0x0079 }\n goto L_0x004c\n L_0x006a:\n android.util.Pair r5 = android.util.Pair.create(r6, r5) // Catch:{ IOException -> 0x007b, all -> 0x0079 }\n lastModuleList = r5 // Catch:{ IOException -> 0x007b, all -> 0x0079 }\n r3.close() // Catch:{ IOException -> 0x0074 }\n goto L_0x0078\n L_0x0074:\n r5 = move-exception\n r5.printStackTrace()\n L_0x0078:\n return r1\n L_0x0079:\n r5 = move-exception\n goto L_0x0090\n L_0x007b:\n r5 = move-exception\n r0 = r3\n goto L_0x0082\n L_0x007e:\n r5 = move-exception\n r3 = r0\n goto L_0x0090\n L_0x0081:\n r5 = move-exception\n L_0x0082:\n r5.printStackTrace() // Catch:{ all -> 0x007e }\n if (r0 == 0) goto L_0x008f\n r0.close() // Catch:{ IOException -> 0x008b }\n goto L_0x008f\n L_0x008b:\n r5 = move-exception\n r5.printStackTrace()\n L_0x008f:\n return r2\n L_0x0090:\n if (r3 == 0) goto L_0x009a\n r3.close() // Catch:{ IOException -> 0x0096 }\n goto L_0x009a\n L_0x0096:\n r6 = move-exception\n r6.printStackTrace()\n L_0x009a:\n throw r5\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p015me.weishu.exposed.ExposedBridge.loadModuleConfig(java.lang.String, java.lang.String):boolean\");\n }", "private void m1866c() {\n /*\n r10 = this;\n r2 = 0;\n r1 = 1;\n r0 = \"DCVpnService\";\n r3 = \"startVPN\";\n com.ppu.fba.p009d.Log1.LogF1(r0, r3);\n monitor-enter(r10);\n r0 = r10.f1317a;\t Catch:{ all -> 0x0065 }\n if (r0 == 0) goto L_0x0017;\n L_0x000e:\n r0 = \"DCVpnService\";\n r1 = \"startVPN: already started\";\n com.ppu.fba.p009d.Log1.LogF1(r0, r1);\t Catch:{ all -> 0x0065 }\n monitor-exit(r10);\t Catch:{ all -> 0x0065 }\n L_0x0016:\n return;\n L_0x0017:\n r0 = 1;\n r10.f1317a = r0;\t Catch:{ all -> 0x0065 }\n monitor-exit(r10);\t Catch:{ all -> 0x0065 }\n r0 = \"DCVpnService\";\n r3 = \"startVPN: about to build\";\n com.ppu.fba.p009d.Log1.LogF1(r0, r3);\n r0 = com.ppu.fba.FirewallApplication.m1851a();\n r0 = android.preference.PreferenceManager.getDefaultSharedPreferences(r0);\n r3 = \"data_caching_on\";\n r3 = r0.getBoolean(r3, r2);\n r4 = \"ad_blocking_on\";\n r4 = r0.getBoolean(r4, r1);\n r5 = \"malware_shield_on\";\n r6 = r0.getBoolean(r5, r2);\n if (r3 == 0) goto L_0x0068;\n L_0x003e:\n r5 = r1;\n L_0x003f:\n if (r4 == 0) goto L_0x006a;\n L_0x0041:\n r4 = r1;\n L_0x0042:\n if (r6 == 0) goto L_0x006c;\n L_0x0044:\n r0 = r1;\n L_0x0045:\n r3 = r10.f1322g;\n if (r3 != 0) goto L_0x0054;\n L_0x0049:\n r3 = new com.ppu.fba.g;\n r3.<init>(r10, r6);\n r3 = r3.establish();\t Catch:{ Exception -> 0x006e }\n r10.f1322g = r3;\t Catch:{ Exception -> 0x006e }\n L_0x0054:\n r3 = r10.f1322g;\n if (r3 != 0) goto L_0x00b6;\n L_0x0058:\n r10.f1317a = r2;\n r0 = \"DCVpnService\";\n r1 = \"builder failed: stopSelf() now\";\n com.ppu.fba.p009d.Log1.LogF1(r0, r1);\n r10.stopSelf();\n goto L_0x0016;\n L_0x0065:\n r0 = move-exception;\n monitor-exit(r10);\t Catch:{ all -> 0x0065 }\n throw r0;\n L_0x0068:\n r5 = r2;\n goto L_0x003f;\n L_0x006a:\n r4 = r2;\n goto L_0x0042;\n L_0x006c:\n r0 = r2;\n goto L_0x0045;\n L_0x006e:\n r3 = move-exception;\n r3 = new com.ppu.fba.q;\n r3.<init>(r10, r6);\n r3 = r3.establish();\t Catch:{ Exception -> 0x007b }\n r10.f1322g = r3;\t Catch:{ Exception -> 0x007b }\n goto L_0x0054;\n L_0x007b:\n r3 = move-exception;\n r6 = \"state\";\n r7 = \"vpnFail\";\n r8 = new java.lang.StringBuilder;\n r8.<init>();\n r9 = \"excEst: \";\n r8 = r8.append(r9);\n r9 = r3.getMessage();\n if (r9 != 0) goto L_0x00b1;\n L_0x0091:\n r3 = \"null\";\n L_0x0093:\n r3 = r8.append(r3);\n r3 = r3.toString();\n r8 = 0;\n r3 = com.google.analytics.tracking.android.MapBuilder.createEvent(r6, r7, r3, r8);\n r3 = r3.build();\n com.ppu.fba.p009d.Log1.LogAction(r3);\n r3 = com.ppu.fba.R.string.error_vpn_establish;\n r3 = android.widget.Toast.makeText(r10, r3, r1);\n r3.show();\n goto L_0x0054;\n L_0x00b1:\n r3 = r3.getMessage();\n goto L_0x0093;\n L_0x00b6:\n r3 = r10.m1868e();\n r10.startForeground(r1, r3);\n r3 = \"DCVpnService\";\n r6 = \"init\";\n com.ppu.fba.p009d.Log1.LogF1(r3, r6);\n r3 = r10.f1322g;\n r3 = r3.getFd();\n r6 = r10.getFilesDir();\n r6 = r6.getAbsolutePath();\n r0 = com.ppu.fba.NativeWrapper.jni_dicki(r3, r6, r5, r4, r0);\n if (r0 == 0) goto L_0x00e4;\n L_0x00d8:\n r0 = \"DCVpnService\";\n r2 = \"account_init failed!!!!!\";\n com.ppu.fba.p009d.Log1.LogF1(r0, r2);\n r10.stopForeground(r1);\n goto L_0x0016;\n L_0x00e4:\n r10.f1321f = r2;\n r0 = new com.ppu.fba.c;\n r1 = new com.ppu.fba.d;\n r1.<init>(r10);\n r2 = \"t4\";\n r0.<init>(r1, r2);\n r10.f1324i = r0;\n r0 = r10.f1324i;\n r0.start();\n r0 = new com.ppu.fba.c;\n r1 = new com.ppu.fba.e;\n r1.<init>(r10);\n r2 = \"t0\";\n r0.<init>(r1, r2);\n r10.f1323h = r0;\n r0 = r10.f1323h;\n r0.start();\n r0 = new com.ppu.fba.c;\n r1 = new com.ppu.fba.f;\n r1.<init>(r10);\n r2 = \"t1\";\n r0.<init>(r1, r2);\n r10.f1319d = r0;\n r0 = new com.ppu.fba.c;\n r1 = new com.ppu.fba.o;\n r1.<init>(r10);\n r2 = \"t2\";\n r0.<init>(r1, r2);\n r10.f1320e = r0;\n r0 = new com.ppu.fba.c;\n r1 = new com.ppu.fba.p;\n r1.<init>(r10);\n r2 = \"t3\";\n r0.<init>(r1, r2);\n r10.f1318c = r0;\n r0 = r10.f1319d;\n r0.start();\n r0 = r10.f1320e;\n r0.start();\n r0 = r10.f1318c;\n r0.start();\n goto L_0x0016;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.ppu.fba.FirewallVpnService.c():void\");\n }", "public void initialize() throws Exception {\n\t\tdataStore = new SimpleProcessImage();\r\n\t\tdataStore.addDigitalOut(new SimpleDigitalOut(true));\r\n\t\tdataStore.addDigitalOut(new SimpleDigitalOut(false));\r\n\t\tdataStore.addDigitalIn(new SimpleDigitalIn(false));\r\n\t\tdataStore.addDigitalIn(new SimpleDigitalIn(true));\r\n\t\tdataStore.addDigitalIn(new SimpleDigitalIn(false));\r\n\t\tdataStore.addDigitalIn(new SimpleDigitalIn(true));\r\n\r\n\t\tfor (int i = 0; i < num_registers; i++) {\r\n\t\t\tdataStore.addRegister(new SimpleRegister(0));\r\n\t\t}\t\t\r\n\r\n\t\t// 3. Set the image on the coupler\r\n\t\tModbusCoupler.getReference().setProcessImage(dataStore);\r\n\t\tModbusCoupler.getReference().setMaster(false);\r\n\t\tModbusCoupler.getReference().setUnitID(15);\r\n\r\n\t\tif(null != slaveListener && slaveListener.isListening()){\r\n\t\t\tslaveListener.stop();\r\n\t\t}\r\n\t\tslaveListener = new ModbusTCPListener(3);\r\n\t\tslaveListener.setPort(port);\r\n\t\tslaveListener.listen();\r\n\t}", "public IndexSearchSharderManager() {\n log = LoggerFactory.getLogger(IndexSearchSharderManager.class);\n }", "public void manual_testRestart() throws Exception {\n final ServiceRegistrar reg = DistributedMasterBuilderTest.findTestLookupService(20);\n assertNotNull(\"Couldn't find registrar.\", reg);\n \n final Entry[] entries = SearchablePropertyEntries.getPropertiesAsEntryArray(\n new SearchablePropertyEntries(\n BuildAgentServiceImplTest.TEST_USER_DEFINED_PROPERTIES_FILE).getProperties()\n );\n // work around timestamp prefix in build.type entry\n final int idxBuildTypeEntry = 3;\n assertEquals(\"Wrong entry in position where we expected to find 'build.type'.\",\n BuildAgentServiceImplTest.ENTRY_NAME_BUILD_TYPE, ((PropertyEntry) entries[idxBuildTypeEntry]).name);\n entries[idxBuildTypeEntry] = new PropertyEntry(((PropertyEntry) entries[idxBuildTypeEntry]).name, \"test\");\n \n final BuildAgentService agentService = (BuildAgentService) findAgent(reg, 3, true, entries);\n assertNotNull(agentService.getMachineName());\n agentService.restart(false);\n // allow time for the relaunched agent to spin up and register\n Thread.sleep(60 * 1000);\n // verify first agent is dead\n try {\n agentService.getMachineName();\n fail(\"Agent should be dead\");\n } catch (Exception e) {\n // good, this is what we want.\n }\n // find the newly relaunched agent\n final BuildAgentService agentService2 = (BuildAgentService) findAgent(reg, 3, true, entries);\n assertNotNull(agentService2.getMachineName());\n agentService2.kill(false);\n }", "private void m110495a() {\n C19535g a = DownloaderManagerHolder.m75524a();\n String x = C25352e.m83241x(this.f89235a.f89233a.f77546j);\n Aweme aweme = this.f89235a.f89233a.f77546j;\n C7573i.m23582a((Object) aweme, \"mAweme\");\n AwemeRawAd awemeRawAd = aweme.getAwemeRawAd();\n if (awemeRawAd == null) {\n C7573i.m23580a();\n }\n C7573i.m23582a((Object) awemeRawAd, \"mAweme.awemeRawAd!!\");\n Long adId = awemeRawAd.getAdId();\n C7573i.m23582a((Object) adId, \"mAweme.awemeRawAd!!.adId\");\n long longValue = adId.longValue();\n Aweme aweme2 = this.f89235a.f89233a.f77546j;\n C7573i.m23582a((Object) aweme2, \"mAweme\");\n C19386b a2 = C22943b.m75511a(\"result_ad\", aweme2.getAwemeRawAd(), \"bg_download_button\");\n Aweme aweme3 = this.f89235a.f89233a.f77546j;\n C7573i.m23582a((Object) aweme3, \"mAweme\");\n AwemeRawAd awemeRawAd2 = aweme3.getAwemeRawAd();\n if (awemeRawAd2 == null) {\n C7573i.m23580a();\n }\n a.mo51670a(x, longValue, 2, a2, C22942a.m75508a(awemeRawAd2));\n }", "protected abstract void rebuildNetwork(int numNodes);", "void setUpLinearManager();", "public static void reload() {\n\t\tif (getConfigManager() != null) {\n\t\t\tgetConfigManager().reload();\n\t\t}\n\t\tfor (Iterator i = getInstance().configGroups.keySet().iterator(); i.hasNext(); ) {\n\t\t\tString group = (String) i.next();\n\t\t\tif (getConfigManager(group) != null) {\n\t\t\t\tgetConfigManager(group).reload();\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public void initialize() {\n warpController = new WarpController(this);\n kitController = new KitController(this);\n crafting = new CraftingController(this);\n mobs = new MobController(this);\n items = new ItemController(this);\n enchanting = new EnchantingController(this);\n anvil = new AnvilController(this);\n blockController = new BlockController(this);\n hangingController = new HangingController(this);\n entityController = new EntityController(this);\n playerController = new PlayerController(this);\n inventoryController = new InventoryController(this);\n explosionController = new ExplosionController(this);\n requirementsController = new RequirementsController(this);\n worldController = new WorldController(this);\n arenaController = new ArenaController(this);\n arenaController.start();\n if (CompatibilityLib.hasStatistics() && !CompatibilityLib.hasJumpEvent()) {\n jumpController = new JumpController(this);\n }\n File examplesFolder = new File(getPlugin().getDataFolder(), \"examples\");\n examplesFolder.mkdirs();\n\n File urlMapFile = getDataFile(URL_MAPS_FILE);\n File imageCache = new File(dataFolder, \"imagemapcache\");\n imageCache.mkdirs();\n maps = new MapController(this, urlMapFile, imageCache);\n\n // Initialize EffectLib.\n if (com.elmakers.mine.bukkit.effect.EffectPlayer.initialize(plugin, getLogger())) {\n getLogger().info(\"EffectLib initialized\");\n } else {\n getLogger().warning(\"Failed to initialize EffectLib\");\n }\n\n // Pre-create schematic folder\n File magicSchematicFolder = new File(plugin.getDataFolder(), \"schematics\");\n magicSchematicFolder.mkdirs();\n\n // One-time migration of legacy configurations\n migrateConfig(\"enchanting\", \"paths\");\n migrateConfig(\"automata\", \"blocks\");\n migrateDataFile(\"automata\", \"blocks\");\n\n // Ready to load\n load();\n resourcePacks.startResourcePackChecks();\n }" ]
[ "0.5119246", "0.51053715", "0.5039238", "0.5033897", "0.4947291", "0.4931412", "0.48490036", "0.48467612", "0.4817161", "0.47190925", "0.46779945", "0.46641904", "0.46078354", "0.45907772", "0.45712882", "0.4554951", "0.45501715", "0.4538359", "0.45364758", "0.45241082", "0.447348", "0.4472271", "0.44670054", "0.4465488", "0.4461842", "0.44569448", "0.44135788", "0.44028306", "0.4398085", "0.43978322", "0.4388658", "0.4387332", "0.43857306", "0.43665376", "0.4366027", "0.43643934", "0.43602192", "0.4355565", "0.43476456", "0.4338965", "0.43383962", "0.43372434", "0.43355018", "0.43279707", "0.43269542", "0.43256578", "0.43219796", "0.43196192", "0.43138975", "0.4311003", "0.43095914", "0.430332", "0.43011582", "0.42950648", "0.4293592", "0.42889473", "0.42774135", "0.42767504", "0.4271643", "0.42683673", "0.42659074", "0.42617375", "0.42530397", "0.4249093", "0.42490733", "0.4236856", "0.4234426", "0.42294845", "0.4227655", "0.4222597", "0.4222415", "0.42193806", "0.42186216", "0.4217112", "0.4213159", "0.4207353", "0.4202933", "0.4201723", "0.41920954", "0.41842678", "0.4179744", "0.41783333", "0.4174247", "0.4170847", "0.416724", "0.41649866", "0.4162762", "0.41597357", "0.41574425", "0.41571888", "0.41559893", "0.41508347", "0.41479206", "0.41441342", "0.4141416", "0.41391727", "0.41391242", "0.41380855", "0.41364583", "0.41349444" ]
0.66853726
0
build root memory node for lsmEngine
public LSMEngineBuilder<T> buildRootMemNode(T rootMemNode) { lsmEngine.setRootMemNode(rootMemNode); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private HPTNode<K, V> buildRoot() {\n HPTNode<K, V> node = new HPTNode<K, V>(keyIdSequence++, null);\n node.children = reallocate(ROOT_CAPACITY);\n return node;\n }", "public LSMEngine<T> build() {\n return lsmEngine;\n }", "private void createRootNode()\r\n {\r\n root = new Node(\"root\", null);\r\n Node.clear();\r\n }", "private void buildRoot() {\n this.root = new GPRootTreeNode(this.tree);\n }", "public static Node createLargeTree() {\n final int dcCount = 2;\n final int rackCount = 6;\n final int snCount = 6;\n final int hdCount = 12;\n\n int id = 0;\n // root\n Node root = new Node();\n root.setName(\"root\");\n root.setId(id++);\n root.setType(Types.ROOT);\n root.setSelection(Selection.STRAW);\n // DC\n List<Node> dcs = new ArrayList<Node>();\n for (int i = 1; i <= dcCount; i++) {\n Node dc = new Node();\n dcs.add(dc);\n dc.setName(\"dc\" + i);\n dc.setId(id++);\n dc.setType(Types.DATA_CENTER);\n dc.setSelection(Selection.STRAW);\n dc.setParent(root);\n // racks\n List<Node> racks = new ArrayList<Node>();\n for (int j = 1; j <= rackCount; j++) {\n Node rack = new Node();\n racks.add(rack);\n rack.setName(dc.getName() + \"rack\" + j);\n rack.setId(id++);\n rack.setType(StorageSystemTypes.RACK);\n rack.setSelection(Selection.STRAW);\n rack.setParent(dc);\n // storage nodes\n List<Node> sns = new ArrayList<Node>();\n for (int k = 1; k <= snCount; k++) {\n Node sn = new Node();\n sns.add(sn);\n sn.setName(rack.getName() + \"sn\" + k);\n sn.setId(id++);\n sn.setType(StorageSystemTypes.STORAGE_NODE);\n sn.setSelection(Selection.STRAW);\n sn.setParent(rack);\n // hds\n List<Node> hds = new ArrayList<Node>();\n for (int l = 1; l <= hdCount; l++) {\n Node hd = new Node();\n hds.add(hd);\n hd.setName(sn.getName() + \"hd\" + l);\n hd.setId(id++);\n hd.setType(StorageSystemTypes.DISK);\n hd.setWeight(100);\n hd.setParent(sn);\n }\n sn.setChildren(hds);\n }\n rack.setChildren(sns);\n }\n dc.setChildren(racks);\n }\n root.setChildren(dcs);\n return root;\n }", "Entity() {\n this.root = null;\n // As soon as the program is run, we sould start off with 1000 directory\n for (int temp = 0; temp < SIZE; temp++) {\n create(temp);\n }\n\n }", "private MainMemory() {\n\t\tPropertiesParser prop = PropertiesLoader.getPropertyInstance();\n\t\tnumOfbank = prop.getIntProperty(\"sim.mem.numberofbank\", 8);\n\t\tlogger.debug(\"numOfBank in main memory :\"+ numOfbank);\n\t\t\n\t\tinit();\n\t}", "public static OrglRoot makeCoordinateSpace(CoordinateSpace cs) {\n\t/* This should definitely be cached!! We make them all the time probably. */\n\tSomeone.thingToDo();\n\tAboraBlockSupport.enterConsistent(4);\n\ttry {\n\t\treturn new EmptyOrglRoot(cs);\n\t}\n\tfinally {\n\t\tAboraBlockSupport.exitConsistent();\n\t}\n/*\nudanax-top.st:9824:OrglRoot class methodsFor: 'creation'!\nmake.CoordinateSpace: cs {CoordinateSpace}\n\t\"create a new orgl root\"\n\t\"This should definitely be cached!! We make them all the time probably.\"\n\tself thingToDo.\n\tDiskManager consistent: 4 with:\n\t\t[^EmptyOrglRoot create: cs]!\n*/\n}", "Node(Path workDir) {\n vaultManager = new VaultManager(new PersistentVaultService(workDir.resolve(\"vault\")));\n\n clusterService = createClusterService(addr);\n\n raftManager = new Loza(clusterService, workDir);\n\n List<RootKey<?, ?>> rootKeys = List.of(NodeConfiguration.KEY);\n\n List<ConfigurationStorage> localStorage = List.of(new LocalConfigurationStorage(vaultManager));\n\n cfgManager = new ConfigurationManager(rootKeys, localStorage);\n\n metaStorageManager = new MetaStorageManager(\n vaultManager,\n cfgManager,\n clusterService,\n raftManager\n );\n\n cfgStorage = new DistributedConfigurationStorage(metaStorageManager, vaultManager);\n }", "public static void makePersistent(Object root) {\n root = Native.makePersistent(root);\n if (root == null) {\n throw VMExtension.outOfMemoryError;\n } else {\n Native.gc();\n }\n }", "protected void initJvmMemory(MBeanServer paramMBeanServer) throws Exception {\n/* 504 */ String str = getGroupOid(\"JvmMemory\", \"1.3.6.1.4.1.42.2.145.3.163.1.1.2\");\n/* 505 */ ObjectName objectName = null;\n/* 506 */ if (paramMBeanServer != null) {\n/* 507 */ objectName = getGroupObjectName(\"JvmMemory\", str, this.mibName + \":name=sun.management.snmp.jvmmib.JvmMemory\");\n/* */ }\n/* 509 */ JvmMemoryMeta jvmMemoryMeta = createJvmMemoryMetaNode(\"JvmMemory\", str, objectName, paramMBeanServer);\n/* 510 */ if (jvmMemoryMeta != null) {\n/* 511 */ jvmMemoryMeta.registerTableNodes(this, paramMBeanServer);\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 517 */ JvmMemoryMBean jvmMemoryMBean = (JvmMemoryMBean)createJvmMemoryMBean(\"JvmMemory\", str, objectName, paramMBeanServer);\n/* 518 */ jvmMemoryMeta.setInstance(jvmMemoryMBean);\n/* 519 */ registerGroupNode(\"JvmMemory\", str, objectName, jvmMemoryMeta, jvmMemoryMBean, paramMBeanServer);\n/* */ } \n/* */ }", "public ProgramModule createRootModule(String treeName) throws DuplicateNameException;", "protected abstract SharedMemory make_infos();", "public TreeRootNode() {\n super(\"root\");\n }", "public static Node buildWorld(AssetManager assetManager) {\n TextureKey keyFloor = new TextureKey(\"Models/Scene/wall_diffuse_1.jpg\", false);// pave_color.jpg\n Texture texFloor = assetManager.loadTexture(keyFloor);\n\n TextureKey keyNorm = new TextureKey(\"Models/Scene/wall_normal.jpg\", false);// pave_norm.jpg\n Texture texNormalPlane = assetManager.loadTexture(keyNorm);\n\n Material mat_basic = new Material(assetManager, \"Common/MatDefs/Light/PBRLighting.j3md\");\n mat_basic.setTexture(\"BaseColorMap\", texFloor);\n mat_basic.setTexture(\"NormalMap\", texNormalPlane);\n mat_basic.setFloat(\"Metallic\", 0.1f);\n mat_basic.setFloat(\"Roughness\", 0.00f);\n mat_basic.setFloat(\"Glossiness\", 0.5f);\n\n // Must be false - otherwise uv gets messed up.\n TextureKey keyFloor2 = new TextureKey(\"Models/Scene/deck.jpg\", false);\n Texture texFloor2 = assetManager.loadTexture(keyFloor2);\n TextureKey keyNorm2 = new TextureKey(\"Models/Scene/deck_normal.jpg\", false);\n Texture texNormalPlane2 = assetManager.loadTexture(keyNorm2);\n\n Material mat_basic2 = new Material(assetManager, \"Common/MatDefs/Light/PBRLighting.j3md\");\n mat_basic2.setTexture(\"BaseColorMap\", texFloor2);\n mat_basic2.setFloat(\"Metallic\", 0.1f);\n mat_basic2.setFloat(\"Roughness\", 0.1f);\n mat_basic2.setTexture(\"NormalMap\", texNormalPlane2);\n // Scene\n Node scene = (Node) assetManager.loadModel(\"Models/Scene/testScene.gltf\");\n\n // Tiling\n ((Geometry) scene.getChild(\"Plane\")).getMesh().scaleTextureCoordinates(new Vector2f(4, 4));\n mat_basic.getTextureParam(\"BaseColorMap\").getTextureValue().setWrap(WrapMode.Repeat);\n mat_basic.getTextureParam(\"NormalMap\").getTextureValue().setWrap(WrapMode.Repeat);\n // Tex for scene\n scene.getChild(\"Plane\").setMaterial(mat_basic);\n scene.getChild(\"Cube\").setMaterial(mat_basic2);\n\n Node probeNode = (Node) assetManager.loadModel(\"Models/Scene/market.j3o\");\n LightProbe probe = (LightProbe) probeNode.getLocalLightList().iterator().next();\n scene.addLight(probe);\n\n // We must add a light to make the model visible\n // Light\n DirectionalLight sun = new DirectionalLight();\n sun.setColor(ColorRGBA.White.mult(0.75f));\n sun.setDirection(new Vector3f(-.5f, -.5f, -.5f).normalizeLocal());\n scene.addLight(sun);\n\n return scene;\n }", "public Node()\n {\n this.name=\"/\";\n this.type=0;\n this.stage=0;\n children=new ArrayList<Node>();\n }", "public interface NodeRoot extends RootVertex<Node> {\n\n\tpublic static final String TYPE = \"nodes\";\n\n\t/**\n\t * Create a new node.\n\t * \n\t * @param user\n\t * User that is used to set creator and editor references\n\t * @param container\n\t * Schema version that should be used when creating the node\n\t * @param project\n\t * Project to which the node should be assigned to\n\t * @return Created node\n\t */\n\tdefault Node create(HibUser user, HibSchemaVersion container, HibProject project) {\n\t\treturn create(user, container, project, null);\n\t}\n\n\t/**\n\t * Create a new node.\n\t * \n\t * @param user\n\t * User that is used to set creator and editor references\n\t * @param container\n\t * Schema version that should be used when creating the node\n\t * @param project\n\t * Project to which the node should be assigned to\n\t * @param uuid\n\t * Optional uuid\n\t * @return Created node\n\t */\n\tNode create(HibUser user, HibSchemaVersion container, HibProject project, String uuid);\n\n}", "abstract AbstractRuntimeServiceNode<T> newRuntimeNode();", "protected IsamIndexNode getRoot() {\n\t\treturn root;\n\t}", "protected JvmMemoryMeta createJvmMemoryMetaNode(String paramString1, String paramString2, ObjectName paramObjectName, MBeanServer paramMBeanServer) {\n/* 541 */ return new JvmMemoryMeta(this, this.objectserver);\n/* */ }", "public static void initializeMemory(){\n\t\tif(memory == null){\n\t\t\tmemory = new TreeMap<String,String>();\n\t\t\tfor(int i=0;i<2048;i++){\n\t\t\t\tmemory.put(Utility.decimalToHex(i, 3), null);\n\t\t\t}\n\t\t\tmemory_fmbv = new int[256];\n\t\t\tfor(int i:memory_fmbv){\n\t\t\t\tmemory_fmbv[i] = 0;\n\t\t\t}\n\t\t}\n\t\tif(diskJobStorage == null){\n\t\t\tdiskJobStorage = new TreeMap<String,DiskSMT>();\n\t\t}\n\t}", "void nodeCreate( long id );", "private void buildComponent() {\n\t\tStoreItemCell cell = new StoreItemCell(\"Turret\");\n\t\tcell.initialize(mySize);\n\t\tmyContainer.getChildren().add(cell.getNode());\n\t}", "public Node()\n {\n \n name = new String();\n type = new String(\"internal\"); //Initial Node type set to internal\n length = new Double(0); //Set initial branch length to zero\n children = new ArrayList<Node>();\n level = 0;\n treesize = new Double(0);\n depth = 0;\n newicklength = 0;\n startycoord = -1;\n startxcoord = -1;\n endxcoord = -1;\n endycoord = -1;\n standardy = -1;\n selected = false;\n xmultiplier = 0;\n ymultiplier = 0;\n }", "Node(){\n\t\t\tthis.array = new Node[256];\n\t\t\tthis.val = null;\n\t\t}", "protected CreateMachineNodeModel() {\r\n super(0,1);\r\n }", "public Engine build() {\n this.extensions.add(new CoreExtension());\n \n // load extensions\n this.extensions.forEach(extension -> {\n this.renderers.putAll(extension.getRenderers());\n this.directives.putAll(extension.getDirectives());\n this.nodeParsers.putAll(extension.getNodeParsers());\n this.filters.putAll(extension.getFilters());\n this.tests.putAll(extension.getTests());\n this.unaryOperators.putAll(extension.getUnaryOperators());\n this.binaryOperators.putAll(extension.getBinaryOperators());\n this.factories.addAll(extension.getNodeVisitorFactories());\n this.safeNodes.addAll(extension.getSafeNodes());\n });\n \n // create an operator token parser\n TokenParser unaryOperatorParser = TokenParser.in(TokenType.OPERATOR, this.unaryOperators.keySet().toArray(new String[]{}));\n TokenParser binaryOperatorParser = TokenParser.in(TokenType.OPERATOR, this.binaryOperators.keySet().toArray(new String[]{}));\n TokenParser operatorParser = unaryOperatorParser.or(binaryOperatorParser);\n \n // create a execute token parser\n TokenParser executeOpenParser = TokenParser.from(TokenType.EXECUTE_OPEN, compile(quote(this.executeOpen)), false);\n TokenParser executeCloseParser = TokenParser.from(TokenType.EXECUTE_CLOSE, compile(quote(this.executeClose)), false);\n TokenParser executeParser = executeOpenParser.then(NAME).then(operatorParser.or(EXPRESSION).until(executeCloseParser));\n this.starts.add(this.executeOpen);\n \n // create a print token parser\n TokenParser printOpenParser = TokenParser.from(TokenType.PRINT_OPEN, compile(quote(this.printOpen)), false);\n TokenParser printCloseParser = TokenParser.from(TokenType.PRINT_CLOSE, compile(quote(this.printClose)), false);\n TokenParser printParser = printOpenParser.then(operatorParser.or(EXPRESSION).until(printCloseParser));\n this.starts.add(this.printOpen);\n \n // create a comment token parser\n TokenParser commentOpenParser = TokenParser.from(TokenType.COMMENT_OPEN, compile(quote(this.commentOpen)), false);\n TokenParser commentCloseParser = TokenParser.from(TokenType.COMMENT_CLOSE, compile(quote(this.commentClose)), false);\n TokenParser commentInner = TokenParser.until(TokenType.TEXT, this.commentClose);\n TokenParser commentParser = commentOpenParser.then(commentInner.optional()).then(commentCloseParser);\n this.starts.add(this.commentOpen);\n \n // create a text token parser\n TokenParser leadingText = TokenParser.until(TokenType.TEXT, this.starts);\n TokenParser text = TokenParser.from(TokenType.TEXT, Pattern.compile(\"^.*\", Pattern.DOTALL | Pattern.MULTILINE), false);\n \n TokenParser principal = commentParser.or(executeParser).or(printParser).or(leadingText).zeroOrMore().then(text.optional()).then(EOF);\n this.tokenizerBuilder.parser(principal);\n Tokenizer tokenizer = this.tokenizerBuilder.build();\n \n ExpressionParser expressionParser = new ExpressionParser(this.unaryOperators, this.binaryOperators);\n \n Engine engine = new Engine(this.environment, expressionParser,\n renderers, directives, nodeParsers, \n filters, tests, factories, safeNodes,\n tokenizer);\n return engine;\n }", "private void createModel() {\n model = new Node(\"Enemy\"+enemyCounter);\n Box b = new Box(.5f, 2, .5f);\n Geometry bg = new Geometry(\"Box\", b);\n Material bm = new Material(assetManager, \"Common/MatDefs/Misc/Unshaded.j3md\");\n Sphere sphere = new Sphere(32, 32, 1.5f, false, false);\n Geometry sg = new Geometry(\"Sphere\", sphere);\n Material sm = new Material(assetManager, \"Common/MatDefs/Misc/Unshaded.j3md\");\n bm.setColor(\"Color\", ColorRGBA.Blue);\n sm.setColor(\"Color\", ColorRGBA.Red);\n bg.setMaterial(bm); \n sg.setMaterial(sm);\n model.attachChild(bg);\n model.attachChild(sg);\n sg.setLocalTranslation(0,2.5f,0);\n \n attachChild(model);\n }", "private void init() {\n myNodeDetails = new NodeDetails();\n try {\n //port will store value of port used for connection\n //eg: port = 5554*2 = 11108\n String port = String.valueOf(Integer.parseInt(getMyNodeId()) * 2);\n //nodeIdHash will store hash of nodeId =>\n // eg: nodeIdHash = hashgen(5554)\n String nodeIdHash = genHash(getMyNodeId());\n myNodeDetails.setPort(port);\n myNodeDetails.setNodeIdHash(nodeIdHash);\n myNodeDetails.setPredecessorPort(port);\n myNodeDetails.setSuccessorPort(port);\n myNodeDetails.setSuccessorNodeIdHash(nodeIdHash);\n myNodeDetails.setPredecessorNodeIdHash(nodeIdHash);\n myNodeDetails.setFirstNode(true);\n\n if (getMyNodeId().equalsIgnoreCase(masterPort)) {\n chordNodeList = new ArrayList<NodeDetails>();\n chordNodeList.add(myNodeDetails);\n }\n\n } catch (Exception e) {\n Log.e(TAG,\"**************************Exception in init()**********************\");\n e.printStackTrace();\n }\n }", "public static void build ()\r\n {\r\n lgt.insert(1);\r\n lgt.insert(2);\r\n lgt.insert(5);\r\n \r\n lgt.findRoot();\r\n lgt.insert(3);\r\n \r\n lgt.findRoot();\r\n lgt.insert(4);\r\n \r\n lgt.insert(6);\r\n lgt.findParent();\r\n lgt.insert(7);\r\n \r\n }", "public GenealogyTree(T root) {\r\n tree = (T[]) new Object[SIZE];\r\n tree[0] = root;\r\n }", "protected abstract Nfa buildInternal();", "public void buildMap() {\n // CUBES ENGINE INITIALIZATION MOVED TO APPSTATE METHOD\n // Here we init cubes engine\n CubesTestAssets.registerBlocks();\n CubesSettings blockSettings = CubesTestAssets.getSettings(this.app);\n blockSettings.setBlockSize(5);\n //When blockSize = 5, global coords should be multiplied by 3 \n this.blockScale = 3.0f;\n this.halfBlockStep = 0.5f;\n \n testTerrain = new BlockTerrainControl(CubesTestAssets.getSettings(this.app), new Vector3Int(4, 1, 4));\n testNode = new Node();\n int wallHeight = 3;\n //testTerrain.setBlockArea(new Vector3Int(0, 0, 0), new Vector3Int(32, 1, 64), CubesTestAssets.BLOCK_STONE);\n this.testTerrain.setBlockArea( new Vector3Int(3,0,43), new Vector3Int(10,1,10), CubesTestAssets.BLOCK_STONE); // Zone 1 Floor\n this.testTerrain.setBlockArea( new Vector3Int(3,1,43), new Vector3Int(10,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // South Wall\n this.testTerrain.setBlockArea( new Vector3Int(3,1,52), new Vector3Int(10,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // North Wall\n this.testTerrain.setBlockArea( new Vector3Int(3,1,43), new Vector3Int(1,wallHeight,10), CubesTestAssets.BLOCK_WOOD); // West Wall\n this.testTerrain.setBlockArea( new Vector3Int(12,1,43), new Vector3Int(1,wallHeight,10), CubesTestAssets.BLOCK_WOOD); // East Wall\n \n this.testTerrain.removeBlockArea( new Vector3Int(12,1,46), new Vector3Int(1,wallHeight,4)); // Door A\n \n this.testTerrain.setBlockArea( new Vector3Int(12,0,45), new Vector3Int(13,1,6), CubesTestAssets.BLOCK_STONE); // Zone 2 Floor A\n this.testTerrain.setBlockArea( new Vector3Int(12,1,45), new Vector3Int(8,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // South Wall\n this.testTerrain.setBlockArea( new Vector3Int(12,1,50), new Vector3Int(13,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // North Wall\n this.testTerrain.setBlockArea(new Vector3Int(19,0,42), new Vector3Int(6,1,3), CubesTestAssets.BLOCK_STONE); // Zone 2 Floor B\n this.testTerrain.setBlockArea( new Vector3Int(19,1,42), new Vector3Int(1,wallHeight,3), CubesTestAssets.BLOCK_WOOD); //\n this.testTerrain.setBlockArea( new Vector3Int(24,1,42), new Vector3Int(1,wallHeight,9), CubesTestAssets.BLOCK_WOOD); //\n \n this.testTerrain.setBlockArea( new Vector3Int(15,0,26), new Vector3Int(18,1,17), CubesTestAssets.BLOCK_STONE); // Zone 3 Floor\n this.testTerrain.setBlockArea( new Vector3Int(15,1,42), new Vector3Int(18,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // South Wall\n this.testTerrain.setBlockArea( new Vector3Int(15,1,26), new Vector3Int(18,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // North Wall\n this.testTerrain.setBlockArea( new Vector3Int(15,1,26), new Vector3Int(1,wallHeight,17), CubesTestAssets.BLOCK_WOOD); // West Wall\n this.testTerrain.setBlockArea( new Vector3Int(32,1,26), new Vector3Int(1,wallHeight,17), CubesTestAssets.BLOCK_WOOD); // East Wall\n \n this.testTerrain.removeBlockArea( new Vector3Int(20,1,42), new Vector3Int(4,wallHeight,1)); // Door B\n this.testTerrain.removeBlockArea( new Vector3Int(15,1,27), new Vector3Int(1,wallHeight,6)); // Door C\n \n this.testTerrain.setBlockArea( new Vector3Int(10,0,26), new Vector3Int(5,1,8), CubesTestAssets.BLOCK_STONE); // Zone 4 Floor A\n this.testTerrain.setBlockArea( new Vector3Int(10,1,26), new Vector3Int(5,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // South Wall\n this.testTerrain.setBlockArea( new Vector3Int(3,0,18), new Vector3Int(8,1,16), CubesTestAssets.BLOCK_STONE); // Zone 4 Floor B\n this.testTerrain.setBlockArea( new Vector3Int(3,1,18), new Vector3Int(1,wallHeight,16), CubesTestAssets.BLOCK_WOOD); // East Wall\n this.testTerrain.setBlockArea( new Vector3Int(10,1,18), new Vector3Int(1,wallHeight,9), CubesTestAssets.BLOCK_WOOD); // West Wall\n this.testTerrain.setBlockArea( new Vector3Int(3,1,33), new Vector3Int(13,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // North Wall\n \n this.testTerrain.setBlockArea( new Vector3Int(1,0,5), new Vector3Int(26,1,14), CubesTestAssets.BLOCK_STONE); // Zone 5\n this.testTerrain.setBlockArea( new Vector3Int(1,1,18), new Vector3Int(26,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // South Wall\n this.testTerrain.setBlockArea( new Vector3Int(1,1,5), new Vector3Int(26,wallHeight,1), CubesTestAssets.BLOCK_WOOD); // North Wall\n this.testTerrain.setBlockArea( new Vector3Int(1,1,5), new Vector3Int(1,wallHeight,14), CubesTestAssets.BLOCK_WOOD); // West Wall\n this.testTerrain.setBlockArea( new Vector3Int(26,1,5), new Vector3Int(1,wallHeight,14), CubesTestAssets.BLOCK_WOOD); // East Wall\n \n this.testTerrain.removeBlockArea( new Vector3Int(4,1,18), new Vector3Int(6,wallHeight,1)); // Door E\n \n // Populate the world with spawn points\n this.initSpawnPoints();\n \n //Add voxel world/map to collisions\n testTerrain.addChunkListener(new BlockChunkListener(){\n @Override\n public void onSpatialUpdated(BlockChunkControl blockChunk){\n Geometry optimizedGeometry = blockChunk.getOptimizedGeometry_Opaque();\n phyTerrain = optimizedGeometry.getControl(RigidBodyControl.class);\n if(phyTerrain == null){\n phyTerrain = new RigidBodyControl(0);\n optimizedGeometry.addControl(phyTerrain);\n bulletAppState.getPhysicsSpace().add(phyTerrain);\n }\n phyTerrain.setCollisionShape(new MeshCollisionShape(optimizedGeometry.getMesh()));\n }\n });\n \n testNode.addControl(testTerrain);\n rootNode.attachChild(testNode);\n }", "public PhysicalMemory()\n {\n frames = new TreeMap<Long, MemoryFrame>();\n for (int i = 0; i < Const.MEM_FRAMES; i++) {\n MemoryFrame frame = new MemoryFrame(i);\n Long zero = new Long(i);\n frames.put(zero, frame);\n }\n }", "abstract protected T createModuleNode(NodeDescriptor node);", "public TDTree(TriangleShape root,int leafCapacity,StorageManager sm,JavaSparkContext sparkContext) {\n super(root,leafCapacity);\n triangleEncoder = new TriangleEncoder((TriangleShape)this.baseTriangle);\n storageManager=sm;\n leafInfos = new HashMap<>();\n\n emptyNodes = new ArrayList<String>();\n emptyNodes.add(\"1\");\n sparkRDD=null;\n constructedRDD= new AtomicBoolean(false);\n this.sparkContext=sparkContext;\n }", "Memory() {}", "private BinaryTree() {\n root = new Node(0);\n }", "public LSystemBuilderImpl() {\n\t\tthis.commands = new Dictionary();\n\t\tthis.productions = new Dictionary();\n\t\tunitLength = 0.1;\n\t\tunitLengthDegreeScaler = 1;\n\t\torigin = new Vector2D(0, 0);\n\t\tangle = 0;\n\t\taxiom = \"\";\n\t}", "private Virtualnetworkmanager createVirtualnetworkmanager() throws DatatypeConfigurationException {\n\t\t\n\t\tVirtualnetworkmanager root = objFactory.createVirtualnetworkmanager();\n\t\t\t\n\t\t// create catalog\n\t\tCatalog catalog = createCatalog();\n\t\t// create nffgs\n\t\tSet<Nffg> nffgs = createNffgs();\n\t\t// create in\n\t\tIn in = createIn();\n\t\t\n\t\t// populate the root element\n\t\troot.setCatalog(catalog);\n\t\tfor(Nffg nffg : nffgs){\n\t\t\troot.getNffg().add(nffg);\n\t\t}\t\t\t\n\t\troot.setIn(in);\n\t\t\n\t\treturn root;\n\t\t\n\t}", "@Override\n protected void createRootDir() {\n }", "private void init() {\n if (root == null) {\n root = buildRoot();\n }\n }", "public void BuildTree() {\n MerkleTree tmpMerkleTree = new MerkleTree();\n\n //assign core information into this block from merkleTree\n this.merkleRoot = tmpMerkleTree.getMerkleRoot();\n this.blockBody = tmpMerkleTree;\n }", "public void allocateNode(int processId){\n this.processId = processId;\n this.full = true;\n }", "public static void main(String[] args) {\n\t\tnem cpu = new nem();\r\n\t\t//creaye an object of inner class Processor using outer class\r\n\t\tnem.Processor processor = cpu.new Processor();\r\n\t\t//create an object of inner class RAM using outer class Multiarray\r\n\t\t\r\n\t\tnem.RAM ram = cpu.new RAM();\r\n\t\tSystem.out.println(\"\" + processor.getCache());\r\n\t\tSystem.out.println(\"\" + ram.getClockSpeed());\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public static void main(String[] args) throws Exception {\n int B = 4096; //bytes max por pagina\n int M = 200; //cantidad de rectangulos tal que el nodo no pese mas que B\n\n int maxCord = 500000;\n int maxDelta = 100;\n\n Random rnd = new Random();\n\n int m = (M * 40) / 100; // m = 40% M\n\n int left = rnd.nextInt(maxCord);\n int bottom = rnd.nextInt(maxCord);\n int deltaX = rnd.nextInt(maxDelta);\n int deltaY = rnd.nextInt(maxDelta);\n\n Rectangle r = new Rectangle(left, left + deltaX, bottom + deltaY, bottom);\n DiskController diskController = new DiskController(M);\n long address = diskController.memoryAssigner();\n Node tree = new Root(m, M, r, diskController, address);\n\n diskController.saveNode(tree);\n long rootSize =diskController.getNodeSize(address);\n System.out.println(\"Tamaño de raiz : \" + rootSize + \" bytes\");\n\n int n=0;\n while (diskController.getNodeSize(address) < B){\n if(n==157) { break;}\n n++;\n Rectangle rn;\n left = rnd.nextInt(maxCord);\n bottom = rnd.nextInt(maxCord);\n deltaX = rnd.nextInt(maxDelta);\n deltaY = rnd.nextInt(maxDelta);\n rn = new Rectangle(left, left + deltaX, bottom + deltaY, bottom);\n tree.insert(rn, new LinearSplit());\n System.out.println(\"Rectangulos insertados : \" + n);\n }\n float nodeCoverage = diskController.nodeOcupation();\n System.out.println(\"Coverage : \"+nodeCoverage);\n System.out.println(\"Tamaño de raiz llena : \" + diskController.getNodeSize(address) + \" bytes, con \"+n+\" nodos insertados. Con raiz vacía de \"+rootSize+\" bytes\");\n //Tamaño de raiz llena : 4089 bytes, con 157 nodos insertados. Con raiz vacía de 478 bytes\n\n }", "public ProgramModule getRootModule(long treeID);", "public PlainMemory(String name)\n\t{\n\t\tsuper(name);\n\t\t\t\n\t}", "public MarkusMachine ()\n {\n fMemory = new Hashtable <String, Object> ();\n }", "protected abstract Node createCenterContent();", "public VMKernel() {\n }", "private void instantiate(){\n inputAddressList = new LinkedList<Address>();\n inputGroupList = new LinkedList<Group>();\n root = new Group(\"root\", 0);\n }", "public LG(){\n\t\tchildren = new LinkedHashMap<Loop, LinkedHashSet<Loop>>();\n\t\tparent = new LinkedHashMap<Loop, Loop>();\n\t\tloops = new LinkedHashSet<Loop>();\n\t\tloopCounter = new LinkedHashMap<Loop, Integer>();\n\t}", "@Override\n\tpublic LSystem build() {\n\t\t\n\t\t/**\n\t\t * Nested class which implements the LSystem and provides two essential methods\n\t\t * for building the LSystem: draw and generate.\n\t\t * @author Alen Carin\n\t\t *\n\t\t */\n\t\tclass LSystemImpl implements LSystem {\n\n\t\t\t/**\n\t\t\t * Method used for drawing the Lyndermayer system.\n\t\t\t * Calls method generate to generate all of the productions and \n\t\t\t * executes all the commands that are in the generated string.\n\t\t\t */\n\t\t\t@Override\n\t\t\tpublic void draw(int depth, Painter painter) {\n\t\t\t\tTurtleState state = new TurtleState(\n\t\t\t\t\t\torigin.copy(), \n\t\t\t\t\t\tnew Vector2D(1, 0).rotated(angle), \n\t\t\t\t\t\tColor.BLACK,\n\t\t\t\t\t\tunitLength * Math.pow(unitLengthDegreeScaler, depth)\n\t\t\t\t\t\t);\n\t\t\t\tContext context = new Context();\n\t\t\t\tcontext.pushState(state);\n\t\t\t\tchar[] sequence = generate(depth).toCharArray();\n\t\t\t\t\n\t\t\t\texecuteAllCommands(context, painter, sequence);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Recursive method which generates a string of actions \n\t\t\t * which are generated from productions for the given depth.\n\t\t\t */\n\t\t\t@Override\n\t\t\tpublic String generate(int depth) {\n\t\t\t\tStringBuilder builder = new StringBuilder();\n\t\t\t\tif(depth == 0) {\n\t\t\t\t\treturn axiom;\n\t\t\t\t}\n\t\t\t\tbuilder.append(generate(depth-1));\n\t\t\t\t\n\t\t\t\tchar[] array = builder.toString().toCharArray();\n\t\t\t\tString result = new String();\n\t\t\t\tfor(int i = 0; i < array.length; i++) {\n\t\t\t\t\tString production = (String) productions.get(array[i]);\n\t\t\t\t\tif(production != null) {\n\t\t\t\t\t\tresult += production;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tresult += array[i];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn new LSystemImpl();\n\t}", "public LeftistHeap() {\n root = null;\n }", "protected void makeTheTree(){\n\n structure.getRootNode().branchList.add(structure.getNode11());\n structure.getRootNode().branchList.add(structure.getNode12());\n structure.getRootNode().branchList.add(structure.getNode13());\n\n structure.getNode11().branchList.add(structure.getNode111());\n structure.getNode11().branchList.add(structure.getNode112());\n structure.getNode11().branchList.add(structure.getNode113());\n\n structure.getNode13().branchList.add(structure.getNode131());\n\n structure.getNode112().branchList.add(structure.getNode1121());\n\n }", "public static ResolutionNode generateResolutionTree(){\n\t\tConnection con = null;\n\t\ttry {\n\t\t\tcon = getConnection();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t};\n\t\tResolutionNode tree = new ResolutionNode();\n\t\ttree.setAc_id(0);\n\t\ttree.setName(\"root\");\n\t\ttree.setPath(\"\");\n\t\ttree.setSupertype(tree);\n\t\tResolutionNode r = generateResolutionTree(0, tree, new ArrayList<ContextParameterType>(), new ArrayList<QualityParameterType>(), new ArrayList<CostParameterType>(), new ArrayList<RankingParameterType>(), \"root\");\n\t\tcloseConnnection(con);\n\t\treturn r;\n\t}", "public StorageUnit getRoot();", "private void constructTree() {\r\n\t\tsortLeaves();\r\n\t\tNode currentNode;\r\n\t\tint index = 0;\r\n\t\t\tdo{\r\n\t\t\t\t// Create a new node with the next two least frequent nodes as its children\r\n\t\t\t\tcurrentNode = new Node(this.treeNodes[0], this.treeNodes[1]); \r\n\t\t\t\taddNewNode(currentNode);\r\n\t\t\t}\r\n\t\t\twhile (this.treeNodes.length > 1); // Until there is only one root node\r\n\t\t\tthis.rootNode = currentNode;\r\n\t\t\tindex++;\r\n\t}", "public void setRoot(WAVLNode root)\r\n\t {\r\n\t\t this.root = root;\r\n\t }", "public interface Backend {\n\n\t/**\n\t * The predefined size of a program's working memory array.\n\t */\n\tpublic int MEM_SIZE = 9001;\n\n\t/**\n\t * Performs code generation for the AST specified.\n\t * \n\t * @param root of AST\n\t */\n\tpublic void work(RootNode root) throws Exception;\n}", "protected JvmOSMeta createJvmOSMetaNode(String paramString1, String paramString2, ObjectName paramObjectName, MBeanServer paramMBeanServer) {\n/* 217 */ return new JvmOSMeta(this, this.objectserver);\n/* */ }", "public VMKernel()\n {\n super();\n }", "public NodeMap<CDMNode, DapNode> create() throws DapException {\n // Netcdf Dataset will already have a root group\n Group cdmroot = ncfile.getRootGroup();\n this.nodemap.put(cdmroot, this.dmr);\n fillGroup(cdmroot, this.dmr, ncfile);\n return this.nodemap;\n }", "void createNode(NodeKey key);", "public static KDNode[] RootBuff() {\n\n\t\t int offset = 0;\n\t\t KDNode[] buff = new KDNode[root_map.size()];\n\t\t for(KDNode k : root_map) {\n\t\t\t buff[offset++] = k;\n\t\t }\n\t\t \n\t\t return buff;\n\t}", "public static MainMemory getInstance(){ \n\t\treturn memory;\n\t}", "private NodeDB() {\n\t\tNodeInfo me = new NodeInfo();\n\t\tme.alive = true;\n\t\tme.nodecomms = ConfigManager.get().node_interface;\n\t\tme.nodehash = ConfigManager.get().nodehash;\n\t\tme.timestamp = System.currentTimeMillis();\n\t\tthis.update(new NodeDB.NodeInfo[] { me });\n\t\tthis.random = new Random();\n\t\tthis.random.setSeed(System.currentTimeMillis());\n\t}", "private void initializeNodes() {\n for (NasmInst inst : nasm.listeInst) {\n Node newNode = graph.newNode();\n inst2Node.put(inst, newNode);\n node2Inst.put(newNode, inst);\n if (inst.label != null) {\n NasmLabel label = (NasmLabel) inst.label;\n label2Inst.put(label.toString(), inst);\n }\n }\n }", "public native void initPhysFS();", "@Override\n public void initEngine() {\n \n }", "@Override\n public void initEngine() {\n \n }", "private BTNode createNode() {\n BTNode btNode;\n btNode = new <DataPair>BTNode ();\n btNode.mIsLeaf = true;\n btNode.mCurrentKeyNum = 0;\n return btNode;\n }", "private void addGlobalNodes() {\n for (Procedure proc : globalProcSet) {\n CFGraph cfg = cfgMap.get(proc);\n// System.out.println(\"ExitNode Size: \" + cfg.getExitNodes().size() + \", proc: \" + proc.getSymbolName());\n DFANode node = cfg.getEntry();\n // entry cfgNode\n DFANode entryNode = new DFANode();\n entryNode.putData(\"cfg_node\", node);\n entryNode.putData(\"psg_type\", \"entry\");\n accessIdxMap.put(\"entry_\" + proc.getSymbolName(), entryNode);\n node.putData(\"psg_entry_global\", entryNode);\n // exit cfgNode\n List<DFANode> exitNodeList = cfg.getExitNodes();\n int idx = 0;\n for (DFANode dfaNode : exitNodeList) {\n DFANode exitNode = new DFANode();\n exitNode.putData(\"cfg_node\", dfaNode);\n exitNode.putData(\"psg_type\", \"exit\");\n accessIdxMap.put(\"exit_\" + proc.getSymbolName() + idx++, exitNode);\n dfaNode.putData(\"psg_exit_global\", exitNode);\n }\n }\n\n // add call and return cfgNode (must check all the procs)\n for (Procedure proc : procList) {\n CFGraph cfg = cfgMap.get(proc);\n Iterator cfgIter = cfg.iterator();\n while (cfgIter.hasNext()) {\n DFANode node = (DFANode) cfgIter.next();\n Traversable currentIR = (Traversable) CFGraph.getIR(node);\n if (currentIR == null) {\n continue;\n }\n List<FunctionCall> fcList = IRTools.getFunctionCalls(currentIR);\n if (fcList == null || fcList.size() == 0) {\n continue;\n }\n Set<DFANode> callList = new HashSet<DFANode>();\n Set<DFANode> returnList = new HashSet<DFANode>();\n for (FunctionCall fc : fcList) {\n Procedure callee = fc.getProcedure();\n if (callee == null) {\n continue;\n }\n if (globalProcSet.contains(callee) == false) {\n continue;\n }\n DFANode callNode = new DFANode();\n callNode.putData(\"cfg_node\", node);\n callNode.putData(\"psg_type\", \"call\");\n callNode.putData(\"proc\", callee);\n callList.add(callNode);\n DFANode entryNode = accessIdxMap.get(\"entry_\" + callee.getSymbolName());\n if (entryNode == null) {\n throw new RuntimeException(\"No Entry Node found: \" + \"entry_\" + callee.getSymbolName());\n }\n callNode.addSucc(entryNode);\n entryNode.addPred(callNode);\n // return\n DFANode returnNode = new DFANode();\n returnNode.putData(\"cfg_node\", node);\n returnNode.putData(\"psg_type\", \"return\");\n returnNode.putData(\"proc\", callee);\n returnList.add(returnNode);\n CFGraph cfgCallee = cfgMap.get(callee);\n List<DFANode> calleeExitList = cfgCallee.getExitNodes();\n for (int idx = 0; idx < calleeExitList.size(); idx++) {\n DFANode exitNode = accessIdxMap.get(\"exit_\" + callee.getSymbolName() + idx);\n if (exitNode == null) {\n throw new RuntimeException(\"No Exit Node found: \" + \"exit_\" + callee.getSymbolName());\n }\n returnNode.addPred(exitNode);\n exitNode.addSucc(returnNode);\n }\n }\n if (callList.size() > 0) {\n node.putData(\"psg_call_global\", callList);\n }\n if (returnList.size() > 0) {\n node.putData(\"psg_return_global\", returnList);\n }\n }\n }\n }", "public Element encode(DocumentBuilderFactory factory, DocumentBuilder builder, Document document)\n\t{\n\t\t// create element\n\t\tElement element = document.createElement(\"SycamoreSystemMemory\");\n\n\t\t// children\n\t\tElement selfPositionsElem = document.createElement(\"selfPositions\");\n\t\tfor (int i = 0; i < selfPositions.size(); i++)\n\t\t{\n\t\t\tElement selfpositionElem = document.createElement(\"selfPosition\");\n\n\t\t\tP position = selfPositions.elementAt(i);\n\t\t\tselfpositionElem.appendChild(position.encode(factory, builder, document));\n\t\t\tselfPositionsElem.appendChild(selfpositionElem);\n\t\t}\n\n\t\tElement snapshotsElem = document.createElement(\"snapshots\");\n\t\tfor (int i = 0; i < snapshots.size(); i++)\n\t\t{\n\t\t\tElement snapshotElem = document.createElement(\"snapshot\");\n\t\t\tVector<P> points = snapshots.elementAt(i);\n\t\t\tfor (int j = 0; j < points.size(); j++)\n\t\t\t{\n\t\t\t\tElement positionElem = document.createElement(\"position\");\n\n\t\t\t\tP position = points.elementAt(j);\n\t\t\t\tpositionElem.appendChild(position.encode(factory, builder, document));\n\t\t\t\tsnapshotElem.appendChild(positionElem);\n\t\t\t}\n\n\t\t\tsnapshotsElem.appendChild(snapshotElem);\n\t\t}\n\n\t\t// append children\n\t\telement.appendChild(selfPositionsElem);\n\t\telement.appendChild(snapshotsElem);\n\n\t\treturn element;\n\t}", "public static void main(String[] args) {\n PointerTree<Integer> arbol = new PointerTree<>();\n\n Node<Integer> raiz = arbol.getRoot();\n raiz.setLabel(1);\n\n Node<Integer> hijo1 = new PointerTreeNode<>();\n hijo1.setLabel(2);\n Node<Integer> hijo2 = new PointerTreeNode<>();\n hijo2.setLabel(3);\n raiz.addChild(hijo1);\n raiz.addChild(hijo2);\n\n\n\n\n }", "public static Node constructTree() {\n\n Node node2 = new Node(2, null, null);\n Node node8 = new Node(8, null, null);\n Node node12 = new Node(12, null, null);\n Node node17 = new Node(17, null, null);\n\n Node node6 = new Node(6, node2, node8);\n Node node15 = new Node(15, node12, node17);\n\n //Root Node\n Node node10 = new Node(10, node6, node15);\n\n return node10;\n }", "public Engine() {\n super(0,0,0,0,null, \"ENGINE\");\n }", "@SuppressWarnings(\"unchecked\")\n\t\tvoid init() {\n\t\t\tsetNodes(offHeapService.newArray(JudyIntermediateNode[].class, NODE_SIZE, true));\n\t\t}", "public void root(Node n) {}", "public static GraphNode createGraphNodeForSubsystem() {\n GraphNode nameNode = new GraphNode();\n\n for (int i = 0; i < 3; i++) {\n GraphNode childNode = new GraphNode();\n\n childNode.setPosition(AccuracyTestHelper.createPoint(0, 12 * i));\n childNode.setSize(AccuracyTestHelper.createDimension(100, 22));\n\n nameNode.addContained(childNode);\n }\n\n nameNode.setPosition(AccuracyTestHelper.createPoint(20, 20));\n nameNode.setSize(AccuracyTestHelper.createDimension(100, 100));\n\n GraphNode graphNode = new GraphNode();\n graphNode.addContained(nameNode);\n graphNode.addContained(new GraphNode());\n\n graphNode.setPosition(AccuracyTestHelper.createPoint(20, 20));\n graphNode.setSize(AccuracyTestHelper.createDimension(1000, 1000));\n\n // create a subsystem\n Subsystem subsystem = new SubsystemImpl();\n\n // set namespace\n Namespace namespace = new MockNamespaceImplAcucracy();\n subsystem.setNamespace(namespace);\n\n // create a semantic model\n Uml1SemanticModelBridge semanticModel = new Uml1SemanticModelBridge();\n semanticModel.setElement(subsystem);\n\n graphNode.setSemanticModel(semanticModel);\n\n return graphNode;\n }", "LuceneMemoryIndex createLuceneMemoryIndex();", "private void initTree()\n {\n String currSpell;\n Node tempNode;\n String currString;\n Gestures currGest;\n for(int spellInd = 0; spellInd < SpellLibrary.spellList.length; spellInd++)\n {\n //Start casting a new spell from the root node\n tempNode = root;\n currSpell = SpellLibrary.spellList[spellInd];\n for(int currCharInd =0; currCharInd < currSpell.length(); currCharInd++)\n {\n currString = currSpell.substring(0,currCharInd+1);\n currGest = Gestures.getGestureByChar(currString.charAt(currString.length()-1));\n if(tempNode.getChild(currGest) == null) //Need to add a new node!\n {\n tempNode.addChild(currGest,new Node(currString));\n debug_node_number++;\n }\n //Walk into the existing node\n tempNode = tempNode.getChild(currGest);\n }\n\n }\n }", "public QQKachoo(){\n\t_front = new DLLNode<T>(null,null,null);\n\t_end = new DLLNode<T>(null, null,null);\n\t_size = 0;\n }", "public KrillIndex () throws IOException {\n this((Directory) new RAMDirectory());\n }", "public Node(int id, int index, int size){\n processId = id;\n startIndex = index;\n this.size = size;\n this.full = true;\n }", "abstract Object build();", "@Override\r\n\tprotected AbstractElement createDefaultRoot() {\n\t\tthis.writeLock();\r\n\r\n\t\tthis.branchContext = BranchContext.FILE_HEADER;\r\n\t\tthis.leafContext = LeafContext.OTHER;\r\n\r\n\t\tBranchElement root = new SectionElement();\r\n\t\tBranchElement branch = (BranchElement) this.createBranchElement(root, null);\r\n\t\tbranch.replace(0, 0, new Element[] { this.createLeafElement(branch, null, 0, 1) });\r\n\t\troot.replace(0, 0, new Element[] { branch });\r\n\r\n\t\tthis.writeUnlock();\r\n\r\n\t\treturn root;\r\n\t}", "public MemoryManagementSystem(int mainMemorySize, int secondaryMemorySize, boolean useLRU) {\n\t\t// ADD YOUR CODE HERE\n\t\tthis.useLRU = useLRU;\n\t\tmainMemory = new DoublyLinkedListImpl();\n\t\tsecondaryMemory = new String[secondaryMemorySize];\n\t\tnodes = new Node[secondaryMemorySize];\n\t\tvalid = new boolean[secondaryMemorySize];\n\t\t// we copy the n first elements from the secondary memory to the main memory\n\t\t// and we intilaized the n first valid array's value to true, because the n first elements exists\n\t\t// into the main memory\n\t\tfor (int i = 0; i < secondaryMemory.length; i++) {\n\t\t\tsecondaryMemory[i] = \"\";\n\t\t\tif (i < mainMemorySize) {\n\t\t\t\tnodes[i] = mainMemory.addFirst(new Page(secondaryMemory[i], i, false));\n\t\t\t\tvalid[i] = true;\n\t\t\t}\n\t\t}\n\t}", "public ProgramModule getRootModule(String treeName);", "public MyBinNode<Type> getRoot(){\n return this.root;\n }", "public abstract Object build();", "private void createGeneralScene(Group root3D){\n generateRunways(root3D);\n for(String runwayId: controller.getRunways()){\n genRunwayName(root3D, runwayId, runwayElevation);\n }\n generateLighting(root3D);\n pointCameraAt(new Point3D(0,0,0),root3D);\n }", "public Node(int index, int size){\n processId = NO_PROCESS;\n startIndex = index;\n this.size = size;\n this.full = false;\n }", "public static void main(String[] args) {\n\n\n\t\tArrayList<Node> N = new ArrayList<Node>();\n\t\t\n\t\t/*\n\t\t * ##### Encoding Model 2 ###### \n\t\t */\n\t\t\n\t\t\n\t\t/*\n\t\t * Encoding the privilege nodes\n\t\t */\n\t\tfor(int i=1; i<7; i++)\n\t\t{\n\t\t\tN.add(new Node(\"p\"+i, 1));\n\t\t}\n\t\t\n\t\t/*\n\t\t * Encoding the exploit nodes\t\t \n\t\t */\n\t\tfor(int i=1; i<8; i++)\n\t\t{\n\t\t\tN.add(new Node(\"e\"+i, 2));\n\t\t}\n\t\t\n\t\t/*\n\t\t * Encoding the child nodes\n\t\t */\n\t\tfor(int i=1; i<12; i++)\n\t\t{\n\t\t\tN.add(new Node(\"c\"+i, 0));\n\t\t}\n\t\t\n\t\t/*\n\t\t * Assigning the children and parent(s) for each node according to model 2\n\t\t */\n\t\t\n\t\tArrayList<Node> nil = new ArrayList<Node>();\n\t\t\n\t\tN.get(0).setParents(nil);\n\t\tN.get(0).addChild(N.get(6));\n\t\t\n\t\tN.get(6).addParent(N.get(0));\n\t\tN.get(6).addChild(N.get(1));\n\t\tN.get(6).addChild(N.get(13));\n\t\tN.get(6).addChild(N.get(14));\n\t\t\n\t\tN.get(1).addParent(N.get(6));\n\t\tN.get(1).addChild(N.get(7));\n\t\tN.get(1).addChild(N.get(8));\n\t\t\n\t\tN.get(7).addParent(N.get(1));\n\t\tN.get(7).addChild(N.get(15));\n\t\tN.get(7).addChild(N.get(2));\n\t\t\n\t\tN.get(2).addParent(N.get(7));\n\t\tN.get(2).addChild(N.get(10));\t\t\n\t\t\n\t\tN.get(8).addParent(N.get(1));\n\t\tN.get(8).addChild(N.get(16));\n\t\tN.get(8).addChild(N.get(3));\n\t\t\n\t\tN.get(3).addParent(N.get(8));\n\t\tN.get(3).addChild(N.get(9));\n\t\t\n\t\tN.get(10).addParent(N.get(2));\n\t\tN.get(10).addChild(N.get(5));\n\t\tN.get(10).addChild(N.get(19));\n\t\tN.get(10).addChild(N.get(20));\n\t\t\n\t\tN.get(9).addParent(N.get(3));\n\t\tN.get(9).addChild(N.get(4));\n\t\tN.get(9).addChild(N.get(17));\n\t\tN.get(9).addChild(N.get(18));\n\t\t\n\t\tN.get(4).addParent(N.get(9));\n\t\tN.get(4).addChild(N.get(12));\n\t\t\n\t\tN.get(5).addParent(N.get(10));\n\t\tN.get(5).addChild(N.get(11));\n\t\t\n\t\tN.get(12).addParent(N.get(4));\n\t\tN.get(12).addChild(N.get(22));\n\t\tN.get(12).addChild(N.get(23));\n\t\t\n\t\tN.get(11).addParent(N.get(5));\n\t\tN.get(11).addChild(N.get(21));\n\t\tN.get(11).addChild(N.get(23));\n\t\t\n\t\tN.get(13).addParent(N.get(6));\n\t\tN.get(14).addParent(N.get(6));\n\t\tN.get(15).addParent(N.get(7));\n\t\tN.get(16).addParent(N.get(8));\n\t\tN.get(17).addParent(N.get(9));\n\t\tN.get(18).addParent(N.get(9));\n\t\tN.get(19).addParent(N.get(10));\n\t\tN.get(20).addParent(N.get(10));\n\t\tN.get(21).addParent(N.get(11));\n\t\tN.get(22).addParent(N.get(12));\n\t\tN.get(23).addParent(N.get(11));\n\t\tN.get(23).addParent(N.get(12));\n\t\t\n\t\t\n\t\t/*\n\t\t * Encoding the C,I,A values for each node\n\t\t */\n\t\t\n\t\tN.get(0).setImpacts(4, 4, 4);\n\t\tN.get(1).setImpacts(1, 2, 3);\n\t\tN.get(2).setImpacts(2, 2, 1);\n\t\tN.get(3).setImpacts(1, 2, 1);\n\t\tN.get(4).setImpacts(1, 1, 1);\n\t\tN.get(5).setImpacts(3, 2, 3);\n\t\tN.get(13).setImpacts(3,3,3);\n\t\tN.get(14).setImpacts(3,3,3);\n\t\tN.get(15).setImpacts(3,3,3);\n\t\tN.get(16).setImpacts(3,3,3);\n\t\tN.get(17).setImpacts(3,3,3);\n\t\tN.get(18).setImpacts(3,3,3);\n\t\tN.get(19).setImpacts(3,3,3);\n\t\tN.get(20).setImpacts(3,3,3);\n\t\tN.get(21).setImpacts(3,3,3);\n\t\tN.get(22).setImpacts(3,3,3);\n\t\tN.get(23).setImpacts(2,2,1);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t/*\n\t\t * This block helps see the setup of the whole tree. \n\t\t * Comment out if not required to see the parent children relationship of each node.\n\t\t */\n\t\t\n\t\tfor(int i=0; i<24; i++)\n\t\t{\n\t\t\tSystem.out.println(\"\\n\\n\" + N.get(i).getName() + \" < C=\" + N.get(i).getImpactC() + \", I=\" + N.get(i).getImpactI() + \", A=\" + N.get(i).getImpactA() + \" >\" );\n\t\t\tSystem.out.println(\"Parents: \");\n\t\t\tfor(int j=0; j<N.get(i).getParents().size(); j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(N.get(i).getParents().get(j).getName() + \" \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\\nChildren: \");\n\t\t\tfor(int k=0; k<N.get(i).getChildren().size(); k++)\n\t\t\t{\n\t\t\t\tSystem.out.print(N.get(i).getChildren().get(k).getName() + \" \");\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t/*\n\t\t * Calling the method which will perform the C,I,A impact analysis \n\t\t */\n\t\t\n\t\t//Node n = new Node(); //Commented out as extended Main to Node and declared impactAnalysis() as static \n\t\t\n\t\tImpactAnalyzer ia = new ImpactAnalyzer();\n\t\tia.analyze(2, 2, 1, N);\n\t\t\n\t\t\n\t\t\n\t}", "public static KubevirtNode buildKubevirtNode(Node node) {\n String hostname = node.getMetadata().getName();\n IpAddress managementIp = null;\n IpAddress dataIp = null;\n\n for (NodeAddress nodeAddress:node.getStatus().getAddresses()) {\n if (nodeAddress.getType().equals(INTERNAL_IP)) {\n managementIp = IpAddress.valueOf(nodeAddress.getAddress());\n dataIp = IpAddress.valueOf(nodeAddress.getAddress());\n }\n }\n\n Set<String> rolesFull = node.getMetadata().getLabels().keySet().stream()\n .filter(l -> l.contains(K8S_ROLE))\n .collect(Collectors.toSet());\n\n KubevirtNode.Type nodeType = WORKER;\n\n for (String roleStr : rolesFull) {\n String role = roleStr.split(\"/\")[1];\n if (MASTER.name().equalsIgnoreCase(role)) {\n nodeType = MASTER;\n break;\n }\n }\n\n // start to parse kubernetes annotation\n Map<String, String> annots = node.getMetadata().getAnnotations();\n String physnetConfig = annots.get(PHYSNET_CONFIG_KEY);\n String gatewayConfig = annots.get(GATEWAY_CONFIG_KEY);\n String dataIpStr = annots.get(DATA_IP_KEY);\n Set<KubevirtPhyInterface> phys = new HashSet<>();\n String gatewayBridgeName = null;\n try {\n if (physnetConfig != null) {\n JsonArray configJson = JsonArray.readFrom(physnetConfig);\n\n for (int i = 0; i < configJson.size(); i++) {\n JsonObject object = configJson.get(i).asObject();\n String network = object.get(NETWORK_KEY).asString();\n String intf = object.get(INTERFACE_KEY).asString();\n\n if (network != null && intf != null) {\n String physBridgeId;\n if (object.get(PHYS_BRIDGE_ID) != null) {\n physBridgeId = object.get(PHYS_BRIDGE_ID).asString();\n } else {\n physBridgeId = genDpidFromName(network + intf + hostname);\n log.trace(\"host {} physnet dpid for network {} intf {} is null so generate dpid {}\",\n hostname, network, intf, physBridgeId);\n }\n\n phys.add(DefaultKubevirtPhyInterface.builder()\n .network(network)\n .intf(intf)\n .physBridge(DeviceId.deviceId(physBridgeId))\n .build());\n }\n }\n }\n\n if (dataIpStr != null) {\n dataIp = IpAddress.valueOf(dataIpStr);\n }\n\n if (gatewayConfig != null) {\n JsonNode jsonNode = new ObjectMapper().readTree(gatewayConfig);\n\n nodeType = GATEWAY;\n gatewayBridgeName = jsonNode.get(GATEWAY_BRIDGE_NAME).asText();\n }\n } catch (JsonProcessingException e) {\n log.error(\"Failed to parse physnet config or gateway config object\", e);\n }\n\n // if the node is taint with kubevirt.io key configured,\n // we mark this node as OTHER type, and do not add it into the cluster\n NodeSpec spec = node.getSpec();\n if (spec.getTaints() != null) {\n for (Taint taint : spec.getTaints()) {\n String effect = taint.getEffect();\n String key = taint.getKey();\n String value = taint.getValue();\n\n if (StringUtils.equals(effect, NO_SCHEDULE_EFFECT) &&\n StringUtils.equals(key, KUBEVIRT_IO_KEY) &&\n StringUtils.equals(value, DRAINING_VALUE)) {\n nodeType = OTHER;\n }\n }\n }\n\n return DefaultKubevirtNode.builder()\n .hostname(hostname)\n .managementIp(managementIp)\n .dataIp(dataIp)\n .type(nodeType)\n .state(KubevirtNodeState.ON_BOARDED)\n .phyIntfs(phys)\n .gatewayBridgeName(gatewayBridgeName)\n .build();\n }", "public interface NodeManagerFactory {\n\n MemcachedNode parseKeyToNode(String key);\n\n MemcachedNode getNodeByKey(String key);\n\n void addNode(String key);\n\n void addNodeList(String... keys);\n\n void deleteNode(String key);\n\n void deleteNodeList(String... keys);\n\n void replaceNode(String oldKey, String newKey);\n}", "static Node newNode(int key) \n{ \n\tNode node = new Node(); \n\tnode.left = node.right = null; \n\tnode.data = key; \n\treturn node; \n}", "public void MIPSme()\n {\n sir_MIPS_a_lot.getInstance().heap_allocate(size, targetReg);\n }", "Node() {\r\n this.k = null;\r\n this.v = null;\r\n this.c = null;\r\n kcount = 0;\r\n }" ]
[ "0.64538425", "0.5858385", "0.5768591", "0.5745341", "0.5532199", "0.5514919", "0.5352658", "0.529592", "0.52653635", "0.5231414", "0.51731473", "0.5158743", "0.51416737", "0.5131002", "0.5117008", "0.51115173", "0.5102479", "0.50631696", "0.50566345", "0.5034759", "0.50239736", "0.5020735", "0.5014705", "0.500368", "0.4998294", "0.49937385", "0.49789542", "0.4951231", "0.49353293", "0.49298787", "0.4914487", "0.49020877", "0.48982716", "0.48900327", "0.48823398", "0.48806947", "0.48781902", "0.487447", "0.48736718", "0.48689684", "0.4868325", "0.48638225", "0.4863327", "0.486221", "0.48496088", "0.4845725", "0.4838319", "0.48376954", "0.4834307", "0.48330703", "0.4817696", "0.48010767", "0.47981393", "0.47939306", "0.47922122", "0.47912705", "0.47693074", "0.47692966", "0.47673002", "0.47658947", "0.47646606", "0.47578275", "0.47488588", "0.47482303", "0.47421855", "0.47409782", "0.47375035", "0.47345683", "0.47293788", "0.47244668", "0.4721629", "0.4721629", "0.4721549", "0.47166902", "0.47133213", "0.47108838", "0.47100237", "0.46963114", "0.4685164", "0.46703583", "0.46682194", "0.46672344", "0.46615916", "0.46529865", "0.46487334", "0.46445483", "0.46415335", "0.46246505", "0.4620928", "0.46183574", "0.46165174", "0.46156117", "0.46155798", "0.46136615", "0.46100256", "0.4607302", "0.46067587", "0.4606176", "0.46061096", "0.4603102" ]
0.7257652
0
build level processors from ApplicationContext object
private LSMEngineBuilder<T> buildLevelProcessors(ApplicationContext applicationContext) { LevelProcessorChain<T, IInsertionRequest, InsertRequestContext> insertionLevelProcessChain = generateLevelProcessorsChain(applicationContext.getInsertionLevelProcessClass()); LevelProcessorChain<T, IDeletionRequest, DeleteRequestContext> deletionLevelProcessChain = generateLevelProcessorsChain(applicationContext.getDeletionLevelProcessClass()); LevelProcessorChain<T, IQueryRequest, QueryRequestContext> queryLevelProcessChain = generateLevelProcessorsChain(applicationContext.getQueryLevelProcessClass()); return buildQueryManager(queryLevelProcessChain) .buildInsertionManager(insertionLevelProcessChain) .buildDeletionManager(deletionLevelProcessChain); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private LSMEngineBuilder<T> buildLevelProcessors(String packageName) {\n try {\n ApplicationContext property =\n ApplicationContextGenerator.GeneratePropertyWithAnnotation(packageName);\n buildLevelProcessors(property);\n } catch (Exception e) {\n logger.error(e.getMessage());\n }\n return this;\n }", "private <R extends IRequest, C extends RequestContext>\n LevelProcessorChain<T, R, C> generateLevelProcessorsChain(\n List<String> levelProcessorClassNames) {\n LevelProcessorChain<T, R, C> levelProcessChain = new LevelProcessorChain<>();\n try {\n if (levelProcessorClassNames.size() > 0) {\n ILevelProcessor iLevelProcess =\n levelProcessChain.nextLevel(generateLevelProcessor(levelProcessorClassNames.get(0)));\n for (int i = 1; i < levelProcessorClassNames.size(); i++) {\n iLevelProcess =\n iLevelProcess.nextLevel(generateLevelProcessor(levelProcessorClassNames.get(i)));\n }\n }\n } catch (Exception e) {\n logger.error(e.getMessage());\n }\n return levelProcessChain;\n }", "private void startup() {\n LOGGER.info(\"Warming up extraction pipeline....\");\n\n for (Extractor extractor : this.context.extractors()) {\n try {\n extractor.init(this.context.persistencyWriter(), this.context.batchSize());\n this.extractors.add(extractor);\n } catch (Throwable t) {\n LOGGER.warn(\"Failed to initialize extractor {} due to an exception: {}\", extractor.getClass().getSimpleName(), t.getMessage());\n }\n }\n\n for (Extractor exporter : this.context.exporters()) {\n try {\n exporter.init(this.context.persistencyWriter(), this.context.batchSize());\n this.extractors.add(exporter);\n } catch (Throwable t) {\n LOGGER.warn(\"Failed to exporter extractor {} due to an exception: {}\", exporter.getClass().getSimpleName(), t.getMessage());\n }\n }\n \n LOGGER.info(\"Extraction pipeline is ready with {} extractors.\", this.extractors.size());\n }", "protected abstract ApplicationContext createApplicationContextImpl(\n MarinerRequestContext requestContext);", "public ApplicationContextAwareProcessor(ConfigurableApplicationContext applicationContext) {\n\t\tthis.applicationContext = applicationContext;\n\t}", "@Override\n\tpublic void init() {\n\t\tregisterBeanDefinitionParser(\"processorEventMulticaster\",\n\t\t\t\tnew ProcessorEventMulticasterDefinitionParser());\n\t\tregisterBeanDefinitionParser(\"processorEventListener\",\n\t\t\t\tnew ProcessorEventListenerDefinitionParser());\n\t}", "private void populateRenderableProcessors()\n {\n myProcessorsLock.readLock().lock();\n try\n {\n mySpecializedProcessorsLock.writeLock().lock();\n try\n {\n myRenderableGeometryProcessors.clear();\n myProjectionSensitiveProcessors.clear();\n for (final Entry<ProcessorDistributionKey, GeometryProcessor<? extends Geometry>> processorEntry : myGeometryProcessorsMap\n .entrySet())\n {\n if (processorEntry.getValue() instanceof RenderableGeometryProcessor)\n {\n myRenderableGeometryProcessors.put(processorEntry.getKey(),\n (RenderableGeometryProcessor<? extends Geometry>)processorEntry.getValue());\n }\n\n if (processorEntry.getValue().sensitiveToProjectionChanges())\n {\n myProjectionSensitiveProcessors.put(processorEntry.getKey(), processorEntry.getValue());\n }\n }\n myProjectionSyncManager.setProcessors(myProjectionSensitiveProcessors.values());\n }\n finally\n {\n mySpecializedProcessorsLock.writeLock().unlock();\n }\n }\n finally\n {\n myProcessorsLock.readLock().unlock();\n }\n }", "private synchronized void buildConcreteProcessor(Environment env) throws Exception {\n if (this.concreteProcessor != null && this.source.getLastModified() == this.lastModified) {\n // Nothing changed\n return;\n }\n\n long startTime = System.currentTimeMillis();\n\n // Dispose the old processor, if any\n if (this.concreteProcessor != null) {\n this.concreteProcessor.markForDisposal();\n }\n\n // Get a builder\n TreeBuilder builder = (TreeBuilder)this.builderSelector.select(\"sitemap\");\n ConcreteTreeProcessor newProcessor = new ConcreteTreeProcessor(this);\n long newLastModified;\n this.setupLogger(newProcessor);\n //FIXME (SW): why do we need to enterProcessor here?\n CocoonComponentManager.enterEnvironment(env, this.manager, this);\n try {\n if (builder instanceof Recomposable) {\n ((Recomposable)builder).recompose(this.manager);\n }\n builder.setProcessor(newProcessor);\n\n newLastModified = this.source.getLastModified();\n\n ProcessingNode root = builder.build(this.source);\n\n newProcessor.setProcessorData(builder.getSitemapComponentManager(), root, builder.getDisposableNodes());\n } finally {\n CocoonComponentManager.leaveEnvironment();\n this.builderSelector.release(builder);\n }\n\n if (this.getLogger().isDebugEnabled()) {\n double time = (this.lastModified - startTime) / 1000.0;\n this.getLogger().debug(\"TreeProcessor built in \" + time + \" secs from \" + this.source.getURI());\n }\n\n // Switch to the new processor (ensure it's never temporarily null)\n this.concreteProcessor = newProcessor;\n this.lastModified = newLastModified;\n }", "@Override\n public synchronized void init(ProcessingEnvironment processingEnvironment) {\n super.init(processingEnvironment);\n\n logger = new Logger(processingEnv.getMessager()); // Package the log utils.\n logger.info(\">>>>parse options<<<< :\"+processingEnvironment.getOptions().size());\n parseOptionParams(processingEnvironment.getOptions());\n\n mFiler = processingEnv.getFiler(); // Generate class.\n types = processingEnv.getTypeUtils(); // Get type utils.\n elements = processingEnv.getElementUtils(); // Get class meta.\n\n typeUtils = new TypeUtils(types, elements);\n\n\n logger.info(\">>> AutowiredProcessor init. <<<\");\n }", "private synchronized void loadProcessors() {\n if (loaded)\n return;\n\n // Get the processor service declarations\n Set<ServiceDeclaration> processorDeclarations; \n try {\n processorDeclarations = ServiceDiscovery.getInstance().getServiceDeclarations(URLArtifactProcessor.class);\n } catch (IOException e) {\n \tIllegalStateException ie = new IllegalStateException(e);\n \terror(\"IllegalStateException\", staxProcessor, ie);\n throw ie;\n }\n \n for (ServiceDeclaration processorDeclaration: processorDeclarations) {\n Map<String, String> attributes = processorDeclaration.getAttributes();\n // Load a URL artifact processor\n String artifactType = attributes.get(\"type\");\n String modelTypeName = attributes.get(\"model\");\n \n // Create a processor wrapper and register it\n URLArtifactProcessor processor = new LazyURLArtifactProcessor(artifactType, modelTypeName, \n \t\tprocessorDeclaration, extensionPoints, staxProcessor, monitor);\n addArtifactProcessor(processor);\n }\n \n loaded = true;\n }", "public Engine build() {\n this.extensions.add(new CoreExtension());\n \n // load extensions\n this.extensions.forEach(extension -> {\n this.renderers.putAll(extension.getRenderers());\n this.directives.putAll(extension.getDirectives());\n this.nodeParsers.putAll(extension.getNodeParsers());\n this.filters.putAll(extension.getFilters());\n this.tests.putAll(extension.getTests());\n this.unaryOperators.putAll(extension.getUnaryOperators());\n this.binaryOperators.putAll(extension.getBinaryOperators());\n this.factories.addAll(extension.getNodeVisitorFactories());\n this.safeNodes.addAll(extension.getSafeNodes());\n });\n \n // create an operator token parser\n TokenParser unaryOperatorParser = TokenParser.in(TokenType.OPERATOR, this.unaryOperators.keySet().toArray(new String[]{}));\n TokenParser binaryOperatorParser = TokenParser.in(TokenType.OPERATOR, this.binaryOperators.keySet().toArray(new String[]{}));\n TokenParser operatorParser = unaryOperatorParser.or(binaryOperatorParser);\n \n // create a execute token parser\n TokenParser executeOpenParser = TokenParser.from(TokenType.EXECUTE_OPEN, compile(quote(this.executeOpen)), false);\n TokenParser executeCloseParser = TokenParser.from(TokenType.EXECUTE_CLOSE, compile(quote(this.executeClose)), false);\n TokenParser executeParser = executeOpenParser.then(NAME).then(operatorParser.or(EXPRESSION).until(executeCloseParser));\n this.starts.add(this.executeOpen);\n \n // create a print token parser\n TokenParser printOpenParser = TokenParser.from(TokenType.PRINT_OPEN, compile(quote(this.printOpen)), false);\n TokenParser printCloseParser = TokenParser.from(TokenType.PRINT_CLOSE, compile(quote(this.printClose)), false);\n TokenParser printParser = printOpenParser.then(operatorParser.or(EXPRESSION).until(printCloseParser));\n this.starts.add(this.printOpen);\n \n // create a comment token parser\n TokenParser commentOpenParser = TokenParser.from(TokenType.COMMENT_OPEN, compile(quote(this.commentOpen)), false);\n TokenParser commentCloseParser = TokenParser.from(TokenType.COMMENT_CLOSE, compile(quote(this.commentClose)), false);\n TokenParser commentInner = TokenParser.until(TokenType.TEXT, this.commentClose);\n TokenParser commentParser = commentOpenParser.then(commentInner.optional()).then(commentCloseParser);\n this.starts.add(this.commentOpen);\n \n // create a text token parser\n TokenParser leadingText = TokenParser.until(TokenType.TEXT, this.starts);\n TokenParser text = TokenParser.from(TokenType.TEXT, Pattern.compile(\"^.*\", Pattern.DOTALL | Pattern.MULTILINE), false);\n \n TokenParser principal = commentParser.or(executeParser).or(printParser).or(leadingText).zeroOrMore().then(text.optional()).then(EOF);\n this.tokenizerBuilder.parser(principal);\n Tokenizer tokenizer = this.tokenizerBuilder.build();\n \n ExpressionParser expressionParser = new ExpressionParser(this.unaryOperators, this.binaryOperators);\n \n Engine engine = new Engine(this.environment, expressionParser,\n renderers, directives, nodeParsers, \n filters, tests, factories, safeNodes,\n tokenizer);\n return engine;\n }", "protected List<VelocityContext> prepareChainedContexts(HttpServletRequest servletRequest, HttpServletResponse servletResponse, Map<String, Object> extraContext) {\n List<VelocityContext> contextList = new ArrayList<>();\n for (String className : chainedContextNames) {\n try {\n VelocityContext velocityContext = (VelocityContext) objectFactory.buildBean(className, extraContext);\n contextList.add(velocityContext);\n } catch (Exception e) {\n LOG.warn(format(\"Unable to instantiate chained VelocityContext %s, skipping\", className), e);\n }\n }\n return contextList;\n }", "public void makeContexts() {\n \n // make map of ContextTreeNode objects for all taxonomic contexts, indexed by root node name\n HashMap<String, ContextTreeNode> contextNodesByRootName = new HashMap<String, ContextTreeNode>();\n for (ContextDescription cd : ContextDescription.values()) {\n contextNodesByRootName.put(cd.licaNodeName, new ContextTreeNode(new TaxonomyContext(cd, this)));\n }\n \n TraversalDescription prefTaxParentOfTraversal = Traversal.description().depthFirst().\n relationships(RelType.PREFTAXCHILDOF, Direction.OUTGOING);\n \n // for each ContextTreeNode (i.e. each context)\n for (Entry<String, ContextTreeNode> entry: contextNodesByRootName.entrySet()) {\n \n String childName = entry.getKey();\n ContextTreeNode contextNode = entry.getValue();\n \n // traverse back up the taxonomy tree from the root of this context toward life\n for (Node parentNode : prefTaxParentOfTraversal.traverse(contextNode.context.getRootNode()).nodes()) {\n \n // if/when we find a more inclusive (i.e. parent) context\n String parentName = String.valueOf(parentNode.getProperty(\"name\"));\n if (contextNodesByRootName.containsKey(parentName) && (parentName.equals(childName) == false)) {\n \n System.out.println(\"Adding \" + childName + \" as child of \" + parentName);\n \n // add this link in the contextNode hierarchy and move to the next contextNode\n ContextTreeNode parentContextNode = contextNodesByRootName.get(parentName);\n parentContextNode.addChild(contextNode);\n break;\n \n }\n }\n }\n \n // get the root of the ContextTreeNode tree (i.e. most inclusive context)\n ContextTreeNode contextHierarchyRoot = contextNodesByRootName.get(LIFE_NODE_NAME);\n \n System.out.println(\"\\nHierarchy for contexts (note: paraphyletic groups do not have their own contexts):\");\n printContextTree(contextHierarchyRoot, \"\");\n System.out.println(\"\");\n \n // make the contexts!\n makeContextsRecursive(contextHierarchyRoot);\n \n }", "<TDef extends IElementDef> Processor<TDef> createProcessor(DynamicScopeContext context, TDef elementDef);", "ODataSingleProcessor createProcessor(ODataContext context);", "public ProcessingPipeline buildPipeline(Environment environment)\n throws Exception {\n\n \t\tthis.setupConcreteProcessor(environment);\n\n \t\treturn this.concreteProcessor.buildPipeline(environment);\n }", "public abstract ApplicationLoader.Context context();", "private void setupProcessingPipeline() throws Exception {\n // activeProcessingUnits = 1;\n\n nonThreadedProcessingUnit = new NonThreadedProcessingUnit(this);\n // Assign initial status to all Cas Processors in the processing pipeline\n for (int i = 0; i < annotatorList.size(); i++) {\n ((ProcessingContainer) annotatorList.get(i)).setStatus(Constants.CAS_PROCESSOR_RUNNING);\n }\n\n nonThreadedProcessingUnit.setContainers(annotatorList);\n nonThreadedProcessingUnit.setCasPool(casPool);\n for (int j = 0; j < statusCbL.size(); j++) {\n BaseStatusCallbackListener statCL = (BaseStatusCallbackListener) statusCbL.get(j);\n if (statCL != null) {\n nonThreadedProcessingUnit.addStatusCallbackListener(statCL);\n }\n }\n }", "public EvaluationContext buildContext(Runner runner, Input input) {\n // our concept of now may be overridden by the runner\n Instant now = runner.getNow() != null ? runner.getNow() : Instant.now();\n\n EvaluationContext context = new EvaluationContext(new HashMap<String, Object>(), m_org.getTimezone(), m_org.getDateStyle(), now);\n\n Map<String, String> contactContext = m_contact.buildContext(this, context);\n\n if (input != null) {\n context.putVariable(\"step\", input.buildContext(context, contactContext));\n }\n\n context.putVariable(\"date\", buildDateContext(context));\n context.putVariable(\"contact\", contactContext);\n context.putVariable(\"extra\", m_extra);\n context.putVariable(\"flow\", buildFlowContext(getValues(), context));\n\n // add the flow that was one level above us\n if (m_level > 0) {\n context.putVariable(\"parent\", buildFlowContext(m_values.get(m_level - 1), context));\n }\n\n // if we have a child below us, add that context in too\n if (m_values.size() > m_level + 1) {\n context.putVariable(\"child\", buildFlowContext(m_values.get(m_level + 1), context));\n }\n\n return context;\n }", "private static void preprocess() {\n \tLOG.info(\"Begin preprocessing of data.\");\n \t\n \tLOG.debug(\"Create a IterativeDirectoryReader.\");\n \t// Create a reader for directories\n \tIterativeDirectoryReader iterativeDirectoryReader = (IterativeDirectoryReader) ReaderFactory.instance().getIterativeDirectoryReader();\n \titerativeDirectoryReader.setDirectoryName(clArgs.preprocessInDir);\n \titerativeDirectoryReader.setPathInChildDirectory(clArgs.preprocessPathInChildDir);\n \t\n \tLOG.debug(\"Create a IterativeFileReader.\");\n \t// Create a reader for text files and set an appropriate file filter\n \tIterativeFileReader iterativeFileReader = (IterativeFileReader) ReaderFactory.instance().getIterativeFileReader();\n \titerativeFileReader.setFileFilter(FileUtil.acceptVisibleFilesFilter(false, true));\n \t\n \tLOG.debug(\"Create a TextFileLineReader.\");\n \t// Create a reader for text files, the first six lines are not relevant in this data set\n \tTextFileLineReader textFileLineReader = (TextFileLineReader) ReaderFactory.instance().getTextFileLineReader();\n \ttextFileLineReader.setOffset(clArgs.preprocessLineOffset);\n \t\n \tLOG.debug(\"Create a GpsLogLineProcessor.\");\n \t// Create a processor for user points\n \tGpsLogLineProcessor processor = new GpsLogLineProcessor(clArgs.preprocessOutFile);\n \t\n \t// Build reader chain\n \titerativeDirectoryReader.setReader(iterativeFileReader);\n \titerativeFileReader.setReader(textFileLineReader);\n \ttextFileLineReader.setProcessor(processor);\n \t\n \titerativeDirectoryReader.attach(processor, \n \t\t\t\tnew Interests[] {\n \t\t\t\t\tInterests.NewChildDirectory,\n \t\t\t\t\tInterests.HasFinished\n \t\t\t\t});\n \t\n \tLOG.debug(\"Read GPS logs. Save the data in a new file {}.\", clArgs.preprocessOutFile);\n \t// Read and save the data\n \titerativeDirectoryReader.read();\n\n \tLOG.info(\"Finished preprocessing of data.\");\n }", "Set<Object> getBeforeProcessors();", "public void constructHierarchy(){\n\t\t// populate parents for the globally defined param specs\n\t\tfor (ListIterator<ParamSpec> iterator = m_paramSpecs.listIterator(m_paramSpecs.size()); iterator.hasPrevious();) {\n\t\t\tParamSpec ps = iterator.previous();\n\t\t\tpopulateParent(ps);\n\t\t}\n\t\t// populate values for the globally defined param specs\n\t\tfor (ListIterator<ParamSpec> iterator = m_paramSpecs.listIterator(m_paramSpecs.size()); iterator.hasPrevious();) {\n\t\t\tParamSpec ps = iterator.previous();\n\t\t\tps.lookupValues();\n\t\t}\n\t\t\n\t\t// populate parents for the command specs and their contained param specs\n\t\tfor (CommandSpec cs : m_commandSpecs){\n\t\t\tpopulateParent(cs);\n\t\t\tif (cs.getParamSpecs() != null){\n\t\t\t\tfor (ParamSpec ps : cs.getParamSpecs()){\n\t\t\t\t\tpopulateParent(ps);\n\t\t\t\t}\n\t\t\t\tfor (ParamSpec ps : cs.getParamSpecs()){\n\t\t\t\t\tps.lookupValues();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public NodeContainer enrichModel(NodeContainer container, Set<Node> availableBeans) {\n\t\tApplicationContext context = container.getExtension(ApplicationContext.class);\n\t\tif(context != null) {\n\t\t\tSet<Node> beanNodes = ADTUtil.createSet(BasicModelUtil.getExtendedNodes(container, BeanNode.class).iterator());\n\t\t\tavailableBeans.addAll(beanNodes);\n\t\t\tSet<Node> availableBeansAndFacades = IoCModelUtil.addFacadeBeans(container, new HashSet<Node>(availableBeans));\n\t\t\tfor (Node node : beanNodes) {\n\t\t\t\tBeanNode bean = node.getExtension(BeanNode.class);\n\t\t\t\tfor (Dependency dependency : bean.getDependencies()) {\n\t\t\t\t\tresolveDependency(availableBeansAndFacades, node, dependency);\n\t\t\t\t}\n for (IoCAwareMethod ioCAwareMethod: bean.getIoCAwareMethods()) {\n if(ioCAwareMethod.getNature() == IoCModelNatures.IOC_METHOD_FACTORY_UNRESOLVED) {\n resolveFactory(beanNodes, node, (TargetedIoCAwareMethod) ioCAwareMethod);\n }\n if(ioCAwareMethod.getNature() == IoCModelNatures.IOC_METHOD_INSTANTIATE_UNRESOLVED) {\n resolveInstantiate(node, (TargetedIoCAwareMethod) ioCAwareMethod);\n }\n }\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Continue with children contexts\n\t\tfor(NodeContainer child : BasicModelUtil.getContainerNodes(container)) {\n\t\t\tenrichModel(child, new HashSet<Node>(availableBeans));\n\t\t}\n\t\t\n\t\treturn container;\n\t}", "protected void init() { \n ServletContext servletContext = getServletContext();\n applicationContext = WebApplicationContextUtils.getWebApplicationContext(servletContext);\n\n String names[] = applicationContext.getBeanDefinitionNames();\n\n for (String name : names) {\n System.out.println(\"name:\" + name);\n }\n }", "@SuppressWarnings(\"unchecked\")\n @Override\n public void setup(Context context) throws IOException, InterruptedException {\n super.setup(context);\n\n InputSplit is = context.getInputSplit();\n if (is instanceof FileSplit)\n split = (FileSplit) is;\n // push the current filename on to the NDC\n if (null != split) {\n NDC.push(split.getPath().toString());\n splitStart = Long.valueOf(split.getStart()).toString();\n } else\n splitStart = null;\n\n // Needed for side-effects\n markingFunctions = MarkingFunctions.Factory.createMarkingFunctions();\n\n // Initialize the Type Registry\n TypeRegistry.getInstance(context.getConfiguration());\n\n interval = context.getConfiguration().getLong(DISCARD_INTERVAL, 0l);\n\n // default to true, but it can be disabled\n createSequenceFileName = context.getConfiguration().getBoolean(LOAD_SEQUENCE_FILE_NAME, true);\n\n trimSequenceFileName = context.getConfiguration().getBoolean(TRIM_SEQUENCE_FILE_NAME, true);\n\n createRawFileName = context.getConfiguration().getBoolean(LOAD_RAW_FILE_NAME, true);\n\n Class<? extends KeyValueFilter<K2,V2>> firstFilter = null;\n\n // Use the filter class as the context writer if any\n ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n if (classLoader == null) {\n classLoader = EventMapper.class.getClassLoader();\n }\n Configuration filterConf = new Configuration(context.getConfiguration());\n Class<? extends KeyValueFilter<K2,V2>> lastFilter = null;\n for (String filterClassName : getDataTypeFilterClassNames()) {\n\n Class<? extends KeyValueFilter<K2,V2>> filterClass = null;\n try {\n filterClass = (Class<? extends KeyValueFilter<K2,V2>>) Class.forName(filterClassName, true, classLoader);\n if (firstFilter == null) {\n firstFilter = filterClass;\n }\n if (lastFilter != null) {\n KeyValueFilter<K2,V2> filter = lastFilter.getDeclaredConstructor().newInstance();\n filter.configureChainedContextWriter(filterConf, filterClass);\n }\n lastFilter = filterClass;\n } catch (Exception e) {\n throw new IOException(\"Unable to configure \" + filterClass + \" on \" + lastFilter, e);\n }\n }\n\n Class<? extends ContextWriter<K2,V2>> contextWriterClass;\n\n if (Mutation.class.equals(context.getMapOutputValueClass())) {\n contextWriterClass = (Class<ContextWriter<K2,V2>>) context.getConfiguration().getClass(CONTEXT_WRITER_CLASS, LiveContextWriter.class,\n ContextWriter.class);\n } else {\n contextWriterClass = (Class<ContextWriter<K2,V2>>) context.getConfiguration().getClass(CONTEXT_WRITER_CLASS, BulkContextWriter.class,\n ContextWriter.class);\n }\n\n if (lastFilter != null) {\n try {\n KeyValueFilter<K2,V2> filter = lastFilter.newInstance();\n filter.configureChainedContextWriter(filterConf, contextWriterClass);\n } catch (Exception e) {\n throw new IOException(\"Unable to configure \" + contextWriterClass + \" on \" + lastFilter, e);\n }\n contextWriterClass = firstFilter;\n }\n try {\n contextWriter = contextWriterClass.getDeclaredConstructor().newInstance();\n contextWriter.setup(filterConf, filterConf.getBoolean(CONTEXT_WRITER_OUTPUT_TABLE_COUNTERS, false));\n } catch (Exception e) {\n throw new IOException(\"Failed to initialized \" + contextWriterClass + \" from property \" + CONTEXT_WRITER_CLASS, e);\n }\n\n metricsEnabled = MetricsConfiguration.isEnabled(context.getConfiguration());\n\n if (metricsEnabled) {\n try {\n // important that MetricsService gets the unwrapped contextWriter\n // we don't want metrics on our metrics\n metricsService = new MetricsService<>(contextWriter, context);\n metricsLabels = new ReusableMetricsLabels();\n\n contextWriter = new KeyValueCountingContextWriter<>(contextWriter, metricsService);\n } catch (Exception e) {\n log.error(\"Could not configure metrics, disabling\", e);\n MetricsConfiguration.disable(context.getConfiguration());\n metricsEnabled = false;\n }\n }\n\n validators = ArrayListMultimap.create();\n\n if (null != split) {\n if (filterConf.getBoolean(FILE_NAME_COUNTERS, true)) {\n getCounter(context, IngestInput.FILE_NAME.name(), split.getPath().toString()).increment(1);\n }\n }\n\n getCounter(context, IngestInput.LINE_BYTES.toString(), \"MIN\").setValue(Long.MAX_VALUE);\n\n offset = 0;\n\n if (log.isInfoEnabled()) {\n log.info(\"EventMapper configured. Bulk Ingest = true\");\n log.info(\"EventMapper configured with the following filters: \" + getDataTypeFilterClassNames());\n }\n\n }", "@Test\n\tpublic void testContextShouldInitalizeChildContexts() {\n\t\tassertThat(Foo.getInstanceCount()).isEqualTo(1);\n\t\tApplicationContext ctx = springClientFactory.getContext(\"testspec\");\n\n\t\tassertThat(Foo.getInstanceCount()).isEqualTo(1);\n\t\tFoo foo = ctx.getBean(\"foo\", Foo.class);\n\t\tassertThat(foo).isNotNull();\n\t}", "protected void startCoreModule() {\n LOGGER.info(\"Start metric service at level: {}\", METRIC_CONFIG.getMetricLevel().name());\n // load metric manager\n loadManager();\n // load metric reporter\n loadReporter();\n // do start all reporter without first time\n startAllReporter();\n }", "public void initPrimaryContainer() {\n for (IMixinPlatformAgent agent : this.agents) {\n MixinContainer.logger.debug(\"Processing launch tasks for {}\", agent);\n agent.initPrimaryContainer();\n }\n }", "private void generalFeatureExtraction () {\n Logger.log(\"Counting how many calls each method does\");\n Chain<SootClass> classes = Scene.v().getApplicationClasses();\n try {\n for (SootClass sclass : classes) {\n if (!isLibraryClass(sclass)) {\n System.out.println(ConsoleColors.RED_UNDERLINED + \"\\n\\n 🔍🔍 Checking invocations in \" +\n sclass.getName() + \" 🔍🔍 \" + ConsoleColors.RESET);\n List<SootMethod> methods = sclass.getMethods();\n for (SootMethod method : methods) {\n featuresMap.put(method, new Features(method));\n }\n }\n }\n } catch (Exception e) { \n }\n System.out.println(\"\\n\");\n }", "@Override\n protected void internalTransform(String arg0, Map arg1) {\n for (SootClass c : Scene.v().getApplicationClasses()) {\n //if (c.getName().startsWith(\"com\"))//TODO\n // if(c.getName().start)\n try {\n transform(c);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n\n }\n }", "private void propagateFeatures () {\n Logger.log(\"Propagating invocations through the Call Graph - DFS\");\n Set<SootMethod> calculated = new HashSet<SootMethod>();\n Chain<SootClass> classes = Scene.v().getApplicationClasses();\n SootClass c = null;\n SootMethod m = null;\n try {\n for (SootClass sclass : classes) {\n c = sclass;\n List<SootMethod> methods = sclass.getMethods();\n for (SootMethod method : methods) {\n m = method;\n if (!calculated.contains(method)) {\n propagateFeatures(method, calculated);\n }\n }\n }\n } catch (Exception e) {\n // handling\n }\n }", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:00:49.367 -0500\", hash_original_method = \"B186F7F0BF353B1A746862E337C50A69\", hash_generated_method = \"7727160CCA8A9EE39BE8CC36CB939BC2\")\n \npublic void pushContext ()\n {\n int max = contexts.length;\n\n contexts [contextPos].declsOK = false;\n contextPos++;\n\n // Extend the array if necessary\n if (contextPos >= max) {\n Context newContexts[] = new Context[max*2];\n System.arraycopy(contexts, 0, newContexts, 0, max);\n max *= 2;\n contexts = newContexts;\n }\n\n // Allocate the context if necessary.\n currentContext = contexts[contextPos];\n if (currentContext == null) {\n contexts[contextPos] = currentContext = new Context();\n }\n\n // Set the parent, if any.\n if (contextPos > 0) {\n currentContext.setParent(contexts[contextPos - 1]);\n }\n }", "public SortedSet<ActivityProcessor> getActivityProcessors();", "void addBeforeProcessor(Object processor);", "public static int availableProcessors() {\n/* 98 */ return holder.availableProcessors();\n/* */ }", "@Context\r\npublic interface ThreadContext\r\n{\r\n /**\r\n * Get the minimum thread level.\r\n *\r\n * @param min the default minimum value\r\n * @return the minimum thread level\r\n */\r\n int getMin( int min );\r\n \r\n /**\r\n * Return maximum thread level.\r\n *\r\n * @param max the default maximum value\r\n * @return the maximum thread level\r\n */\r\n int getMax( int max );\r\n \r\n /**\r\n * Return the deamon flag.\r\n *\r\n * @param flag true if a damon thread \r\n * @return the deamon thread policy\r\n */\r\n boolean getDaemon( boolean flag );\r\n \r\n /**\r\n * Get the thread pool name.\r\n *\r\n * @param name the pool name\r\n * @return the name\r\n */\r\n String getName( String name );\r\n \r\n /**\r\n * Get the thread pool priority.\r\n *\r\n * @param priority the thread pool priority\r\n * @return the priority\r\n */\r\n int getPriority( int priority );\r\n \r\n /**\r\n * Get the maximum idle time.\r\n *\r\n * @param idle the default maximum idle time\r\n * @return the maximum idle time in milliseconds\r\n */\r\n int getIdle( int idle );\r\n \r\n}", "private void makeContextsRecursive(ContextTreeNode contextNode) {\n \n TaxonomyContext context = contextNode.getContext();\n Node contextRootNode = context.getRootNode();\n int i = 0;\n \n Transaction tx = beginTx();\n if (contextRootNode.getProperty(\"name\").equals(LIFE_NODE_NAME) == false) {\n \n System.out.println(\"making indices for \" + contextRootNode.getProperty(\"name\"));\n \n for (Node n : PREFTAXCHILDOF_TRAVERSAL.traverse(contextRootNode).nodes()) {\n addToPreferredIndexes(n, context);\n \n i++;\n if (i % 100000 == 0)\n System.out.println(i);\n }\n }\n tx.success();\n tx.finish();\n \n // now move on to all children\n for (ContextTreeNode childNode : contextNode.getChildren())\n makeContextsRecursive(childNode);\n \n }", "public void initContext() {\n\t\tClassLoader originalContextClassLoader =\n\t\t\t\tThread.currentThread().getContextClassLoader();\n\t\tThread.currentThread().setContextClassLoader(MY_CLASS_LOADER);\n\t\t//this.setClassLoader(MY_CLASS_LOADER);\n\n\t\tcontext = new ClassPathXmlApplicationContext(\"beans.xml\");\n\t\tsetParent(context);\n\n\n\t\t// reset the original CL, to try to prevent crashing with\n\t\t// other Java AI implementations\n\t\tThread.currentThread().setContextClassLoader(originalContextClassLoader);\n\t}", "private static void buildFramework() {\n \tLOG.info(\"Begin building of shared framework.\");\n \t\n \tLOG.debug(\"Create a IterativeFileReader.\");\n \tIterativeFileReader iterativeFileReader = (IterativeFileReader) ReaderFactory.instance().getIterativeFileReader();\n \tLOG.debug(\"Create a TextFileLineReader.\");\n \tTextFileLineReader textFileLineReader = (TextFileLineReader) ReaderFactory.instance().getTextFileLineReader();\n \t\n \t// Setup IterativeFileReader\n \tFile dir = new File(clArgs.buildFrameworkInDir);\n \titerativeFileReader.setFile(dir);\n \titerativeFileReader.setFileFilter(FileUtil.acceptOnlyClusterFilesFilter());\n \titerativeFileReader.setReader(textFileLineReader);\n \t\n \t// Setup processor\n \tLOG.debug(\"Create a SharedFrameworkProcessor.\");\n \tSharedFrameworkProcessor sharedFrameworkProcessor = new SharedFrameworkProcessor();\n \ttextFileLineReader.setProcessor(sharedFrameworkProcessor);\n \t// Get informed about the finishing of each cluster (file) to reset the processor's status\n \ttextFileLineReader.attach(sharedFrameworkProcessor, Interests.HasFinished);\n \t// Get informed about the finishing of all clusters to give each cluster in the generated graph a pretty id\n \titerativeFileReader.attach(sharedFrameworkProcessor, Interests.HasFinished);\n \t\n \titerativeFileReader.read();\n \t\n \tLOG.info(\"Finished building shared framework.\");\n }", "protected void initializeInstances() {\n if (mUser == null) {\n mUser = new User(getApplicationContext());\n }\n if (mUserCache == null) {\n mUserCache = new UserCache();\n }\n if(mGlobalGroupContainer == null) {\n mGlobalGroupContainer = new GroupContainer(getApplicationContext());\n }\n if(mGlobalHistoryContainer == null) {\n mGlobalHistoryContainer = new HistoryContainer(getApplicationContext());\n }\n\n if(mGlobalContactContainer == null) {\n mGlobalContactContainer = new ContactContainer(getApplicationContext());\n mGlobalContactContainer.setContactSortKey(Contact.UserSortKey.USER_FIRST_NAME);\n }\n }", "@Override\n\tprotected void setup(Reducer<LongWritable, Text, Text, Text>.Context context)\n\t\t\tthrows IOException, InterruptedException {\n\t\tsuper.setup(context);\n\t\tminPnts=Long.parseLong(context.getConfiguration().get(\"minPnts\"));\n\t\tepsilon=Double.parseDouble(context.getConfiguration().get(\"epsilon\"));\n\t\toutput = new MultipleOutputs<Text,Text>(context);\n\t\tPath[] cacheFilesLocal = DistributedCache.getLocalCacheFiles(context.getConfiguration());\n\t\tfor (Path eachPath : cacheFilesLocal) {\n\t\t\t\n\t\t\tloadPartition(eachPath, context);\n\t\t\t\n\t\t}\n\t}", "public void prepare() {\n for (IMixinPlatformAgent agent : this.agents) {\n MixinContainer.logger.debug(\"Processing prepare() for {}\", agent);\n agent.prepare();\n }\n }", "@Override\n public boolean visit(final Node node) {\n if (node instanceof WrapperNode || node instanceof RootNode) {\n return true;\n }\n\n TypeCounter activationCounter = activationCounters.get(node);\n if (activationCounter != null) {\n Map<Class<?>, Long> activationsByType = activationCounter.getActivations();\n\n // Handle each activation result Java type separately.\n for (Class<?> javaType : activationsByType.keySet()) {\n long typeActivations = activationsByType.get(javaType);\n // Construct contexts up to CONTEXT_LEVEL\n for (int level = 0; level <= CONTEXT_LEVEL; level++) {\n ActivationContext context = makeActivationContext(node, javaType, level);\n if (context.getNumberOfClasses() == level + 1) {\n contexts.merge(context, typeActivations, Long::sum);\n } else {\n break;\n }\n }\n }\n }\n return true;\n }", "public interface GameAppContext extends GameAppManager\n{ \n\n /**\n * Handles a new network message.\n * \n * @param message \n */\n public void handleMessage(Message message);\n \n \n /**\n * Trigger an event in the internal aggregator.\n * \n * @param event \n */\n public void trigger(Event event);\n \n \n /**\n * Getter.\n * \n * @return The internal instance of EventAggregator.\n */\n public EventAggregator getEventAggregator();\n \n \n /**\n * Getter.\n * \n * @return The unique name of the type of this gameapp\n */\n public String getName();\n \n \n /**\n * Getter.\n * \n * @return The manager of this context. Use the manager\n * to create new contexts or to try to shutdown this one.\n */\n public GameAppManager getManager();\n \n \n /**\n * This method can be used to get a reference to the parent of this context.\n * Note that a parent context is only available if this game app was not\n * automatically created by the container at startup time.\n * \n * @return The reference to the parent context of this context\n */\n public Handle<GameAppContext> getParentContext();\n\n \n /**\n * Default implementation of a ShardletContext.\n * Build you own contexts by extending this class.\n * \n * @author _rusty\n */\n public static class Default implements GameAppContext\n {\n\n private EventAggregator aggregator;\n private String name = \"\";\n private GameAppManager manager;\n private Handle<GameAppContext> parent;\n\n \n /**\n * Constructor.\n * \n * @param name The name of the game app\n * @param manager The container-specific game app manager.\n * @param parent The parent that created this context.\n */\n public Default(String name, GameAppManager manager, Handle<GameAppContext> parent)\n {\n this.name = name;\n this.manager = manager;\n this.parent = parent;\n \n aggregator = new EventAggregator();\n }\n \n\n @Override\n public void handleMessage(Message message) \n {\n trigger(message);\n }\n\n \n @Override\n public void trigger(Event event) \n {\n aggregator.triggerEvent(event);\n }\n \n \n @Override\n public EventAggregator getEventAggregator()\n {\n return aggregator;\n }\n\n \n @Override\n public String getName() \n {\n return name;\n }\n \n \n @Override\n public GameAppManager getManager() \n {\n return manager;\n } \n \n \n @Override\n public Handle<GameAppContext> getParentContext()\n {\n return parent;\n }\n\n \n /**\n * Ask the game app manager to do this... \n */\n @Override\n public boolean canCreateGameApp(String name) \n {\n return manager.canCreateGameApp(name);\n }\n\n \n /**\n * Ask the game app manager to do this... \n */\n @Override\n public Handle<GameAppContext> createGameApp(String name, Handle<GameAppContext> parent, Map<String, String> additionalParams) \n {\n return manager.createGameApp(name, parent, additionalParams);\n }\n\n \n /**\n * Ask the game app manager to do this... \n */\n @Override\n public Handle<GameAppContext> tryGetGameApp(UUID gameAppUid) \n {\n return manager.tryGetGameApp(gameAppUid);\n }\n\n \n /**\n * Ask the game app manager to do this... \n */\n @Override\n public void removeGameApp(Handle<GameAppContext> that) \n {\n manager.removeGameApp(that);\n }\n\n \n /**\n * Ask the game app manager to do this... \n */\n @Override\n public InetSocketAddress localAddressFor(Handle<GameAppContext> that) \n {\n return manager.localAddressFor(that);\n }\n }\n}", "protected void init()\n {\n context.setConfigured(false);\n ok = true;\n\n if (!context.getOverride())\n {\n processContextConfig(\"context.xml\", false);\n processContextConfig(getHostConfigPath(org.apache.catalina.startup.Constants.HostContextXml), false);\n }\n // This should come from the deployment unit\n processContextConfig(context.getConfigFile(), true);\n }", "private void buildDialectConfigurationMap() {\n Map dialectProperties = new HashMap();\r\n this.chainedProperties.mapStartsWith( dialectProperties,\r\n \"drools.dialect\",\r\n false );\r\n setDefaultDialect( (String) dialectProperties.remove( \"drools.dialect.default\" ) );\r\n\r\n ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\r\n for ( Iterator it = dialectProperties.entrySet().iterator(); it.hasNext(); ) {\r\n Entry entry = (Entry) it.next();\r\n String str = (String) entry.getKey();\r\n String dialectName = str.substring( str.lastIndexOf( \".\" ) + 1 );\r\n String dialectClass = (String) entry.getValue();\r\n addDialect( dialectName,\r\n dialectClass );\r\n }\r\n }", "private static Handler buildChain() {\n Handler ForAbroad = new ForAbroad();\n\n //chain.XmlHandler is the successor of chain.Mp3Handler.\n Handler ForCountry = new ForCountry(ForAbroad);\n\n return new ForCity(ForCountry);\n }", "private AnnotationConfigWebApplicationContext getGlobalApplicationContext() {\r\n\t\tAnnotationConfigWebApplicationContext rootContext = new AnnotationConfigWebApplicationContext();\r\n\t\t//rootContext.register(ApplicationConfig.class);\r\n\t\trootContext.register(new Class[] {ApplicationConfig.class});\r\n\t\treturn rootContext;\r\n\t}", "public void processCode() throws InstantiationException, IllegalAccessException, ClassNotFoundException {\n\t\tsuper.processCode();\t\n\t\t\n\t\tfor (String processor : getProcessors()) {\n\t\t\tString[] refactorName = processor.split(\"\\\\.\");\n\t\t\tString refactor = refactorName[refactorName.length - 1];\n\t\t\t\n\t\t\tswitch (refactor) {\n\t\t\t\tcase \"CollapseHierarchy\" : refactoringsApplied.put(refactor, CollapseHierarchy.getTimesApplied());\n\t\t\t\t\t\t\t\t\t\t\t CollapseHierarchy.resetTimesApplied();\n\t\t\t\t\t\t\t\t\t\t break;\n\t\t\t\tcase \"EncapsulateCollection\" : refactoringsApplied.put(refactor, EncapsulateCollection.getTimesApplied());\n\t\t\t\t\t\t\t\t\t\t\t EncapsulateCollection.resetTimesApplied();\n\t\t\t\t \t\t\t\t\t\t\t break;\n\t\t\t\tcase \"EncapsulateField\" \t : refactoringsApplied.put(refactor, EncapsulateField.getTimesApplied());\n\t\t\t\t\t\t\t\t\t\t\t EncapsulateField.resetTimesApplied();\n\t\t\t\t\t\t\t\t\t\t \t break;\n\t\t\t\tcase \"ExtractSuperClass\" : refactoringsApplied.put(refactor, ExtractSuperClass.getTimesApplied());\n\t\t\t\t\t\t\t\t\t\t ExtractSuperClass.resetTimesApplied();\n\t\t\t\t\t\t\t\t\t\t\t break;\n\t\t\t\tcase \"HideMethod\" : refactoringsApplied.put(refactor, HideMethod.getTimesApplied());\n\t\t\t\t\t\t\t\t\t\t\t HideMethod.resetTimesApplied();\n\t\t\t\t\t\t\t\t\t\t\t break;\n\t\t\t\tcase \"PullUpField\"\t\t\t : refactoringsApplied.put(refactor, PullUpField.getTimesApplied());\n\t\t\t\t\t\t\t\t\t\t\t PullUpField.resetTimesApplied();\n\t\t\t\t\t\t\t\t\t\t\t break;\n\t\t\t\tcase \"PullUpMethod\" : refactoringsApplied.put(refactor, PullUpMethod.getTimesApplied());\n\t\t\t\t\t\t\t\t\t\t\t PullUpMethod.resetTimesApplied();\n\t\t\t\t\t\t\t\t\t\t\t break;\n\t\t\t\tcase \"PushDownField\"\t\t : refactoringsApplied.put(refactor, PushDownField.getTimesApplied());\n\t\t\t\t\t\t\t\t\t\t\t PushDownField.resetTimesApplied();\n\t\t\t\t\t\t\t\t\t\t\t break;\n\t\t\t\tcase \"PushDownMethod\"\t : refactoringsApplied.put(refactor, PushDownMethod.getTimesApplied());\n\t\t\t\t\t\t\t\t\t\t\t PushDownMethod.resetTimesApplied();\n\t\t\t\t\t\t\t\t\t\t\t break;\n\t\t\t}\t\n\t\t}\n\t\t\n\t\toutputProcessedCode();\n\t}", "private void initContext() {\n contextId = System.getProperty(CONFIG_KEY_CERES_CONTEXT, DEFAULT_CERES_CONTEXT);\n\n // Initialize application specific configuration keys\n homeDirKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_HOME);\n debugKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_DEBUG);\n configFileKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_CONFIG_FILE_NAME);\n modulesDirKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_MODULES);\n libDirsKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_LIB_DIRS);\n mainClassKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_MAIN_CLASS);\n classpathKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_CLASSPATH);\n applicationIdKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_APP);\n logLevelKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_LOG_LEVEL);\n consoleLogKey = String.format(\"%s.%s\", contextId, CONFIG_KEY_CONSOLE_LOG);\n\n // Initialize default file and directory paths\n char sep = File.separatorChar;\n defaultRelConfigFilePath = String.format(\"%s/%s\", DEFAULT_CONFIG_DIR_NAME, configFileKey).replace('/', sep);\n defaultHomeConfigFilePath = String.format(\"${%s}/%s\", homeDirKey, defaultRelConfigFilePath).replace('/', sep);\n defaultHomeModulesDirPath = String.format(\"${%s}/%s\", homeDirKey, DEFAULT_MODULES_DIR_NAME).replace('/', sep);\n defaultHomeLibDirPath = String.format(\"${%s}/%s\", homeDirKey, DEFAULT_LIB_DIR_NAME).replace('/', sep);\n }", "private List<Route> getRoutesFromContext() {\n Set<RequestMappingInfo> requestMappingInfos = requestMappingHandlerMapping.getHandlerMethods().keySet();\n List<Route> routes = new LinkedList<>();\n for (RequestMappingInfo handlerMethod : requestMappingInfos) {\n Set<String> patterns = handlerMethod.getPatternsCondition().getPatterns();\n for (String pattern : patterns) {\n Method method = requestMappingHandlerMapping.getHandlerMethods().get(handlerMethod).getMethod();\n routes.add(new Route(pattern, method));\n }\n }\n return routes;\n }", "private ProcessorUtils() { }", "@StartStep(localName=\"command-engineering\", after={\"config\"})\n public static void startCommandEngineering(LifecycleContext context) \n {\n // for each class that is a Catalog or Command, create an entry for those in the context.\n ClassScanner classScanner = new ClassScanner(context);\n classScanner.scan();\n }", "public Contexte() {\n FactoryRegistry registry = FactoryRegistry.getRegistry();\n registry.register(\"module\", new ModuleFactory());\n registry.register(\"if\", new ConditionFactory());\n registry.register(\"template\", new TemplateFactory());\n registry.register(\"dump\", new DumpFactory());\n }", "Map<String, Object> getContext();", "public void initApplicationContext()\r\n/* 32: */ throws BeansException\r\n/* 33: */ {\r\n/* 34:103 */ super.initApplicationContext();\r\n/* 35:104 */ registerHandlers(this.urlMap);\r\n/* 36: */ }", "public void init() {\n\n\t\tString rootdir = null;\n\t\ttry {\n\t\t\trootdir = ServletActionContext.getServletContext().getRealPath(\"/\");\n\t\t} catch (Exception ex) {\n\n\t\t}\n\n\t\tif (rootdir == null) {\n\t\t\trootdir = \"/Users/huangic/Documents/jetty-6.1.22/webapps/TransWeb\";\n\t\t}\n\n\t\tlogger.debug(rootdir);\n\t\tString classesdir = rootdir + \"/WEB-INF/classes/\";\n\t\tthis.xmlBatchRule = ReadXML(classesdir\n\t\t\t\t+ \"applicationContext-BatchRule.xml\");\n\t\tthis.xmlDB = ReadXML(classesdir + \"applicationContext-DB.xml\");\n\t\tthis.xmlSystem = ReadXML(classesdir + \"applicationContext-system.xml\");\n\n\t}", "@Override\r\n public Context initControlContext() throws Exception {\r\n _log.info(\"\");\r\n _log.info(\"...Preparing generation of free generate\");\r\n for (DfFreeGenRequest request : _freeGenRequestList) {\r\n _log.info(\" \" + request.toString());\r\n }\r\n final VelocityContext context = createVelocityContext();\r\n return context;\r\n }", "protected void additionalProcessing() {\n\t}", "protected void buildContexts() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: android.icu.impl.coll.CollationDataBuilder.buildContexts():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.icu.impl.coll.CollationDataBuilder.buildContexts():void\");\n }", "private void AddHandlersProcessing()\n {\n \n for(MessageHandler handler : actorData.MessageHandlers())\n {\n Location handlerProc_h = new Location(String.format(\"handlerProc_%s\", actorData.MessageHandlerName(handler)));\n handlerProc_h.AddFlow(new Flow(actorData.GetUrgentFlow()));\n handlerProc_h.AddInvarient(actorData.GetUrgentInvarient());\n comp.AddTransition(new HybridTransitionBuilder().\n SetOrigin(idleLoc).\n SetDestination(handlerProc_h).\n SetSynclabel(actorData.ExecuteLabelFor(handler)).\n // AddAssignment(actorData.SetBusyAssignment()).\n Build());\n \n CreateHandler(handler, comp, handlerProc_h);\n }\n }", "public abstract void makeContext();", "@Override\n protected final void initializeSpecific() {\n initializeSpringSpecific();\n\n // Once the subclasses have had their opportunity, compute configurations belonging to SpringTemplateEngine\n super.initializeSpecific();\n\n final MessageSource messageSource =\n this.templateEngineMessageSource == null ? this.messageSource : this.templateEngineMessageSource;\n\n final IMessageResolver messageResolver;\n if (messageSource != null) {\n final SpringMessageResolver springMessageResolver = new SpringMessageResolver();\n springMessageResolver.setMessageSource(messageSource);\n messageResolver = springMessageResolver;\n } else {\n messageResolver = new StandardMessageResolver();\n }\n\n super.setMessageResolver(messageResolver);\n\n }", "public <R extends IQueryRequest> LSMEngineBuilder<T> buildQueryManager(\n LevelProcessorChain<T, R, QueryRequestContext> levelProcessChain) {\n QueryManager<T, R> queryManager = new QueryManager<>();\n queryManager.setLevelProcessorsChain(levelProcessChain);\n buildQueryManager(queryManager);\n return this;\n }", "private Map<String,Object> buildFlowContext(Map<String,Value> flowValues, EvaluationContext context) {\n Map<String, Object> flowContext = new HashMap<>();\n List<String> values = new ArrayList<>();\n for (Map.Entry<String, Value> entry : flowValues.entrySet()) {\n flowContext.put(entry.getKey(), entry.getValue().buildContext(context));\n values.add(entry.getKey() + \": \" + entry.getValue().getValue());\n }\n flowContext.put(\"*\", StringUtils.join(values, \"\\n\"));\n return flowContext;\n }", "private static interface Processor<T> {\n\n\t\t/**\n\t\t * Called to process the annotation.\n\t\t * @param annotation the annotation to process\n\t\t * @param depth the depth of the annotation relative to the initial match. For\n\t\t * example a matched annotation will have a depth of 0, a meta-annotation 1\n\t\t * and a meta-meta-annotation 2\n\t\t * @return the result of the processing or {@code null} to continue\n\t\t */\n\t\tT process(Annotation annotation, int depth);\n\t}", "private void createSharedSingletons(Context applicationContext) {\n\t\t// Create Active User\n\t\tActiveUserModel.createInstance(applicationContext);\n\n\t\t// Create Favorites List\n\t\tFavoriteTopicModelList.createInstance(applicationContext);\n\t\tFavoriteCommentModelList.createInstance(applicationContext);\n\n\t\t// Create Read Later list\n\t\tReadLaterTopicModelList.createInstance(applicationContext);\n\t\tReadLaterCommentModelList.createInstance(applicationContext);\n\n\t\t// Create Location Provider\n\t\tLocationProvider.getInstance(applicationContext);\n\t}", "private static void buildHierarchicalGraphs() {\n \tLOG.info(\"Begin building of hierarchical graph for each user.\");\n \t\n \tDBUtil.open();\n \t\n \t// Create a reader for users\n \tLOG.debug(\"Create a UserReader.\");\n \tUserReader userReader = (UserReader) ReaderFactory.instance().getUserReader();\n\n\t\t// Create the processor to test\n \tLOG.debug(\"Create HierarchicalGraphProcessor.\");\n\t\tHierarchicalGraphProcessor hgProc = new HierarchicalGraphProcessor();\n\t\t\n\t\t// Setup the reader\n\t\tuserReader.setProcessor(hgProc);\n\t\tuserReader.attach(hgProc, Interests.UserFinished);\n\t\t\n\t\t// Read the user resources to process\n\t\tLOG.debug(\"Read users out of the database with a minimum of {} and a maximum of {} points.\", userReader.getMinUserPoints(), userReader.getMaxUserPoints());\n\t\tuserReader.read();\n \t\n \tLOG.info(\"Finished building of hierarchical graphs.\");\n }", "public static INLPProcessor initNLPProcessor(Class nlpFramework){\n\n if(nlpFramework.getCanonicalName().equalsIgnoreCase(\"com.data.processors.OpenNLPProcessor\")){\n return new OpenNLPProcessor();\n }\n return null;\n }", "public void init() {\n entityPropertyBuilders.add(new DefaultEntityComponentBuilder(environment));\n entityPropertyBuilders.add(new FilterTransientFieldComponentBuilder(environment));\n entityPropertyBuilders.add(new MakeAccessibleComponentBuilder(environment));\n entityPropertyBuilders.add(new PrimaryKeyComponentBuilder(environment));\n\n // Field meta property builders\n fieldPropertyBuilders.add(new FilterPrimaryKeyComponentBuilder(environment));\n fieldPropertyBuilders.add(new FilterTransientFieldComponentBuilder(environment));\n fieldPropertyBuilders.add(new MakeAccessibleComponentBuilder(environment));\n fieldPropertyBuilders.add(new TtlFieldComponentBuilder(environment));\n fieldPropertyBuilders.add(new CompositeParentComponentBuilder(environment));\n fieldPropertyBuilders.add(new CollectionFieldComponentBuilder(environment));\n fieldPropertyBuilders.add(new MapFieldComponentBuilder(environment));\n fieldPropertyBuilders.add(new SimpleFieldComponentBuilder(environment));\n }", "private void bootstrap() {\n\t\t// configure default values\n\t\t// maxPoolSize = 5;\n\t\tthis.parserPool.setMaxPoolSize(50);\n\t\t// coalescing = true;\n\t\tthis.parserPool.setCoalescing(true);\n\t\t// expandEntityReferences = false;\n\t\tthis.parserPool.setExpandEntityReferences(false);\n\t\t// ignoreComments = true;\n\t\tthis.parserPool.setIgnoreComments(true);\n\t\t// ignoreElementContentWhitespace = true;\n\t\tthis.parserPool.setIgnoreElementContentWhitespace(true);\n\t\t// namespaceAware = true;\n\t\tthis.parserPool.setNamespaceAware(true);\n\t\t// schema = null;\n\t\tthis.parserPool.setSchema(null);\n\t\t// dtdValidating = false;\n\t\tthis.parserPool.setDTDValidating(false);\n\t\t// xincludeAware = false;\n\t\tthis.parserPool.setXincludeAware(false);\n\n\t\tMap<String, Object> builderAttributes = new HashMap<>();\n\t\tthis.parserPool.setBuilderAttributes(builderAttributes);\n\n\t\tMap<String, Boolean> parserBuilderFeatures = new HashMap<>();\n\t\tparserBuilderFeatures.put(\"http://apache.org/xml/features/disallow-doctype-decl\", TRUE);\n\t\tparserBuilderFeatures.put(XMLConstants.FEATURE_SECURE_PROCESSING, TRUE);\n\t\tparserBuilderFeatures.put(\"http://xml.org/sax/features/external-general-entities\", FALSE);\n\t\tparserBuilderFeatures.put(\"http://apache.org/xml/features/validation/schema/normalized-value\", FALSE);\n\t\tparserBuilderFeatures.put(\"http://xml.org/sax/features/external-parameter-entities\", FALSE);\n\t\tparserBuilderFeatures.put(\"http://apache.org/xml/features/dom/defer-node-expansion\", FALSE);\n\t\tthis.parserPool.setBuilderFeatures(parserBuilderFeatures);\n\n\t\ttry {\n\t\t\tthis.parserPool.initialize();\n\t\t}\n\t\tcatch (ComponentInitializationException x) {\n\t\t\tthrow new Saml2Exception(\"Unable to initialize OpenSaml v3 ParserPool\", x);\n\t\t}\n\n\t\ttry {\n\t\t\tInitializationService.initialize();\n\t\t}\n\t\tcatch (InitializationException e) {\n\t\t\tthrow new Saml2Exception(\"Unable to initialize OpenSaml v3\", e);\n\t\t}\n\n\t\tXMLObjectProviderRegistry registry;\n\t\tsynchronized (ConfigurationService.class) {\n\t\t\tregistry = ConfigurationService.get(XMLObjectProviderRegistry.class);\n\t\t\tif (registry == null) {\n\t\t\t\tregistry = new XMLObjectProviderRegistry();\n\t\t\t\tConfigurationService.register(XMLObjectProviderRegistry.class, registry);\n\t\t\t}\n\t\t}\n\n\t\tregistry.setParserPool(this.parserPool);\n\t}", "@Override\n public Map flowControl() throws Exception {\n ELKAopLogger.logStr(\"this is phone user\");\n\n // 拼装产品节点\n preProductInfo();\n\n // 拼装ext节点-tradeRelation\n preExt();\n\n // 拼装base\n preBase();\n\n // 拼装其他产品节点\n preTradeOther();\n\n // 调预提交\n callPreSub();\n\n return null;\n }", "private final void perRecordInitMaster(Record record)\n {\n perRecordInit(record);\n for (String key : customMixinMap.keySet())\n {\n SolrIndexerMixin mixin = customMixinMap.get(key);\n mixin.perRecordInit(record);\n }\n }", "public interface BeanProcessor {\n\n\n void process(Object bean, Class<?> clazz) throws Exception;\n\n //before all beans loaded.\n void beforeInit(Object bean, Class<?> clazz) throws Exception;\n\n //after all beans loaded.\n void afterInit(Object bean, Class<?> clazz) throws Exception;\n}", "public List<Processor> getProcessors() {\n return processors;\n }", "public void init() throws Exception\n\t{\n\t\ttry{\n\t\t\tif(requests_file!= null){\n\t\t parse();\n\t\t\t}\n\t\t}catch(Exception e){\n\t\t\tthrow e;\n\t\t}\n\t\t\n\t\t// Set requests from command line.\n\t\tfor(int i=0;i<urls.length;i++){\n\t\t\tRequestContext ctx=new RequestContext(this);\n\t\t\tctx.setUrl(new URL(urls[i]));\n\t\t\t\n\t\t\tif(method != null && method.equals(\"POST\")){\n\t\t\t\tctx.setMethod(method);\n\t\t\t\tif(bodyFile != null){\n\t\t\t\t\tctx.setBodyFile(bodyFile);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tctx.setMethod(\"GET\");\n\t\t\t}\n\t\t\t\n\t\t\tfor(String name:headers.keySet()){\n\t\t\t\tctx.setHeader(name, headers.get(name));\n\t\t\t}\n\t\t\t\n\t\t\tfor(String key:queries.keySet()){\n\t\t\t\tctx.setQueryParam(key, queries.get(key));\n\t\t\t}\n\t\t\t\n\t\t\tctx.setRounds(rounds);\n\t\t\t\n\t\t\tif(ctxs.contains(ctx)){\n\t\t\t\tctxs.remove(ctx);\n\t\t\t}\n\t\t\t\n\t\t\tctxs.add(ctx);\n\t\t}\n\t\t\n\t\t// Add default headers for generic header types. Doesn't override already set headers. Useful for situations when no headers are explicitly set.\n\t\tfor(RequestContext ctx:ctxs){\n\t\t\tfor(String header:defaultHeaders.keySet()){\n\t\t\t\tctx.setHeaderIfNotPresent(header, defaultHeaders.get(header));\n\t\t\t}\n\t\t}\n\t\t\n\t\tsynchronized(this){\n\t\t\tprocessorCount=ctxs.size();\n\t\t}\n\t}", "private static void setupServerContext(){\n\n serverContext.set(new ServerContext());\n serverContext.get().bgThreadIds = new int[GlobalContext.getNumTotalBgThreads()];\n serverContext.get().numShutdownBgs = 0;\n serverContext.get().serverObj = new Server();\n\n }", "@Override\n public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnvironment) {\n\n // Scanner class to scan through various component elements\n CodeAnalyzerTreeVisitor visitor = new CodeAnalyzerTreeVisitor();\n\n //long startTime = System.currentTimeMillis();\n\n for (Element e : roundEnvironment.getRootElements()) {\n TreePath tp = trees.getPath(e);\n // invoke the scanner\n try {\n visitor.scan(tp, trees);\n } catch (Exception e1) {\n e1.printStackTrace();\n LOG.error(String.valueOf(e1));\n }\n\n AccessHelper accessHelper = AccessHelper.getInstance();\n accessHelper.addToMap(e.getSimpleName().toString());\n accessHelper.printTree();\n }\n return true;\n }", "public void getJobMixAndMakeProcesses(){\n if(jobType == 1){\n //type 1: there is only one process, with A=1 and B=C=0\n //since there is only one process, no the currentWord is 111%processSize\n processes.add(new process(1, 1, 0, 0, 111 % processSize));\n\n }else if(jobType ==2){\n //type 2: there are four processes, each with A=1, B=C=0\n for(int i=1; i<5; i++){\n processes.add(new process(i, 1, 0, 0, (111*i) % processSize));\n }\n\n\n }else if(jobType ==3){\n //type 3: there are four processes, each with A=B=C=0\n for(int i=1; i<5; i++){\n processes.add(new process(i,0, 0, 0, (111*i) % processSize));\n }\n\n }else{\n System.out.println(\"job type 4!!\");\n //process 1 with A=0.75, B=0.25, C=0\n processes.add(new process(1, 0.75, 0.25, 0, (111) % processSize));\n //process 2 with A=0.75, B= 0, C=0.25\n processes.add(new process(2, 0.75, 0, 0.25, (111*2) % processSize));\n //process 3 with A=0.75, B=0.125, C=0.125\n processes.add(new process(3, 0.75, 0.125, 0.125, (111*3) % processSize));\n //process 4 with A=0.5, B=0.125, C=0.125\n processes.add(new process(4, 0.5, 0.125, 0.125, (111*4) % processSize));\n\n }\n\n }", "public List<UtteranceProcessorConfig> getProcessorConfigs() {\n return processorConfigs;\n }", "public Context runMap() throws InstantiationException, IllegalAccessException, IOException {\n\t\tContext tempoContext = new Context();\n\t\tthis.setup(tempoContext);\n\t\t//Read the input file\n\t\tString[] inputLines = this.inputSplit.getLines();\n\t\t//Map process\n\t\tfor (int i=0; i<inputLines.length; i++) {\n\t\t\tthis.map(Integer.toString(i), inputLines[i], tempoContext);\n\t\t}\n\t\treturn tempoContext;\n\t}", "@Override\n\tpublic void init(FloodlightModuleContext context) throws FloodlightModuleException {\n\t\tfloodlightProvider = context.getServiceImpl(IFloodlightProviderService.class);\n\t\tentrypushers=context.getServiceImpl(IStaticEntryPusherService.class);\n\t //the collection is kept sorted\n\t // entrypushers.addFlow(\"aa\", fm, swDpid);\n\n\n\t}", "@Bind(aggregate = true, optional = true, proxy = false)\n public void bindProcessor(HandlerProcessor processor) {\n if (validated) {\n add(new TaskInternalProcessor(processor, currentProcessor, currentPhase));\n } else {\n this.handlerProcessors.add(processor);\n }\n\n }", "@PostConstruct\n public void init() {\n for (final Entry<String, Set<String>> aggregateEntry : processor.getTaskIndex().entrySet()) {\n final AggregateStopwatch stopwatchEntry = new AggregateStopwatch();\n\n aggregatedTasks.put(aggregateEntry.getKey(), stopwatchEntry);\n\n for (final String nameEntry : aggregateEntry.getValue()) {\n logger.info(\"adding stopwatchEntry - aggregate: \" + aggregateEntry.getKey() + \" task: \" + nameEntry);\n stopwatchEntry.getTimedTasks().put(nameEntry, new TaskStopwatch());\n }\n }\n }", "public int initializeRouteEnvironment(int level);", "private Processor()\n {\n super(providerName+\"ProxyProcessor\");\n }", "public void init(MailetContext context);", "@Override\n public Object build() {\n Map<String, org.opensearch.index.query.QueryBuilder> filterMap = new HashMap<>();\n for (FilterComposite filter : this.getChildren().stream()\n .filter(child -> FilterComposite.class.isAssignableFrom(child.getClass()))\n .map(child -> (FilterComposite) child).collect(Collectors.toList())) {\n\n org.opensearch.index.query.QueryBuilder filterBuilder = (org.opensearch.index.query.QueryBuilder)filter.queryBuilder.seekRoot().query().filtered().filter().getCurrent().build();\n filterMap.put(filter.getName(), filterBuilder);\n }\n\n FiltersAggregationBuilder filtersAggsBuilder = AggregationBuilders.filters(this.getName(),\n Stream.ofAll(filterMap.entrySet())\n .map(entry -> new FiltersAggregator.KeyedFilter(entry.getKey(), entry.getValue()))\n .toJavaArray(FiltersAggregator.KeyedFilter.class));\n\n for (Composite childComposite : this.getChildren().stream()\n .filter(child -> !FilterComposite.class.isAssignableFrom(child.getClass()) &&\n !ParamComposite.class.isAssignableFrom(child.getClass()) &&\n !HavingComposite.class.isAssignableFrom(child.getClass())).collect(Collectors.toList())) {\n\n applySubAggregationFromChild(filtersAggsBuilder, childComposite);\n }\n\n return filtersAggsBuilder;\n }", "@PostConstruct\n public void init() {\n String[] commandPathPatterns = new String[]{\"classpath*:/commands/**\",\n \"classpath*:/crash/commands/**\"};\n\n // Patterns to use to look for configurations.\n String[] configPathPatterns = new String[]{\"classpath*:/crash/*\"};\n\n // Comma-separated list of commands to disable.\n String[] disabledCommands = new String[]{\"jpa*\", \"jdbc*\", \"jndi*\"};\n\n // Comma-separated list of plugins to disable. Certain plugins are disabled by default\n // based on the environment.\n String[] disabledPlugins = new String[0];\n\n FS commandFileSystem = createFileSystem(\n commandPathPatterns,\n disabledCommands);\n FS configurationFileSystem = createFileSystem(\n configPathPatterns, new String[0]);\n\n PluginDiscovery discovery = new BeanFactoryFilteringPluginDiscovery(\n this.resourceLoader.getClassLoader(), this.beanFactory,\n disabledPlugins);\n\n PluginContext context = new PluginContext(discovery,\n createPluginContextAttributes(), commandFileSystem,\n configurationFileSystem, this.resourceLoader.getClassLoader());\n\n context.refresh();\n start(context);\n }", "private Candidate constructCandidate(final ActivationContext currentContext) {\n assert currentContext.getNumberOfClasses() == 3;\n // currentContext has a trace:\n // [C_0, s_0, C_1, s_1, C_2]\n // We now find possible \"piblings\", i.e. siblings of its parent.\n // For that, we invoke findExtensions on the prefix\n // [C_0]\n Map<Integer, ActivationContext> piblings = findExtensions(currentContext.getClass(0));\n\n // Also, we find possible siblings. For that, we invoke findExtensions\n // on the prefix\n // [C_0, s_0, C_1]\n Map<Integer, ActivationContext> siblings = findExtensions(currentContext.getClass(0),\n currentContext.getChildIndex(0), currentContext.getClass(1));\n\n // We now construct a super-instruction candidate, i.e.\n // a tree of height 2. The root of the tree is C_0 (its Java type is unknown).\n Candidate candidate = new Candidate(currentContext.getClass(0), \"?\");\n // Now, we add the children of C_0, i.e. the siblings of C_1 and C_1 itself.\n for (int piblingSlot : piblings.keySet()) {\n if (piblingSlot == currentContext.getChildIndex(0)) {\n // This is C_1. We add it to the candidate and proceed\n // with adding the siblings of C_2 and C_2 itself.\n Candidate.AstNode child =\n candidate.getRoot().setChild(piblingSlot, currentContext.getClass(1), \"?\");\n for (int siblingSlot : siblings.keySet()) {\n if (siblingSlot == currentContext.getChildIndex(1)) {\n // Add C_2\n child.setChild(siblingSlot,\n currentContext.getClass(2),\n currentContext.getJavaType());\n } else {\n // Add a sibling of C_2\n ActivationContext sibling = siblings.get(siblingSlot);\n child.setChild(siblingSlot,\n sibling.getClass(2),\n sibling.getJavaType());\n }\n }\n } else {\n ActivationContext pibling = piblings.get(piblingSlot);\n // Add a sibling of C_1.\n assert pibling.getNumberOfClasses() == 2;\n candidate.getRoot().setChild(piblingSlot,\n pibling.getClass(1),\n pibling.getJavaType());\n }\n }\n // The score of the super-instruction candidate corresponds to the number\n // of activations of the current context.\n candidate.setScore(contexts.get(currentContext));\n return candidate;\n }", "public interface Processor {\n\n /**\n * Common key on the params map that uses/returns the process method\n */\n enum ParameterKeys {\n ID, BODY, LEFT, RIGHT, STOP_FLAG, RESULT\n }\n\n /**\n * It's the entry point to call the business logic execution on each Processor\n * @param params Map of params that is been use inside the Processor\n * @return the new state of the params after the business logic execution\n * @throws NullPointerException if the params is null, or an expected key inside the map\n * @throws IllegalArgumentException id the value of the param is not valid\n */\n Map<ParameterKeys, Object> process(final Map<ParameterKeys, Object> params) throws NullPointerException, IllegalArgumentException;\n}", "public abstract Parts getProcessor();", "private void createPartitions() {\n \tfor (int attrOrd : splitAttrs) {\n \t\tFeatureField featFld = schema.findFieldByOrdinal(attrOrd);\n \t\tif (featFld.isInteger()) {\n \t\t\t//numerical\n \t\t\tList<Integer[]> splitList = new ArrayList<Integer[]>();\n \t\t\tInteger[] splits = null;\n \t\t\tcreateNumPartitions(splits, featFld, splitList);\n \t\t\t\n \t\t\t//collect all splits\n \t\t\tfor (Integer[] thisSplit : splitList) {\n \t\t\t\tsplitHandler.addIntSplits(attrOrd, thisSplit);\n \t\t\t}\n \t\t} else if (featFld.isCategorical()) {\n \t\t\t//categorical\n \t\t\tint numGroups = featFld.getMaxSplit();\n \t\t\tif (numGroups > maxCatAttrSplitGroups) {\n \t\t\t\tthrow new IllegalArgumentException(\n \t\t\t\t\t\"more than \" + maxCatAttrSplitGroups + \" split groups not allwed for categorical attr\");\n \t\t\t}\n \t\t\t\n \t\t\t//try all group count from 2 to max\n \t\t\tList<List<List<String>>> finalSplitList = new ArrayList<List<List<String>>>();\n \t\t\tfor (int gr = 2; gr <= numGroups; ++gr) {\n \t\t\t\tLOG.debug(\"num of split sets:\" + gr);\n \t\t\t\tList<List<List<String>>> splitList = new ArrayList<List<List<String>>>();\n \t\t\t\tcreateCatPartitions(splitList, featFld.getCardinality(), 0, gr);\n \t\t\t\tfinalSplitList.addAll(splitList);\n \t\t\t}\n \t\t\t\n \t\t\t//collect all splits\n \t\t\tfor (List<List<String>> splitSets : finalSplitList) {\n \t\t\t\tsplitHandler.addCategoricalSplits(attrOrd, splitSets);\n \t\t\t}\n \t\t\t\n \t\t}\n \t}\n }", "public static void setAvailableProcessors(int availableProcessors) {\n/* 87 */ holder.setAvailableProcessors(availableProcessors);\n/* */ }", "public abstract RequestMappingInfo build();", "public void buildPriors() {\n\t\t// grab the list of all class labels for this fold\n\t\tList<List<String>> classListHolder = dc.getClassificationFold();\n\t\tint totalClasses = 0; // track ALL class occurrences for this fold\n\t\tint[] totalClassOccurrence = new int[classes.size()]; // track respective class occurrence\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tif (i == testingFold) {\n\t\t\t\tcontinue; // skip testing fold\n\t\t\t} else {\n\t\t\t\tcurrentFold = i;\n\t\t\t} // end if\n\n\t\t\t// grab the list of all classes for this current fold\n\t\t\tList<String> classList = classListHolder.get(currentFold);\n\t\t\t// track the total number of classes in this fold and their occurrences\n\t\t\ttotalClasses += classList.size();\n\t\t\t// for each class occurrence, match it to a class and track its occurrence\n\t\t\tfor (String className : classList) {\n\t\t\t\tfor (int j = 0; j < classes.size(); j++) {\n\t\t\t\t\tif (className.equals(classes.get(j))) {\n\t\t\t\t\t\ttotalClassOccurrence[j]++;\n\t\t\t\t\t} // end if\n\t\t\t\t} // end for\n\t\t\t} // end for\n\t\t} // end for\n\n\t\t// divide a particular class occurrence by total number of classes across training set\n\t\tfor (int i = 0; i < classPriors.length; i++) {\n\t\t\tclassPriors[i] = totalClassOccurrence[i] / totalClasses;\n\t\t} // end for\n\t}", "private SpringApplicationContextProvider() {\r\n\t}", "@Override\n public Object build() {\n TopHitsAggregationBuilder topHitsBuilder = AggregationBuilders.topHits(this.getName());\n\n for (ParamComposite param : this.getChildren().stream()\n .filter(child -> ParamComposite.class.isAssignableFrom(child.getClass()))\n .map(child -> (ParamComposite) child).collect(Collectors.toList())) {\n switch (param.getName().toLowerCase()) {\n case \"size\":\n topHitsBuilder.size((int)param.getValue());\n break;\n\n case \"fetch_source\":\n topHitsBuilder.fetchSource((boolean)param.getValue());\n break;\n }\n }\n\n return topHitsBuilder;\n }", "int getProcessorpathCount();", "@Override\n public void init(ProcessingEnvironment env) {\n // Not working at the moment.\n // myEnv = env;\n filer = env.getFiler();\n }" ]
[ "0.6616682", "0.58954126", "0.5557518", "0.5098962", "0.5081747", "0.50663006", "0.50641227", "0.5038936", "0.50225085", "0.50062245", "0.49299172", "0.49110544", "0.48925278", "0.48435682", "0.48399216", "0.4806345", "0.4805799", "0.47737217", "0.47337803", "0.47098848", "0.46544176", "0.46358657", "0.4577934", "0.45568943", "0.45530778", "0.45512614", "0.45418918", "0.45315337", "0.45200524", "0.4513085", "0.45061132", "0.45020983", "0.44972727", "0.4478982", "0.44710538", "0.4467181", "0.44500503", "0.44499546", "0.44303018", "0.43887672", "0.43874428", "0.43860754", "0.43816656", "0.43778494", "0.43698645", "0.436779", "0.43499634", "0.4342088", "0.43379503", "0.43325275", "0.43223754", "0.4321715", "0.43131557", "0.43087342", "0.4303702", "0.43016574", "0.42997938", "0.42992663", "0.429841", "0.42967406", "0.42928684", "0.42896447", "0.4288865", "0.42850962", "0.42781898", "0.4270215", "0.42696053", "0.42622507", "0.4262149", "0.4255677", "0.42545074", "0.42424956", "0.4231537", "0.42297807", "0.4226688", "0.42200536", "0.42196494", "0.42142767", "0.421381", "0.42134857", "0.42106023", "0.42089435", "0.42056078", "0.4203361", "0.41948265", "0.41943827", "0.41940862", "0.4193951", "0.4193268", "0.41913766", "0.4190492", "0.4184634", "0.41823953", "0.4178963", "0.41772208", "0.41710755", "0.41653597", "0.41647837", "0.41638157", "0.41635782" ]
0.7574037
0
Scan the classes of the package and build level processors based on the class annotations
private LSMEngineBuilder<T> buildLevelProcessors(String packageName) { try { ApplicationContext property = ApplicationContextGenerator.GeneratePropertyWithAnnotation(packageName); buildLevelProcessors(property); } catch (Exception e) { logger.error(e.getMessage()); } return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void init() {\n\t\tMvcs.scanPackagePath = analyseScanPath();\n\t\tif(StringHandler.isEmpty(Mvcs.scanPackagePath))\n\t\t\tthrow new RuntimeException(\"No scan path has been set! you need to setup ScanPackage annotation\");\n\t\t\n\t\t//put all class into the list\n\t\tList<String> allClassNames = scanAllClassNames();\n\t\tif(StringHandler.isEmpty(allClassNames)) //some loader may have no return value \n\t\t\treturn ;\n\t\t\n\t\tfor(String pkgPath : allClassNames){\n\t\t\tlist.add(ClassUtil.getClass(pkgPath));\n\t\t}\n\t}", "private void scan() {\n final ClassGraph classGraph = new ClassGraph();\n classGraph.enableAnnotationInfo().ignoreClassVisibility().blacklistLibOrExtJars()\n .removeTemporaryFilesAfterScan();\n if (whitelistedPackagesList.size() > 0) {\n classGraph.whitelistPackages(whitelistedPackagesList.toArray(new String[0]));\n }\n if (blacklistedPackagesList.size() > 0) {\n classGraph.blacklistPackages(blacklistedPackagesList.toArray(new String[0]));\n }\n final ScanResult scanResult = classGraph.scan();\n final ClassInfoList classInfoList = scanResult.getClassesWithAnnotation(MetricClass.class.getName());\n final Set<Class<?>> monitorClasses = new HashSet<>();\n monitorClasses.addAll(classInfoList.loadClasses(true));\n final List<CompositeData> metricClassCompositesList = new ArrayList<>();\n for (Class<?> monitorClass : monitorClasses) {\n try {\n final CompositeData metricClassComposite = new MonitorCompositeDataBuilder(monitorClass).getMetricClassData();\n metricClassCompositesList.add(metricClassComposite);\n } catch (OpenDataException ox) {\n logger.error(\"Build monitor metricaAnnotation failed: \" + monitorClass.getName());\n }\n }\n\n final int monitorCount = metricClassCompositesList.size();\n final String[] monitorKey = new String[monitorCount];\n final String[] monitorKeyDescription = new String[monitorCount];\n @SuppressWarnings(\"rawtypes\")\n final OpenType[] monitorType = new OpenType[monitorCount];\n final CompositeData[] metricClassComposites = metricClassCompositesList.toArray(new CompositeData[0]);\n for (int j = 0; j < metricClassComposites.length; j++) {\n final CompositeData metricClassComposite = metricClassComposites[j];\n monitorKey[j] = metricClassComposite.getCompositeType().getTypeName();\n monitorKeyDescription[j] = metricClassComposite.getCompositeType().getDescription();\n monitorType[j] = metricClassComposite.getCompositeType();\n }\n\n try {\n final CompositeType allMonitorCompositeType = new CompositeType(\"Monitor Metric\", \"Monitor Metric Info\", monitorKey,\n monitorKeyDescription, monitorType);\n allMonitorCompositeData = new CompositeDataSupport(allMonitorCompositeType, monitorKey, metricClassComposites);\n } catch (final OpenDataException ox) {\n logger.error(\"Creating CompositeData failed\", ox);\n }\n }", "@Override\n public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnvironment) {\n\n // Scanner class to scan through various component elements\n CodeAnalyzerTreeVisitor visitor = new CodeAnalyzerTreeVisitor();\n\n //long startTime = System.currentTimeMillis();\n\n for (Element e : roundEnvironment.getRootElements()) {\n TreePath tp = trees.getPath(e);\n // invoke the scanner\n try {\n visitor.scan(tp, trees);\n } catch (Exception e1) {\n e1.printStackTrace();\n LOG.error(String.valueOf(e1));\n }\n\n AccessHelper accessHelper = AccessHelper.getInstance();\n accessHelper.addToMap(e.getSimpleName().toString());\n accessHelper.printTree();\n }\n return true;\n }", "private void scanClass(String scanPackage) {\n URL url = this.getClass().getClassLoader().getResource(\"/\" + scanPackage.replaceAll(\"\\\\.\", \"/\"));\n File dir = new File(url.getFile());\n for (File file : dir.listFiles()) {\n if (file.isDirectory()) {\n scanClass(scanPackage + \".\" + file.getName());\n } else {\n classNames.add(scanPackage + \".\" + file.getName().replaceAll(\".class\", \"\").trim());\n }\n }\n\n }", "public AnnotationScanner() {\n File rootDir = this.getClassRootDirectory();\n\n if (rootDir != null) {\n this.allClass = getDirClassList(rootDir, null);\n } else {\n this.initJar();\n }\n }", "public abstract List<String> scanAllClassNames();", "@SuppressWarnings(\"rawtypes\")\n\tprotected void scan() {\n\t\tLOGGER.info(\"Scanning database procedure mappers for packages: \"\n\t\t\t\t+ packageNames + \" ...\");\n\t\tfor (String scanPackageName : packageNames) {\n\t\t\tClass[] procedureConfigClasses = PackageUtils.getAnnotatedClasses(\n\t\t\t\t\tscanPackageName, Procedure.class);\n\t\t\tif (procedureConfigClasses != null) {\n\t\t\t\tfor (Class procedureConfigClass : procedureConfigClasses) {\n\t\t\t\t\thelper.initProcedureConfigCache(procedureConfigClass);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tLOGGER.info(\"Finished scanning database procedure mappers for packages.\");\n\t}", "public interface PackageScanner {\n String FILE_SUFFIX = \".class\";\n\n /**\n * Find target element blow package except two class name.\n *\n * @param packageName\n * @param except\n * @param except2\n * @return\n * @throws IOException\n */\n Set<String> classNames(String packageName, String except, String except2) throws Exception;\n\n /**\n * Find target element blow package except single class name.\n *\n * @param packageName\n * @param except\n * @return\n * @throws IOException\n */\n Set<String> classNames(String packageName, String except) throws Exception;\n\n /**\n * Scanning target class blow package except @param except and @param except2 class.\n *\n * @param packageName\n * @param except\n * @param except2\n * @return\n */\n Set<?> scan(String packageName, Class<?> except, Class<?> except2) throws Exception;\n\n /**\n * Scanning target class blow package except @param except class.\n *\n * @param packageName\n * @param except\n * @return\n */\n Set<?> scan(String packageName, Class<?> except) throws Exception;\n\n /**\n * Instantiation a class set.\n *\n * @param classNames\n * @return\n */\n Set<?> instantiation(Set<String> classNames, Class<?> tClass) throws IOException;\n}", "public void onScanClasses(Set<Class<?>> parentClasses, Class<?> clazz, Object instance);", "public void scanClasspath() {\n List<String> classNames = new ArrayList<>(Collections.list(dexFile.entries()));\n\n ClassLoader classLoader = org.upacreekrobotics.dashboard.ClasspathScanner.class.getClassLoader();\n\n for (String className : classNames) {\n if (filter.shouldProcessClass(className)) {\n try {\n Class klass = Class.forName(className, false, classLoader);\n\n filter.processClass(klass);\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (NoClassDefFoundError e) {\n e.printStackTrace();\n }\n }\n }\n }", "private void processActivityCheck(RoundEnvironment roundEnv) throws IllegalArgumentException, ClassNotFoundException {\n for (Class<? extends Annotation> annotation : provideAnnotation()) {\n// log(\"annotation \" + annotation.getName());\n for (Element element : roundEnv.getElementsAnnotatedWith(annotation)) {\n// log(\"element \" + element.toString());\n getAnnotatedClass(annotation, element);\n }\n }\n provideFile();\n }", "@BeforeAll\n public static void beforeClass() {\n scanResult = new ClassGraph()\n .acceptPackages(RetentionPolicyForFunctionParameterAnnotationsTest.class.getPackage().getName())\n .enableAllInfo().scan();\n classInfo = scanResult.getClassInfo(RetentionPolicyForFunctionParameterAnnotationsTest.class.getName());\n }", "private void scanAndRegisterTypes() throws Exception {\n ScannedClassLoader scl = ScannedClassLoader.getSystemScannedClassLoader();\n // search annotations\n Iterator<Metadata> it = scl.getAll(MetadataType.class, Metadata.class); //CellFactorySPI.class);\n logger.log(Level.INFO, \"[Metadata Service] about to search classloader\");\n while (it.hasNext()) {\n Metadata metadata = it.next();\n logger.log(Level.INFO, \"[Metadata Service] using system scl, scanned type:\" + metadata.simpleName());\n registerMetadataType(metadata);\n }\n }", "public static void moduleClassScan(Consumer<? super Class> consumer, String packageName) {\n\n\n Set<Class<? extends Module>> allClasses = getModuleClasses(packageName);\n\n for (Class clazz : allClasses) {\n\n consumer.accept(clazz);\n }\n }", "public void process(byte[] inputClass) throws IOException {\n\t\tClassNode classNode = BytecodeUtils.getClassNode(inputClass);\n\t\t// TODO: address innerclasses, classNode.innerClasses, could these even be found from class files? they would be different files...\n\t\tif(classNode.invisibleAnnotations != null){\n\t\t\tfor(Object annotationObject : classNode.invisibleAnnotations){\n\t\t\t\tAnnotationNode annotationNode = (AnnotationNode) annotationObject;\n\t\t\t\tJREFAnnotationIdentifier checker = new JREFAnnotationIdentifier();\n\t\t\t\tchecker.visitAnnotation(annotationNode.desc, false);\n\t\t\t\tif(checker.isJREFAnnotation()){\n\t\t\t\t\tString qualifiedClassName = classNode.name + \".class\";\n\t\t\t\t\tif(checker.isDefineTypeAnnotation()){\n\t\t\t\t\t\tif(runtimeModifications.getJarEntrySet().contains(qualifiedClassName)){\n\t\t\t\t\t\t\truntimeModifications.add(qualifiedClassName, inputClass, true);\n//\t\t\t\t\t\t\tLog.info(\"Replaced: \" + qualifiedClassName + \" in \" + runtimeModifications.getJarFile().getName());\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\truntimeModifications.add(qualifiedClassName, inputClass, false);\n//\t\t\t\t\t\t\tLog.info(\"Inserted: \" + qualifiedClassName + \" into \" + runtimeModifications.getJarFile().getName());\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if(checker.isMergeTypeAnnotation()){\n\t\t\t\t\t\tString qualifiedParentClassName = classNode.superName + \".class\";\n\t\t\t\t\t\tbyte[] baseClass = runtimeModifications.extractEntry(qualifiedParentClassName);\n\t\t\t\t\t\tbyte[] mergedClass = mergeClasses(baseClass, inputClass);\n\t\t\t\t\t\truntimeModifications.add(qualifiedParentClassName, mergedClass, true);\n\t\t\t\t\t\t// TODO: clean up outputClass somehow, probably need to make a local temp\n\t\t\t\t\t\t// directory which gets deleted at the end of the build\n//\t\t\t\t\t\tLog.info(\"Merged: \" + qualifiedClassName + \" into \" + qualifiedParentClassName + \" in \" + runtimeModifications.getJarFile().getName());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private static interface Processor<T> {\n\n\t\t/**\n\t\t * Called to process the annotation.\n\t\t * @param annotation the annotation to process\n\t\t * @param depth the depth of the annotation relative to the initial match. For\n\t\t * example a matched annotation will have a depth of 0, a meta-annotation 1\n\t\t * and a meta-meta-annotation 2\n\t\t * @return the result of the processing or {@code null} to continue\n\t\t */\n\t\tT process(Annotation annotation, int depth);\n\t}", "public void processClasses(CompilationUnit cu) {\n\t\t\n\t\tif(cu.getStorage().get().getFileName().equals(\"package-info.java\")) {\n\t\t\tthis.packageInfo = cu;\n\t\t}else {\n\t\t\tthis.cus.add(cu);\n\t\t}\n\t\tfor(TypeDeclaration<?> node : cu.findAll(TypeDeclaration.class)) {\n\t\t\tthis.classes.put(node.getNameAsString(), new ClassAST(node, this));\n\t\t}\n\t}", "void initClasses() {\n\t\tif (programUnit == null) return;\n\n\t\t// Add all classes\n\t\tList<BdsNode> cdecls = BdsNodeWalker.findNodes(programUnit, ClassDeclaration.class, true, true);\n\t\tfor (BdsNode n : cdecls) {\n\t\t\tClassDeclaration cd = (ClassDeclaration) n;\n\t\t\tbdsvm.addType(cd.getType());\n\t\t}\n\t}", "private void scanClassMap() {\n Set<Class<?>> classSet = reflections.getTypesAnnotatedWith(Redis.class);\n for (Class cl : classSet) {\n RedisInfo redisInfo = new RedisInfo();\n Redis redis = (Redis) cl.getAnnotation(Redis.class);\n redisInfo.setCls(cl);\n redisInfo.setTableName(redis.name());\n redisInfo.setIncrName(redis.IncrName());\n redisInfo.setDbName(redis.dbName());\n redisInfo.setImmediately(redis.immediately());\n redisInfo.setIncr(redis.incrId());\n redisInfo.setDelete(redis.delete());\n try {\n classMap.put(redis.name(), redisInfo);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }", "private void generalFeatureExtraction () {\n Logger.log(\"Counting how many calls each method does\");\n Chain<SootClass> classes = Scene.v().getApplicationClasses();\n try {\n for (SootClass sclass : classes) {\n if (!isLibraryClass(sclass)) {\n System.out.println(ConsoleColors.RED_UNDERLINED + \"\\n\\n 🔍🔍 Checking invocations in \" +\n sclass.getName() + \" 🔍🔍 \" + ConsoleColors.RESET);\n List<SootMethod> methods = sclass.getMethods();\n for (SootMethod method : methods) {\n featuresMap.put(method, new Features(method));\n }\n }\n }\n } catch (Exception e) { \n }\n System.out.println(\"\\n\");\n }", "public Set<Class<?>> getScanClasses();", "private void readClasses(SB_SingletonBook book) throws SB_FileException\r\n\t{\r\n\t for (Class javaClass : SB_ClassMap.getBaseJavaClasses()) {\r\n\t addJavaClass(book, javaClass.getSimpleName(), javaClass.getName());\r\n\t }\r\n\t \r\n\t List<String> importedClasses = _dataModel.getJavaScript().getImportedJavaClasses();\r\n\t\tfor( String javaClassName : importedClasses) {\r\n\t\t\tString classPackage = javaClassName;\r\n\t\t\tString className = javaClassName.substring(javaClassName.lastIndexOf('.') + 1);\r\n\t\t\taddJavaClass(book, className, classPackage);\r\n\t }\r\n\t\t\r\n\t\t//Now that all classes read in, convert class descriptions\r\n\t\ttry\r\n\t\t{\r\n\t\t book.getUserClassMap().convertClassDescriptions(book);\r\n\t\t}\r\n\t\tcatch(SB_Exception ex)\r\n\t\t{\r\n\t\t throw new SB_FileException(ex.toString());\r\n\t\t}\r\n\t}", "Class<?>[] getHandledClasses();", "private void scan() {\n if (classRefs != null)\n return;\n // Store ids rather than names to avoid multiple name building.\n Set classIDs = new HashSet();\n Set methodIDs = new HashSet();\n\n codePaths = 1; // there has to be at least one...\n\n offset = 0;\n int max = codeBytes.length;\n\twhile (offset < max) {\n\t int bcode = at(0);\n\t if (bcode == bc_wide) {\n\t\tbcode = at(1);\n\t\tint arg = shortAt(2);\n\t\tswitch (bcode) {\n\t\t case bc_aload: case bc_astore:\n\t\t case bc_fload: case bc_fstore:\n\t\t case bc_iload: case bc_istore:\n\t\t case bc_lload: case bc_lstore:\n\t\t case bc_dload: case bc_dstore:\n\t\t case bc_ret:\n\t\t\toffset += 4;\n\t\t\tbreak;\n\n\t\t case bc_iinc:\n\t\t\toffset += 6;\n\t\t\tbreak;\n\t\t default:\n\t\t\toffset++;\n\t\t\tbreak;\n\t\t}\n\t } else {\n\t\tswitch (bcode) {\n // These bcodes have CONSTANT_Class arguments\n case bc_instanceof: \n case bc_checkcast: case bc_new:\n {\n\t\t\tint index = shortAt(1);\n classIDs.add(new Integer(index));\n\t\t\toffset += 3;\n\t\t\tbreak;\n\t\t }\n\n\t\t case bc_putstatic: case bc_getstatic:\n case bc_putfield: case bc_getfield: {\n\t\t\tint index = shortAt(1);\n CPFieldInfo fi = (CPFieldInfo)cpool.get(index);\n classIDs.add(new Integer(fi.getClassID()));\n\t\t\toffset += 3;\n\t\t\tbreak;\n }\n\n // These bcodes have CONSTANT_MethodRef_info arguments\n\t\t case bc_invokevirtual: case bc_invokespecial:\n case bc_invokestatic:\n methodIDs.add(new Integer(shortAt(1)));\n messageSends++;\n\t\t\toffset += 3;\n\t\t\tbreak;\n\n\t\t case bc_jsr_w:\n\t\t case bc_invokeinterface:\n methodIDs.add(new Integer(shortAt(1)));\n messageSends++;\n\t\t\toffset += 5;\n\t\t\tbreak;\n\n // Branch instructions\n\t\t case bc_ifeq: case bc_ifge: case bc_ifgt:\n\t\t case bc_ifle: case bc_iflt: case bc_ifne:\n\t\t case bc_if_icmpeq: case bc_if_icmpne: case bc_if_icmpge:\n\t\t case bc_if_icmpgt: case bc_if_icmple: case bc_if_icmplt:\n\t\t case bc_if_acmpeq: case bc_if_acmpne:\n\t\t case bc_ifnull: case bc_ifnonnull:\n\t\t case bc_jsr:\n codePaths++;\n\t\t\toffset += 3;\n\t\t\tbreak;\n\n case bc_lcmp: case bc_fcmpl: case bc_fcmpg:\n case bc_dcmpl: case bc_dcmpg:\n codePaths++;\n\t\t\toffset++;\n break;\n\n\t\t case bc_tableswitch:{\n\t\t\tint tbl = (offset+1+3) & (~3);\t// four byte boundry\n\t\t\tlong low = intAt(tbl, 1);\n\t\t\tlong high = intAt(tbl, 2);\n\t\t\ttbl += 3 << 2; \t\t\t// three int header\n\n // Find number of unique table addresses.\n // The default path is skipped so we find the\n // number of alternative paths here.\n Set set = new HashSet();\n int length = (int)(high - low + 1);\n for (int i = 0; i < length; i++) {\n int jumpAddr = (int)intAt (tbl, i) + offset;\n set.add(new Integer(jumpAddr));\n }\n codePaths += set.size();\n\n\t\t\toffset = tbl + (int)((high - low + 1) << 2);\n\t\t\tbreak;\n\t\t }\n\n\t\t case bc_lookupswitch:{\n\t\t\tint tbl = (offset+1+3) & (~3);\t// four byte boundry\n\t\t\tint npairs = (int)intAt(tbl, 1);\n\t\t\tint nints = npairs * 2;\n\t\t\ttbl += 2 << 2; \t\t\t// two int header\n\n // Find number of unique table addresses\n Set set = new HashSet();\n for (int i = 0; i < nints; i += 2) {\n // use the address half of each pair\n int jumpAddr = (int)intAt (tbl, i + 1) + offset;\n set.add(new Integer(jumpAddr));\n }\n codePaths += set.size();\n \n\t\t\toffset = tbl + (nints << 2);\n\t\t\tbreak;\n\t\t }\n\n // Ignore other bcodes.\n\t\t case bc_anewarray: \n offset += 3;\n break;\n\n\t\t case bc_multianewarray: {\n\t\t\toffset += 4;\n\t\t\tbreak;\n\t\t }\n\n\t\t case bc_aload: case bc_astore:\n\t\t case bc_fload: case bc_fstore:\n\t\t case bc_iload: case bc_istore:\n\t\t case bc_lload: case bc_lstore:\n\t\t case bc_dload: case bc_dstore:\n\t\t case bc_ret: case bc_newarray:\n\t\t case bc_bipush: case bc_ldc:\n\t\t\toffset += 2;\n\t\t\tbreak;\n\t\t \n\t\t case bc_iinc: case bc_sipush:\n\t\t case bc_ldc_w: case bc_ldc2_w:\n\t\t case bc_goto:\n\t\t\toffset += 3;\n\t\t\tbreak;\n\n\t\t case bc_goto_w:\n\t\t\toffset += 5;\n\t\t\tbreak;\n\n\t\t default:\n\t\t\toffset++;\n\t\t\tbreak;\n\t\t}\n\t }\n\t}\n classRefs = expandClassNames(classIDs);\n methodRefs = expandMethodNames(methodIDs);\n }", "Set<Class<?>> getClassSetByAnnotation(String packageName, Class<? extends Annotation> annotationClass);", "protected abstract void generatePackageFiles(ClassTree classtree) throws Exception;", "private void buildClassPath() throws InterruptedException, IOException, CheckedAnalysisException {\n IClassPathBuilder builder = classFactory.createClassPathBuilder(bugReporter);\n\n for (String path : project.getFileArray()) {\n builder.addCodeBase(classFactory.createFilesystemCodeBaseLocator(path), true);\n }\n for (String path : project.getAuxClasspathEntryList()) {\n builder.addCodeBase(classFactory.createFilesystemCodeBaseLocator(path), false);\n }\n\n builder.scanNestedArchives(analysisOptions.scanNestedArchives);\n\n builder.build(classPath, progress);\n\n appClassList = builder.getAppClassList();\n\n if (PROGRESS) {\n System.out.println(appClassList.size() + \" classes scanned\");\n }\n\n // If any of the application codebases contain source code,\n // add them to the source path.\n // Also, use the last modified time of application codebases\n // to set the project timestamp.\n for (Iterator<? extends ICodeBase> i = classPath.appCodeBaseIterator(); i.hasNext();) {\n ICodeBase appCodeBase = i.next();\n\n if (appCodeBase.containsSourceFiles()) {\n String pathName = appCodeBase.getPathName();\n if (pathName != null) {\n project.addSourceDir(pathName);\n }\n }\n\n project.addTimestamp(appCodeBase.getLastModifiedTime());\n }\n\n }", "public static void scanPackage(String scanProviderPackage) throws Exception {\n\t\tproviders = AnnotationUtil.getAnnotations(scanProviderPackage, Controller.class, ServiceRegister.class);\n\t}", "private List<Class> getClasses(final String scanPackage) {\n ClassPathScanningCandidateComponentProvider provider = new ClassPathScanningCandidateComponentProvider(false);\n provider.addIncludeFilter(new AnnotationTypeFilter(ElementEntity.class));\n provider.addIncludeFilter(new AnnotationTypeFilter(VertexEntity.class));\n provider.addIncludeFilter(new AnnotationTypeFilter(EdgeEntity.class));\n provider.addIncludeFilter(new AnnotationTypeFilter(EmbeddedEntity.class));\n Set<BeanDefinition> beanDefinitionSet = provider.findCandidateComponents(scanPackage);\n List<Class> entityClasses = new ArrayList<>();\n for (BeanDefinition beanDefinition : beanDefinitionSet) {\n String beanClassName = beanDefinition.getBeanClassName();\n try {\n entityClasses.add(Class.forName(beanClassName));\n } catch (ClassNotFoundException e) {\n LOG.error(\"Generate class: {}'s schema error: \", beanClassName, e);\n }\n }\n return entityClasses;\n }", "public void buildNestedClassInfo() {\n\t\twriter.writeNestedClassInfo();\n\t}", "private List<Class<?>> getClasses(String packageName) throws Exception {\n File directory = null;\n try {\n ClassLoader cld = getClassLoader();\n URL resource = getResource(packageName, cld);\n directory = new File(resource.getFile());\n } catch (NullPointerException ex) {\n throw new ClassNotFoundException(packageName + \" (\" + directory\n + \") does not appear to be a valid package\");\n }\n return collectClasses(packageName, directory);\n }", "Set<Class<? extends Annotation>> getScanTypeAnnotations();", "private Map<String, SkylarkModuleDoc> collectTypes() throws ClassPathException {\n return SkylarkDocumentationCollector.collectModules(\n Classpath.findClasses(MODULES_PACKAGE_PREFIX));\n }", "@NotNull\n List<? extends ClassInfo> getAllClasses();", "@Override\n protected void internalTransform(String arg0, Map arg1) {\n for (SootClass c : Scene.v().getApplicationClasses()) {\n //if (c.getName().startsWith(\"com\"))//TODO\n // if(c.getName().start)\n try {\n transform(c);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n\n }\n }", "private void processElement(Element element) {\n\n\t\tprocessBaseAnnotatins(element);\n\n//\t\tSystem.out.println(\" ===> Get all annotations \");\n\n\t\tfor (AnnotationMirror annotationMirror : elementUtils.getAllAnnotationMirrors(element)) {\n//\t\t\tSystem.out.println(\" ===> \" + annotationMirror);\n\t\t\tString annotationName = annotationMirror.getAnnotationType().asElement().toString();\n\t\t\tString annotationPackage = annotationMirror.getAnnotationType().asElement().getEnclosingElement()\n\t\t\t\t\t.toString();\n\n\t\t\tif (!baseAnnotations.contains(annotationName) && !annotationPackage.startsWith(\"java.lang.annotation\")) {\n\t\t\t\tprocessAdditionalAnnotation(annotationMirror);\n\t\t\t}\n\t\t}\n\t}", "private static void registerFromPackage(String packageName, String packageURL, FileFilter fileFilter) {\n File dir = new File(packageURL);\n if (!dir.exists() || !dir.isDirectory()) return;\n File[] dirFiles = dir.listFiles(fileFilter);\n for (File file : dirFiles)\n if (file.isDirectory()) {\n registerFromPackage(packageName + \".\" + file.getName(), file.getAbsolutePath(), fileFilter);\n } else {\n String className = file.getName().substring(0, file.getName().indexOf(\".\"));\n try {\n Class<?> aClass = Class.forName(packageName + \".\" + className);\n Annotation[] annotations = aClass.getAnnotations();\n //TODO 并不一定是按照顺序的,而且未来有可能不只是2个注解\n\n // 扫描注册 controller requestMapping\n if (annotations.length > 1 && annotations[0].annotationType().equals(Controller.class) && annotations[1].annotationType().equals(RequestMapping.class)) {\n String preUrl = aClass.getAnnotation(RequestMapping.class).value();\n Method[] methods = aClass.getMethods();\n for (Method method : methods) {\n Annotation requestMapping = method.getAnnotation(RequestMapping.class);\n if (requestMapping != null) {\n String pixUrl = ((RequestMapping) requestMapping).value();\n register(preUrl + pixUrl, new Service(aClass.asSubclass(ServiceInterface.class).getConstructor().newInstance(), method));\n System.out.println(((RequestMapping) requestMapping).value());\n }\n }\n\n }\n\n //放弃以下早期的扫描服务代码\n // 实现了注解,并且实现了接口\n// if (annotation != null && ServiceInterface.class.isAssignableFrom(aClass)) {\n//\n//// register(annotation.urlPattern(),aClass.asSubclass(ServiceInterface.class).getDeclaredConstructor().newInstance());\n//// System.out.println(\"成功注册服务: \" + annotation.urlPattern() + \" \" + className);\n// }\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n } catch (InstantiationException e) {\n e.printStackTrace();\n } catch (NoSuchMethodException e) {\n e.printStackTrace();\n } catch (InvocationTargetException e) {\n e.printStackTrace();\n }\n }\n }", "protected abstract void generateClassFiles(ClassDoc[] arr, ClassTree classtree);", "private void describeClassTree(Class<?> inputClass, Set<Class<?>> setOfClasses) {\r\n // can't map null class\r\n if (inputClass == null) {\r\n return;\r\n }\r\n\r\n // don't further analyze a class that has been analyzed already\r\n if (Object.class.equals(inputClass) || setOfClasses.contains(inputClass)) {\r\n return;\r\n }\r\n\r\n // add to analysis set\r\n setOfClasses.add(inputClass);\r\n\r\n // perform super class analysis\r\n describeClassTree(inputClass.getSuperclass(), setOfClasses);\r\n\r\n // perform analysis on interfaces\r\n for (Class<?> hasInterface : inputClass.getInterfaces()) {\r\n describeClassTree(hasInterface, setOfClasses);\r\n }\r\n }", "@Override\n public void apply(@Nonnull Project project) {\n project.getLogger().info(\"Applying API scanner to {}\", project.getName());\n if (GradleVersion.current().compareTo(GradleVersion.version(MINIMUM_GRADLE_VERSION)) < 0) {\n throw new GradleException(\"The API Scanner plugin requires Gradle \" + MINIMUM_GRADLE_VERSION + \" or newer.\");\n }\n project.getPluginManager().apply(JavaPlugin.class);\n\n // Do not type-cast to String because the property may be a Groovy GString.\n Object classifierValue = project.findProperty(CLASSIFIER_PROPERTY_NAME);\n final String targetClassifier = classifierValue == null ? DEFAULT_CLASSIFIER : classifierValue.toString();\n\n ScannerExtension extension = project.getExtensions().create(SCAN_TASK_NAME, ScannerExtension.class, targetClassifier);\n\n // Register the scanning task lazily, so that it will be configured after the project has been evaluated.\n project.getLogger().info(\"Adding {} task to {}\", SCAN_TASK_NAME, project.getName());\n TaskProvider<ScanApi> scanProvider = project.getTasks().register(SCAN_TASK_NAME, ScanApi.class, scanTask -> {\n TaskCollection<Jar> jarTasks = project.getTasks()\n .withType(Jar.class)\n .matching(Jar::isEnabled)\n .matching(jarTask ->\n matches(jarTask.getArchiveClassifier(), extension.getTargetClassifier())\n );\n\n scanTask.setClasspath(project.getConfigurations().getByName(COMPILE_CLASSPATH_CONFIGURATION_NAME));\n // Automatically creates a dependency on jar tasks.\n scanTask.setSources(jarTasks);\n scanTask.setExcludePackages(extension.getExcludePackages());\n scanTask.setExcludeClasses(extension.getExcludeClasses());\n scanTask.setExcludeMethods(extension.getExcludeMethods());\n scanTask.setVerbose(extension.getVerbose());\n scanTask.setEnabled(extension.isEnabled());\n });\n\n // Declare this ScanApi task to be a dependency of any GenerateApi tasks belonging to any of our ancestors.\n Project target = project;\n while (target != null) {\n target.getTasks().withType(GenerateApi.class)\n .configureEach(generateTask -> generateTask.dependsOn(scanProvider));\n target = target.getParent();\n }\n }", "protected void generateClassFiles(RootDoc root, ClassTree classtree) {\n generateClassFiles(classtree);\n PackageDoc[] packages = root.specifiedPackages();\n for (int i = 0; i < packages.length; i++) {\n generateClassFiles(packages[i].allClasses(), classtree);\n }\n }", "protected void processPackage(Package myPackage, String parentPackageName)\n {\n Element element = null;\n // local variable to store an attribute\n Attribute attribute = null;\n // local variable to store a connector\n Connector connector = null;\n // local variable to store the roles\n ConnectorEnd sourceRole = null;\n ConnectorEnd targetRole = null;\n \n String packageHierarchy = null; \n\n \n EAEventManager.getInstance().fireEAEvent(\n this,\n \"Extracting information from package \"\n + myPackage.GetName());\n\n if(parentPackageName.equals(\"\"))\n packageHierarchy = myPackage.GetName();\n else\n packageHierarchy = parentPackageName + \"/\" + myPackage.GetName(); \n \n addPackageToGlossary(myPackage, packageHierarchy);\n\n /////////////////////////////////////////////////\n // Process the classes defined in this subpackage\n /////////////////////////////////////////////////\n for (Iterator elementsIter = myPackage.GetElements()\n .iterator(); elementsIter.hasNext();) {\n\n element = (Element) elementsIter.next();\n\n // The class element is used generically\n // WARNING: in some cases, an element of type enumeration\n // ...\n if (element.GetType().equals(EA_TYPE_CLASS)) {\n\n addElementToGlossary(element, packageHierarchy);\n\n ///////////////////////////////////////////////////\n // Process the class attributes\n ///////////////////////////////////////////////////\n for (Iterator attributeIter = element.GetAttributes()\n .iterator(); attributeIter.hasNext();) {\n attribute = (Attribute) attributeIter.next();\n addAttributeToGlossary(attribute, packageHierarchy);\n }\n\n }\n }\n \n }", "private void loadClasses() {\n\t\tString[] classes = new String[] { \"com.sssprog.delicious.api.ApiAsyncTask\" };\n\t\tfor (String c : classes) {\n\t\t\ttry {\n\t\t\t\tClass.forName(c);\n\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public abstract Annotations getClassAnnotations();", "private void parseAnnotations(ClassParser classParser, Object bean, Set<Class<?>> visited) {\n if (!visited.isEmpty()) {\n classParser.parse(bean, this); // 'Parse' the class of the bean looking for annotations.\n }\n Class<?> beanClass = bean.getClass();\n if (visited.contains(beanClass)) {\n throw new IllegalAnnotationError(beanClass.getCanonicalName() + \" used more than once.\");\n } else {\n visited.add(beanClass);\n }\n\n for (Field f : beanClass.getDeclaredFields()) {\n parseAdditionalOptions(classParser, bean, visited, f);\n parsePluginBasedOption(classParser, bean, visited, f);\n }\n }", "Collection<ClassValidationAnnotationHandler> getClassHandlers();", "Set<Class<? extends Annotation>> getScanMethodAnnotations();", "public interface ComponentTypeScanner<A extends Annotation, C> {\n\n /**\n * Handles the discovery of a component type.\n *\n * @param annotation an instance of the annotation which caused this scanner to be notified.\n * @param type a reference to the component type.\n */\n default void onDiscovery(@Nonnull A annotation, @Nonnull Class<? extends C> type) {\n }\n\n /**\n * Handles the pre-construction (e.g. when it is decided that the component is to be constructed\n * but has yet to be constructed).\n *\n * @param annotation an instance of the annotation which caused this scanner to be notified.\n * @param type a reference to the component type.\n */\n default void onPreConstruct(@Nonnull A annotation, @Nonnull Class<? extends C> type) {\n }\n\n /**\n * Handles the construction of a new component instance.\n *\n * @param annotation an instance of the annotation which caused this scanner to be notified.\n * @param instance an instance of the constructed component.\n */\n default void onConstruct(@Nonnull A annotation, @Nonnull C instance) {\n }\n\n /**\n * Handles the destruction of a new component instance.\n *\n * @param annotation an instance of the annotation which caused this scanner to be notified.\n * @param instance an instance of the constructed component.\n */\n default void onDestruct(@Nonnull A annotation, @Nonnull C instance) {\n }\n\n /**\n * Handles the post-destruction (e.g. when an instance has been removed from the context).\n *\n * @param annotation an instance of the annotation which caused this scanner to be notified.\n * @param type a reference to the component type.\n */\n default void onPostDestruct(@Nonnull A annotation, @Nonnull Class<? extends C> type) {\n }\n}", "private void scanDirectory(final File directory) throws AnalyzerException {\n\t\tFile[] files = directory.listFiles();\n\t\tfor (File f : files) {\n\t\t\t// scan .class file\n\t\t\tif (f.isFile() && f.getName().toLowerCase().endsWith(\".class\")) {\n\t\t\t\tInputStream is = null;\n\t\t\t\ttry {\n\t\t\t\t\tis = new FileInputStream(f);\n\t\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\tthrow new AnalyzerException(\n\t\t\t\t\t\t\t\"Cannot read input stream from '\"\n\t\t\t\t\t\t\t\t\t+ f.getAbsolutePath() + \"'.\", e);\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tnew ClassReader(is).accept(scanVisitor,\n\t\t\t\t\t\t\tClassReader.SKIP_CODE);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tthrow new AnalyzerException(\n\t\t\t\t\t\t\t\"Cannot launch class visitor on the file '\"\n\t\t\t\t\t\t\t\t\t+ f.getAbsolutePath() + \"'.\", e);\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tis.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new AnalyzerException(\n\t\t\t\t\t\t\t\"Cannot close input stream on the file '\"\n\t\t\t\t\t\t\t\t\t+ f.getAbsolutePath() + \"'.\", e);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// loop on childs\n\t\t\t\tif (f.isDirectory()) {\n\t\t\t\t\tscanDirectory(f);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void onScanType(Set<? extends Annotation> annotations, Class<?> clazz, Object instance);", "public void makePackageClassesHtmls(SizeBreakdown breakdown)\n throws IOException {\n for (String packageName : GlobalInformation.packageToClasses.keySet()) {\n \n TreeMap<Float, String> sortedClasses = new TreeMap<Float, String>(\n Collections.reverseOrder());\n float maxSize = 0f;\n \n int maxDepCount = 1;\n \n for (String className : GlobalInformation.packageToClasses.get(packageName)) {\n \n float curSize = 0f;\n if (!breakdown.classToPartialSize.containsKey(className)) {\n // This class not present in this code collection\n } else {\n curSize = breakdown.classToPartialSize.get(className);\n }\n \n int depCount = 0;\n if (GlobalInformation.classToWhatItDependsOn.containsKey(className)) {\n depCount = GlobalInformation.classToWhatItDependsOn.get(className).size();\n }\n \n if (curSize != 0f) {\n \n sortedClasses.put(curSize, className);\n if (curSize > maxSize) {\n maxSize = curSize;\n }\n if (depCount > maxDepCount) {\n maxDepCount = depCount;\n }\n }\n }\n \n PrintWriter outFile = new PrintWriter(\n getOutFile(classesInPackageFileName(breakdown, packageName)));\n \n outFile.println(\"<!DOCTYPE HTML PUBLIC \\\"-//W3C//DTD HTML 4.01//EN\\\"\");\n outFile.println(\"\\\"http://www.w3.org/TR/html4/strict.dtd\\\">\");\n outFile.println(\"<html>\");\n outFile.println(\"<head>\");\n outFile.println(\"<meta http-equiv=\\\"content-type\\\" content=\\\"text/html;charset=ISO-8859-1\\\">\");\n outFile.println(\"<link rel=\\\"stylesheet\\\" href=\\\"classLevel.css\\\" media=\\\"screen\\\">\");\n outFile.println(\"<title>Classes in package \\\"\" + packageName\n + \"\\\"</title>\");\n outFile.println(\"</head>\");\n outFile.println(\"<body>\");\n \n outFile.println(\"<center>\");\n outFile.println(\"<h2>Classes in package \\\"\" + packageName + \"\\\"</h2>\");\n addHeaderWithBreakdownContext(breakdown, outFile);\n outFile.println(\"</center>\");\n \n outFile.println(\"<div style=\\\"width:90%; height:80%; overflow-y:auto; overflow-x:auto; top: 120px; left:70px; position:absolute; background-color:white\\\"\");\n \n int yOffset = 0;\n for (Float size : sortedClasses.keySet()) {\n \n String className = sortedClasses.get(size);\n \n // TODO(kprobst): switch out the commented/uncommented lines below when\n // showing dependencies\n // float ratio = (size / maxSize) * 45;\n float ratio = (size / maxSize) * 85;\n \n if (ratio < 3) {\n ratio = 3;\n }\n \n // TODO(kprobst): not currently used, but will be for dependencies\n // get the dependency count\n int depCount = 0;\n if (GlobalInformation.classToWhatItDependsOn.containsKey(className)) {\n depCount = GlobalInformation.classToWhatItDependsOn.get(className).size();\n }\n float depRatio = ((float) depCount / (float) maxDepCount) * 45f;\n if (depRatio < 3.0) {\n depRatio = 3;\n }\n \n outFile.println(\"<div class=\\\"box\\\" style=\\\"width:\" + ratio\n + \"%; top: \" + yOffset + \"px; left: 60px;\\\">\");\n outFile.println(\"<div id=\\\"lb\\\">\");\n outFile.println(\"<div id=\\\"rb\\\">\");\n outFile.println(\"<div id=\\\"bb\\\"><div id=\\\"blc\\\"><div id=\\\"brc\\\">\");\n outFile.println(\"<div id=\\\"tb\\\"><div id=\\\"tlc\\\"><div id=\\\"trc\\\">\");\n outFile.println(\"<div id=\\\"content\\\">\");\n outFile.println(\"</div>\");\n outFile.println(\"</div></div></div></div>\");\n outFile.println(\"</div></div></div></div>\");\n outFile.println(\"</div>\");\n \n // TODO(kprobst): not currently used, but will be for dependencies\n /*\n * outFile.println(\"<div class=\\\"box-right\\\" style=\\\"width:\" + depRatio\n * + \"%; top: \" + yOffset + \"px; left: 50%\\\">\");\n * outFile.println(\"<div id=\\\"lb\\\">\");\n * outFile.println(\"<div id=\\\"rb\\\">\");\n * outFile.println(\"<div id=\\\"bb\\\"><div id=\\\"blc\\\"><div id=\\\"brc\\\">\");\n * outFile.println(\"<div id=\\\"tb\\\"><div id=\\\"tlc\\\"><div id=\\\"trc\\\">\");\n * outFile.println(\"<div id=\\\"content\\\">\"); outFile.println(\"</div>\");\n * outFile.println(\"</div></div></div></div>\");\n * outFile.println(\"</div></div></div></div>\");\n * outFile.println(\"</div>\");\n */\n \n int yOffsetText = yOffset + 8;\n outFile.printf(\"<div class=\\\"barlabel\\\" style=\\\"top:\" + yOffsetText\n + \"px; left:5px;\\\">%.1f</div>\\n\", size);\n if (GlobalInformation.displayDependencies == true) {\n outFile.println(\"<div class=\\\"barlabel\\\" style=\\\"top:\" + yOffsetText\n + \"px; left:70px;\\\"><a href=\\\"methodDependencies-\"\n + filename(packageName) + \".html#\" + className + \"\\\">\"\n + className + \"</a></div>\");\n } else {\n outFile.println(\"<div class=\\\"barlabel\\\" style=\\\"top:\" + yOffsetText\n + \"px; left:70px;\\\">\" + className + \"</div>\");\n }\n /*\n * //TODO(kprobst) make this a link String drillDownFileName = className\n * + \"Deps.html\"; outFile.println(\"<div class=\\\"barlabel\\\" style=\\\"top:\"\n * + yOffsetText + \"px; left:50%;\\\"><a href=\\\"\" + drillDownFileName +\n * \"\\\" target=\\\"_top\\\">Dependencies: \" + depCount + \"</a></div>\");\n */\n yOffset = yOffset + 25;\n }\n \n outFile.println(\"</div>\");\n outFile.println(\"</body>\");\n outFile.println(\"</html>\");\n outFile.close();\n }\n }", "private void visitAdditionalEntrypoints() {\n\tLinkedHashSet<jq_Class> extraClasses = new LinkedHashSet<jq_Class>();\n\tfor(jq_Method m: publicMethods) {\n\t extraClasses.add(m.getDeclaringClass());\n\t}\n\t\n\tfor(jq_Class cl: extraClasses) {\n\t visitClass(cl);\n\t\t\tjq_Method ctor = cl.getInitializer(new jq_NameAndDesc(\"<init>\", \"()V\"));\n\t\t\tif (ctor != null)\n\t\t\t\tvisitMethod(ctor);\n\t}\n\n\tfor(jq_Method m: publicMethods) {\n\t visitMethod(m);\n\t}\n }", "private void generateClassFiles(ClassTree classtree) {\n String[] packageNames = configuration.classDocCatalog.packageNames();\n for (int packageNameIndex = 0; packageNameIndex < packageNames.length;\n packageNameIndex++) {\n generateClassFiles(configuration.classDocCatalog.allClasses(\n packageNames[packageNameIndex]), classtree);\n }\n }", "@PostConstruct\r\n\tprivate void init()\r\n\t{\r\n\t\tSet<Method> freeMarkerMethods = classScannerService.getMethodsAnnotatedWith(FreeMarkerMethod.class);\r\n\t\t\r\n\t\tif(freeMarkerMethods == null)\r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tSet<Class<?>> fmarkerClasses = new HashSet<Class<?>>();\r\n\t\t\r\n\t\tfor(Method method : freeMarkerMethods)\r\n\t\t{\r\n\t\t\tif(fmarkerClasses.contains(method.getDeclaringClass()))\r\n\t\t\t{\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\r\n\t\t\tfreeMarkerEngine.loadClass(method.getDeclaringClass());\r\n\t\t}\r\n\t}", "public void execute()\n throws BuildException {\n this.validator = new TestClassValidator.DefaultClassValidator();\n this.validator.setListener(new TestClassValidator.ClassValidatorListener() {\n public void info(String message) {\n log(\"INFO> \" + message, verbosity);\n System.out.println(\"INFO> \" + message);\n }\n\n public void warning(String message) {\n log(\"WARNING> \" + message, verbosity);\n System.out.println(\"WARNING> \" + message);\n }\n\n public void error(String message) {\n log(\"ERROR> \" + message, verbosity);\n System.out.println(\"ERROR> \" + message);\n }\n });\n\n\n if (classpath != null) {\n classpath.setProject(project);\n this.loader = new AntClassLoader(project, classpath);\n }\n\n log(TestClassValidator.BANNER, Project.MSG_VERBOSE);\n System.out.println(TestClassValidator.BANNER);\n int count = 0;\n for (int i = 0; i < filesets.size(); i++) {\n FileSet fs = (FileSet) filesets.get(i);\n\n try {\n DirectoryScanner ds = fs.getDirectoryScanner(project);\n ds.scan();\n\n String[] files = ds.getIncludedFiles();\n\n for (int k = 0; k < files.length; k++) {\n String pathname = files[k];\n if (pathname.endsWith(\".class\")) {\n String classname = pathname.substring(0, pathname.length() - \".class\".length()).replace(File.separatorChar, '.');\n processFile(classname);\n }\n }\n count += files.length;\n } catch (BuildException e) {\n if (failonerror) {\n throw e;\n } else {\n log(e.getMessage(), quiet ? Project.MSG_VERBOSE : Project.MSG_WARN);\n }\n } catch (ClassNotFoundException e) {\n if (failonerror) {\n throw new BuildException(e);\n } else {\n log(e.getMessage(), quiet ? Project.MSG_VERBOSE : Project.MSG_WARN);\n }\n }\n log(\"Number of classes: \" + count, Project.MSG_VERBOSE);\n System.out.println(\"Number of classes: \" + count);\n }\n }", "public String[] readClasses();", "public void buildClassTree() {\n\t\twriter.writeClassTree();\n\t}", "private void setClasses(OWLClass cls, int depth, Set<String> supers) {\n\n\t\tif (depth > 0) {\n\t\t\tString nm = render(cls);\n\t\t\tsupersInfo.put(nm, supers);\n\t\t\tSet<OWLClass> children = theProvider.getDescendants(cls);\n\t\t\tString lbl = (children.size() > 0 && depth == 1) ? nm + \"+\" : nm;\n\t\t\tPair<String, OWLClass> nameInfo = new Pair<String, OWLClass>(lbl,\n\t\t\t\t\tcls);\n\t\t\tclassMap.put(nm, nameInfo);\n\t\t\tif (depth > 1) {\n\t\t\t\tSet<String> supers2 = new HashSet<String>(supers);\n\t\t\t\tsupers2.add(nm);\n\t\t\t\tint newDepth = --depth;\n\t\t\t\tfor (OWLClass sub : theProvider.getChildren(cls)) {\n\t\t\t\t\tsetClasses(sub, newDepth, supers2);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// collect the spiders info\n\t\t\tSet<OWLIndividual> inds = cls.getIndividuals(mgr\n\t\t\t\t\t.getActiveOntologies());\n\t\t\t// TODO all individuals are reported as belonging to Thing, but not\n\t\t\t// to the other\n\t\t\t// superclasses of the class within which they are actually defined.\n\t\t\t// For now,\n\t\t\t// only show spiders for the actual class, c, within which they are\n\t\t\t// defined, and work\n\t\t\t// out how to show spiders in any superclass of c later on\n\t\t\tif (showSpiders && !inds.isEmpty() && !nm.equals(\"Thing\")) {\n\t\t\t\tArrayList<Pair<String, List<CVizZone>>> spInfo = new ArrayList<Pair<String, List<CVizZone>>>();\n\t\t\t\tfor (OWLIndividual i : inds) {\n\t\t\t\t\tif (i.isNamed()) {\n\t\t\t\t\t\tspInfo.add(new Pair<String, List<CVizZone>>(ren\n\t\t\t\t\t\t\t\t.render((OWLEntity) i),\n\t\t\t\t\t\t\t\tnew ArrayList<CVizZone>()));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tindMap.put(nm, spInfo);\n\t\t\t}\n\t\t\t// collect the children info\n\t\t\tSet<String> childrenStr = new HashSet<String>();\n\t\t\tIterator<OWLClass> it = children.iterator();\n\t\t\tOWLClass c;\n\t\t\twhile (it.hasNext()) {\n\t\t\t\tchildrenStr.add(render(it.next()));\n\t\t\t}\n\t\t\tchildrenInfo.put(nm, childrenStr);\n\n\t\t\t// collect the disjointness info\n\t\t\tNodeSet<OWLClass> ds = theReasoner.getDisjointClasses(cls);\n\t\t\tSet<String> disjoints = new HashSet<String>();\n\t\t\tIterator<Node<OWLClass>> it2 = ds.iterator();\n\t\t\twhile (it2.hasNext()) {\n\t\t\t\tc = it2.next().getRepresentativeElement();\n\t\t\t\tdisjoints.add(render(c));\n\t\t\t}\n\t\t\tif (disjoints.size() > 0)\n\t\t\t\tdisjointsInfo.put(nm, disjoints);\n\t\t\t// collect the equivalent classes info\n\t\t\tNode<OWLClass> equivs = theReasoner.getEquivalentClasses(cls);\n\t\t\tif (!equivs.isSingleton())\n\t\t\t\tequivsInfo.put(nm, new HashSet<OWLClass>(equivs.getEntities()));\n\t\t\t// collect the union classes info\n\t\t\tSet<OWLEquivalentClassesAxiom> eq;\n\t\t\tfor (OWLOntology ont : activeOntologies) {\n\t\t\t\teq = ont.getEquivalentClassesAxioms(cls);\n\t\t\t\tif (eq.size() > 0) {\n\t\t\t\t\tfor (OWLEquivalentClassesAxiom a : eq) {\n\t\t\t\t\t\tboolean isUnion = true;\n\t\t\t\t\t\tClassExpressionType t;\n\t\t\t\t\t\tfor (OWLClassExpression e : a.getClassExpressions()) {\n\t\t\t\t\t\t\tt = e.getClassExpressionType();\n\t\t\t\t\t\t\tif (!(t.equals(ClassExpressionType.OWL_CLASS) || t\n\t\t\t\t\t\t\t\t\t.equals(ClassExpressionType.OBJECT_UNION_OF))) {\n\t\t\t\t\t\t\t\tisUnion = false;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (isUnion) {\n\t\t\t\t\t\t\tSet<OWLClass> us = a.getClassesInSignature();\n\t\t\t\t\t\t\tus.remove(cls);\n\t\t\t\t\t\t\tif (us.size() > 0)\n\t\t\t\t\t\t\t\tunionsInfo.put(render(cls), us);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// collect the inconsistent classes info\n\t\t\tif (!theReasoner.isSatisfiable(cls)) {\n\t\t\t\tinconsistentClasses.add(nm);\n\t\t\t}\n\t\t}\n\t}", "public List<ClassDescription> scanSources()\n throws SCRDescriptorFailureException, SCRDescriptorException {\n final List<ClassDescription> result = new ArrayList<ClassDescription>();\n\n for (final Source src : project.getSources()) {\n if ( src.getFile().getName().equals(\"package-info.java\") ) {\n log.debug(\"Skipping file \" + src.getClassName());\n continue;\n }\n log.debug(\"Scanning class \" + src.getClassName());\n\n try {\n // load the class\n final Class<?> annotatedClass = project.getClassLoader().loadClass(src.getClassName());\n\n this.process(annotatedClass, src, result);\n } catch ( final SCRDescriptorFailureException e ) {\n throw e;\n } catch ( final SCRDescriptorException e ) {\n throw e;\n } catch ( final ClassNotFoundException e ) {\n log.warn(\"ClassNotFoundException: \" + e.getMessage());\n } catch ( final NoClassDefFoundError e ) {\n log.warn(\"NoClassDefFoundError: \" + e.getMessage());\n } catch (final Throwable t) {\n throw new SCRDescriptorException(\"Unable to load compiled class: \" + src.getClassName(), src.getFile().toString(), t);\n }\n }\n return result;\n }", "public void main(ArrayList<String> files) throws IOException {\n\t\tDesignParser.CLASSES = files;\n\t\t\n\t\tthis.model = new Model();\n\n\t\tfor (String className : CLASSES) {\n//\t\t\tSystem.out.println(\"====================\");\n\t\t\t// ASM's ClassReader does the heavy lifting of parsing the compiled\n\t\t\t// Java class\n//\t\t\tSystem.out.println(\"Analyzing: \" + className);\n//\t\t\tSystem.out.println(className + \"[\");\n\t\t\tClassReader reader = new ClassReader(className);\n\t\t\t\t\t\t\n\t\t\t// make class declaration visitor to get superclass and interfaces\n\t\t\tClassVisitor decVisitor = new ClassDeclarationVisitor(Opcodes.ASM5, this.model);\n\t\t\t\n\t\t\t// DECORATE declaration visitor with field visitor\n\t\t\tClassVisitor fieldVisitor = new ClassFieldVisitor(Opcodes.ASM5, decVisitor, this.model);\n\t\t\t\n\t\t\t// DECORATE field visitor with method visitor\n\t\t\tClassVisitor methodVisitor = new ClassMethodVisitor(Opcodes.ASM5, fieldVisitor, this.model);\n\t\t\t\n\t\t\t// TODO: add more DECORATORS here in later milestones to accomplish\n\t\t\t// specific tasks\n\t\t\tClassVisitor extensionVisitor = new ExtensionVisitor(Opcodes.ASM5, methodVisitor, this.model);\n\t\t\t\n\t\t\tClassVisitor implementationVisitor = new ImplementationVisitor(Opcodes.ASM5, extensionVisitor, this.model);\n\t\t\t\t\t\t\n\t\t\tClassVisitor usesVisitor = new UsesVisitor(Opcodes.ASM5, implementationVisitor, this.model);\n\t\t\t\n\t\t\tClassVisitor compositionVisitor = new CompositionVisitor(Opcodes.ASM5, usesVisitor, this.model);\n\t\t\t\n\t\t\t// Tell the Reader to use our (heavily decorated) ClassVisitor to\n\t\t\t// visit the class\n\t\t\treader.accept(compositionVisitor, ClassReader.EXPAND_FRAMES);\n//\t\t\tSystem.out.println(\"\\n]\");\n\t\t}\n//\t\tSystem.out.println(\"End Of Code\");\n\t}", "private CratState preoptimizePackages() {\n\t\tArrayList<EvaluatedClass> optimized = new ArrayList<EvaluatedClass>();\n\t\tTreeMap<Integer, CratClass> packageClasses = new TreeMap<Integer, CratClass>();\n\t\tString currentPackage = \"\";\n\t\tfor (Map.Entry<Integer, ? extends CratClass> entry : craCase.getClasses().entrySet()) {\n\t\t\tint classId = entry.getKey();\n\t\t\tCratClass curClass = entry.getValue();\n\t\t\tString classPackage = craCase.getPackageNameOf(classId);\n\t\t\tif (!currentPackage.equals(classPackage)) {\n\t\t\t\tCratState packageOptimized = preoptimizePackage(currentPackage, packageClasses);\n\t\t\t\toptimized.addAll(packageOptimized.values());\n\t\t\t\tpackageClasses = new TreeMap<Integer, CratClass>();\n\t\t\t\tcurrentPackage = classPackage;\n\t\t\t}\n\t\t\tpackageClasses.put(classId, curClass);\n\t\t}\n\t\t// preoptimize last package\n\t\tCratState packageOptimized = preoptimizePackage(currentPackage, packageClasses);\n\t\toptimized.addAll(packageOptimized.values());\n\t\treturn new CratState(optimized, metric);\n\t}", "private void buildReferencedClassSet() throws CheckedAnalysisException, InterruptedException {\n\n if (PROGRESS) {\n System.out.println(\"Adding referenced classes\");\n }\n Set<String> referencedPackageSet = new HashSet<String>();\n\n LinkedList<ClassDescriptor> workList = new LinkedList<ClassDescriptor>();\n workList.addAll(appClassList);\n\n Set<ClassDescriptor> seen = new HashSet<ClassDescriptor>();\n Set<ClassDescriptor> appClassSet = new HashSet<ClassDescriptor>(appClassList);\n\n Set<ClassDescriptor> badAppClassSet = new HashSet<ClassDescriptor>();\n HashSet<ClassDescriptor> knownDescriptors = new HashSet<ClassDescriptor>(DescriptorFactory.instance()\n .getAllClassDescriptors());\n int count = 0;\n Set<ClassDescriptor> addedToWorkList = new HashSet<ClassDescriptor>(appClassList);\n\n // add fields\n //noinspection ConstantIfStatement\n if (false)\n for (ClassDescriptor classDesc : appClassList) {\n try {\n XClass classNameAndInfo = Global.getAnalysisCache().getClassAnalysis(XClass.class, classDesc);\n for (XField f : classNameAndInfo.getXFields()) {\n String sig = f.getSignature();\n ClassDescriptor d = DescriptorFactory.createClassDescriptorFromFieldSignature(sig);\n if (d != null && addedToWorkList.add(d))\n workList.addLast(d);\n }\n } catch (RuntimeException e) {\n bugReporter.logError(\"Error scanning \" + classDesc + \" for referenced classes\", e);\n if (appClassSet.contains(classDesc)) {\n badAppClassSet.add(classDesc);\n }\n } catch (MissingClassException e) {\n // Just log it as a missing class\n bugReporter.reportMissingClass(e.getClassDescriptor());\n if (appClassSet.contains(classDesc)) {\n badAppClassSet.add(classDesc);\n }\n }\n }\n\n while (!workList.isEmpty()) {\n if (Thread.interrupted()) {\n throw new InterruptedException();\n }\n ClassDescriptor classDesc = workList.removeFirst();\n\n if (seen.contains(classDesc)) {\n continue;\n }\n seen.add(classDesc);\n\n if (!knownDescriptors.contains(classDesc)) {\n count++;\n if (PROGRESS && count % 5000 == 0) {\n System.out.println(\"Adding referenced class \" + classDesc);\n }\n }\n\n referencedPackageSet.add(classDesc.getPackageName());\n\n // Get list of referenced classes and add them to set.\n // Add superclasses and superinterfaces to worklist.\n try {\n XClass classNameAndInfo = Global.getAnalysisCache().getClassAnalysis(XClass.class, classDesc);\n\n ClassDescriptor superclassDescriptor = classNameAndInfo.getSuperclassDescriptor();\n if (superclassDescriptor != null && addedToWorkList.add(superclassDescriptor)) {\n workList.addLast(superclassDescriptor);\n }\n\n for (ClassDescriptor ifaceDesc : classNameAndInfo.getInterfaceDescriptorList()) {\n if (addedToWorkList.add(ifaceDesc))\n workList.addLast(ifaceDesc);\n }\n\n ClassDescriptor enclosingClass = classNameAndInfo.getImmediateEnclosingClass();\n if (enclosingClass != null && addedToWorkList.add(enclosingClass))\n workList.addLast(enclosingClass);\n\n } catch (RuntimeException e) {\n bugReporter.logError(\"Error scanning \" + classDesc + \" for referenced classes\", e);\n if (appClassSet.contains(classDesc)) {\n badAppClassSet.add(classDesc);\n }\n } catch (MissingClassException e) {\n // Just log it as a missing class\n bugReporter.reportMissingClass(e.getClassDescriptor());\n if (appClassSet.contains(classDesc)) {\n badAppClassSet.add(classDesc);\n }\n } catch (CheckedAnalysisException e) {\n // Failed to scan a referenced class --- just log the error and\n // continue\n bugReporter.logError(\"Error scanning \" + classDesc + \" for referenced classes\", e);\n if (appClassSet.contains(classDesc)) {\n badAppClassSet.add(classDesc);\n }\n }\n }\n // Delete any application classes that could not be read\n appClassList.removeAll(badAppClassSet);\n DescriptorFactory.instance().purge(badAppClassSet);\n\n for (ClassDescriptor d : DescriptorFactory.instance().getAllClassDescriptors()) {\n referencedPackageSet.add(d.getPackageName());\n }\n referencedClassSet = new ArrayList<ClassDescriptor>(DescriptorFactory.instance().getAllClassDescriptors());\n\n // Based on referenced packages, add any resolvable package-info classes\n // to the set of referenced classes.\n if (PROGRESS) {\n referencedPackageSet.remove(\"\");\n System.out.println(\"Added \" + count + \" referenced classes\");\n System.out.println(\"Total of \" + referencedPackageSet.size() + \" packages\");\n for (ClassDescriptor d : referencedClassSet)\n System.out.println(\" \" + d);\n\n }\n\n }", "public void processClassResourceAnnotations ()\n throws Exception\n {\n List<Class<?>> classes = _finder.getClassesForAnnotation(Resource.class);\n for (Class<?> clazz:classes)\n {\n if (!isServletType(clazz))\n {\n Log.debug(\"Ignoring @Resource annotation on on-servlet type class \"+clazz.getName());\n continue;\n }\n //Handle Resource annotation - add namespace entries\n Resource resource = (Resource)clazz.getAnnotation(Resource.class);\n if (resource != null)\n {\n String name = resource.name();\n String mappedName = resource.mappedName();\n Resource.AuthenticationType auth = resource.authenticationType();\n Class type = resource.type();\n boolean shareable = resource.shareable();\n \n if (name==null || name.trim().equals(\"\"))\n throw new IllegalStateException (\"Class level Resource annotations must contain a name (Common Annotations Spec Section 2.3)\");\n \n try\n {\n //TODO don't ignore the shareable, auth etc etc\n if (!org.mortbay.jetty.plus.naming.NamingEntryUtil.bindToENC(_webApp, name,mappedName))\n if (!org.mortbay.jetty.plus.naming.NamingEntryUtil.bindToENC(_webApp.getServer(), name,mappedName))\n throw new IllegalStateException(\"No resource at \"+(mappedName==null?name:mappedName));\n }\n catch (NamingException e)\n {\n throw new IllegalStateException(e);\n }\n }\n }\n }", "private void onClassesFound(List<UMDClass> classes) {\n\t}", "private void processClassesFolderIfNotEmpty(Properties sonarProjectProperties, String classFolder) {\n if (FileUtils.iterateFiles(new File(classFolder), new String[] {\"class\"}, true).hasNext()) {\n LOG.debug(\"Class folder: {}\", classFolder);\n appendProperty(sonarProjectProperties, SonarConfiguratorProperties.LIBRARIES_PROPERTY, classFolder + (classFolder.endsWith(\"/\") ? \"\" : \"/\") + \"*.class\");\n }\n }", "@SneakyThrows\n private Stream<Class<?>> findClasses(File directory, String packageName) {\n\n val lookForClasses =\n Function2.of(ReflectionUtils::lookForClasses)\n .apply(packageName);\n\n return Optional.of(directory)\n .filter(File::exists)\n .map(File::listFiles)\n .stream()\n .flatMap(Arrays::stream)\n .flatMap(lookForClasses);\n }", "List<String> getClassNames() {\n List<String> allGeneratedClasses = new ArrayList<String>();\n for (int i = 0; i < classesToScan.size(); i++) {\n String lookupName = classesToScan.get(i);\n byte classBytes[] = getClassBytes(lookupName);\n if (classBytes == null) {\n /*\n * Weird case: javac might generate a name and reference the class in\n * the bytecode but decide later that the class is unnecessary. In the\n * bytecode, a null is passed for the class.\n */\n continue;\n }\n \n /*\n * Add the class to the list only if it can be loaded to get around the\n * javac weirdness issue where javac refers a class but does not\n * generate it.\n */\n if (CompilingClassLoader.isClassnameGenerated(lookupName)\n && !allGeneratedClasses.contains(lookupName)) {\n allGeneratedClasses.add(lookupName);\n }\n AnonymousClassVisitor cv = new AnonymousClassVisitor();\n new ClassReader(classBytes).accept(cv, 0);\n List<String> innerClasses = cv.getInnerClassNames();\n for (String innerClass : innerClasses) {\n // The innerClass has to be an inner class of the lookupName\n if (!innerClass.startsWith(mainClass + \"$\")) {\n continue;\n }\n /*\n * TODO (amitmanjhi): consider making this a Set if necessary for\n * performance\n */\n // add the class to classes\n if (!classesToScan.contains(innerClass)) {\n classesToScan.add(innerClass);\n }\n }\n }\n Collections.sort(allGeneratedClasses, new GeneratedClassnameComparator());\n return allGeneratedClasses;\n }", "private static void preprocess() {\n \tLOG.info(\"Begin preprocessing of data.\");\n \t\n \tLOG.debug(\"Create a IterativeDirectoryReader.\");\n \t// Create a reader for directories\n \tIterativeDirectoryReader iterativeDirectoryReader = (IterativeDirectoryReader) ReaderFactory.instance().getIterativeDirectoryReader();\n \titerativeDirectoryReader.setDirectoryName(clArgs.preprocessInDir);\n \titerativeDirectoryReader.setPathInChildDirectory(clArgs.preprocessPathInChildDir);\n \t\n \tLOG.debug(\"Create a IterativeFileReader.\");\n \t// Create a reader for text files and set an appropriate file filter\n \tIterativeFileReader iterativeFileReader = (IterativeFileReader) ReaderFactory.instance().getIterativeFileReader();\n \titerativeFileReader.setFileFilter(FileUtil.acceptVisibleFilesFilter(false, true));\n \t\n \tLOG.debug(\"Create a TextFileLineReader.\");\n \t// Create a reader for text files, the first six lines are not relevant in this data set\n \tTextFileLineReader textFileLineReader = (TextFileLineReader) ReaderFactory.instance().getTextFileLineReader();\n \ttextFileLineReader.setOffset(clArgs.preprocessLineOffset);\n \t\n \tLOG.debug(\"Create a GpsLogLineProcessor.\");\n \t// Create a processor for user points\n \tGpsLogLineProcessor processor = new GpsLogLineProcessor(clArgs.preprocessOutFile);\n \t\n \t// Build reader chain\n \titerativeDirectoryReader.setReader(iterativeFileReader);\n \titerativeFileReader.setReader(textFileLineReader);\n \ttextFileLineReader.setProcessor(processor);\n \t\n \titerativeDirectoryReader.attach(processor, \n \t\t\t\tnew Interests[] {\n \t\t\t\t\tInterests.NewChildDirectory,\n \t\t\t\t\tInterests.HasFinished\n \t\t\t\t});\n \t\n \tLOG.debug(\"Read GPS logs. Save the data in a new file {}.\", clArgs.preprocessOutFile);\n \t// Read and save the data\n \titerativeDirectoryReader.read();\n\n \tLOG.info(\"Finished preprocessing of data.\");\n }", "public SELF the_analyzer_recognizes(Class... classHierarchyToScanFor) {\n builder.addHierarchy(classHierarchyToScanFor);\n return self();\n }", "@SuppressWarnings(\"unchecked\")\n public void loadClasses(String pckgname) throws ClassNotFoundException {\n File directory = null;\n try {\n ClassLoader cld = Thread.currentThread().getContextClassLoader();\n String path = \"/\" + pckgname.replace(\".\", \"/\");\n URL resource = cld.getResource(path);\n if (resource == null) {\n throw new ClassNotFoundException(\"sem classes no package \" + path);\n }\n directory = new File(resource.getFile());\n }\n catch (NullPointerException x) {\n throw new ClassNotFoundException(pckgname + \" (\" + directory + \") package invalido\");\n }\n if (directory.exists()) {\n String[] files = directory.list();\n for (int i = 0; i < files.length; i++) {\n if (files[i].endsWith(\".class\") && !files[i].contains(\"$\")) {\n Class cl = Class.forName(pckgname + '.' + files[i].substring(0, files[i].length() - 6));\n Method methods[] = cl.getDeclaredMethods();\n boolean ok = false;\n for (Method m : methods) {\n if ((m.getReturnType().equals(List.class) || m.getReturnType().isArray()) && m.getParameterTypes().length == 0) {\n ok = true;\n break;\n }\n }\n if (ok) {\n classes.add(cl);\n }\n }\n }\n }\n else {\n throw new ClassNotFoundException(pckgname + \" package invalido\");\n }\n }", "private void registerPrinters() {\n List<Class> classes = null;\n try {\n classes = ReflectionUtils.getAnnotatedClasses(PrinterAnnotation.class);\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n\n if(classes != null && classes.size() != 0) {\n for(Class aClass : classes) {\n try {\n Class<?> clazz = aClass;\n if (clazz.isAnnotationPresent(PrinterAnnotation.class) &&\n clazz.getAnnotation(PrinterAnnotation.class).parent() == PrinterAnnotation.NULL.class) {\n AbstractPrinter printer = (AbstractPrinter) clazz.newInstance();\n registerSignaturePrinters(printer);\n printers.put(clazz.getAnnotation(PrinterAnnotation.class).type(), printer);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }\n }", "private void writeClassesKey() {\n writeSpacesCorrespondingToNestedLevel(PKG_INFO_NEST_LEVEL);\n writer.println(\"classes:\");\n }", "private List<Class> getClasses(String packageName)\n throws ClassNotFoundException, IOException {\n ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n assert classLoader != null;\n String path = packageName.replace('.', '/');\n Enumeration<URL> resources = classLoader.getResources(path);\n List<File> dirs = new ArrayList<File>();\n while (resources.hasMoreElements()) {\n URL resource = resources.nextElement();\n dirs.add(new File(resource.getFile()));\n }\n ArrayList<Class> classes = new ArrayList<Class>();\n for (File directory : dirs) {\n classes.addAll(findClasses(directory, packageName));\n }\n return classes;\n }", "@Override\r\n public void process(CtClass<?> clazz) {\r\n this.processClass(clazz);\r\n }", "@Override\n public List<Class> getAllUssdClasses(String packageName) {\n\n List<Class> commands = new ArrayList<Class>();\n List<String> classNames = new ArrayList<String>();\n\n JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();\n StandardJavaFileManager fileManager = compiler.getStandardFileManager(\n null, null, null);\n\n StandardLocation location = StandardLocation.CLASS_PATH;\n\n Set<JavaFileObject.Kind> kinds = new HashSet<>();\n kinds.add(JavaFileObject.Kind.CLASS);\n boolean recurse = false;\n Iterable<JavaFileObject> list = new ArrayList<>();\n try {\n list = fileManager.list(location, packageName,\n kinds, recurse);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n\n for (JavaFileObject javaFileObject : list) {\n String path = javaFileObject.toUri().getPath();\n String className = path.substring(path.lastIndexOf(\"/\") + 1, path.indexOf(\".\"));\n classNames.add(className);\n }\n\n for (String className : classNames) {\n Class klass = null;\n try {\n klass = Class.forName(packageName + \".\" + className);\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n if (klass != null && klass.isAnnotationPresent(UssdService.class)) {\n commands.add(klass);\n }\n }\n return commands;\n }", "IClassDefinition[] resolveAncestry(ICompilerProject project);", "private Map<String, Entity> parseJavaClasses(List<Path> classFiles) {\r\n logger.trace(\"parseJavaClass\");\r\n\r\n // Instantiate walker and listener\r\n ParseTreeWalker walker = new ParseTreeWalker();\r\n Java8CustomListener listener = new Java8CustomListener();\r\n\r\n classFiles.forEach(path -> {\r\n logger.trace(\"========== Parse: \" + path.toFile().getName() + \" ==========\");\r\n\r\n try {\r\n ParseTree tree = getTree(path);\r\n\r\n // walk through class\r\n walker.walk(listener, tree);\r\n } catch (IOException e) {\r\n logger.error(\"Error while reading creating tree for: {}\", path, e);\r\n }\r\n });\r\n\r\n return listener.getEntityMap();\r\n }", "private static List<Class<?>> findClasses(File directory, String packageName) throws ClassNotFoundException {\n List<Class<?>> classes = new ArrayList<Class<?>>();\n if (!directory.exists()) {\n return classes;\n }\n File[] files = directory.listFiles();\n for (File file : files) {\n if (file.isDirectory()) {\n assert !file.getName().contains(\".\");\n classes.addAll(findClasses(file, packageName + \".\" + file.getName()));\n } else if (file.getName().endsWith(\".class\")) {\n classes.add(Class.forName(packageName + '.' + file.getName().substring(0, file.getName().length() - 6)));\n }\n }\n return classes;\n }", "private void propagateFeatures () {\n Logger.log(\"Propagating invocations through the Call Graph - DFS\");\n Set<SootMethod> calculated = new HashSet<SootMethod>();\n Chain<SootClass> classes = Scene.v().getApplicationClasses();\n SootClass c = null;\n SootMethod m = null;\n try {\n for (SootClass sclass : classes) {\n c = sclass;\n List<SootMethod> methods = sclass.getMethods();\n for (SootMethod method : methods) {\n m = method;\n if (!calculated.contains(method)) {\n propagateFeatures(method, calculated);\n }\n }\n }\n } catch (Exception e) {\n // handling\n }\n }", "private void connectClasses(Header [] list)\r\n {\r\n Vector queue;\r\n Vector garbage = new Vector();\r\n\r\n Find.setCrossreference(list);\r\n\r\n for(int i = 0; list != null && i < list.length; i++)\r\n {\r\n queue = list[i].scopes;\r\n\r\n for(int j = 0; j < queue.size(); j++)\r\n for(Iterator iter = ((Scope)queue.get(j)).iterator(); iter.hasNext();)\r\n {\r\n Iterator a = null;\r\n Basic x = (Basic)iter.next();\r\n\r\n if (x instanceof ClassType)\r\n {\r\n ClassType y = (ClassType)x;\r\n ClassType [] z;\r\n boolean done = false;\r\n String st = null;\r\n\r\n if (y.extend != null && y.extend.name != null && y.extend.scope == null)\r\n { // look for superclass\r\n st = y.extend.name.string;\r\n for(a = y.unresolved.iterator(); a.hasNext();)\r\n {\r\n String s = (String)a.next();\r\n if (s.endsWith('.' + st))\r\n {\r\n st = s;\r\n break;\r\n }\r\n }\r\n\r\n z = Find.findClass(st, 0, y.scope);\r\n \r\n for(int k = 0; k < z.length; k++)\r\n if (z[k].scope.javaPath(\"\").endsWith(st) || z[k].scope.buildPath(\"\").endsWith(st))\r\n {\r\n y.extend = z[k];\r\n garbage.add(st);\r\n done = true;\r\n }\r\n }\r\n\r\n for(int k = 0; k < y.implement.length; k++)\r\n if (y.implement[k].name != null && y.implement[k].scope == null)\r\n { // look for interface\r\n st = y.implement[k].name.string;\r\n for(a = y.unresolved.iterator(); a.hasNext();)\r\n {\r\n String s = (String)a.next();\r\n if (s.endsWith('.' + st))\r\n {\r\n st = s;\r\n break;\r\n }\r\n }\r\n done = false;\r\n \r\n z = Find.findClass(st, 0, y.scope);\r\n \r\n for(int l = 0; l < z.length && !done; l++)\r\n if (z[l].scope.javaPath(\"\").endsWith(st) || z[l].scope.buildPath(\"\").endsWith(st))\r\n {\r\n y.implement[k] = z[l];\r\n garbage.add(st);\r\n done = true;\r\n break;\r\n }\r\n }\r\n\r\n a = null;\r\n while(garbage.size() > 0)\r\n {\r\n st = (String)garbage.get(0);\r\n garbage.remove(0);\r\n y.unresolved.remove(st);\r\n }\r\n }\r\n }\r\n }\r\n }", "public List<? extends BaseClassInfo> getClasses(HasMetricsFilter filter) {\n if (classLookup == null) {\n buildClassLookupMap();\n }\n List<BaseClassInfo> result = newArrayList();\n for (BaseClassInfo classInfo : classLookup.values()) {\n if (filter.accept(classInfo)) {\n result.add(classInfo);\n }\n }\n return result;\n }", "private ArrayList<Class<Critter>> getCritterClasses(Package pkg) {\n\t\tArrayList<Class<Critter>> classes = new ArrayList<Class<Critter>>();\n\t\tString packagename = pkg.getName();\n\t\tURL resource = ClassLoader.getSystemClassLoader().getResource(packagename);\n\t\tString path = resource.getFile(); //path to package\n\t\tFile directory;\n\t\ttry {\n\t\t\tdirectory = new File(resource.toURI());\n\t\t} catch (Exception e) {\n\t\t\treturn null;\n\t\t}\n\t\tif (directory.exists()) {\n\t\t\tString[] files = directory.list();\n\t\t\tfor (String file : files) {\n\t\t\t\tif (file.endsWith(\".class\")) {\n\t\t\t\t\t// removes the .class extension\n\t\t\t\t\tString className = packagename + '.' + file.substring(0, file.length() - 6);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tClass classObj = Class.forName(className);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tObject obj = classObj.newInstance();\n\t\t\t\t\t\t\tif (obj instanceof Critter) {\n\t\t\t\t\t\t\t\tclasses.add(classObj);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\tcontinue; //Skip if class cannot be made into object\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn classes;\n\t}", "public static boolean start(RootDoc root) {\n System.out.println(\"ClassDoc packages: \" + root.classes().length);\n Path rootPath = FileSystems.getDefault().getPath(gitRepoRoot);\n\n for (String hierarchyRoot: hierarchyRoots) {\n ClassDoc hierarchyRootDoc = root.classNamed(hierarchyRoot);\n if (hierarchyRootDoc == null) {\n System.err.printf(\"Root class not found: '%s'\\n\", hierarchyRoot);\n System.exit(-2);\n }\n ClassTree javadocTree = new ClassTree(root, new EmptyJavadocConfiguration());\n\n List<ClassDoc> classDocs;\n\n if (hierarchyRootDoc.isInterface()) {\n classDocs = javadocTree.implementingclasses(hierarchyRootDoc);\n } else {\n classDocs = javadocTree.allSubs(hierarchyRootDoc, false);\n }\n classDocs.add(hierarchyRootDoc); //not to forget the main one\n\n\n // for (ClassDoc classDoc : root.classes()) {\n for (ClassDoc classDoc : classDocs) {\n Tag[] sinceTags = classDoc.tags(\"since\");\n String sinceVal = null;\n if (sinceTags != null && sinceTags.length > 0) {\n if (sinceTags.length > 1) {\n sinceVal = \"Multiple since tags!\";\n } else {\n sinceVal = sinceTags[0].text();\n }\n }\n\n\n Path containingPath = classDoc.position().file().toPath();\n String containingFileName = containingPath.getFileName().toString();\n String className = classDoc.name();\n System.out.printf(\"Class: %s (%s): @since: %s\\n\", className, containingFileName, (sinceVal == null) ? \"not found\" : sinceVal);\n currentFileToPath.put(containingFileName, rootPath.relativize(containingPath).toString());\n if (firstOccurance.containsKey(containingFileName)) {\n System.err.printf(\"Already stored %s from %s, must be an inner class; skipping!\\n\", className, containingFileName);\n } else {\n firstOccurance.put(containingFileName, sinceVal);\n }\n }\n }\n return true;\n }", "public void visitEnd() {\n\t\t\tfor (Object fieldObject : classToMerge.fields) {\n\t\t\t\tFieldNode fieldNode = (FieldNode) fieldObject;\n\t\t\t\t// only insert the field if it is annotated\n\t\t\t\tif(fieldNode.invisibleAnnotations != null){\n\t\t\t\t\tboolean addField = false;\n\t\t\t\t\tfor(Object annotationObject : fieldNode.invisibleAnnotations){\n\t\t\t\t\t\tAnnotationNode annotationNode = (AnnotationNode) annotationObject;\n\t\t\t\t\t\tJREFAnnotationIdentifier checker = new JREFAnnotationIdentifier();\n\t\t\t\t\t\tchecker.visitAnnotation(annotationNode.desc, false);\n\t\t\t\t\t\tif(checker.isDefineFieldAnnotation()){\n\t\t\t\t\t\t\taddField = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif(addField){\n\t\t\t\t\t\t// clear field annotations and insert the field\n\t\t\t\t\t\tAnnotationUtils.clearFieldAnnotations(fieldNode);\n\t\t\t\t\t\tfieldNode.accept(this);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// copy each method of the class to merge that is annotated\n\t\t\t// with a jref annotation to the original class\n\t\t\tfor (Object methodObject : classToMerge.methods) {\n\t\t\t\tMethodNode methodNode = (MethodNode) methodObject;\n\n\t\t\t\t// static initializers need to be handled specially\n\t\t\t\tif(methodNode.name.equals(\"<clinit>\")){\n\t\t\t\t\t// TODO: merge static initializers\n\t\t\t\t} else if(methodNode.name.equals(\"<init>\")){\n\t\t\t\t\t// TODO: merge initializers\n\t\t\t\t} else {\n\t\t\t\t\tboolean define = false;\n\t\t\t\t\tboolean merge = false;\n\t\t\t\t\t// check if method is annotated with a jref annotation\n\t\t\t\t\tLinkedList<AnnotationNode> jrefAnnotations = new LinkedList<AnnotationNode>();\n\t\t\t\t\tif (methodNode.invisibleAnnotations != null) {\n\t\t\t\t\t\tfor (Object annotationObject : methodNode.invisibleAnnotations) {\n\t\t\t\t\t\t\tAnnotationNode annotation = (AnnotationNode) annotationObject;\n\t\t\t\t\t\t\t// check if the annotation is a jref annotation\n\t\t\t\t\t\t\tJREFAnnotationIdentifier jrefChecker = new JREFAnnotationIdentifier();\n\t\t\t\t\t\t\tjrefChecker.visitAnnotation(annotation.desc, false);\n\t\t\t\t\t\t\tif(jrefChecker.isJREFAnnotation()){\n\t\t\t\t\t\t\t\tjrefAnnotations.add(annotation);\n\t\t\t\t\t\t\t\tif(jrefChecker.isDefineMethodAnnotation()){\n\t\t\t\t\t\t\t\t\tdefine = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(jrefChecker.isMergeMethodAnnotation()){\n\t\t\t\t\t\t\t\t\tmerge = true;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// if the method is annotated with @DefineMethod or @MergeMethod, add the method\n\t\t\t\t\tif(define || merge){\n\t\t\t\t\t\t// in any case, strip the jref annotations from the method\n\t\t\t\t\t\tmethodNode.invisibleAnnotations.removeAll(jrefAnnotations);\n\t\t\t\t\t\tif(merge){\n\t\t\t\t\t\t\tmergeMethod(methodNode, renamedMethods);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\taddMethod(methodNode);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tsuper.visitEnd();\n\t\t}", "public void processCode() throws InstantiationException, IllegalAccessException, ClassNotFoundException {\n\t\tsuper.processCode();\t\n\t\t\n\t\tfor (String processor : getProcessors()) {\n\t\t\tString[] refactorName = processor.split(\"\\\\.\");\n\t\t\tString refactor = refactorName[refactorName.length - 1];\n\t\t\t\n\t\t\tswitch (refactor) {\n\t\t\t\tcase \"CollapseHierarchy\" : refactoringsApplied.put(refactor, CollapseHierarchy.getTimesApplied());\n\t\t\t\t\t\t\t\t\t\t\t CollapseHierarchy.resetTimesApplied();\n\t\t\t\t\t\t\t\t\t\t break;\n\t\t\t\tcase \"EncapsulateCollection\" : refactoringsApplied.put(refactor, EncapsulateCollection.getTimesApplied());\n\t\t\t\t\t\t\t\t\t\t\t EncapsulateCollection.resetTimesApplied();\n\t\t\t\t \t\t\t\t\t\t\t break;\n\t\t\t\tcase \"EncapsulateField\" \t : refactoringsApplied.put(refactor, EncapsulateField.getTimesApplied());\n\t\t\t\t\t\t\t\t\t\t\t EncapsulateField.resetTimesApplied();\n\t\t\t\t\t\t\t\t\t\t \t break;\n\t\t\t\tcase \"ExtractSuperClass\" : refactoringsApplied.put(refactor, ExtractSuperClass.getTimesApplied());\n\t\t\t\t\t\t\t\t\t\t ExtractSuperClass.resetTimesApplied();\n\t\t\t\t\t\t\t\t\t\t\t break;\n\t\t\t\tcase \"HideMethod\" : refactoringsApplied.put(refactor, HideMethod.getTimesApplied());\n\t\t\t\t\t\t\t\t\t\t\t HideMethod.resetTimesApplied();\n\t\t\t\t\t\t\t\t\t\t\t break;\n\t\t\t\tcase \"PullUpField\"\t\t\t : refactoringsApplied.put(refactor, PullUpField.getTimesApplied());\n\t\t\t\t\t\t\t\t\t\t\t PullUpField.resetTimesApplied();\n\t\t\t\t\t\t\t\t\t\t\t break;\n\t\t\t\tcase \"PullUpMethod\" : refactoringsApplied.put(refactor, PullUpMethod.getTimesApplied());\n\t\t\t\t\t\t\t\t\t\t\t PullUpMethod.resetTimesApplied();\n\t\t\t\t\t\t\t\t\t\t\t break;\n\t\t\t\tcase \"PushDownField\"\t\t : refactoringsApplied.put(refactor, PushDownField.getTimesApplied());\n\t\t\t\t\t\t\t\t\t\t\t PushDownField.resetTimesApplied();\n\t\t\t\t\t\t\t\t\t\t\t break;\n\t\t\t\tcase \"PushDownMethod\"\t : refactoringsApplied.put(refactor, PushDownMethod.getTimesApplied());\n\t\t\t\t\t\t\t\t\t\t\t PushDownMethod.resetTimesApplied();\n\t\t\t\t\t\t\t\t\t\t\t break;\n\t\t\t}\t\n\t\t}\n\t\t\n\t\toutputProcessedCode();\n\t}", "@Override\r\n\tpublic void visit(ast.program.Program p) {\r\n\t\t// ////////////////////////////////////////////////\r\n\t\t// step 1: build a symbol table for class (the class table)\r\n\t\t// a class table is a mapping from class names to class bindings\r\n\t\t// classTable: className -> ClassBinding{extends, fields, methods}\r\n\t\tbuildMainClass((ast.mainClass.MainClass) p.mainClass);\r\n\t\tfor (ast.classs.T c : p.classes) {\r\n\t\t\tbuildClass((ast.classs.Class) c);\r\n\t\t}\r\n\r\n\t\t// we can double check that the class table is OK!\r\n\t\tif (control.Control.elabClassTable) {\r\n\t\t\tthis.classTable.dump();\r\n\t\t}\r\n\r\n\t\t// ////////////////////////////////////////////////\r\n\t\t// step 2: elaborate each class in turn, under the class table\r\n\t\t// built above.\r\n\t\tp.mainClass.accept(this);\r\n\t\tfor (ast.classs.T c : p.classes) {\r\n\t\t\tc.accept(this);\r\n\t\t}\r\n\t}", "@SuppressWarnings(\"unchecked\")\n private void resolveClasses() {\n for (String s : filesToResolve) {\n SchemaTupleFactory.LOG.info(\"Attempting to resolve class: \" + s);\n // Step one is to simply attempt to get the class object from the classloader\n // that includes the generated code.\n Class<?> clazz;\n try {\n clazz = classLoader.loadClass(s);\n } catch (ClassNotFoundException e) {\n throw new RuntimeException(\"Unable to find class: \" + s, e);\n }\n\n // Step three is to check if the class is a SchemaTuple. If it isn't,\n // we do not attempt to resolve it, because it is support code, such\n // as anonymous classes.\n if (!SchemaTuple.class.isAssignableFrom(clazz)) {\n return;\n }\n\n Class<SchemaTuple<?>> stClass = (Class<SchemaTuple<?>>)clazz;\n\n // Step four is to actually try to create the SchemaTuple instance.\n SchemaTuple<?> st;\n try {\n st = stClass.newInstance();\n } catch (InstantiationException e) {\n throw new RuntimeException(\"Error instantiating file: \" + s, e);\n } catch (IllegalAccessException e) {\n throw new RuntimeException(\"Error accessing file: \" + s, e);\n }\n\n // Step five is to get information about the class.\n boolean isAppendable = st instanceof AppendableSchemaTuple<?>;\n int id = st.getSchemaTupleIdentifier();\n Schema schema = st.getSchema();\n\n SchemaTupleFactory stf = new SchemaTupleFactory(stClass, st.getQuickGenerator());\n\n for (GenContext context : GenContext.values()) {\n if (context != GenContext.FORCE_LOAD && !context.shouldGenerate(stClass)) {\n SchemaTupleFactory.LOG.debug(\"Context [\"+context+\"] not present for class, skipping.\");\n continue;\n }\n\n // the SchemaKey (Schema sans alias) and appendability are how we will\n // uniquely identify a SchemaTupleFactory\n Triple<SchemaKey, Boolean, GenContext> trip =\n Triple.make(new SchemaKey(schema), isAppendable, context);\n\n schemaTupleFactoriesByTriple.put(trip, stf);\n\n SchemaTupleFactory.LOG.info(\"Successfully resolved class for schema [\"+schema+\"] and appendability [\"+isAppendable+\"]\"\n + \" in context: \" + context);\n }\n schemaTupleFactoriesById.put(id, stf);\n }\n }", "public List<Class<?>> getKnownClasses();", "public ClassDoc[] classes() {\n // return specClasses.values().toArray(new ClassDoc[0]);\n\n // return the set of classes in specClasses that are \"included\"\n // according to the access modifier filter\n if (includedClasses != null) {\n // System.out.println(\"RootDoc.classes() called.\");\n return includedClasses;\n }\n int size = 0;\n Collection<X10ClassDoc> classes = specClasses.values();\n for (ClassDoc cd : classes) {\n if (cd.isIncluded()) {\n size++;\n }\n }\n includedClasses = new X10ClassDoc[size];\n int i = 0;\n for (X10ClassDoc cd : classes) {\n if (cd.isIncluded()) {\n includedClasses[i++] = cd;\n }\n }\n Comparator<X10ClassDoc> cmp = new Comparator<X10ClassDoc>() {\n public int compare(X10ClassDoc first, X10ClassDoc second) {\n return first.name().compareTo(second.name());\n }\n\n public boolean equals(Object other) {\n return false;\n }\n };\n Arrays.sort(includedClasses, cmp);\n // System.out.println(\"RootDoc.classes() called. result = \" +\n // Arrays.toString(includedClasses));\n return includedClasses;\n }", "private Class<DimensionInterface>[] getAllClasses (String pckgname) {\n\t\t\n\t\ttry {\n\t\t \n\t\t\t// Classes will store our results\n\t\t\tArrayList classes = new ArrayList ();\n\t\t\t\n\n\t\t\t// Get a File object for the package \n\t\t File directory; \n\t\t \n\t\t \n\t\t // Load the package \n\t\t try { \n\t\t \tdirectory = new File (\n\t\t \t\tThread.currentThread ()\n\t\t \t\t\t.getContextClassLoader()\n\t\t \t\t\t.getResource (pckgname.replace('.', '/'))\n\t\t \t\t\t.getFile()\n\t\t \t); \n\t\t \n\t\t } catch (NullPointerException x) { \n\t\t \tSystem.out.println (\"Nullpointer\");\n\t\t \tthrow new ClassNotFoundException (pckgname + \" does not appear to be a valid package\"); \n\t\t }\n\t\t \n\t\t \n\t\t // IF we have found our package, then\n\t\t // obtain the files withtin\n\t\t if ( ! directory.exists ()) {\n\t\t \tSystem.out.println (\"Directory does not exist\");\n\t\t \tthrow new ClassNotFoundException(pckgname + \" does not appear to be a valid package\"); \n\t\t } \t\t \t\n\t\t \t\n\t\t \n\t \t// Get the list of the files contained in the package \n\t \tString[] files = directory.list ();\n\t\t \t\n\t\t \t\n\t \t// Get the files\n\t \tfor (int i=0; i<files.length; i++) { \n\n\t \t\t// we are only interested in .class files \n\t \t\tif ( ! files[i].endsWith(\".class\")) {\n\t \t\t\tcontinue;\n\t \t\t}\n\t \t\t\t\n \t\t\t// removes the .class extension \n \t\t\tclasses.add(Class.forName (pckgname + '.' + files[i].substring (0, files[i].length() - 6)));\n\t \t\t\t\n\t \t}\n\t\t \n\t\t \n\t \t// Convert the result in an array\n\t\t Class[] classesA = new Class[classes.size()]; \n\t\t classes.toArray (classesA); \n\t\t \n\t\t \n\t\t // Return\n\t\t return classesA;\n\t\t \n\t\t// Generic error\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "private TypeMirror[] readCustomConverterClasses(Element classElement) {\n AnnotationMirror annotationMirror = null;\n for (AnnotationMirror candidate : classElement.getAnnotationMirrors()) {\n if (context.getClassUtils().isSame(candidate.getAnnotationType(), NamingStrategy.class)) {\n annotationMirror = candidate;\n break;\n }\n }\n assert annotationMirror != null; // We've checked that in the caller already\n\n for (Map.Entry<? extends ExecutableElement, ? extends AnnotationValue> entry :\n annotationMirror.getElementValues().entrySet()) {\n if (entry.getKey().getSimpleName().contentEquals(\"customConverterClass\")) {\n @SuppressWarnings(\"unchecked\")\n List<? extends AnnotationValue> values = (List) entry.getValue().getValue();\n TypeMirror[] result = new TypeMirror[values.size()];\n for (int i = 0; i < values.size(); i++) {\n result[i] = ((TypeMirror) values.get(i).getValue());\n }\n return result;\n }\n }\n return new TypeMirror[0];\n }", "@Override\n\t\tprotected Set<BeanDefinitionHolder> doScan(String... basePackages) {\n\t\t\tSet<BeanDefinitionHolder> beanDefinitions = super.doScan(basePackages);\n\t\t\t\n\t\t\tif (beanDefinitions.isEmpty()) {\n\t\t\t\tlogger.warn(\"No MyBatis mapper was found in '\" + PagingMapperScannerConfigurer.this.basePackage\n\t\t\t\t\t\t+ \"' package. Please check your configuration.\");\n\t\t\t} else {\n\t\t\t\tfor (BeanDefinitionHolder holder : beanDefinitions) {\n\t\t\t\t\t\n\t\t\t\t\tGenericBeanDefinition definition = (GenericBeanDefinition) holder.getBeanDefinition();\n\n\t\t\t\t\tif (logger.isDebugEnabled()) {\n\t\t\t\t\t\tlogger.debug(\"Creating MapperFactoryBean with name '\" + holder.getBeanName()\n\t\t\t\t\t\t\t\t+ \"' and '\" + definition.getBeanClassName() + \"' mapperInterface\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// the mapper interface is the original class of the bean\n\t\t\t\t\t// but, the actual class of the bean is MapperFactoryBean\n\t\t\t\t\tdefinition.getPropertyValues().add(\"mapperInterface\", definition.getBeanClassName());\n\t\t\t\t\tdefinition.setBeanClass(PagingMapperFactoryBean.class);\n\t\t\t\t\tdefinition.getPropertyValues().add(\"addToConfig\", PagingMapperScannerConfigurer.this.addToConfig);\n\t\t\t\t\t\n\t\t\t\t\t// checking sql session factory of mybatis object and inject it \n\t\t\t\t\tboolean explicitFactoryUsed = false;\n\t\t\t\t\tif (StringUtils.hasLength(PagingMapperScannerConfigurer.this.sqlSessionFactoryBeanName)) {\n\t\t\t\t\t\tdefinition.getPropertyValues().add(\"sqlSessionFactory\", \n\t\t\t\t\t\t\t\tnew RuntimeBeanReference(PagingMapperScannerConfigurer.this.sqlSessionFactoryBeanName));\n\t\t\t\t\t\texplicitFactoryUsed = true;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (StringUtils.hasLength(PagingMapperScannerConfigurer.this.sqlSessionTemplateBeanName)) {\n\t\t\t\t\t\tif (explicitFactoryUsed) {\n\t\t\t\t\t\t\tlogger.warn(\"Cannot use both: sqlSessionTemplate and sqlSessionFactory together. sqlSessionFactory is ignored.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdefinition.getPropertyValues().add(\"sqlSessionTemplate\",\n\t\t\t\t\t\t\t\tnew RuntimeBeanReference(PagingMapperScannerConfigurer.this.sqlSessionTemplateBeanName));\n\t\t\t\t\t\tdefinition.getPropertyValues().add(\"sqlSessionFactory\", null);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn beanDefinitions;\n\t\t}", "private List<String> getClassesInPackage(String packageUniqueName) {\n List<String> result = new ArrayList<String>();\n if (theModel.packages.containsKey(packageUniqueName)){\n \tTreeSet<String> children = theModel.packages.get(packageUniqueName).children;\n \tif ((children != null)){\n \t\tfor (String uniqueName : children){\n \t\t\tFamixClass foundClass = theModel.classes.get(uniqueName);\n \t\t\tif (foundClass != null){\n \t\t\t\tresult.add(uniqueName);\n \t\t\t\tif (foundClass.hasInnerClasses){\n \t\t\t\t\tresult.addAll(foundClass.children);\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}\n }\n return result;\n }", "private static List<Class> findClasses(File directory, String packageName) throws ClassNotFoundException {\n List<Class> classes = new ArrayList<Class>();\n if (!directory.exists()) {\n return classes;\n }\n File[] files = directory.listFiles();\n for (File file : files) {\n if (file.isDirectory()) {\n assert !file.getName().contains(\".\");\n classes.addAll(findClasses(file, packageName + \".\" + file.getName()));\n } else if (file.getName().endsWith(\".class\")) {\n classes.add(Class.forName(packageName + '.' + file.getName().substring(0, file.getName().length() - 6)));\n }\n }\n return classes;\n }", "public void loadFeatures(Class<?> classToRun) throws Exception {\n List<Features> annos = FeaturesRunner.getScanner().getAnnotations(classToRun, Features.class);\n for (Features anno : annos) {\n for (Class<? extends RunnerFeature> cl : anno.value()) {\n loadFeature(new HashSet<>(), cl);\n }\n }\n\n }", "static void scan(Class<?> aClass, BiConsumer<Method, Annotation> consumer) {\n if (Object.class.equals(aClass)) {\n return;\n }\n\n if (!isInstantiable(aClass)) {\n return;\n }\n for (Method method : aClass.getMethods()) {\n scan(consumer, aClass, method);\n }\n }", "public void analyseAnnotations(AbsIoc ioc){\n\t\t//0. makeup a cache first\n\t\tMap<String, IocObject> cacheMap = new HashMap<String, IocObject>();\n\t\tIocObject iocObj = null;\n\t\tfor(Class<?> cl : list){\n\t\t\tiocObj = new IocObject();\n\t\t\tiocObj.setType(cl);\n\t\t\t//1.tell if there is an IocBean \n\t\t\tif(!cl.isAnnotationPresent(IocBean.class))\n\t\t\t\tcontinue ;\n\t\t\t//2.if have the class name\n\t\t\tIocBean bean = cl.getAnnotation(IocBean.class);\n\t\t\tif(StringHandler.isEmpty(bean))\n\t\t\t\tcontinue ;\n\t\t\tString className = bean.name();\n\t\t\tif(StringHandler.isEmpty(className))\n\t\t\t\tclassName = cl.getSimpleName(); //if no name has been set, then use simple name\n\t\t\t\n\t\t\t//3. scope properties, here only use default properties\n\t\t\tif(cl.isAnnotationPresent(IocScope.class)){\n\t\t\t\tIocScope scope = cl.getAnnotation(IocScope.class);\n\t\t\t\tString val = scope.value();\n\t\t\t\t//default is singleton\n\t\t\t\tif(StringHandler.isEmpty(val)) \n\t\t\t\t\tval = \"singleton\"; \n\t\t\t\t\n\t\t\t\tiocObj.scope = val.trim();\n\t\t\t}\n\t\t\t\n\t\t\t//4. initial a instance\n\t\t\ttry {\n\t\t\t\tif(iocObj.scope.equals(\"singleton\"))\n\t\t\t\t\tiocObj.instanceObj = cl.newInstance();\n\t\t\t} catch (InstantiationException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IllegalAccessException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} \n\t\t\t//XXX later change to logger\n\t\t\tSystem.out.println(\"success load class: \" + cl.getName());\n\t\t\tcacheMap.put(className, iocObj); \n\t\t}\n\t\t\n\t\t//finally replace the map\n\t\tioc.iocMap = cacheMap;\n\t}", "@Test\r\n\tpublic void testScanBaseClass(){\n\t\tString path = JDocPluginUtils.getProjectDir().getPath()+ \"/src/test/java/\";\r\n\t\tSystem.out.println(\"path:\" + path);\r\n\t\tJavaSourceScanner scaner = new JavaSourceScanner();\r\n\t\tscaner.setSourceDir(path);\r\n\t\tList<JClassDoc> jdocs = scaner.scan(\"org.onetwo.plugins.jdoc.test\");\r\n\t\tSystem.out.println(\"testScanBaseClass:\" + getInfoDoc(jdocs).toString().trim());\r\n\t\t\r\n\t\tassertJDoc(jdocs);\r\n\t}", "public void generateSchema(final ODatabaseSession session, final String entityScanPackage) {\n Map<String, OClass> processed = new HashMap<>();\n Map<String, Consumer<OClass>> postProcess = new HashMap<>();\n List<Class> classes = getClasses(entityScanPackage);\n for (Class clazz : classes) {\n generateSchema(session, clazz, processed, postProcess);\n }\n\n // Sets relationships if a class was processed before it's relation class.\n for (String className : postProcess.keySet()) {\n postProcess.get(className).accept(processed.get(className));\n }\n\n // Creates index\n for (Class clazz : classes) {\n generateIndex(session, clazz);\n }\n\n session.close();\n }", "@SuppressWarnings(\"rawtypes\")\n public static Iterable<Class> getClasses(String packageName) throws ClassNotFoundException, IOException\n {\n return getClasses(packageName, null);\n }" ]
[ "0.6739729", "0.6649452", "0.6557237", "0.6554823", "0.65374625", "0.64378273", "0.6339039", "0.63258916", "0.629722", "0.6292303", "0.6087058", "0.60701895", "0.6063367", "0.6004702", "0.5914939", "0.5895156", "0.58286995", "0.5751835", "0.5747269", "0.5741667", "0.57281274", "0.56738114", "0.5669039", "0.56640685", "0.5654046", "0.5622077", "0.5605718", "0.55873525", "0.5577249", "0.5540624", "0.5522359", "0.5509246", "0.55085707", "0.55041826", "0.5497541", "0.54526275", "0.54490435", "0.54223037", "0.54028857", "0.5401209", "0.5396155", "0.53931624", "0.53732705", "0.53695834", "0.5359796", "0.535202", "0.5325806", "0.5318233", "0.53172475", "0.53084", "0.5305216", "0.5294925", "0.52923757", "0.52767336", "0.5273913", "0.5269104", "0.52659476", "0.52636814", "0.52407676", "0.5197972", "0.519246", "0.51848894", "0.51823664", "0.51803577", "0.5174083", "0.5148605", "0.51449907", "0.51203805", "0.51175535", "0.5112719", "0.51099104", "0.5108654", "0.5102445", "0.51000273", "0.50914043", "0.50908095", "0.50855374", "0.50799155", "0.5078872", "0.5077829", "0.5072064", "0.5068766", "0.50611335", "0.50593936", "0.505765", "0.5051371", "0.50425917", "0.504144", "0.50251085", "0.5020948", "0.5015268", "0.5011762", "0.49999946", "0.4993466", "0.49896872", "0.49888495", "0.4980465", "0.49778527", "0.49776006", "0.4971232" ]
0.5149329
65
build all LSM managers
public LSMEngineBuilder<T> buildLSMManagers( ApplicationContext applicationContext, WALManager walManager) { try { buildWalManager(walManager).buildLevelProcessors(applicationContext).buildRecoverManager(); } catch (Exception e) { logger.error(e.getMessage()); } return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void registerManagers() {\n registerProviders();\n\n // Cast Managers\n if (worldGuardManager.isEnabled()) castManagers.add(worldGuardManager);\n if (preciousStonesManager.isEnabled()) castManagers.add(preciousStonesManager);\n if (redProtectManager != null && redProtectManager.isFlagsEnabled()) castManagers.add(redProtectManager);\n\n // Entity Targeting Managers\n if (preciousStonesManager.isEnabled()) targetingProviders.add(preciousStonesManager);\n if (townyManager.isEnabled()) targetingProviders.add(townyManager);\n if (residenceManager != null) targetingProviders.add(residenceManager);\n if (redProtectManager != null) targetingProviders.add(redProtectManager);\n\n // PVP Managers\n if (worldGuardManager.isEnabled()) pvpManagers.add(worldGuardManager);\n if (pvpManager.isEnabled()) pvpManagers.add(pvpManager);\n if (multiverseManager.isEnabled()) pvpManagers.add(multiverseManager);\n if (preciousStonesManager.isEnabled()) pvpManagers.add(preciousStonesManager);\n if (townyManager.isEnabled()) pvpManagers.add(townyManager);\n if (griefPreventionManager.isEnabled()) pvpManagers.add(griefPreventionManager);\n if (factionsManager.isEnabled()) pvpManagers.add(factionsManager);\n if (residenceManager != null) pvpManagers.add(residenceManager);\n if (redProtectManager != null) pvpManagers.add(redProtectManager);\n\n // Build Managers\n if (worldGuardManager.isEnabled()) blockBuildManagers.add(worldGuardManager);\n if (factionsManager.isEnabled()) blockBuildManagers.add(factionsManager);\n if (locketteManager.isEnabled()) blockBuildManagers.add(locketteManager);\n if (preciousStonesManager.isEnabled()) blockBuildManagers.add(preciousStonesManager);\n if (townyManager.isEnabled()) blockBuildManagers.add(townyManager);\n if (griefPreventionManager.isEnabled()) blockBuildManagers.add(griefPreventionManager);\n if (mobArenaManager != null && mobArenaManager.isProtected()) blockBuildManagers.add(mobArenaManager);\n if (residenceManager != null) blockBuildManagers.add(residenceManager);\n if (redProtectManager != null) blockBuildManagers.add(redProtectManager);\n if (landsManager != null) blockBuildManagers.add(landsManager);\n\n // Break Managers\n if (worldGuardManager.isEnabled()) blockBreakManagers.add(worldGuardManager);\n if (factionsManager.isEnabled()) blockBreakManagers.add(factionsManager);\n if (locketteManager.isEnabled()) blockBreakManagers.add(locketteManager);\n if (preciousStonesManager.isEnabled()) blockBreakManagers.add(preciousStonesManager);\n if (townyManager.isEnabled()) blockBreakManagers.add(townyManager);\n if (griefPreventionManager.isEnabled()) blockBreakManagers.add(griefPreventionManager);\n if (mobArenaManager != null && mobArenaManager.isProtected()) blockBreakManagers.add(mobArenaManager);\n if (citadelManager != null) blockBreakManagers.add(citadelManager);\n if (residenceManager != null) blockBreakManagers.add(residenceManager);\n if (redProtectManager != null) blockBreakManagers.add(redProtectManager);\n if (landsManager != null) blockBreakManagers.add(landsManager);\n\n // Team providers\n if (heroesManager != null && heroesManager.useParties()) teamProviders.add(heroesManager);\n if (skillAPIManager != null && skillAPIManager.usesAllies()) teamProviders.add(skillAPIManager);\n if (useScoreboardTeams) teamProviders.add(new ScoreboardTeamProvider());\n if (permissionTeams != null && !permissionTeams.isEmpty()) {\n teamProviders.add(new PermissionsTeamProvider(permissionTeams));\n }\n if (factionsManager != null) teamProviders.add(factionsManager);\n if (battleArenaManager != null && useBattleArenaTeams) teamProviders.add(battleArenaManager);\n if (ultimateClansManager != null) teamProviders.add(ultimateClansManager);\n\n // Player warp providers\n if (preciousStonesManager != null && preciousStonesManager.isEnabled()) {\n playerWarpManagers.put(\"fields\", preciousStonesManager);\n }\n if (redProtectManager != null) playerWarpManagers.put(\"redprotect\", redProtectManager);\n if (residenceManager != null) playerWarpManagers.put(\"residence\", residenceManager);\n }", "public LSMEngineBuilder<T> buildLSMManagers(String packageName, WALManager walManager) {\n try {\n ApplicationContext property =\n ApplicationContextGenerator.GeneratePropertyWithAnnotation(packageName);\n buildLSMManagers(property, walManager);\n } catch (Exception e) {\n logger.error(e.getMessage());\n }\n return this;\n }", "private void initManagers() {\n\t\t// TODO Auto-generated method stub\n\t\tvenueManager = new VenueManager();\n\t\tadView = new AdView(this, AdSize.SMART_BANNER,\n\t\t\t\tConstants.AppConstants.ADDMOB);\n\t\tanimationSounds = new AnimationSounds(VenuesActivity.this);\n\n\t}", "private void loadManager() {\n LOGGER.info(\"Load metricManager, type: {}\", METRIC_CONFIG.getMetricFrameType());\n ServiceLoader<AbstractMetricManager> metricManagers =\n ServiceLoader.load(AbstractMetricManager.class);\n int size = 0;\n for (AbstractMetricManager mf : metricManagers) {\n size++;\n if (mf.getClass()\n .getName()\n .toLowerCase()\n .contains(METRIC_CONFIG.getMetricFrameType().name().toLowerCase())) {\n metricManager = mf;\n break;\n }\n }\n\n // if no more implementations, we use nothingManager.\n if (size == 0 || metricManager == null) {\n metricManager = new DoNothingMetricManager();\n } else if (size > 1) {\n LOGGER.info(\n \"Detect more than one MetricManager, will use {}\", metricManager.getClass().getName());\n }\n }", "public LSMEngine<T> build() {\n return lsmEngine;\n }", "public void start() {\n System.out.println(\"OBRMAN started\");\n ApamManagers.addManager(this, 3);\n OBRMan.obr = new OBRManager(null, repoAdmin);\n obr.startWatchingRepository();\n }", "public void addBuildables(){\n this.allBuildables.add(new Nexus());\n this.allBuildables.add(new Pylon());\n this.allBuildables.add(new Assimilator());\n this.allBuildables.add(new Gateway());\n this.allBuildables.add(new CyberneticsCore());\n this.allBuildables.add(new RoboticsFacility());\n this.allBuildables.add(new Stargate());\n this.allBuildables.add(new TwilightCouncil());\n this.allBuildables.add(new TemplarArchives());\n this.allBuildables.add(new DarkShrine());\n this.allBuildables.add(new RoboticsBay());\n this.allBuildables.add(new FleetBeacon());\n this.allBuildables.add(new Probe());\n this.allBuildables.add(new Zealot());\n this.allBuildables.add(new Stalker());\n this.allBuildables.add(new Sentry());\n this.allBuildables.add(new Observer());\n this.allBuildables.add(new Immortal());\n this.allBuildables.add(new Phoenix());\n this.allBuildables.add(new VoidRay());\n this.allBuildables.add(new Colossus());\n this.allBuildables.add(new HighTemplar());\n this.allBuildables.add(new DarkTemplar());\n this.allBuildables.add(new Carrier());\n }", "protected void build() {\n // Make sure we have a fresh build of everything needed to run a JAM session\n // - bootstrap, translator and agent suites\n builder(\"clean\");\n builder(\"\");\n buildBootstrap();\n }", "private void startComponents(){\n\n if(isAllowed(sentinel)){\n SentinelComponent sentinelComponent = new SentinelComponent(getInstance());\n sentinelComponent.getCanonicalName();\n }\n\n if(isAllowed(\"fileserver\")){\n FileServer fileServer = new FileServer(getInstance());\n fileServer.getCanonicalName();\n }\n\n if(isAllowed(\"manager\")){\n ManagerComponent Manager = new ManagerComponent(getInstance());\n Manager.getCanonicalName();\n }\n\n// if(isAllowed(\"sdk\")){\n// SDK sdk = new SDK(getInstance());\n// sdk.getCanonicalName();\n// }\n\n if(isAllowed(\"centrum\")){\n CentrumComponent centrum1 = new CentrumComponent(getInstance(), null);\n centrum1.getCanonicalName();\n }\n\n }", "private LSMEngineBuilder<T> buildLevelProcessors(ApplicationContext applicationContext) {\n LevelProcessorChain<T, IInsertionRequest, InsertRequestContext> insertionLevelProcessChain =\n generateLevelProcessorsChain(applicationContext.getInsertionLevelProcessClass());\n LevelProcessorChain<T, IDeletionRequest, DeleteRequestContext> deletionLevelProcessChain =\n generateLevelProcessorsChain(applicationContext.getDeletionLevelProcessClass());\n LevelProcessorChain<T, IQueryRequest, QueryRequestContext> queryLevelProcessChain =\n generateLevelProcessorsChain(applicationContext.getQueryLevelProcessClass());\n return buildQueryManager(queryLevelProcessChain)\n .buildInsertionManager(insertionLevelProcessChain)\n .buildDeletionManager(deletionLevelProcessChain);\n }", "public void buildAllRepositories() {\n for (ServerRepository serverRepository : serverRepositories.values()) {\n buildRepository(serverRepository, false);\n }\n\n updateServerInfo();\n }", "private void startBootstrapServices() {\n traceBeginAndSlog(\"StartWatchdog\");\n Watchdog watchdog = Watchdog.getInstance();\n watchdog.start();\n traceEnd();\n if (MAPLE_ENABLE) {\n this.mPrimaryZygotePreload = SystemServerInitThreadPool.get().submit($$Lambda$SystemServer$UyrPns7R814gZEylCbDKhe8It4.INSTANCE, \"PrimaryZygotePreload\");\n }\n Slog.i(TAG, \"Reading configuration...\");\n traceBeginAndSlog(\"ReadingSystemConfig\");\n SystemServerInitThreadPool.get().submit($$Lambda$YWiwiKm_Qgqb55C6tTuq_n2JzdY.INSTANCE, \"ReadingSystemConfig\");\n traceEnd();\n traceBeginAndSlog(\"StartInstaller\");\n this.installer = (Installer) this.mSystemServiceManager.startService(Installer.class);\n traceEnd();\n traceBeginAndSlog(\"DeviceIdentifiersPolicyService\");\n this.mSystemServiceManager.startService(DeviceIdentifiersPolicyService.class);\n traceEnd();\n traceBeginAndSlog(\"UriGrantsManagerService\");\n this.mSystemServiceManager.startService(UriGrantsManagerService.Lifecycle.class);\n traceEnd();\n traceBeginAndSlog(\"StartActivityManager\");\n ActivityTaskManagerService atm = this.mSystemServiceManager.startService(ActivityTaskManagerService.Lifecycle.class).getService();\n this.mActivityManagerService = ActivityManagerService.Lifecycle.startService(this.mSystemServiceManager, atm);\n this.mActivityManagerService.setSystemServiceManager(this.mSystemServiceManager);\n this.mActivityManagerService.setInstaller(this.installer);\n this.mWindowManagerGlobalLock = atm.getGlobalLock();\n traceEnd();\n traceBeginAndSlog(\"StartPowerManager\");\n try {\n this.mPowerManagerService = (PowerManagerService) this.mSystemServiceManager.startService(\"com.android.server.power.HwPowerManagerService\");\n } catch (RuntimeException e) {\n Slog.w(TAG, \"create HwPowerManagerService failed\");\n this.mPowerManagerService = (PowerManagerService) this.mSystemServiceManager.startService(PowerManagerService.class);\n }\n traceEnd();\n traceBeginAndSlog(\"StartThermalManager\");\n this.mSystemServiceManager.startService(ThermalManagerService.class);\n traceEnd();\n try {\n Slog.i(TAG, \"PG Manager service\");\n this.mPGManagerService = PGManagerService.getInstance(this.mSystemContext);\n } catch (Throwable e2) {\n reportWtf(\"PG Manager service\", e2);\n }\n traceBeginAndSlog(\"InitPowerManagement\");\n this.mActivityManagerService.initPowerManagement();\n traceEnd();\n traceBeginAndSlog(\"StartRecoverySystemService\");\n this.mSystemServiceManager.startService(RecoverySystemService.class);\n traceEnd();\n RescueParty.noteBoot(this.mSystemContext);\n traceBeginAndSlog(\"StartLightsService\");\n try {\n this.mSystemServiceManager.startService(\"com.android.server.lights.LightsServiceBridge\");\n } catch (RuntimeException e3) {\n Slog.w(TAG, \"create LightsServiceBridge failed\");\n this.mSystemServiceManager.startService(LightsService.class);\n }\n traceEnd();\n traceBeginAndSlog(\"StartSidekickService\");\n if (SystemProperties.getBoolean(\"config.enable_sidekick_graphics\", false)) {\n this.mSystemServiceManager.startService(WEAR_SIDEKICK_SERVICE_CLASS);\n }\n traceEnd();\n traceBeginAndSlog(\"StartDisplayManager\");\n this.mDisplayManagerService = (DisplayManagerService) this.mSystemServiceManager.startService(DisplayManagerService.class);\n traceEnd();\n try {\n this.mSystemServiceManager.startService(\"com.android.server.security.HwSecurityService\");\n Slog.i(TAG, \"HwSecurityService start success\");\n } catch (Exception e4) {\n Slog.e(TAG, \"can't start HwSecurityService service\");\n }\n traceBeginAndSlog(\"WaitForDisplay\");\n this.mSystemServiceManager.startBootPhase(100);\n traceEnd();\n String cryptState = (String) VoldProperties.decrypt().orElse(\"\");\n if (ENCRYPTING_STATE.equals(cryptState)) {\n Slog.w(TAG, \"Detected encryption in progress - only parsing core apps\");\n this.mOnlyCore = true;\n } else if (ENCRYPTED_STATE.equals(cryptState)) {\n Slog.w(TAG, \"Device encrypted - only parsing core apps\");\n this.mOnlyCore = true;\n }\n HwBootCheck.bootSceneEnd(100);\n HwBootFail.setBootTimer(false);\n HwBootCheck.bootSceneStart(105, 900000);\n if (!this.mRuntimeRestart) {\n MetricsLogger.histogram((Context) null, \"boot_package_manager_init_start\", (int) SystemClock.elapsedRealtime());\n }\n traceBeginAndSlog(\"StartPackageManagerService\");\n try {\n Watchdog.getInstance().pauseWatchingCurrentThread(\"packagemanagermain\");\n this.mPackageManagerService = PackageManagerService.main(this.mSystemContext, this.installer, this.mFactoryTestMode != 0, this.mOnlyCore);\n Watchdog.getInstance().resumeWatchingCurrentThread(\"packagemanagermain\");\n this.mFirstBoot = this.mPackageManagerService.isFirstBoot();\n this.mPackageManager = this.mSystemContext.getPackageManager();\n Slog.i(TAG, \"Finish_StartPackageManagerService\");\n traceEnd();\n if (!this.mRuntimeRestart && !isFirstBootOrUpgrade()) {\n MetricsLogger.histogram((Context) null, \"boot_package_manager_init_ready\", (int) SystemClock.elapsedRealtime());\n HwBootCheck.addBootInfo(\"[bootinfo]\\nisFirstBoot: \" + this.mFirstBoot + \"\\nisUpgrade: \" + this.mPackageManagerService.isUpgrade());\n HwBootCheck.bootSceneStart(101, JobStatus.DEFAULT_TRIGGER_MAX_DELAY);\n HwBootFail.setBootTimer(true);\n }\n HwBootCheck.bootSceneEnd(105);\n if (!this.mOnlyCore && !SystemProperties.getBoolean(\"config.disable_otadexopt\", false)) {\n traceBeginAndSlog(\"StartOtaDexOptService\");\n try {\n Watchdog.getInstance().pauseWatchingCurrentThread(\"moveab\");\n OtaDexoptService.main(this.mSystemContext, this.mPackageManagerService);\n } catch (Throwable th) {\n Watchdog.getInstance().resumeWatchingCurrentThread(\"moveab\");\n traceEnd();\n throw th;\n }\n Watchdog.getInstance().resumeWatchingCurrentThread(\"moveab\");\n traceEnd();\n }\n traceBeginAndSlog(\"StartUserManagerService\");\n this.mSystemServiceManager.startService(UserManagerService.LifeCycle.class);\n traceEnd();\n traceBeginAndSlog(\"InitAttributerCache\");\n AttributeCache.init(this.mSystemContext);\n traceEnd();\n traceBeginAndSlog(\"SetSystemProcess\");\n this.mActivityManagerService.setSystemProcess();\n traceEnd();\n traceBeginAndSlog(\"InitWatchdog\");\n watchdog.init(this.mSystemContext, this.mActivityManagerService);\n traceEnd();\n this.mDisplayManagerService.setupSchedulerPolicies();\n traceBeginAndSlog(\"StartOverlayManagerService\");\n this.mSystemServiceManager.startService(new OverlayManagerService(this.mSystemContext, this.installer));\n traceEnd();\n traceBeginAndSlog(\"StartSensorPrivacyService\");\n this.mSystemServiceManager.startService(new SensorPrivacyService(this.mSystemContext));\n traceEnd();\n if (SystemProperties.getInt(\"persist.sys.displayinset.top\", 0) > 0) {\n this.mActivityManagerService.updateSystemUiContext();\n ((DisplayManagerInternal) LocalServices.getService(DisplayManagerInternal.class)).onOverlayChanged();\n }\n this.mSensorServiceStart = SystemServerInitThreadPool.get().submit($$Lambda$SystemServer$oG4I04QJrkzCGs6IcMTKU2211A.INSTANCE, START_SENSOR_SERVICE);\n } catch (Throwable th2) {\n Watchdog.getInstance().resumeWatchingCurrentThread(\"packagemanagermain\");\n throw th2;\n }\n }", "private EntityManager initSystems() {\n CameraSystem cameraSystem = new CameraSystem(Constants.WINDOW_WIDTH, Constants.WINDOW_HEIGHT);\n addSystem(cameraSystem);\n addSystem(new ZoomSystem());\n //Physics System\n addSystem(new PhysicsSystem());\n //Player movement system\n addSystem(new PlayerMovementSystem());\n\n addSystem(new CannonFiringSystem());\n addSystem(new CollisionSystem());\n addSystem(new KillSystem());\n addSystem(new HealthSystem());\n addSystem(new StatisticSystem());\n addSystem(new EnemySpawningSystem());\n addSystem(new InventorySystem());\n addSystem(new CurrencySystem());\n\n GUISystem guiSystem = new GUISystem();\n InputSystem inputSystem = new InputSystem(guiSystem);\n\n //Input System\n addSystem(inputSystem);\n //Entity Render System\n addSystem(new EntityRenderSystem());\n //Particle System\n addSystem(new ParticleSystem());\n addSystem(new PlayerActionSystem(guiSystem));\n addSystem(new MapRenderSystem());\n addSystem(new HUDSystem());\n //Debug Render System\n addSystem(new DebugRendererSystem());\n //GUI System\n addSystem(guiSystem);\n\n return this;\n }", "private void setupAllMafiosis()\n {\n }", "public static void initManager() {\n theManager = new LevelManager();\n lives = 3;\n }", "private void initSCMHAConfig() {\n // Set configurations required for starting OM HA service, because that\n // is the serviceID being passed to start Ozone HA cluster.\n // Here setting internal service and OZONE_OM_SERVICE_IDS_KEY, in this\n // way in OM start it uses internal service id to find it's service id.\n conf.set(ScmConfigKeys.OZONE_SCM_SERVICE_IDS_KEY, scmServiceId);\n conf.set(ScmConfigKeys.OZONE_SCM_DEFAULT_SERVICE_ID, scmServiceId);\n String scmNodesKey = ConfUtils.addKeySuffixes(\n ScmConfigKeys.OZONE_SCM_NODES_KEY, scmServiceId);\n StringBuilder scmNodesKeyValue = new StringBuilder();\n StringBuilder scmNames = new StringBuilder();\n\n for (int i = 1; i <= numOfSCMs; i++) {\n String scmNodeId = SCM_NODE_ID_PREFIX + i;\n scmNodesKeyValue.append(\",\").append(scmNodeId);\n\n String scmAddrKey = ConfUtils.addKeySuffixes(\n ScmConfigKeys.OZONE_SCM_ADDRESS_KEY, scmServiceId, scmNodeId);\n String scmHttpAddrKey = ConfUtils.addKeySuffixes(\n ScmConfigKeys.OZONE_SCM_HTTP_ADDRESS_KEY, scmServiceId, scmNodeId);\n String scmHttpsAddrKey = ConfUtils.addKeySuffixes(\n ScmConfigKeys.OZONE_SCM_HTTPS_ADDRESS_KEY, scmServiceId, scmNodeId);\n String scmRatisPortKey = ConfUtils.addKeySuffixes(\n ScmConfigKeys.OZONE_SCM_RATIS_PORT_KEY, scmServiceId, scmNodeId);\n String dnPortKey = ConfUtils.addKeySuffixes(\n ScmConfigKeys.OZONE_SCM_DATANODE_ADDRESS_KEY,\n scmServiceId, scmNodeId);\n String blockClientKey = ConfUtils.addKeySuffixes(\n ScmConfigKeys.OZONE_SCM_BLOCK_CLIENT_ADDRESS_KEY,\n scmServiceId, scmNodeId);\n String ssClientKey = ConfUtils.addKeySuffixes(\n ScmConfigKeys.OZONE_SCM_CLIENT_ADDRESS_KEY,\n scmServiceId, scmNodeId);\n String scmGrpcPortKey = ConfUtils.addKeySuffixes(\n ScmConfigKeys.OZONE_SCM_GRPC_PORT_KEY, scmServiceId, scmNodeId);\n String scmSecurityAddrKey = ConfUtils.addKeySuffixes(\n ScmConfigKeys.OZONE_SCM_SECURITY_SERVICE_ADDRESS_KEY, scmServiceId,\n scmNodeId);\n\n conf.set(scmAddrKey, \"127.0.0.1\");\n conf.set(scmHttpAddrKey, localhostWithFreePort());\n conf.set(scmHttpsAddrKey, localhostWithFreePort());\n conf.set(scmSecurityAddrKey, localhostWithFreePort());\n conf.set(\"ozone.scm.update.service.port\", \"0\");\n\n int ratisPort = getFreePort();\n conf.setInt(scmRatisPortKey, ratisPort);\n //conf.setInt(\"ozone.scm.ha.ratis.bind.port\", ratisPort);\n\n int dnPort = getFreePort();\n conf.set(dnPortKey, \"127.0.0.1:\" + dnPort);\n scmNames.append(\",localhost:\").append(dnPort);\n\n conf.set(ssClientKey, localhostWithFreePort());\n conf.setInt(scmGrpcPortKey, getFreePort());\n\n String blockAddress = localhostWithFreePort();\n conf.set(blockClientKey, blockAddress);\n conf.set(ScmConfigKeys.OZONE_SCM_BLOCK_CLIENT_ADDRESS_KEY,\n blockAddress);\n }\n\n conf.set(scmNodesKey, scmNodesKeyValue.substring(1));\n conf.set(ScmConfigKeys.OZONE_SCM_NAMES, scmNames.substring(1));\n }", "private GroupManager() {\r\n\t\tqueueManagers = new HashMap<Integer,QueueManager>();\r\n\t\tqueueManagerDeletionTimeout = -1;\r\n\t\thousekeepingSleep = HOUSEKEEPING_SLEEP;\r\n\t\thouseKeeper = new HouseKeeper(\"GroupManager_HouseKeeper\");\r\n\t\thouseKeeper.start();\r\n\t}", "private void manageLoaders() {\n\n // note: null is used in place of a Bundle object since all additional\n // parameters for Loader are global variables\n\n // get LoaderManager and initialise the loader\n if (getSupportLoaderManager().getLoader(LOADER_ID_01) == null) {\n getSupportLoaderManager().initLoader(LOADER_ID_01, null, this);\n } else {\n getSupportLoaderManager().restartLoader(LOADER_ID_01, null, this);\n }\n }", "public void init() {\r\n\tlog.info(\"OsylManagerServiceImpl service init() \");\r\n\t// register functions\r\n\tfor (Iterator<String> i = functionsToRegister.iterator(); i.hasNext();) {\r\n\t String function = i.next();\r\n\t functionManager.registerFunction(function);\r\n\t}\r\n }", "private void initOMHAConfig() {\n // Set configurations required for starting OM HA service, because that\n // is the serviceID being passed to start Ozone HA cluster.\n // Here setting internal service and OZONE_OM_SERVICE_IDS_KEY, in this\n // way in OM start it uses internal service id to find it's service id.\n conf.set(OMConfigKeys.OZONE_OM_SERVICE_IDS_KEY, omServiceId);\n conf.set(OMConfigKeys.OZONE_OM_INTERNAL_SERVICE_ID, omServiceId);\n String omNodesKey = ConfUtils.addKeySuffixes(\n OMConfigKeys.OZONE_OM_NODES_KEY, omServiceId);\n List<String> omNodeIds = new ArrayList<>();\n\n for (int i = 1; i <= numOfOMs; i++) {\n String omNodeId = OM_NODE_ID_PREFIX + i;\n omNodeIds.add(omNodeId);\n\n configureOMPorts(conf, omServiceId, omNodeId);\n }\n\n conf.set(omNodesKey, String.join(\",\", omNodeIds));\n }", "protected void setup() {\n /**\n * Content manager manages the content languages and ontologies \"known\" by a given agent.\n * We register new languages that is required that our agent knows.\n * SLCodec is the codec class for the FIPA-SLn languages.\n * MobilityOntology is the class that represents the ontology used for JADE mobility.\n */\n getContentManager().registerLanguage(new SLCodec());\n getContentManager().registerOntology(MobilityOntology.getInstance());\n\n /**\n * Create containers. ProfileImpl allows us to set boot-parameters for the new containers.\n */\n homeContainer = getContainerController(); //retrieve the containercontroller that this agent lives in\n createdContainers = new AgentContainer[3]; //we require 3 containers for this scenario\n ProfileImpl curatorContainer1 = new ProfileImpl();\n curatorContainer1.setParameter(ProfileImpl.CONTAINER_NAME, \"Curator-Container-1\");\n ProfileImpl curatorContainer2 = new ProfileImpl();\n curatorContainer2.setParameter(ProfileImpl.CONTAINER_NAME, \"Curator-Container-2\");\n ProfileImpl artistManagerContainer = new ProfileImpl();\n artistManagerContainer.setParameter(ProfileImpl.CONTAINER_NAME, \"Artistmanager-Container\");\n createdContainers[0] = runtime.createAgentContainer(curatorContainer1);\n createdContainers[1] = runtime.createAgentContainer(curatorContainer2);\n createdContainers[2] = runtime.createAgentContainer(artistManagerContainer);\n doWait(2000); //wait while containers initializes\n\n /**\n * Request a list of all containers on the platform from AMS\n */\n getAllContainers();\n\n /**\n * Initialize gui\n */\n\n myGui = new ControllerAgentGUI(this, (String[]) containersOnPlatform.keySet().toArray(new String[containersOnPlatform.keySet().size()]));\n myGui.setVisible(true);\n }", "ImplementationManager createManager();", "private void initDirectoryService(File workDir) throws Exception {\n // Initialize the LDAP service\n service = new DefaultDirectoryService();\n service.setInstanceId(currentTest.getDisplayName());\n service.setInstanceLayout(new InstanceLayout(workDir));\n CacheService cacheService = new CacheService();\n cacheService.initialize(service.getInstanceLayout(), \"test\");\n service.setCacheService(cacheService);\n\n factory = new JdbmPartitionFactory();\n\n // first load the schema\n initSchema();\n\n // then the system partition\n // this is a MANDATORY partition\n initSystemPartition();\n\n // Disable the ChangeLog system\n service.getChangeLog().setEnabled(false);\n service.setDenormalizeOpAttrsEnabled(true);\n\n // Now we can create as many partitions as we need\n // Create some new partitions named 'foo', 'bar' and 'apache'.\n\n Partition partition;\n if (ldapSchema == null) {\n partition = addPartition(\"jenkins\", \"dc=jenkins,dc=io\");\n } else {\n partition = addPartition(ldapSchema.id(), ldapSchema.dn());\n }\n\n // Index some attributes on the jenkins partition\n addIndex(partition, \"objectClass\", \"ou\", \"uid\");\n\n // And start the service\n service.startup();\n\n try {\n CoreSession coreSession = service.getAdminSession();\n ModifyRequest modifyRequest = new ModifyRequestImpl();\n modifyRequest.setName(new Dn(\"uid=admin\", \"ou=system\"));\n modifyRequest.replace(\"userPassword\", configuration == null ? \"password\" : configuration.adminPassword());\n coreSession.modify(modifyRequest);\n } catch (LdapException lnnfe) {\n throw new AssertionError(\"Could not update admin password\");\n }\n\n if (ldapSchema != null) {\n String resourceName = ldapSchema.ldif() + \".ldif\";\n String schemaSource = resourceName.startsWith(\"/\")\n ? resourceName\n : currentTest.getTestClass().getName().replace('.', '/') + \"/\" + resourceName;\n try (InputStream stream = currentTest.getTestClass().getResourceAsStream(resourceName)) {\n LOGGER.log(Level.INFO, \"Importing schema from {0}\", schemaSource);\n loadSchema(partition, stream);\n }\n }\n\n // We are all done !\n }", "public List<Manager> getAllManager() {\n\t\treturn service.getAllManager();\n\t}", "private void createManagersList(){\n\t\tmanagerList.clear();\n\t\tArrayList<User> users = jdbc.get_Managers();\n\t\tfor (int i = 0; i < users.size(); i++) {\n\t\t\tmanagerList.addElement(String.format(\"%s, %s\", users.get(i).get_lastname(), users.get(i).get_firstname()));\n\t\t}\n\t}", "private void initDLManager() {\n //TODO poner estos datos en configuraciones\n final String botName = \"DL-MS+A\";\n final String directlinePrimaryKey =\n //\"5Cx8OLT2X98.cwA.1j4.FGE7LsMoVuBtww9vQYNuC6lwoVBWYrb-5DHGzBbOeO0\"; // J\n //\"sccvRjdQVbw.cwA.8tQ.3tw3MFQtgG9bcqYf5xxHgW-lUYKymaoSFNCoIzI-SJY\"; //MS+A\n //\"IWixc2S5WaU.cwA.DEw.DV8nbC-BijSw5TbtNimDJuvrp45GpsKCRW4wPTtqYeY\"; //MP-AURA DEV\n \"QyKjl6KL-XQ.cwA.UTM.puyqrjpLvO1Briz7TjM7q_VqqAOflJ3jN0ryBGvkEiU\";\n mDLManager =\n DLManager.getInstance(this, directlinePrimaryKey);\n }", "private void importState() {\n SpeakerManager s = new SpeakerManager();\n this.speakerManager = s.importState();\n\n RoomManager r = new RoomManager();\n this.roomManager = r.importState();\n\n OrganizerManager o = new OrganizerManager();\n this.organizerManager = o.importState();\n\n EventManager e = new EventManager();\n this.eventManager = e.importState();\n\n ChatManager c = new ChatManager();\n this.chatManager = c.importState();\n\n AttendeeManager a = new AttendeeManager();\n this.attendeeManager = a.importState();\n\n\n }", "public void initialize()\n {\n \t// Luodaan manager-luokat\n EffectManager.getInstance();\n MessageManager.getInstance();\n CameraManager.getInstance();\n\n // Luodaan pelitilan eri osat\n backgroundManager = new BackgroundManager(wrapper);\n \tweaponManager = new WeaponManager();\n hud = new Hud(context, weaponManager);\n touchManager = new TouchManager(dm, surfaceView, context, hud, weaponManager);\n gameMode = new GameMode(gameActivity, this, dm, context, hud, weaponManager);\n \n // Järjestellään Wrapperin listat uudelleen\n wrapper.sortDrawables();\n wrapper.generateAiGroups();\n \n // Merkitään kaikki ladatuiksi\n allLoaded = true;\n }", "private void build()\n\t{\n\t\tengine.addSystem(new InputSystem());\n\t\tengine.addSystem(new MovementSystem());\n\t\t\n\t}", "protected void buildServerInfoStore() {\n\n if (serverInfoStore != null)\n return;\n\n serverInfoStore = new DefaultVOMSServerInfoStore.Builder()\n .lookupStrategy(vomsesLookupStrategy).storeListener(storeListener)\n .vomsesPaths(vomsesLocations).build();\n }", "void setUpLinearManager();", "public FVTreeManager() {\n mgrModels =\n new EnumMap<TreeTypeEnum, TreeManagementModel>(\n TreeTypeEnum.class);\n for (TreeTypeEnum type : TreeTypeEnum.values()) {\n mgrModels.put(type, new TreeManagementModel());\n }\n\n searchBuilder = new SearchTreeBuilder();\n }", "@Override\r\n\tpublic void buildImpl() {\n\t\tint nbLasers =(int)Math.ceil((double)lanesPerLink.length / (double)linksPerLaser);\r\n\t\tlasers = new Laser[nbLasers];\r\n\t\tpoweredChannelForLaserI = new int[nbLasers];\r\n\t\tpoweredHorizonForLaserI = new double[nbLasers];\r\n\t\tcanBeExtended = new boolean[nbLasers];\r\n\t\tboolean timeLine = lue.isWithTimeLine();\r\n\t\tfor (int i = 0; i < nbLasers ; i++) {\r\n\t\t\tlasers[i] = laserTemplate.getCopy(i, nbLasers, timeLine);\r\n\t\t\tlasers[i].setLinkUtilisationExperiment(lue);\r\n\t\t}\r\n\t}", "protected void initGSM() {\n gsm = new GameStateManager();}", "private UnitManager() {\r\n\t\tUM = new UnitMap(); // create an object\r\n\t}", "protected void getCacheManager()\n {\n try\n {\n if ( cacheMgr == null )\n {\n cacheMgr = CompositeCacheManager.getInstance();\n\n if ( log.isDebugEnabled() )\n {\n log.debug( \" groupcache cacheMgr = \" + cacheMgr );\n }\n }\n else\n {\n if ( log.isDebugEnabled() )\n {\n log.debug( \"already got groupcache cacheMgr = \" + cacheMgr );\n }\n }\n }\n catch ( Exception e )\n {\n log.error( e );\n }\n }", "private void initSingletons() {\n\t\tModel.getInstance();\n\t\tSocialManager.getInstance();\n\t\tMensaDataSource.getInstance();\n\t}", "private void initList() {\n long now = System.nanoTime();\n loadConfig();\n SlogEx.d(TAG, \"load config use:\" + (System.nanoTime() - now));\n }", "protected void loadAll() {\n\t\ttry {\n\t\t\tloadGroups(this.folder, this.cls, this.cachedOnes);\n\t\t\t/*\n\t\t\t * we have to initialize the components\n\t\t\t */\n\t\t\tfor (Object obj : this.cachedOnes.values()) {\n\t\t\t\t((Component) obj).getReady();\n\t\t\t}\n\t\t\tTracer.trace(this.cachedOnes.size() + \" \" + this + \" loaded.\");\n\t\t} catch (Exception e) {\n\t\t\tthis.cachedOnes.clear();\n\t\t\tTracer.trace(\n\t\t\t\t\te,\n\t\t\t\t\tthis\n\t\t\t\t\t\t\t+ \" pre-loading failed. No component of this type is available till we successfully pre-load them again.\");\n\t\t}\n\t}", "public void createLevel(){\n for(LevelController rc: rooms ) {\n rc.loadContent();\n rc.setScreenListener(listener);\n rc.setCanvas(canvas);\n }\n }", "private void initializeComponents() {\n\n RootConfig rootConfig = UAAppContext.getInstance().getRootConfig();\n\n if (rootConfig == null || rootConfig.mApplications == null) {\n // Error - Root Config inconsistencies\n Utils.logError(LogTags.PROJECT_LIST, \"No Root Config for user after AppStartupThread2\" +\n \"-- redirecting user to login screen\");\n invalidateLogin();\n moveToLoginScreen();\n }\n\n for (ProjectTypeModel projectTypeModel : rootConfig.mApplications) {\n if (projectTypeModel.mAppId.equals(mAppId)) {\n if (projectTypeModel.mSortType != null && !projectTypeModel.mSortType.isEmpty()) {\n mSortType = projectTypeModel.mSortType;\n }\n if (projectTypeModel.mFilteringAttributes != null && projectTypeModel.mFilteringAttributes.size() > 0) {\n mFilteringAttributes = projectTypeModel.mFilteringAttributes;\n }\n // Checking if Map Configuration is null or not\n if (UAAppContext.getInstance().getMapConfig() != null) {\n Map<String, List<MapInfo>> appSpecificMarkers = UAAppContext.getInstance().getMapConfig().mapMarkers;\n if (appSpecificMarkers != null && !appSpecificMarkers.isEmpty()) {\n mapMarkers = appSpecificMarkers.get(mAppId);\n }\n if (UAAppContext.getInstance().getMapConfig().files != null) {\n mapLayers = MapUtils.getInstance().getLayerFiles();\n }\n }\n break;\n }\n }\n\n if (mGroupingAttribute != null && !mGroupingAttribute.isEmpty()) {\n // Only show the projects that have this grouping attribute\n UAAppContext.getInstance().setProjectList(UAAppContext.getInstance().getDBHelper().getProjectsForUserForGroupingAttribute(UAAppContext\n .getInstance().getUserID(), mAppId, mGroupingAttributeValue.toLowerCase()));\n } else {\n UAAppContext.getInstance().setProjectList(UAAppContext.getInstance().getDBHelper().getProjectsForUser(UAAppContext\n .getInstance().getUserID(), mAppId));\n }\n mProjectList = UAAppContext.getInstance().getProjectList();\n }", "private void initializeStoreDirectories() {\n LOG.info(\"Initializing side input store directories.\");\n\n stores.keySet().forEach(storeName -> {\n File storeLocation = getStoreLocation(storeName);\n String storePath = storeLocation.toPath().toString();\n if (!isValidSideInputStore(storeName, storeLocation)) {\n LOG.info(\"Cleaning up the store directory at {} for {}\", storePath, storeName);\n new FileUtil().rm(storeLocation);\n }\n\n if (isPersistedStore(storeName) && !storeLocation.exists()) {\n LOG.info(\"Creating {} as the store directory for the side input store {}\", storePath, storeName);\n storeLocation.mkdirs();\n }\n });\n }", "void initAgents() {\n Runtime rt = Runtime.instance();\n\n //Create a container to host the Default Agent\n Profile p = new ProfileImpl();\n p.setParameter(Profile.MAIN_HOST, \"localhost\");\n //p.setParameter(Profile.MAIN_PORT, \"10098\");\n p.setParameter(Profile.GUI, \"false\");\n ContainerController cc = rt.createMainContainer(p);\n\n HashMap<Integer, String> neighbors = new HashMap <Integer, String>();\n neighbors.put(1, \"2, 4, 3\");\n neighbors.put(2, \"1, 3\");\n neighbors.put(3, \"1, 2, 4\");\n neighbors.put(4, \"1, 3, 5\");\n neighbors.put(5, \"4\");\n\n//Create a container to host the Default Agent\n try {\n for (int i = 1; i <= MainController.numberOfAgents; i++) {\n AgentController agent = cc.createNewAgent(Integer.toString(i), \"ru.spbu.mas.DefaultAgent\",\n new Object[]{neighbors.get(i)});\n agent.start();\n }\n } catch (StaleProxyException e) {\n e.printStackTrace();\n }\n }", "@Override public void init() {\n /// Important Step 2: Get access to a list of Expansion Hub Modules to enable changing caching methods.\n all_hubs_ = hardwareMap.getAll(LynxModule.class);\n /// Important Step 3: Option B. Set all Expansion hubs to use the MANUAL Bulk Caching mode\n for (LynxModule module : all_hubs_ ) {\n switch (motor_read_mode_) {\n case BULK_READ_AUTO:\n module.setBulkCachingMode(LynxModule.BulkCachingMode.AUTO);\n break;\n case BULK_READ_MANUAL:\n module.setBulkCachingMode(LynxModule.BulkCachingMode.MANUAL);\n break;\n case BULK_READ_OFF:\n default:\n module.setBulkCachingMode(LynxModule.BulkCachingMode.OFF);\n break;\n }\n }\n\n /// Use the hardwareMap to get the dc motors and servos by name.\n\n motorLF_ = hardwareMap.get(DcMotorEx.class, lfName);\n motorLB_ = hardwareMap.get(DcMotorEx.class, lbName);\n motorRF_ = hardwareMap.get(DcMotorEx.class, rfName);\n motorRB_ = hardwareMap.get(DcMotorEx.class, rbName);\n motorLF_.setDirection(DcMotor.Direction.REVERSE);\n motorLB_.setDirection(DcMotor.Direction.REVERSE);\n\n // map odometry encoders\n verticalLeftEncoder = hardwareMap.get(DcMotorEx.class, verticalLeftEncoderName);\n verticalRightEncoder = hardwareMap.get(DcMotorEx.class, verticalRightEncoderName);\n horizontalEncoder = hardwareMap.get(DcMotorEx.class, horizontalEncoderName);\n\n if( USE_ENCODER_FOR_TELEOP ) {\n motorLF_.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorLF_.setMode ( DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n motorLB_.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorLB_.setMode ( DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n motorRF_.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorRF_.setMode ( DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n motorRB_.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n motorRB_.setMode ( DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n\n verticalLeftEncoder.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n verticalRightEncoder.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n horizontalEncoder.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);\n\n motorLF_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n motorLB_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n motorRF_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n motorRB_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n }\n\n if( USE_INTAKE ) {\n motor_left_intake_ = hardwareMap.get(DcMotorEx.class, \"motorLeftIntake\");\n motor_right_intake_ = hardwareMap.get(DcMotorEx.class, \"motorRightIntake\");\n motor_right_intake_.setDirection(DcMotor.Direction.REVERSE) ;\n\n motor_left_intake_.setMode( DcMotor.RunMode.STOP_AND_RESET_ENCODER );\n motor_left_intake_.setMode( DcMotor.RunMode.RUN_USING_ENCODER );\n motor_right_intake_.setMode( DcMotor.RunMode.STOP_AND_RESET_ENCODER );\n motor_right_intake_.setMode( DcMotor.RunMode.RUN_USING_ENCODER );\n\n servo_left_intake_ = hardwareMap.servo.get(\"servoLeftIntake\");\n servo_left_intake_pos_ = CR_SERVO_STOP ;\n servo_left_intake_.setPosition(CR_SERVO_STOP);\n servo_right_intake_ = hardwareMap.servo.get(\"servoRightIntake\");\n servo_right_intake_pos_ = CR_SERVO_STOP ;\n servo_right_intake_.setPosition(CR_SERVO_STOP);\n }\n if( USE_LIFT ) {\n motor_lift_ = hardwareMap.get(DcMotorEx.class, \"motorLift\");\n motor_lift_.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n motor_lift_.setMode( DcMotor.RunMode.STOP_AND_RESET_ENCODER );\n power_lift_ = 0.0;\n if( USE_RUN_TO_POS_FOR_LIFT ) {\n motor_lift_.setTargetPosition(0);\n motor_lift_.setMode( DcMotor.RunMode.RUN_TO_POSITION ); // must call setTargetPosition() before switching to RUN_TO_POSISTION\n } else {\n motor_lift_.setMode( DcMotor.RunMode.RUN_USING_ENCODER);\n }\n last_stone_lift_enc_ = -1;\n }\n\n if( USE_STONE_PUSHER ) {\n servo_pusher_ = hardwareMap.servo.get(\"servoPusher\");\n servo_pusher_.setPosition(PUSHER_INIT);\n servo_pusher_pos_ = PUSHER_INIT;\n }\n if( USE_STONE_GATER ) {\n servo_gater_ = hardwareMap.servo.get(\"servoGater\");\n servo_gater_.setPosition(GATER_INIT);\n servo_gater_pos_ = GATER_INIT;\n }\n\n if( USE_ARM ) {\n servo_arm_ = hardwareMap.servo.get(\"servoArm\");\n servo_arm_.setPosition(ARM_INIT);\n servo_arm_pos_ = ARM_INIT;\n servo_claw_ = hardwareMap.servo.get(\"servoClaw\");\n servo_claw_.setPosition(CLAW_OPEN);\n servo_claw_pos_ = CLAW_OPEN;\n }\n\n if( USE_HOOKS ) {\n servo_left_hook_ = hardwareMap.servo.get(\"servoLeftHook\");\n servo_left_hook_.setPosition(LEFT_HOOK_UP);\n servo_left_hook_pos_ = LEFT_HOOK_UP;\n servo_right_hook_ = hardwareMap.servo.get(\"servoRightHook\");\n servo_right_hook_.setPosition(RIGHT_HOOK_UP);\n servo_right_hook_pos_ = RIGHT_HOOK_UP;\n }\n\n if( USE_PARKING_STICKS ) {\n servo_left_park_ = hardwareMap.servo.get(\"servoLeftPark\");\n servo_left_park_.setPosition(LEFT_PARK_IN);\n servo_left_park_pos_ = LEFT_PARK_IN;\n servo_right_park_ = hardwareMap.servo.get(\"servoRightPark\");\n servo_right_park_.setPosition(RIGHT_PARK_IN);\n servo_right_park_pos_ = RIGHT_PARK_IN;\n }\n\n if( USE_RGB_FOR_STONE ) {\n rev_rgb_range_ = hardwareMap.get(LynxI2cColorRangeSensor.class, \"stoneColor\");\n //rev_rgb_range_ = hardwareMap.get(LynxI2cColorRangeSensor.class, \"stoneColorV3\"); // different interface for V3, can't define it as LynxI2cColorRangeSensor anymore, 2020/02/29\n if( rev_rgb_range_!=null ) {\n if( AUTO_CALIBRATE_RGB ) {\n int alpha = rev_rgb_range_.alpha();\n //double dist = rev_rgb_range_.getDistance(DistanceUnit.CM);\n double dist = rev_rgb_range_.getDistance(DistanceUnit.METER);\n if( alpha>=MIN_RGB_ALPHA && alpha<100000 ) {\n rev_rgb_alpha_init_ = alpha;\n }\n if( AUTO_CALIBRATE_RGB_RANGE && !Double.isNaN(dist) ) {\n if( dist>MIN_RGB_RANGE_DIST && dist<MAX_RGB_RANGE_DIST ) {\n rev_rgb_dist_init_ = dist;\n }\n }\n }\n }\n }\n if( USE_RGBV3_FOR_STONE ) {\n //rgb_color_stone_ = hardwareMap.get(ColorSensor.class, \"stoneColorV3\");\n rgb_range_stone_ = hardwareMap.get(DistanceSensor.class, \"stoneColorV3\");\n if( AUTO_CALIBRATE_RANGE && rgb_range_stone_!=null ) {\n while(true) { // wait till range sensor gets a valid reading\n double dis = getRangeDist(RangeName.RGB_RANGE_STONE);\n if( dis>0.0 && dis<0.2 ) {\n rgb_range_stone_dist_init_ = dis;\n break;\n }\n }\n }\n }\n\n if( USE_RIGHT_RANGE ) {\n range_right_ = (Rev2mDistanceSensor) (hardwareMap.get(DistanceSensor.class, \"rightRange\"));\n if( AUTO_CALIBRATE_RANGE && range_right_!=null ) {\n while(true) { // wait till range sensor gets a valid reading\n double dis = getRangeDist(RangeName.RANGE_RIGHT);\n if( dis>0.01 && dis<2.0 ) {\n range_right_dist_init_ = dis;\n break;\n }\n }\n }\n }\n if( USE_LEFT_RANGE ) {\n range_left_ = (Rev2mDistanceSensor) (hardwareMap.get(DistanceSensor.class, \"leftRange\"));\n if( AUTO_CALIBRATE_RANGE && range_left_!=null ) {\n while(true) { // wait till range sensor gets a valid reading\n double dis = getRangeDist(RangeName.RANGE_LEFT);\n if( dis>0.01 && dis<2.0 ) {\n range_left_dist_init_ = dis;\n break;\n }\n }\n }\n }\n\n if( USE_RANGE_FOR_STONE) {\n range_stone_ = (Rev2mDistanceSensor) (hardwareMap.get(DistanceSensor.class, \"stoneRange\"));\n if( AUTO_CALIBRATE_RANGE && range_stone_!=null ) {\n while(true) { // wait till range sensor gets a valid reading\n double dis = getRangeDist(RangeName.RANGE_STONE);\n if( dis>0.01 && dis<0.5 ) {\n range_stone_dist_init_ = dis;\n break;\n }\n }\n }\n }\n\n if( USE_INTAKE_MAG_SWITCH ) {\n intake_mag_switch_ = hardwareMap.get(DigitalChannel.class, \"intake_mag_switch\");\n intake_mag_switch_.setMode(DigitalChannelController.Mode.INPUT);\n intake_mag_prev_state_ = intake_mag_switch_.getState();\n intake_mag_change_time_ = 0.0;\n }\n if( USE_STONE_LIMIT_SWITCH ) {\n stone_limit_switch_ = hardwareMap.get(DigitalChannel.class, \"stone_limit_switch\");\n stone_limit_switch_.setMode(DigitalChannelController.Mode.INPUT);\n stone_limit_switch_prev_state_ = stone_limit_switch_.getState();\n }\n\n\n /////***************************** JOY STICKS *************************************/////\n\n /// Set joystick deadzone, any value below this threshold value will be considered as 0; moved from init() to init_loop() to aovid crash\n if(gamepad1!=null) gamepad1.setJoystickDeadzone( JOYSTICK_DEAD_ZONE );\n if(gamepad2!=null) gamepad2.setJoystickDeadzone( JOYSTICK_DEAD_ZONE );\n\n resetControlVariables();\n }", "private void createAllGames() {\n\t\t// Create a melee game for each melee arena\n\t\tmeleeArenaManager.loadArenas();\n\t\tmeleeArenaManager.getArenas().forEach(meleeArena -> {\n\t\t\tMeleeGame game = new MeleeGame(meleeArena);\n\t\t\tmeleeGameManager.addGame(meleeArena.getName(), game, new PerMapLegacyLobby(game, PlayerProfile::restore, Melee.MELEE_CHAT_PREFIX));\n\t\t});\n\t\t\n\t\t// Create a rabbit game for each rabbit arena\n\t\trabbitArenaManager.loadArenas();\n\t\trabbitArenaManager.getArenas().forEach(rabbitArena -> {\n\t\t\tRabbitGame game = new RabbitGame(rabbitArena);\n\t\t\trabbitGameManager.addGame(rabbitArena.getName(), game, new PerMapLegacyLobby(game, PlayerProfile::restore, Melee.RABBIT_CHAT_PREFIX));\n\t\t});\n\t\t\n\t\t// Log out what games were created\n\t\tString meleeGamesList = meleeGameManager.getGamesList().stream()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t .map(game -> game.getArena().getName())\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t .collect(Collectors.joining(\", \"));\n\t\tgetLogger().info(\"Created Melee Games for arenas : \" + meleeGamesList);\n\n\t\tString rabbitGamesList = rabbitGameManager.getGamesList().stream()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t .map(game -> game.getArena().getName())\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t .collect(Collectors.joining(\", \"));\n\t\tgetLogger().info(\"Created Rabbit Games for arenas : \" + rabbitGamesList);\n\t}", "private InformationManager() {\n\t\tlives = ConfigurationManager.getConfigurationManager().getConfiguration().getLives();\n\t\tshields = ConfigurationManager.getConfigurationManager().getConfiguration().getShields();\n\t}", "public void startPlugin() {\n classesDisponibles = new HashMap[types.length];\n try { // enregistrer le service d'acces aux depot de jars\n ServicesRegisterManager.registerService(Parameters.JAR_REPOSITORY_MANAGER, this);\n rescanRepository(); // creer les listes de classes disponibles a partir du depot\n }\n catch (ServiceInUseException mbiue) {\n System.err.println(\"Jar Repository Manager service created twice\");\n }\n }", "public LSMEngineBuilder<T> buildWalManager(WALManager walManager) {\n lsmEngine.setWalManager(walManager);\n return this;\n }", "public void init() {\n\t\t\n\t\tdebugPrintln(\"Doing init.\");\n\t\t\n\t\t// can sanity check some things by requesting notification when nodes\n\t\t// are created/deleted/etc.\n\t\t// It does not notify when playBufs reach the end of a buffer, though.\n\t\t// Too bad, that. Would have to poll.\n\t\tsendMessage(\"/notify\", new Object[] { 1 });\n\n\t\t//start by cleaning up any detritus from previous runs on the same server:\n\t\tcleanup();\n\n\t\t//sclang creates the default group, not supercollider, so let's follow that convention.\n\t\tcreateGroup(1, 0);\n\n\t\t// create a mother group, under the default group (1),\n\t\t// which will contain all of the SCSoundControl objects.\n\t\t//this is where we would query if another node == _motherGroupID already exists.\n\t\t//if so, would need to choose an alternate groupID (e.g. += 10000)\n\t\tcreateGroup(_motherGroupID, 1);\n\t\t\n\t}", "public static synchronized void init(Element root) throws Exception {\n\t\tLogger log = Logger.getLogger(SQLConnectionManager.class);\n\t\tlog.debug(\"Loading SQL Connection Manager configuration.\");\n\n\t\tmanagerByPool.clear();\n\t\tglobalStatements.clear();\n\n\t\tElement cfgElt = DOMUtils.getElement(root, SQL_NAMESPACE_URI,\n\t\t\t\tCONFIG_ELEMENT, true);\n\t\tglobalStatements.putAll(SQLStatement.parseStatements(cfgElt));\n\n\t\tNodeList dbElts = DOMUtils.getElements(cfgElt, SQL_NAMESPACE_URI,\n\t\t\t\tDB_ELEMENT);\n\t\tfor (int i = 0; i < dbElts.getLength(); i++) {\n\t\t\tElement dbElt = (Element) dbElts.item(i);\n\t\t\tString name = DOMUtils.getAttribute(dbElt, NAME_ATTR, true);\n\n\t\t\tString url = \"jdbc:apache:commons:dbcp:/\";\n\t\t\tString resourceName = DOMUtils.getAttribute(dbElt,\n\t\t\t\t\tCFG_RESOURCE_ATTR, false);\n\t\t\tif (resourceName != null && resourceName.length() > 0) {\n\t\t\t\turl += resourceName;\n\t\t\t} else {\n\t\t\t\turl += name;\n\t\t\t}\n\n\t\t\tfinal Map stmts = SQLStatement.parseStatements(dbElt);\n\t\t\tSQLConnectionManager manager = new SQLConnectionManager(name, url,\n\t\t\t\t\tstmts);\n\n\t\t\t// test the configuration\n\t\t\tmanager.getConnection().close();\n\n\t\t\tmanagerByPool.put(name, manager);\n\t\t}\n\t}", "private LampManager() {\n lampList = Collections.synchronizedList( new ArrayList<Lamp>());\n }", "default void buildMainSpace() throws Exception {\n buildMainBuildModules();\n buildMainCheckModules();\n buildMainGenerateAPIDocumentation();\n buildMainGenerateCustomRuntimeImage();\n }", "public static void InitializeSystems()\n\t{\n\t\tif (_systems.size() < 1)\n\t\t{\n\t\t\tSystem.out.println(\"ERROR - no systems! (InitializeSystems)\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tfor (int i = 0; i < _systems.size(); i++)\n\t\t\t_systems.get(i).Start();\n\t}", "public void addPoolManager(SQLMXPooledConnectionManager mgr) {\n\t\tif (JdbcDebugCfg.entryActive)\n\t\t\tdebug[methodId_addPoolManager].methodEntry();\n\t\tif (JdbcDebugCfg.traceActive)\n\t\t\tdebug[methodId_addPoolManager].methodParameters(\"mgr=\" + JdbcDebug.debugObjectStr(mgr));\n\t\ttry{\n\t\t\tlistOfPCM.add(mgr);\n\t\t}finally{\n\t\t\tif (JdbcDebugCfg.entryActive)\n\t\t\t\tdebug[methodId_addPoolManager].methodExit();\n\t\t}\n\t}", "private void initExternalSystemsAvailable() {\n externalSystemsAvailable.add(\"Accounting system\");\n externalSystemsAvailable.add(\"Tax system\");\n }", "public static void init()\n\t{\n\t\tusername2accesses.clear();\n\t\t//--- adds info.json in ./Home/Administrator for the system admin ---//\n\t\tfinal String adminAccessPath = Hierarchies.getSectionDir() + \"/\" + Hierarchies.getInfoFileName() + \".\" + Directories.getFileExt();\n\t\tfinal File adminAccessFile = new File(adminAccessPath);\n\t\tif (!adminAccessFile.exists())\n\t\t{\n\t\t\tfinal Access[] accesses = new Access[1];\n\t\t\taccesses[0] = new Access(\"admin\", Role.ADMINISTRATOR, null);\n\t\t\tfinal HierarchyItem hierarchyItem = new HierarchyItem(null, null, null, accesses);\n\t\t\tfinal String hierarchyItemAsJson = new Gson().toJson(hierarchyItem);\n\t\t\tFileIO.writeToFile(adminAccessPath, hierarchyItemAsJson);\n\t\t}\n\t\t//--- reads all JSON files recursively in ./Home/Administrator ---//\n\t\t//--- contents of JSON files will be processed to be cached in hash map username2accesses ---//\n\t\tfinal File file = new File(Hierarchies.getSectionDir());\n\t\tfinal Collection<File> jsonFiles = FileUtils.listFiles(file, new String[]{Directories.getFileExt()}, true);\n\t\tfor (File infoFile : jsonFiles) manage(infoFile, Op.STORE);\n\t}", "private void buildComponents() {\r\n buildJMenuBar();\r\n setJMenuBar( gameBar );\r\n\r\n buildScorePanel();\r\n buildInfoPanel();\r\n\r\n getContentPane().add( scorePanel, \"North\" );\r\n getContentPane().add( infoPanel, \"South\" );\r\n }", "protected void init() {\n eachModule(ModuleHandler.INSTANCE::depends);\n \n // init, only enabled modules are run\n eachEnabledModule(ModuleHandler.INSTANCE::init);\n \n // listen for server world loading events\n // LoadWorldCallback.EVENT.register(server -> eachEnabledModule(m ->\n // m.loadWorld(server)));\n }", "private void createAllFrameworks(){\n\t\tFramework fw1 = new Framework(\"Skype\");\r\n\t\tFeature fw1feat1 = new Feature(\"Audio\");\r\n\t\tfw1feat1.addAttribute(new Attribute(\"Enabled\", \"true\"));\r\n\t\tfw1feat1.addAttribute(new Attribute(\"NumberOfUsers\",\"2\")); \r\n\t\t\r\n\t\tFeature fw1feat2 = new Feature(\"Video\");\r\n\t\tfw1feat2.addAttribute(new Attribute(\"Enabled\", \"true\"));\r\n\t\tfw1feat2.addAttribute(new Attribute(\"NumberOfUsers\", \"2\"));\r\n\t\tfw1feat2.addAttribute(new Attribute(\"onlineStatus.Enabled\", \"true\"));\r\n\t\r\n\t\tfw1.addFeature(fw1feat1);\r\n\t\tfw1.addFeature(fw1feat2);\r\n\r\n\t\tFramework fw2 = new Framework(\"Smack\");\r\n\t\tFeature fw2feat1 = new Feature(\"Audio\");\r\n\t\tfw2feat1.addAttribute(new Attribute(\"Enabled\", \"true\"));\r\n\t\tfw2feat1.addAttribute(new Attribute(\"NumberOfUsers\",\"2\"));\r\n\t\tfw2.addFeature(fw2feat1);\r\n\r\n\t\tFeature fw2feat2 = new Feature(\"Video\");\r\n\t\tfw2feat2.addAttribute(new Attribute(\"Enabled\", \"true\"));\r\n\t\tfw2feat2.addAttribute(new Attribute(\"NumberOfUsers\",\"4\"));\r\n\t\tfw2feat2.addAttribute(new Attribute(\"onlineStatus.Enabled\", \"true\"));\r\n\t\tfw2.addFeature(fw2feat2);\r\n\r\n\t\tFramework fw3 = new Framework(\"Asterisk\");\r\n\t\tFeature fw3feat1 = new Feature(\"Audio\");\r\n\t\tfw3feat1.addAttribute(new Attribute(\"Enabled\", \"true\"));\r\n\t\tfw3feat1.addAttribute(new Attribute(\"NumberOfUsers\",\"8\"));\r\n\t\tfw3.addFeature(fw3feat1);\r\n\r\n\t\t// Available for NCB\r\n\t\taddFramework(fw3);\r\n\t\taddFramework(fw2);\r\n\t\taddFramework(fw1);\r\n\r\n\t}", "private void initClassloaders() {\n\t\tthis.commonloader = createClassloader(\"common\",null);\n\t\tthis.sharedloader = createClassloader(\"shared\", commonloader);\n\t\tthis.catalinaloader = createClassloader(\"server\", commonloader);\n\t}", "private void _loadProvidersLocked() {\n if (GpsLocationProvider.isSupported()) {\n // Create a gps location provider\n mGpsLocationProvider = new GpsLocationProvider(mContext);\n LocationProviderImpl.addProvider(mGpsLocationProvider);\n }\n\n // Load fake providers if real providers are not available\n File f = new File(LocationManager.PROVIDER_DIR);\n if (f.isDirectory()) {\n File[] subdirs = f.listFiles();\n for (int i = 0; i < subdirs.length; i++) {\n if (!subdirs[i].isDirectory()) {\n continue;\n }\n\n String name = subdirs[i].getName();\n\n if (LOCAL_LOGV) {\n Log.v(TAG, \"Found dir \" + subdirs[i].getAbsolutePath());\n Log.v(TAG, \"name = \" + name);\n }\n\n // Don't create a fake provider if a real provider exists\n if (LocationProviderImpl.getProvider(name) == null) {\n LocationProviderImpl provider = null;\n try {\n File classFile = new File(subdirs[i], \"class\");\n // Look for a 'class' file\n provider = LocationProviderImpl.loadFromClass(classFile);\n\n // Look for an 'kml', 'nmea', or 'track' file\n if (provider == null) {\n // Load properties from 'properties' file, if present\n File propertiesFile = new File(subdirs[i], \"properties\");\n\n if (propertiesFile.exists()) {\n provider = new TrackProvider(name);\n ((TrackProvider)provider).readProperties(propertiesFile);\n\n File kmlFile = new File(subdirs[i], \"kml\");\n if (kmlFile.exists()) {\n ((TrackProvider) provider).readKml(kmlFile);\n } else {\n File nmeaFile = new File(subdirs[i], \"nmea\");\n if (nmeaFile.exists()) {\n ((TrackProvider) provider).readNmea(name, nmeaFile);\n } else {\n File trackFile = new File(subdirs[i], \"track\");\n if (trackFile.exists()) {\n ((TrackProvider) provider).readTrack(trackFile);\n }\n }\n }\n }\n }\n if (provider != null) {\n LocationProviderImpl.addProvider(provider);\n }\n // Grab the initial location of a TrackProvider and\n // store it as the last known location for that provider\n if (provider instanceof TrackProvider) {\n TrackProvider tp = (TrackProvider) provider;\n mLastKnownLocation.put(tp.getName(), tp.getInitialLocation());\n }\n } catch (Exception e) {\n Log.e(TAG, \"Exception loading provder \" + name, e);\n }\n }\n }\n }\n\n updateProvidersLocked();\n }", "@PostConstruct\n\tprivate void registerAllAnalyser() {\n\n\t\t// Get configuration for analysers\n\t\tMap<String, Map<String, String>> analyserProperties = analysisConfiguration.getAnalyserConfig();\n\n\t\t//get all analyser class\n\t\tReflections reflections = new Reflections(\"eu.ill.puma.analysis.analyser\");\n\n\t\t//iterate\n\t\tfor (Class analyserClass : reflections.getTypesAnnotatedWith(Analyser.class)) {\n\n\t\t\t//get annotation\n\t\t\tAnalyser analyser = (Analyser) analyserClass.getAnnotation(Analyser.class);\n\n\t\t\t// create new pool for analyser\n\t\t\tif (analyser != null) {\n\t\t\t\tthis.analyserPools.put(analyser.name(), new AnalyserPool(analyser, analyserClass, analyserProperties.get(analyser.name())));\n\n\t\t\t\tif (analyser.enabled()) {\n\t\t\t\t\tthis.enabledAnalysers.add(analyser.name());\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tlog.error(\"Failed to get instance of analyser with class \" + analyserClass);\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic LSystem build() {\n\t\t\n\t\t/**\n\t\t * Nested class which implements the LSystem and provides two essential methods\n\t\t * for building the LSystem: draw and generate.\n\t\t * @author Alen Carin\n\t\t *\n\t\t */\n\t\tclass LSystemImpl implements LSystem {\n\n\t\t\t/**\n\t\t\t * Method used for drawing the Lyndermayer system.\n\t\t\t * Calls method generate to generate all of the productions and \n\t\t\t * executes all the commands that are in the generated string.\n\t\t\t */\n\t\t\t@Override\n\t\t\tpublic void draw(int depth, Painter painter) {\n\t\t\t\tTurtleState state = new TurtleState(\n\t\t\t\t\t\torigin.copy(), \n\t\t\t\t\t\tnew Vector2D(1, 0).rotated(angle), \n\t\t\t\t\t\tColor.BLACK,\n\t\t\t\t\t\tunitLength * Math.pow(unitLengthDegreeScaler, depth)\n\t\t\t\t\t\t);\n\t\t\t\tContext context = new Context();\n\t\t\t\tcontext.pushState(state);\n\t\t\t\tchar[] sequence = generate(depth).toCharArray();\n\t\t\t\t\n\t\t\t\texecuteAllCommands(context, painter, sequence);\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * Recursive method which generates a string of actions \n\t\t\t * which are generated from productions for the given depth.\n\t\t\t */\n\t\t\t@Override\n\t\t\tpublic String generate(int depth) {\n\t\t\t\tStringBuilder builder = new StringBuilder();\n\t\t\t\tif(depth == 0) {\n\t\t\t\t\treturn axiom;\n\t\t\t\t}\n\t\t\t\tbuilder.append(generate(depth-1));\n\t\t\t\t\n\t\t\t\tchar[] array = builder.toString().toCharArray();\n\t\t\t\tString result = new String();\n\t\t\t\tfor(int i = 0; i < array.length; i++) {\n\t\t\t\t\tString production = (String) productions.get(array[i]);\n\t\t\t\t\tif(production != null) {\n\t\t\t\t\t\tresult += production;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tresult += array[i];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn new LSystemImpl();\n\t}", "private void initialize() {\r\n\r\n\t\tserverNode = new TreeParent(\"Servers\", \"Servers\", \"AA\", this);\r\n\t\tserverNode.setImageKey(\"System.gif\");\r\n\r\n\t\tnewServerNode = new TreeParent(\"NewServerWizard\", \"New Server\", \"AA\", this);\r\n\t\tnewServerNode.setImageKey(\"ApplicationFilter.gif\");\r\n\t\tnewServerNode.setExpandable(false);\r\n\t\tserverNode.addChild(newServerNode);\r\n\t\tnewServerNode.addChild(new TreeObject(\"Dummy\"));\r\n\t\r\n\t\tloadServers(serverNode);\r\n\r\n\t\tpreferenceNode = new TreeParent(\"Systems\", \"Preferences\", \"BB\", this);\r\n\t\tpreferenceNode.setImageKey(\"preference_page.gif\");\r\n\t\tpreferenceNode.addChild(new TreeObject(\"Dummy\"));\r\n\r\n\t\tinvisibleRoot = new TreeParent(\"\", \"InvisibleRoot\", \"AA\", this);\r\n\t\tinvisibleRoot.addChild(serverNode);\r\n\t\tinvisibleRoot.addChild(preferenceNode);\r\n\r\n\t}", "void start() throws Exception {\n vaultManager.start();\n\n cfgManager.start();\n\n // metastorage configuration\n var config = String.format(\"{\\\"node\\\": {\\\"metastorageNodes\\\": [ \\\"%s\\\" ]}}\", addr);\n\n cfgManager.bootstrap(config, ConfigurationType.LOCAL);\n\n Stream.of(clusterService, raftManager, metaStorageManager).forEach(IgniteComponent::start);\n\n // this is needed to avoid assertion errors\n cfgStorage.registerConfigurationListener(changedEntries -> {});\n\n // deploy watches to propagate data from the metastore into the vault\n metaStorageManager.deployWatches();\n }", "private MenuManager() {\r\n\r\n\t\t\tmenubar = new Menu(shell, SWT.BAR);\r\n\t\t\tshell.setMenuBar(menubar);\r\n\t\t}", "private ServiceManage() {\r\n\t\tInitialThreads();\r\n\t}", "public WandManager() {\n\t\tBukkit.getPluginManager().registerEvents(new WandListener(),\n\t\t\t\tSH.getPlugin());\n\t}", "@Override\n\tprotected void onInitialAgentsCreation() {\n\t\tSystem.out.println(\"Création drones\");\n\t\tDrone drone = null;\n\t\tDroneBuilder droneBuilder;\n\t\tfor (int i = 0; i < INITIAL_DRONE_COUNT; i++) {\n\t\t\tdrone = new Drone(this, getEnvironment().getRandom().nextInt(World.WIDTH), getEnvironment().getRandom().nextInt(World.HEIGHT));\n\t\t\tdroneBuilder = new DroneBuilder();\n\t\t\tdroneBuilder.setDrone(drone);\n\t\t\tdroneBuilder.buildBehaviorStates();\n\t\t\tdroneBuilder.buildAgentPhase();\n\t\t}\n\t}", "public Systems() {\r\n\t\t__initializeSystems = new ArrayList<InitializeSystem>();\r\n\t\t__executeSystems = new ArrayList<ExecuteSystem>();\r\n\t\t__renderSystems = new ArrayList<RenderSystem>();\r\n\t\t__tearDownSystems = new ArrayList<TearDownSystem>();\r\n\t}", "public void initialize(InfoflowManager manager);", "private void registerAllKnownModules() throws ModulesFactoryException\n\t{\n\t\tfor(MODULE_TYPE m: MODULE_TYPE.values() )\n\t\t{\n\t\t\tthis.allocator.registerModule(ModulesFactory.getModule(m));\n\t\t}\n\t}", "public void initializeGameComponents(){\n\t\tcreateWalls();\n\t}", "public GameManager( GameFrame gameFrame ){\r\n\t\tpassedLevelIds = new ArrayList<Integer>();\r\n\t\tthis.gameFrame = gameFrame;\r\n\t\tcollectionManager = new CollectionManager(this);\r\n\t\tlevelManager = new LevelManager(this);\r\n\t\tmusicOn = true;\r\n\t\tcurrentLevelId = levelManager.getCurrentLevelId();\r\n\t\tsoundManager = new SoundManager();\r\n\t\tobservers = new ArrayList<GameManagerObserver>();\r\n\t}", "public static void init()\n {\n oreStarSteel = new BlockOreStarSteel(MSAConfig.ores, Material.rock);\n storageStarSteel = new BlockStorageStarSteel(MSAConfig.storageBlock, Material.iron);\n // tech blocks\n launchTower = new BlockLaunchTower(MSAConfig.launchTower, Material.iron);\n launchTowerController = new BlockLaunchControl(MSAConfig.launchController, Material.iron);\n rocketAssembler = new BlockRocketAssembler(MSAConfig.rocketAssembler, Material.iron);\n comSatellite = new BlockComSatellite(MSAConfig.comSatellite, Material.iron);\n ssBuilding = new BlockSSBuilding(MSAConfig.ssBuilding, Material.rock);\n commandCenter = new BlockCommandCenter(MSAConfig.commandCenter, Material.iron);\n\n /* Register Blocks */\n // ore blocks\n GameRegistry.registerBlock(oreStarSteel, \"oreStarSteel\");\n GameRegistry.registerBlock(storageStarSteel, \"storageStarSteel\");\n // tech blocks\n GameRegistry.registerBlock(launchTower, \"launchTower\");\n GameRegistry.registerBlock(launchTowerController, \"launchTowerController\");\n GameRegistry.registerBlock(rocketAssembler, \"rocketAssembler\");\n GameRegistry.registerBlock(comSatellite, \"comSatellite\");\n GameRegistry.registerBlock(ssBuilding, \"ssBuilding\");\n GameRegistry.registerBlock(commandCenter, \"commandCenter\");\n\n /* Set block harvest level */\n // ore blocks\n MinecraftForge.setBlockHarvestLevel(oreStarSteel, \"pickaxe\", 2);\n MinecraftForge.setBlockHarvestLevel(storageStarSteel, \"pickaxe\", 2);\n // building blocks\n MinecraftForge.setBlockHarvestLevel(ssBuilding, \"pickaxe\", 2);\n // tech blocks\n MinecraftForge.setBlockHarvestLevel(launchTower, \"pickaxe\", 1);\n }", "public interface SMSCALLManager\r\n extends GenericManager<SMSCALL, Long>\r\n{\r\n\r\n public final static String SERVICE_NAME = \"SMSCALLManager\";\r\n\r\n}", "protected void clearCaches() {\n // Primary class LocusDetailProxy cache\n IDaoManager manager = DaoManagerFactory.getManager(getSubsystem());\n if (manager != null) {\n manager.clearCache(org.tair.db.locusdetail.LocusDetailProxy.class.getName());\n }\n\n // Clear nested object caches\n \n // Child LocusUpdateHistory cache\n IDaoManager LocusUpdateHistoryManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocusUpdateHistoryManager != null) {\n LocusUpdateHistoryManager.clearCache(org.tair.db.locusdetail.LocusUpdateHistory.class.getName());\n }\n \n // Child ModelFeature cache\n IDaoManager ModelFeatureManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (ModelFeatureManager != null) {\n ModelFeatureManager.clearCache(org.tair.db.locusdetail.ModelFeature.class.getName());\n }\n \n // Child LocusGeneModelCdnaAlias cache\n IDaoManager LocusGeneModelCdnaAliasManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocusGeneModelCdnaAliasManager != null) {\n LocusGeneModelCdnaAliasManager.clearCache(org.tair.db.locusdetail.LocusGeneModelCdnaAlias.class.getName());\n }\n \n // Child LocusGeneModelCdna cache\n IDaoManager LocusGeneModelCdnaManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocusGeneModelCdnaManager != null) {\n LocusGeneModelCdnaManager.clearCache(org.tair.db.locusdetail.LocusGeneModelCdna.class.getName());\n }\n \n // Child ProteinResourceLink cache\n IDaoManager ProteinResourceLinkManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (ProteinResourceLinkManager != null) {\n ProteinResourceLinkManager.clearCache(org.tair.db.locusdetail.ProteinResourceLink.class.getName());\n }\n \n // Child ProteinModelDomain cache\n IDaoManager ProteinModelDomainManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (ProteinModelDomainManager != null) {\n ProteinModelDomainManager.clearCache(org.tair.db.locusdetail.ProteinModelDomain.class.getName());\n }\n \n // Child ProteinModel Proxy cache\n IDaoManager ProteinModelManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (ProteinModelManager != null) {\n ProteinModelManager.clearCache(org.tair.db.locusdetail.ProteinModel.class.getName());\n }\n \n // Child LocusGeneModelAnnotation cache\n IDaoManager LocusGeneModelAnnotationManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocusGeneModelAnnotationManager != null) {\n LocusGeneModelAnnotationManager.clearCache(org.tair.db.locusdetail.LocusGeneModelAnnotation.class.getName());\n }\n \n // Child PolymorphismSite cache\n IDaoManager PolymorphismSiteManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (PolymorphismSiteManager != null) {\n PolymorphismSiteManager.clearCache(org.tair.db.locusdetail.PolymorphismSite.class.getName());\n }\n \n // Child LocusGeneModel Proxy cache\n IDaoManager LocusGeneModelManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocusGeneModelManager != null) {\n LocusGeneModelManager.clearCache(org.tair.db.locusdetail.LocusGeneModel.class.getName());\n }\n \n // Child LocusOtherName cache\n IDaoManager LocusOtherNameManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocusOtherNameManager != null) {\n LocusOtherNameManager.clearCache(org.tair.db.locusdetail.LocusOtherName.class.getName());\n }\n \n // Child LocusPhysicalMapCoordinates cache\n IDaoManager LocusPhysicalMapCoordinatesManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocusPhysicalMapCoordinatesManager != null) {\n LocusPhysicalMapCoordinatesManager.clearCache(org.tair.db.locusdetail.LocusPhysicalMapCoordinates.class.getName());\n }\n \n // Child LocusResourceLink cache\n IDaoManager LocusResourceLinkManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocusResourceLinkManager != null) {\n LocusResourceLinkManager.clearCache(org.tair.db.locusdetail.LocusResourceLink.class.getName());\n }\n \n // Child LocusComment cache\n IDaoManager LocusCommentManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocusCommentManager != null) {\n LocusCommentManager.clearCache(org.tair.db.locusdetail.LocusComment.class.getName());\n }\n \n // Child LocusAttribution cache\n IDaoManager LocusAttributionManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocusAttributionManager != null) {\n LocusAttributionManager.clearCache(org.tair.db.locusdetail.LocusAttribution.class.getName());\n }\n \n // Child LocusOtherSymbol cache\n IDaoManager LocusOtherSymbolManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocusOtherSymbolManager != null) {\n LocusOtherSymbolManager.clearCache(org.tair.db.locusdetail.LocusOtherSymbol.class.getName());\n }\n \n // Child LocusPolymorphism Proxy cache\n IDaoManager LocusPolymorphismManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocusPolymorphismManager != null) {\n LocusPolymorphismManager.clearCache(org.tair.db.locusdetail.LocusPolymorphism.class.getName());\n }\n \n // Child ReferencedLocus cache\n IDaoManager ReferencedLocusManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (ReferencedLocusManager != null) {\n ReferencedLocusManager.clearCache(org.tair.db.locusdetail.ReferencedLocus.class.getName());\n }\n \n // Child Reference Proxy cache\n IDaoManager ReferenceManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (ReferenceManager != null) {\n ReferenceManager.clearCache(org.tair.db.locusdetail.Reference.class.getName());\n }\n \n // Child LocusBac cache\n IDaoManager LocusBacManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocusBacManager != null) {\n LocusBacManager.clearCache(org.tair.db.locusdetail.LocusBac.class.getName());\n }\n \n // Child LocusEstAlias cache\n IDaoManager LocusEstAliasManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocusEstAliasManager != null) {\n LocusEstAliasManager.clearCache(org.tair.db.locusdetail.LocusEstAlias.class.getName());\n }\n \n // Child LocuslEst cache\n IDaoManager LocuslEstManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocuslEstManager != null) {\n LocuslEstManager.clearCache(org.tair.db.locusdetail.LocuslEst.class.getName());\n }\n \n // Child LocusCdnaAlias cache\n IDaoManager LocusCdnaAliasManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocusCdnaAliasManager != null) {\n LocusCdnaAliasManager.clearCache(org.tair.db.locusdetail.LocusCdnaAlias.class.getName());\n }\n \n // Child LocusCdna cache\n IDaoManager LocusCdnaManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocusCdnaManager != null) {\n LocusCdnaManager.clearCache(org.tair.db.locusdetail.LocusCdna.class.getName());\n }\n \n // Child LocusAnnotation cache\n IDaoManager LocusAnnotationManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocusAnnotationManager != null) {\n LocusAnnotationManager.clearCache(org.tair.db.locusdetail.LocusAnnotation.class.getName());\n }\n }", "DomainManager[] _get_domain_managers();", "protected void initModules()\n {\n\n }", "private void init() {\n\t\tMvcs.scanPackagePath = analyseScanPath();\n\t\tif(StringHandler.isEmpty(Mvcs.scanPackagePath))\n\t\t\tthrow new RuntimeException(\"No scan path has been set! you need to setup ScanPackage annotation\");\n\t\t\n\t\t//put all class into the list\n\t\tList<String> allClassNames = scanAllClassNames();\n\t\tif(StringHandler.isEmpty(allClassNames)) //some loader may have no return value \n\t\t\treturn ;\n\t\t\n\t\tfor(String pkgPath : allClassNames){\n\t\t\tlist.add(ClassUtil.getClass(pkgPath));\n\t\t}\n\t}", "public final void init() {\r\n GroundItemManager.create(this);\r\n SPAWNS.add(this);\r\n }", "public void onLoad()\n {\n saveDefaultConfig();\n\n // Get the lobby name\n chatManager = new ChatManager(this);\n lobby = getConfig().getString(\"lobby\");\n\n // Loading up needed classes\n worldManager = new WorldManager(this);\n\n boolean backupsFound = false;\n\n File backupDir = new File(getDataFolder(), \"backups\");\n if (!backupDir.exists()) {\n getLogger().info(\"No backup directory found; creating one now.\");\n getLogger().info(\"Place world folders you want to reset from in '.../plugins/SkyblockWarriors/backups'\");\n backupDir.mkdirs();\n } else {\n for (File backup : backupDir.listFiles()) {\n if ((backup.isDirectory()) && (backup.listFiles().length != 0)) {\n backupsFound = true;\n }\n }\n\n if (backupsFound) {\n getLogger().info(\"Found backup folder, attempting to reset the world..\");\n // Resetting the world\n worldManager.resetWorld();\n } else {\n if (!getConfig().getBoolean(\"arena-setup\") == false) {\n getLogger().info(\"The plugin should be setup, please copy the world into the backup folder\");\n getLogger().info(\"so the plugin can reset the world on each restart!\");\n }\n }\n }\n }", "public <R extends IQueryRequest> LSMEngineBuilder<T> buildQueryManager(\n QueryManager<T, R> queryManager) {\n lsmEngine.setQueryManager(queryManager);\n return this;\n }", "public static void setupModules(){\n\t\tStart.setupModules();\n\t\t//add\n\t\t//e.g.: special custom scripts, workers, etc.\n\t}", "private void initLoggers()\n {\n Logger.getSharedInstance();\n\n for (Logger logger : Logger.getAllLoggers())\n {\n String key = \"Loggers/\" + logger.getNamespace();\n Level desired;\n\n if (!SmartDashboard.containsKey(key))\n {\n // First time this logger has been sent to SmartDashboard\n SmartDashboard.putString(key, logger.getLogLevel().name());\n desired = Level.DEBUG;\n }\n else\n {\n String choice = SmartDashboard.getString(key, \"DEBUG\");\n Level parsed = Level.valueOf(choice);\n if (parsed == null)\n {\n m_logger.error(\"The choice '\" + choice + \"' for logger \" + logger.getNamespace() + \" isn't a valid value.\");\n desired = Level.DEBUG;\n }\n else\n {\n desired = parsed;\n }\n }\n logger.setLogLevel(desired);\n }\n }", "private static void setPropertiesFromRuntime(RuntimeConfigManager manager) {\n try {\n if (manager != null) {\n if (manager.getDeploymentId() != null && System.getProperty(COMPSsConstants.DEPLOYMENT_ID) == null) {\n System.setProperty(COMPSsConstants.DEPLOYMENT_ID, manager.getDeploymentId());\n }\n if (manager.getMasterName() != null && System.getProperty(COMPSsConstants.MASTER_NAME) == null) {\n System.setProperty(COMPSsConstants.MASTER_NAME, manager.getMasterName());\n }\n if (manager.getMasterPort() != null && System.getProperty(COMPSsConstants.MASTER_PORT) == null) {\n System.setProperty(COMPSsConstants.MASTER_PORT, manager.getMasterPort());\n }\n if (manager.getAppName() != null && System.getProperty(COMPSsConstants.APP_NAME) == null) {\n System.setProperty(COMPSsConstants.APP_NAME, manager.getAppName());\n }\n if (manager.getTaskSummary() != null && System.getProperty(COMPSsConstants.TASK_SUMMARY) == null) {\n System.setProperty(COMPSsConstants.TASK_SUMMARY, manager.getTaskSummary());\n }\n if (manager.getCOMPSsBaseLogDir() != null && System.getProperty(COMPSsConstants.BASE_LOG_DIR) == null) {\n System.setProperty(COMPSsConstants.BASE_LOG_DIR, manager.getCOMPSsBaseLogDir());\n }\n if (manager.getSpecificLogDir() != null && System.getProperty(COMPSsConstants.SPECIFIC_LOG_DIR) == null) {\n System.setProperty(COMPSsConstants.SPECIFIC_LOG_DIR, manager.getSpecificLogDir());\n }\n if (manager.getLog4jConfiguration() != null && System.getProperty(COMPSsConstants.LOG4J) == null) {\n System.setProperty(COMPSsConstants.LOG4J, manager.getLog4jConfiguration());\n }\n if (manager.getResourcesFile() != null && System.getProperty(COMPSsConstants.RES_FILE) == null) {\n System.setProperty(COMPSsConstants.RES_FILE, manager.getResourcesFile());\n }\n if (manager.getResourcesSchema() != null && System.getProperty(COMPSsConstants.RES_SCHEMA) == null) {\n System.setProperty(COMPSsConstants.RES_SCHEMA, manager.getResourcesSchema());\n }\n if (manager.getProjectFile() != null && System.getProperty(COMPSsConstants.PROJ_FILE) == null) {\n System.setProperty(COMPSsConstants.PROJ_FILE, manager.getProjectFile());\n }\n if (manager.getProjectSchema() != null && System.getProperty(COMPSsConstants.PROJ_SCHEMA) == null) {\n System.setProperty(COMPSsConstants.PROJ_SCHEMA, manager.getProjectSchema());\n }\n\n if (manager.getScheduler() != null && System.getProperty(COMPSsConstants.SCHEDULER) == null) {\n System.setProperty(COMPSsConstants.SCHEDULER, manager.getScheduler());\n }\n if (manager.getMonitorInterval() > 0 && System.getProperty(COMPSsConstants.MONITOR) == null) {\n System.setProperty(COMPSsConstants.MONITOR, Long.toString(manager.getMonitorInterval()));\n }\n if (manager.getGATAdaptor() != null && System.getProperty(COMPSsConstants.GAT_ADAPTOR_PATH) == null) {\n System.setProperty(COMPSsConstants.GAT_ADAPTOR_PATH, manager.getGATAdaptor());\n }\n if (manager.getGATBrokerAdaptor() != null && System.getProperty(COMPSsConstants.GAT_BROKER_ADAPTOR) == null) {\n System.setProperty(COMPSsConstants.GAT_BROKER_ADAPTOR, manager.getGATBrokerAdaptor());\n }\n if (manager.getGATFileAdaptor() != null && System.getProperty(COMPSsConstants.GAT_FILE_ADAPTOR) == null) {\n System.setProperty(COMPSsConstants.GAT_FILE_ADAPTOR, manager.getGATFileAdaptor());\n }\n\n if (manager.getWorkerCP() != null && System.getProperty(COMPSsConstants.WORKER_CP) == null) {\n System.setProperty(COMPSsConstants.WORKER_CP, manager.getWorkerCP());\n }\n if (manager.getWorkerJVMOpts() != null && System.getProperty(COMPSsConstants.WORKER_JVM_OPTS) == null) {\n System.setProperty(COMPSsConstants.WORKER_JVM_OPTS, manager.getWorkerJVMOpts());\n }\n if (System.getProperty(COMPSsConstants.WORKER_CPU_AFFINITY) == null\n || System.getProperty(COMPSsConstants.WORKER_CPU_AFFINITY).isEmpty()) {\n System.setProperty(COMPSsConstants.WORKER_CPU_AFFINITY, Boolean.toString(manager.isWorkerCPUAffinityEnabled()));\n }\n if (System.getProperty(COMPSsConstants.WORKER_GPU_AFFINITY) == null\n || System.getProperty(COMPSsConstants.WORKER_GPU_AFFINITY).isEmpty()) {\n System.setProperty(COMPSsConstants.WORKER_GPU_AFFINITY, Boolean.toString(manager.isWorkerGPUAffinityEnabled()));\n }\n\n if (manager.getServiceName() != null && System.getProperty(COMPSsConstants.SERVICE_NAME) == null) {\n System.setProperty(COMPSsConstants.SERVICE_NAME, manager.getServiceName());\n }\n if (System.getProperty(COMPSsConstants.COMM_ADAPTOR) == null) {\n if (manager.getCommAdaptor() != null) {\n System.setProperty(COMPSsConstants.COMM_ADAPTOR, manager.getCommAdaptor());\n } else {\n System.setProperty(COMPSsConstants.COMM_ADAPTOR, COMPSsConstants.DEFAULT_ADAPTOR);\n }\n }\n if (System.getProperty(COMPSsConstants.CONN) == null) {\n if (manager.getConn() != null) {\n System.setProperty(COMPSsConstants.CONN, manager.getConn());\n } else {\n System.setProperty(COMPSsConstants.CONN, COMPSsConstants.DEFAULT_CONNECTOR);\n }\n }\n if (System.getProperty(COMPSsConstants.GAT_DEBUG) == null) {\n System.setProperty(COMPSsConstants.GAT_DEBUG, Boolean.toString(manager.isGATDebug()));\n }\n if (System.getProperty(COMPSsConstants.LANG) == null) {\n System.setProperty(COMPSsConstants.LANG, manager.getLang());\n }\n if (System.getProperty(COMPSsConstants.GRAPH) == null) {\n System.setProperty(COMPSsConstants.GRAPH, Boolean.toString(manager.isGraph()));\n }\n if (System.getProperty(COMPSsConstants.TRACING) == null) {\n System.setProperty(COMPSsConstants.TRACING, String.valueOf(manager.getTracing()));\n }\n if (System.getProperty(COMPSsConstants.EXTRAE_CONFIG_FILE) == null) {\n System.setProperty(COMPSsConstants.EXTRAE_CONFIG_FILE, manager.getCustomExtraeFile());\n }\n if (System.getProperty(COMPSsConstants.TASK_EXECUTION) == null\n || System.getProperty(COMPSsConstants.TASK_EXECUTION).equals(\"\")) {\n System.setProperty(COMPSsConstants.TASK_EXECUTION, COMPSsConstants.EXECUTION_INTERNAL);\n }\n\n if (manager.getContext() != null) {\n System.setProperty(COMPSsConstants.COMPSS_CONTEXT, manager.getContext());\n }\n System.setProperty(COMPSsConstants.COMPSS_TO_FILE, Boolean.toString(manager.isToFile()));\n } else {\n setDefaultProperties();\n }\n } catch (Exception e) {\n System.err.println(WARN_IT_FILE_NOT_READ);\n e.printStackTrace();\n }\n }", "public void populateUtilities(){\n\t\tMainScreen.groups = getGroups();\t//Populate Groups\n\t\tMainScreen.umArray = getUMs();\t\t//Populate Units of Measurement (UMs)\n\t\tMainScreen.locations = new WarehouseLocations();\t//Populate the Locations\n\t\tMainScreen.codeIndexTree = new IndexBTree();\n\t\tMainScreen.nameIndexTree = new IndexBTree();\n\t\tpopulateBinaryTrees();\n\t}", "public HierarchyManager createHierarchyManager() throws ServiceException {\t\t\r\n initialize(); \r\n return new HierarchyManager(multiDomainMetaService, multiDomainService); \r\n\t}", "public MongoManager()\n\t{\n\t\ttry\n\t\t{\n\t\t/*\tmorphia = new Morphia();\n\t\t\tclient = new MongoClient();\n\t\t\tmorphia.mapPackage(\"com.glenwood.kernai.data.entity\");\n\t\t\tdatastore = morphia.createDatastore(client, \"Kernai\");\n\t\t\tdatastore.ensureIndexes();\n\t\t*/\t\n\t\t}\n\t\tcatch(Exception ex)\n\t\t{\n\t\t\tthrow ex;\n\t\t}\n\t\n\t}", "public manager() {\n initComponents();\n autoID();\n table_update();\n }", "public void initDevices() {\n for (Device device: deviceList) {\n device.init(getCpu().getTime());\n }\n }", "public void initComponents() {\n\t\t\n\t\tDocumentBuilder builder;\n\t\tDocumentBuilderFactory factory =DocumentBuilderFactory.newInstance();\n\t\tElement root;\n\t\tNodeList modules;\n\t\tint indexNodes;\n\t\t\n\t\ttry {\n\t\t\t\tbuilder = factory.newDocumentBuilder();\n\t\t\t\tDocument document =builder.parse(\n\t\t\t\tClassLoader.getSystemResourceAsStream(m_fileModuleNameStructure));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\troot = document.getDocumentElement();\n\t\t\t\tmodules = root.getElementsByTagName(\"module\");\n\t\t\t\t\n\t\t\t\tfor(indexNodes = 0; indexNodes < modules.getLength(); indexNodes++)\n\t\t\t\t\tparseDataOneModule(modules.item(indexNodes));\n\t\t\t\t\n\t\t\t\t\n\t\t} \n\t\tcatch (ParserConfigurationException e) \n\t\t{\n\t\t\t\t\n\t\t\t\te.printStackTrace();\n\t\t} catch (SAXException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t}", "public static void initializeBlocks() {\n if (Config.enableGiveADamn) {\n giveADamn = new GiveADamn();\n }\n\n if (Config.enableGlowstone) {\n glowstone = new HeavyLight();\n }\n\n if (Config.enableSpicedSand) {\n sandSpiced = new SpicedSand();\n }\n /*\n\n if (Config.enableMuffler){\n muffler = new Muffler();\n }\n */\n }", "@PostConstruct\n public void initPool() {\n SpringHelper.setApplicationContext(applicationContext);\n if (!initialized) {\n try {\n final File configDirectory = ConfigDirectory.setupTestEnvironement(\"OGCRestTest\");\n final File dataDirectory2 = new File(configDirectory, \"dataCsw2\");\n dataDirectory2.mkdir();\n\n try {\n serviceBusiness.delete(\"csw\", \"default\");\n serviceBusiness.delete(\"csw\", \"intern\");\n } catch (ConfigurationException ex) {}\n\n final Automatic config2 = new Automatic(\"filesystem\", dataDirectory2.getPath());\n config2.putParameter(\"shiroAccessible\", \"false\");\n serviceBusiness.create(\"csw\", \"default\", config2, null);\n\n writeProvider(\"meta1.xml\", \"42292_5p_19900609195600\");\n\n Automatic configuration = new Automatic(\"internal\", (String)null);\n configuration.putParameter(\"shiroAccessible\", \"false\");\n serviceBusiness.create(\"csw\", \"intern\", configuration, null);\n\n initServer(null, null, \"api\");\n pool = GenericDatabaseMarshallerPool.getInstance();\n initialized = true;\n } catch (Exception ex) {\n Logger.getLogger(OGCRestTest.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }", "private Manager() {\n _transportViews = new ArrayList<TransportView>();\n _transportersClient = new ArrayList<TransporterClient>();\n }", "private void startServiceThreads() {\n // Do after main thread name has been set\n this.metrics = new MasterMetrics();\n try {\n regionManager.start();\n serverManager.start();\n // Put up info server.\n int port = this.conf.getInt(\"hbase.master.info.port\", 60010);\n if (port >= 0) {\n String a = this.conf.get(\"hbase.master.info.bindAddress\", \"0.0.0.0\");\n this.infoServer = new InfoServer(MASTER, a, port, false);\n this.infoServer.setAttribute(MASTER, this);\n this.infoServer.start();\n }\n // Start the server so everything else is running before we start\n // receiving requests.\n this.server.start();\n } catch (IOException e) {\n if (e instanceof RemoteException) {\n try {\n e = RemoteExceptionHandler.decodeRemoteException((RemoteException) e);\n } catch (IOException ex) {\n LOG.warn(\"thread start\", ex);\n }\n }\n // Something happened during startup. Shut things down.\n this.closed.set(true);\n LOG.error(\"Failed startup\", e);\n }\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Started service threads\");\n }\n }", "public StorageManager() {\n makeDirectory();\n }", "private LSMEngineBuilder<T> buildLevelProcessors(String packageName) {\n try {\n ApplicationContext property =\n ApplicationContextGenerator.GeneratePropertyWithAnnotation(packageName);\n buildLevelProcessors(property);\n } catch (Exception e) {\n logger.error(e.getMessage());\n }\n return this;\n }", "public GameManagerAstratta init(Giocatore[] nomiGiocatori, int numGiocatori,\r\n String nomeConfigurazione) throws SQLException {\n return null;\r\n }", "@Override\n public synchronized void startInternal() throws Exception {\n createConnection();\n\n // ensure root dirs exist\n createRootDir(znodeWorkingPath);\n createRootDir(zkRootNodePath);\n createRootDir(rmDTSecretManagerRoot);\n createRootDir(rmAppRoot);\n }" ]
[ "0.6275923", "0.59398025", "0.5730071", "0.5562661", "0.55462986", "0.5522445", "0.55157334", "0.54370695", "0.54142034", "0.54091644", "0.5393289", "0.53636074", "0.5363431", "0.53527576", "0.5316097", "0.5299886", "0.5253107", "0.52174234", "0.52114093", "0.5210096", "0.5203439", "0.51617044", "0.5146462", "0.5146292", "0.51273257", "0.5119892", "0.5094513", "0.5085667", "0.50800467", "0.50793606", "0.5051343", "0.50140643", "0.50139886", "0.5005769", "0.49976656", "0.49945652", "0.49889565", "0.49690127", "0.49625358", "0.49478006", "0.493172", "0.49250883", "0.49046066", "0.4903793", "0.48982722", "0.48727202", "0.4862042", "0.4859678", "0.48552656", "0.48546767", "0.48499238", "0.48327458", "0.48325104", "0.48246416", "0.4821036", "0.48200822", "0.48127097", "0.48114407", "0.4806977", "0.48051393", "0.47915986", "0.47910836", "0.4789354", "0.47882488", "0.47842953", "0.47630543", "0.47608966", "0.4754122", "0.47524256", "0.47521108", "0.47517604", "0.47477156", "0.47476962", "0.47455993", "0.4745191", "0.47436", "0.47406042", "0.47372127", "0.47347832", "0.47288752", "0.4724683", "0.47218126", "0.47167554", "0.47138426", "0.4702589", "0.46995702", "0.46971616", "0.46946347", "0.4694557", "0.4688189", "0.46827924", "0.46816272", "0.46805638", "0.4679499", "0.46762702", "0.4672314", "0.4671477", "0.46692467", "0.4669007", "0.46673363" ]
0.55598634
4
Scan the classes of the package and build all LSM managers based on the class annotations
public LSMEngineBuilder<T> buildLSMManagers(String packageName, WALManager walManager) { try { ApplicationContext property = ApplicationContextGenerator.GeneratePropertyWithAnnotation(packageName); buildLSMManagers(property, walManager); } catch (Exception e) { logger.error(e.getMessage()); } return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void init() {\n\t\tMvcs.scanPackagePath = analyseScanPath();\n\t\tif(StringHandler.isEmpty(Mvcs.scanPackagePath))\n\t\t\tthrow new RuntimeException(\"No scan path has been set! you need to setup ScanPackage annotation\");\n\t\t\n\t\t//put all class into the list\n\t\tList<String> allClassNames = scanAllClassNames();\n\t\tif(StringHandler.isEmpty(allClassNames)) //some loader may have no return value \n\t\t\treturn ;\n\t\t\n\t\tfor(String pkgPath : allClassNames){\n\t\t\tlist.add(ClassUtil.getClass(pkgPath));\n\t\t}\n\t}", "private void scan() {\n final ClassGraph classGraph = new ClassGraph();\n classGraph.enableAnnotationInfo().ignoreClassVisibility().blacklistLibOrExtJars()\n .removeTemporaryFilesAfterScan();\n if (whitelistedPackagesList.size() > 0) {\n classGraph.whitelistPackages(whitelistedPackagesList.toArray(new String[0]));\n }\n if (blacklistedPackagesList.size() > 0) {\n classGraph.blacklistPackages(blacklistedPackagesList.toArray(new String[0]));\n }\n final ScanResult scanResult = classGraph.scan();\n final ClassInfoList classInfoList = scanResult.getClassesWithAnnotation(MetricClass.class.getName());\n final Set<Class<?>> monitorClasses = new HashSet<>();\n monitorClasses.addAll(classInfoList.loadClasses(true));\n final List<CompositeData> metricClassCompositesList = new ArrayList<>();\n for (Class<?> monitorClass : monitorClasses) {\n try {\n final CompositeData metricClassComposite = new MonitorCompositeDataBuilder(monitorClass).getMetricClassData();\n metricClassCompositesList.add(metricClassComposite);\n } catch (OpenDataException ox) {\n logger.error(\"Build monitor metricaAnnotation failed: \" + monitorClass.getName());\n }\n }\n\n final int monitorCount = metricClassCompositesList.size();\n final String[] monitorKey = new String[monitorCount];\n final String[] monitorKeyDescription = new String[monitorCount];\n @SuppressWarnings(\"rawtypes\")\n final OpenType[] monitorType = new OpenType[monitorCount];\n final CompositeData[] metricClassComposites = metricClassCompositesList.toArray(new CompositeData[0]);\n for (int j = 0; j < metricClassComposites.length; j++) {\n final CompositeData metricClassComposite = metricClassComposites[j];\n monitorKey[j] = metricClassComposite.getCompositeType().getTypeName();\n monitorKeyDescription[j] = metricClassComposite.getCompositeType().getDescription();\n monitorType[j] = metricClassComposite.getCompositeType();\n }\n\n try {\n final CompositeType allMonitorCompositeType = new CompositeType(\"Monitor Metric\", \"Monitor Metric Info\", monitorKey,\n monitorKeyDescription, monitorType);\n allMonitorCompositeData = new CompositeDataSupport(allMonitorCompositeType, monitorKey, metricClassComposites);\n } catch (final OpenDataException ox) {\n logger.error(\"Creating CompositeData failed\", ox);\n }\n }", "private void scanAndRegisterTypes() throws Exception {\n ScannedClassLoader scl = ScannedClassLoader.getSystemScannedClassLoader();\n // search annotations\n Iterator<Metadata> it = scl.getAll(MetadataType.class, Metadata.class); //CellFactorySPI.class);\n logger.log(Level.INFO, \"[Metadata Service] about to search classloader\");\n while (it.hasNext()) {\n Metadata metadata = it.next();\n logger.log(Level.INFO, \"[Metadata Service] using system scl, scanned type:\" + metadata.simpleName());\n registerMetadataType(metadata);\n }\n }", "public AnnotationScanner() {\n File rootDir = this.getClassRootDirectory();\n\n if (rootDir != null) {\n this.allClass = getDirClassList(rootDir, null);\n } else {\n this.initJar();\n }\n }", "public abstract List<String> scanAllClassNames();", "private void scanClass(String scanPackage) {\n URL url = this.getClass().getClassLoader().getResource(\"/\" + scanPackage.replaceAll(\"\\\\.\", \"/\"));\n File dir = new File(url.getFile());\n for (File file : dir.listFiles()) {\n if (file.isDirectory()) {\n scanClass(scanPackage + \".\" + file.getName());\n } else {\n classNames.add(scanPackage + \".\" + file.getName().replaceAll(\".class\", \"\").trim());\n }\n }\n\n }", "@SuppressWarnings(\"rawtypes\")\n\tprotected void scan() {\n\t\tLOGGER.info(\"Scanning database procedure mappers for packages: \"\n\t\t\t\t+ packageNames + \" ...\");\n\t\tfor (String scanPackageName : packageNames) {\n\t\t\tClass[] procedureConfigClasses = PackageUtils.getAnnotatedClasses(\n\t\t\t\t\tscanPackageName, Procedure.class);\n\t\t\tif (procedureConfigClasses != null) {\n\t\t\t\tfor (Class procedureConfigClass : procedureConfigClasses) {\n\t\t\t\t\thelper.initProcedureConfigCache(procedureConfigClass);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tLOGGER.info(\"Finished scanning database procedure mappers for packages.\");\n\t}", "void initClasses() {\n\t\tif (programUnit == null) return;\n\n\t\t// Add all classes\n\t\tList<BdsNode> cdecls = BdsNodeWalker.findNodes(programUnit, ClassDeclaration.class, true, true);\n\t\tfor (BdsNode n : cdecls) {\n\t\t\tClassDeclaration cd = (ClassDeclaration) n;\n\t\t\tbdsvm.addType(cd.getType());\n\t\t}\n\t}", "public static void scanPackage(String scanProviderPackage) throws Exception {\n\t\tproviders = AnnotationUtil.getAnnotations(scanProviderPackage, Controller.class, ServiceRegister.class);\n\t}", "public void onScanClasses(Set<Class<?>> parentClasses, Class<?> clazz, Object instance);", "@PostConstruct\n\tprivate void registerAllAnalyser() {\n\n\t\t// Get configuration for analysers\n\t\tMap<String, Map<String, String>> analyserProperties = analysisConfiguration.getAnalyserConfig();\n\n\t\t//get all analyser class\n\t\tReflections reflections = new Reflections(\"eu.ill.puma.analysis.analyser\");\n\n\t\t//iterate\n\t\tfor (Class analyserClass : reflections.getTypesAnnotatedWith(Analyser.class)) {\n\n\t\t\t//get annotation\n\t\t\tAnalyser analyser = (Analyser) analyserClass.getAnnotation(Analyser.class);\n\n\t\t\t// create new pool for analyser\n\t\t\tif (analyser != null) {\n\t\t\t\tthis.analyserPools.put(analyser.name(), new AnalyserPool(analyser, analyserClass, analyserProperties.get(analyser.name())));\n\n\t\t\t\tif (analyser.enabled()) {\n\t\t\t\t\tthis.enabledAnalysers.add(analyser.name());\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\tlog.error(\"Failed to get instance of analyser with class \" + analyserClass);\n\t\t\t}\n\t\t}\n\t}", "private void loadClasses() {\n\t\tString[] classes = new String[] { \"com.sssprog.delicious.api.ApiAsyncTask\" };\n\t\tfor (String c : classes) {\n\t\t\ttry {\n\t\t\t\tClass.forName(c);\n\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "private void scanClassMap() {\n Set<Class<?>> classSet = reflections.getTypesAnnotatedWith(Redis.class);\n for (Class cl : classSet) {\n RedisInfo redisInfo = new RedisInfo();\n Redis redis = (Redis) cl.getAnnotation(Redis.class);\n redisInfo.setCls(cl);\n redisInfo.setTableName(redis.name());\n redisInfo.setIncrName(redis.IncrName());\n redisInfo.setDbName(redis.dbName());\n redisInfo.setImmediately(redis.immediately());\n redisInfo.setIncr(redis.incrId());\n redisInfo.setDelete(redis.delete());\n try {\n classMap.put(redis.name(), redisInfo);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }", "public interface PackageScanner {\n String FILE_SUFFIX = \".class\";\n\n /**\n * Find target element blow package except two class name.\n *\n * @param packageName\n * @param except\n * @param except2\n * @return\n * @throws IOException\n */\n Set<String> classNames(String packageName, String except, String except2) throws Exception;\n\n /**\n * Find target element blow package except single class name.\n *\n * @param packageName\n * @param except\n * @return\n * @throws IOException\n */\n Set<String> classNames(String packageName, String except) throws Exception;\n\n /**\n * Scanning target class blow package except @param except and @param except2 class.\n *\n * @param packageName\n * @param except\n * @param except2\n * @return\n */\n Set<?> scan(String packageName, Class<?> except, Class<?> except2) throws Exception;\n\n /**\n * Scanning target class blow package except @param except class.\n *\n * @param packageName\n * @param except\n * @return\n */\n Set<?> scan(String packageName, Class<?> except) throws Exception;\n\n /**\n * Instantiation a class set.\n *\n * @param classNames\n * @return\n */\n Set<?> instantiation(Set<String> classNames, Class<?> tClass) throws IOException;\n}", "private List<Class> getClasses(final String scanPackage) {\n ClassPathScanningCandidateComponentProvider provider = new ClassPathScanningCandidateComponentProvider(false);\n provider.addIncludeFilter(new AnnotationTypeFilter(ElementEntity.class));\n provider.addIncludeFilter(new AnnotationTypeFilter(VertexEntity.class));\n provider.addIncludeFilter(new AnnotationTypeFilter(EdgeEntity.class));\n provider.addIncludeFilter(new AnnotationTypeFilter(EmbeddedEntity.class));\n Set<BeanDefinition> beanDefinitionSet = provider.findCandidateComponents(scanPackage);\n List<Class> entityClasses = new ArrayList<>();\n for (BeanDefinition beanDefinition : beanDefinitionSet) {\n String beanClassName = beanDefinition.getBeanClassName();\n try {\n entityClasses.add(Class.forName(beanClassName));\n } catch (ClassNotFoundException e) {\n LOG.error(\"Generate class: {}'s schema error: \", beanClassName, e);\n }\n }\n return entityClasses;\n }", "@SuppressWarnings(\"unchecked\")\n\t@Override\n\tpublic void refreshModules()\n\t{\n\t\t// Scan each directory in turn to find JAR files\n\t\t// Subdirectories are not scanned\n\t\tList<File> jarFiles = new ArrayList<>();\n\n\t\tfor (File dir : moduleDirectories) {\n\t\t\tfor (File jarFile : dir.listFiles(jarFileFilter)) {\n\t\t\t\tjarFiles.add(jarFile);\n\t\t\t}\n\t\t}\n\n\t\t// Create a new class loader to ensure there are no class name clashes.\n\t\tloader = new GPIGClassLoader(jarFiles);\n\t\tfor (String className : loader.moduleVersions.keySet()) {\n\t\t\ttry {\n\t\t\t\t// Update the record of each class\n\t\t\t\tClass<? extends Interface> clz = (Class<? extends Interface>) loader.loadClass(className);\n\t\t\t\tClassRecord rec = null;\n\t\t\t\tfor (ClassRecord searchRec : modules.values()) {\n\t\t\t\t\tif (searchRec.clz.getName().equals(className)) {\n\t\t\t\t\t\trec = searchRec;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (rec != null) {\n\t\t\t\t\t// This is not an upgrade, ignore it\n\t\t\t\t\tif (rec.summary.moduleVersion >= loader.moduleVersions.get(className)) continue;\n\n\t\t\t\t\t// Otherwise update the version number stored\n\t\t\t\t\trec.summary.moduleVersion = loader.moduleVersions.get(className);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\trec = new ClassRecord();\n\t\t\t\t\trec.summary = new ModuleSummary(IDGenerator.getNextID(), loader.moduleVersions.get(className),\n\t\t\t\t\t\t\tclassName);\n\t\t\t\t\tmodules.put(rec.summary.moduleID, rec);\n\t\t\t\t}\n\t\t\t\trec.clz = clz;\n\n\t\t\t\t// Update references to existing objects\n\t\t\t\tfor (StrongReference<Interface> ref : instances.values()) {\n\t\t\t\t\tif (ref.get().getClass().getName().equals(className)) {\n\t\t\t\t\t\tConstructor<? extends Interface> ctor = clz.getConstructor(Object.class);\n\t\t\t\t\t\tref.object = ctor.newInstance(ref.get());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (NoSuchMethodException e) {\n\t\t\t\t// Thrown when trying to find a suitable constructor\n\t\t\t\tSystem.err.println(\"Discovered class which has no available upgrade constructor: \" + className + \"\\n\\t\"\n\t\t\t\t\t\t+ e.getLocalizedMessage());\n\t\t\t}\n\t\t\tcatch (InstantiationException | IllegalAccessException | IllegalArgumentException\n\t\t\t\t\t| InvocationTargetException e) {\n\t\t\t\t// All thrown by the instantiate call\n\t\t\t\tSystem.err.println(\"Unable to create new instance of class: \" + className + \"\\n\\t\"\n\t\t\t\t\t\t+ e.getLocalizedMessage());\n\t\t\t}\n\t\t\tcatch (ClassNotFoundException e) {\n\t\t\t\t// Should never occur but required to stop the compiler moaning\n\t\t\t\tSystem.err.println(\"Discovered class which has no available upgrade constructor: \" + className + \"\\n\\t\"\n\t\t\t\t\t\t+ e.getLocalizedMessage());\n\t\t\t}\n\t\t}\n\t}", "public void scanClasspath() {\n List<String> classNames = new ArrayList<>(Collections.list(dexFile.entries()));\n\n ClassLoader classLoader = org.upacreekrobotics.dashboard.ClasspathScanner.class.getClassLoader();\n\n for (String className : classNames) {\n if (filter.shouldProcessClass(className)) {\n try {\n Class klass = Class.forName(className, false, classLoader);\n\n filter.processClass(klass);\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (NoClassDefFoundError e) {\n e.printStackTrace();\n }\n }\n }\n }", "private Map<String, SkylarkModuleDoc> collectTypes() throws ClassPathException {\n return SkylarkDocumentationCollector.collectModules(\n Classpath.findClasses(MODULES_PACKAGE_PREFIX));\n }", "@Override\n public List<Class> getAllUssdClasses(String packageName) {\n\n List<Class> commands = new ArrayList<Class>();\n List<String> classNames = new ArrayList<String>();\n\n JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();\n StandardJavaFileManager fileManager = compiler.getStandardFileManager(\n null, null, null);\n\n StandardLocation location = StandardLocation.CLASS_PATH;\n\n Set<JavaFileObject.Kind> kinds = new HashSet<>();\n kinds.add(JavaFileObject.Kind.CLASS);\n boolean recurse = false;\n Iterable<JavaFileObject> list = new ArrayList<>();\n try {\n list = fileManager.list(location, packageName,\n kinds, recurse);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n\n for (JavaFileObject javaFileObject : list) {\n String path = javaFileObject.toUri().getPath();\n String className = path.substring(path.lastIndexOf(\"/\") + 1, path.indexOf(\".\"));\n classNames.add(className);\n }\n\n for (String className : classNames) {\n Class klass = null;\n try {\n klass = Class.forName(packageName + \".\" + className);\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n if (klass != null && klass.isAnnotationPresent(UssdService.class)) {\n commands.add(klass);\n }\n }\n return commands;\n }", "public void startPlugin() {\n classesDisponibles = new HashMap[types.length];\n try { // enregistrer le service d'acces aux depot de jars\n ServicesRegisterManager.registerService(Parameters.JAR_REPOSITORY_MANAGER, this);\n rescanRepository(); // creer les listes de classes disponibles a partir du depot\n }\n catch (ServiceInUseException mbiue) {\n System.err.println(\"Jar Repository Manager service created twice\");\n }\n }", "private void readClasses(SB_SingletonBook book) throws SB_FileException\r\n\t{\r\n\t for (Class javaClass : SB_ClassMap.getBaseJavaClasses()) {\r\n\t addJavaClass(book, javaClass.getSimpleName(), javaClass.getName());\r\n\t }\r\n\t \r\n\t List<String> importedClasses = _dataModel.getJavaScript().getImportedJavaClasses();\r\n\t\tfor( String javaClassName : importedClasses) {\r\n\t\t\tString classPackage = javaClassName;\r\n\t\t\tString className = javaClassName.substring(javaClassName.lastIndexOf('.') + 1);\r\n\t\t\taddJavaClass(book, className, classPackage);\r\n\t }\r\n\t\t\r\n\t\t//Now that all classes read in, convert class descriptions\r\n\t\ttry\r\n\t\t{\r\n\t\t book.getUserClassMap().convertClassDescriptions(book);\r\n\t\t}\r\n\t\tcatch(SB_Exception ex)\r\n\t\t{\r\n\t\t throw new SB_FileException(ex.toString());\r\n\t\t}\r\n\t}", "@BeforeAll\n public static void beforeClass() {\n scanResult = new ClassGraph()\n .acceptPackages(RetentionPolicyForFunctionParameterAnnotationsTest.class.getPackage().getName())\n .enableAllInfo().scan();\n classInfo = scanResult.getClassInfo(RetentionPolicyForFunctionParameterAnnotationsTest.class.getName());\n }", "public static void moduleClassScan(Consumer<? super Class> consumer, String packageName) {\n\n\n Set<Class<? extends Module>> allClasses = getModuleClasses(packageName);\n\n for (Class clazz : allClasses) {\n\n consumer.accept(clazz);\n }\n }", "@SuppressWarnings(\"unchecked\")\n public void loadClasses(String pckgname) throws ClassNotFoundException {\n File directory = null;\n try {\n ClassLoader cld = Thread.currentThread().getContextClassLoader();\n String path = \"/\" + pckgname.replace(\".\", \"/\");\n URL resource = cld.getResource(path);\n if (resource == null) {\n throw new ClassNotFoundException(\"sem classes no package \" + path);\n }\n directory = new File(resource.getFile());\n }\n catch (NullPointerException x) {\n throw new ClassNotFoundException(pckgname + \" (\" + directory + \") package invalido\");\n }\n if (directory.exists()) {\n String[] files = directory.list();\n for (int i = 0; i < files.length; i++) {\n if (files[i].endsWith(\".class\") && !files[i].contains(\"$\")) {\n Class cl = Class.forName(pckgname + '.' + files[i].substring(0, files[i].length() - 6));\n Method methods[] = cl.getDeclaredMethods();\n boolean ok = false;\n for (Method m : methods) {\n if ((m.getReturnType().equals(List.class) || m.getReturnType().isArray()) && m.getParameterTypes().length == 0) {\n ok = true;\n break;\n }\n }\n if (ok) {\n classes.add(cl);\n }\n }\n }\n }\n else {\n throw new ClassNotFoundException(pckgname + \" package invalido\");\n }\n }", "private void loadManager() {\n LOGGER.info(\"Load metricManager, type: {}\", METRIC_CONFIG.getMetricFrameType());\n ServiceLoader<AbstractMetricManager> metricManagers =\n ServiceLoader.load(AbstractMetricManager.class);\n int size = 0;\n for (AbstractMetricManager mf : metricManagers) {\n size++;\n if (mf.getClass()\n .getName()\n .toLowerCase()\n .contains(METRIC_CONFIG.getMetricFrameType().name().toLowerCase())) {\n metricManager = mf;\n break;\n }\n }\n\n // if no more implementations, we use nothingManager.\n if (size == 0 || metricManager == null) {\n metricManager = new DoNothingMetricManager();\n } else if (size > 1) {\n LOGGER.info(\n \"Detect more than one MetricManager, will use {}\", metricManager.getClass().getName());\n }\n }", "public Set<Class<?>> getScanClasses();", "@NotNull\n List<? extends ClassInfo> getAllClasses();", "public void rescanRepository() { // recree les liste de classes connues a partir du depot\n // cette methode peut etre invoquee si on sait que le depot a ete modifie\n for (int i=0; i<types.length; i++) {\n classesDisponibles[i] = new HashMap<String, String>();\n scanRepository(types[i], classesDisponibles[i]);\n }\n }", "private List<Class<?>> getClasses(String packageName) throws Exception {\n File directory = null;\n try {\n ClassLoader cld = getClassLoader();\n URL resource = getResource(packageName, cld);\n directory = new File(resource.getFile());\n } catch (NullPointerException ex) {\n throw new ClassNotFoundException(packageName + \" (\" + directory\n + \") does not appear to be a valid package\");\n }\n return collectClasses(packageName, directory);\n }", "public List<ClassDescription> scanSources()\n throws SCRDescriptorFailureException, SCRDescriptorException {\n final List<ClassDescription> result = new ArrayList<ClassDescription>();\n\n for (final Source src : project.getSources()) {\n if ( src.getFile().getName().equals(\"package-info.java\") ) {\n log.debug(\"Skipping file \" + src.getClassName());\n continue;\n }\n log.debug(\"Scanning class \" + src.getClassName());\n\n try {\n // load the class\n final Class<?> annotatedClass = project.getClassLoader().loadClass(src.getClassName());\n\n this.process(annotatedClass, src, result);\n } catch ( final SCRDescriptorFailureException e ) {\n throw e;\n } catch ( final SCRDescriptorException e ) {\n throw e;\n } catch ( final ClassNotFoundException e ) {\n log.warn(\"ClassNotFoundException: \" + e.getMessage());\n } catch ( final NoClassDefFoundError e ) {\n log.warn(\"NoClassDefFoundError: \" + e.getMessage());\n } catch (final Throwable t) {\n throw new SCRDescriptorException(\"Unable to load compiled class: \" + src.getClassName(), src.getFile().toString(), t);\n }\n }\n return result;\n }", "public static void loadAnalyzerContributions() {\n\t\tIExtensionRegistry registry = Platform.getExtensionRegistry();\n\t\tIConfigurationElement[] config = registry.getConfigurationElementsFor(Activator.PLUGIN_ANALYZER_EXTENSION_ID);\n\t\ttry {\n\t\t\tfor (IConfigurationElement element : config) {\n\t\t\t\tfinal Object o = element.createExecutableExtension(\"class\");\n\t\t\t\tif (o instanceof Analyzer) {\n\t\t\t\t\tAnalyzer analyzer = (Analyzer) o;\n\t\t\t\t\tregisterAnalyzer(analyzer);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (CoreException e) {\n\t\t\tLog.error(\"Error loading analyzers.\", e);\n\t\t}\n\t}", "private void onClassesFound(List<UMDClass> classes) {\n\t}", "protected abstract void generatePackageFiles(ClassTree classtree) throws Exception;", "public void processClasses(CompilationUnit cu) {\n\t\t\n\t\tif(cu.getStorage().get().getFileName().equals(\"package-info.java\")) {\n\t\t\tthis.packageInfo = cu;\n\t\t}else {\n\t\t\tthis.cus.add(cu);\n\t\t}\n\t\tfor(TypeDeclaration<?> node : cu.findAll(TypeDeclaration.class)) {\n\t\t\tthis.classes.put(node.getNameAsString(), new ClassAST(node, this));\n\t\t}\n\t}", "public void analyseAnnotations(AbsIoc ioc){\n\t\t//0. makeup a cache first\n\t\tMap<String, IocObject> cacheMap = new HashMap<String, IocObject>();\n\t\tIocObject iocObj = null;\n\t\tfor(Class<?> cl : list){\n\t\t\tiocObj = new IocObject();\n\t\t\tiocObj.setType(cl);\n\t\t\t//1.tell if there is an IocBean \n\t\t\tif(!cl.isAnnotationPresent(IocBean.class))\n\t\t\t\tcontinue ;\n\t\t\t//2.if have the class name\n\t\t\tIocBean bean = cl.getAnnotation(IocBean.class);\n\t\t\tif(StringHandler.isEmpty(bean))\n\t\t\t\tcontinue ;\n\t\t\tString className = bean.name();\n\t\t\tif(StringHandler.isEmpty(className))\n\t\t\t\tclassName = cl.getSimpleName(); //if no name has been set, then use simple name\n\t\t\t\n\t\t\t//3. scope properties, here only use default properties\n\t\t\tif(cl.isAnnotationPresent(IocScope.class)){\n\t\t\t\tIocScope scope = cl.getAnnotation(IocScope.class);\n\t\t\t\tString val = scope.value();\n\t\t\t\t//default is singleton\n\t\t\t\tif(StringHandler.isEmpty(val)) \n\t\t\t\t\tval = \"singleton\"; \n\t\t\t\t\n\t\t\t\tiocObj.scope = val.trim();\n\t\t\t}\n\t\t\t\n\t\t\t//4. initial a instance\n\t\t\ttry {\n\t\t\t\tif(iocObj.scope.equals(\"singleton\"))\n\t\t\t\t\tiocObj.instanceObj = cl.newInstance();\n\t\t\t} catch (InstantiationException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IllegalAccessException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} \n\t\t\t//XXX later change to logger\n\t\t\tSystem.out.println(\"success load class: \" + cl.getName());\n\t\t\tcacheMap.put(className, iocObj); \n\t\t}\n\t\t\n\t\t//finally replace the map\n\t\tioc.iocMap = cacheMap;\n\t}", "private void registerManagers() {\n registerProviders();\n\n // Cast Managers\n if (worldGuardManager.isEnabled()) castManagers.add(worldGuardManager);\n if (preciousStonesManager.isEnabled()) castManagers.add(preciousStonesManager);\n if (redProtectManager != null && redProtectManager.isFlagsEnabled()) castManagers.add(redProtectManager);\n\n // Entity Targeting Managers\n if (preciousStonesManager.isEnabled()) targetingProviders.add(preciousStonesManager);\n if (townyManager.isEnabled()) targetingProviders.add(townyManager);\n if (residenceManager != null) targetingProviders.add(residenceManager);\n if (redProtectManager != null) targetingProviders.add(redProtectManager);\n\n // PVP Managers\n if (worldGuardManager.isEnabled()) pvpManagers.add(worldGuardManager);\n if (pvpManager.isEnabled()) pvpManagers.add(pvpManager);\n if (multiverseManager.isEnabled()) pvpManagers.add(multiverseManager);\n if (preciousStonesManager.isEnabled()) pvpManagers.add(preciousStonesManager);\n if (townyManager.isEnabled()) pvpManagers.add(townyManager);\n if (griefPreventionManager.isEnabled()) pvpManagers.add(griefPreventionManager);\n if (factionsManager.isEnabled()) pvpManagers.add(factionsManager);\n if (residenceManager != null) pvpManagers.add(residenceManager);\n if (redProtectManager != null) pvpManagers.add(redProtectManager);\n\n // Build Managers\n if (worldGuardManager.isEnabled()) blockBuildManagers.add(worldGuardManager);\n if (factionsManager.isEnabled()) blockBuildManagers.add(factionsManager);\n if (locketteManager.isEnabled()) blockBuildManagers.add(locketteManager);\n if (preciousStonesManager.isEnabled()) blockBuildManagers.add(preciousStonesManager);\n if (townyManager.isEnabled()) blockBuildManagers.add(townyManager);\n if (griefPreventionManager.isEnabled()) blockBuildManagers.add(griefPreventionManager);\n if (mobArenaManager != null && mobArenaManager.isProtected()) blockBuildManagers.add(mobArenaManager);\n if (residenceManager != null) blockBuildManagers.add(residenceManager);\n if (redProtectManager != null) blockBuildManagers.add(redProtectManager);\n if (landsManager != null) blockBuildManagers.add(landsManager);\n\n // Break Managers\n if (worldGuardManager.isEnabled()) blockBreakManagers.add(worldGuardManager);\n if (factionsManager.isEnabled()) blockBreakManagers.add(factionsManager);\n if (locketteManager.isEnabled()) blockBreakManagers.add(locketteManager);\n if (preciousStonesManager.isEnabled()) blockBreakManagers.add(preciousStonesManager);\n if (townyManager.isEnabled()) blockBreakManagers.add(townyManager);\n if (griefPreventionManager.isEnabled()) blockBreakManagers.add(griefPreventionManager);\n if (mobArenaManager != null && mobArenaManager.isProtected()) blockBreakManagers.add(mobArenaManager);\n if (citadelManager != null) blockBreakManagers.add(citadelManager);\n if (residenceManager != null) blockBreakManagers.add(residenceManager);\n if (redProtectManager != null) blockBreakManagers.add(redProtectManager);\n if (landsManager != null) blockBreakManagers.add(landsManager);\n\n // Team providers\n if (heroesManager != null && heroesManager.useParties()) teamProviders.add(heroesManager);\n if (skillAPIManager != null && skillAPIManager.usesAllies()) teamProviders.add(skillAPIManager);\n if (useScoreboardTeams) teamProviders.add(new ScoreboardTeamProvider());\n if (permissionTeams != null && !permissionTeams.isEmpty()) {\n teamProviders.add(new PermissionsTeamProvider(permissionTeams));\n }\n if (factionsManager != null) teamProviders.add(factionsManager);\n if (battleArenaManager != null && useBattleArenaTeams) teamProviders.add(battleArenaManager);\n if (ultimateClansManager != null) teamProviders.add(ultimateClansManager);\n\n // Player warp providers\n if (preciousStonesManager != null && preciousStonesManager.isEnabled()) {\n playerWarpManagers.put(\"fields\", preciousStonesManager);\n }\n if (redProtectManager != null) playerWarpManagers.put(\"redprotect\", redProtectManager);\n if (residenceManager != null) playerWarpManagers.put(\"residence\", residenceManager);\n }", "Set<Class<?>> getClassSetByAnnotation(String packageName, Class<? extends Annotation> annotationClass);", "@Override\n public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnvironment) {\n\n // Scanner class to scan through various component elements\n CodeAnalyzerTreeVisitor visitor = new CodeAnalyzerTreeVisitor();\n\n //long startTime = System.currentTimeMillis();\n\n for (Element e : roundEnvironment.getRootElements()) {\n TreePath tp = trees.getPath(e);\n // invoke the scanner\n try {\n visitor.scan(tp, trees);\n } catch (Exception e1) {\n e1.printStackTrace();\n LOG.error(String.valueOf(e1));\n }\n\n AccessHelper accessHelper = AccessHelper.getInstance();\n accessHelper.addToMap(e.getSimpleName().toString());\n accessHelper.printTree();\n }\n return true;\n }", "@PostConstruct\r\n\tprivate void init()\r\n\t{\r\n\t\tSet<Method> freeMarkerMethods = classScannerService.getMethodsAnnotatedWith(FreeMarkerMethod.class);\r\n\t\t\r\n\t\tif(freeMarkerMethods == null)\r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tSet<Class<?>> fmarkerClasses = new HashSet<Class<?>>();\r\n\t\t\r\n\t\tfor(Method method : freeMarkerMethods)\r\n\t\t{\r\n\t\t\tif(fmarkerClasses.contains(method.getDeclaringClass()))\r\n\t\t\t{\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\r\n\t\t\tfreeMarkerEngine.loadClass(method.getDeclaringClass());\r\n\t\t}\r\n\t}", "private Class<DimensionInterface>[] getAllClasses (String pckgname) {\n\t\t\n\t\ttry {\n\t\t \n\t\t\t// Classes will store our results\n\t\t\tArrayList classes = new ArrayList ();\n\t\t\t\n\n\t\t\t// Get a File object for the package \n\t\t File directory; \n\t\t \n\t\t \n\t\t // Load the package \n\t\t try { \n\t\t \tdirectory = new File (\n\t\t \t\tThread.currentThread ()\n\t\t \t\t\t.getContextClassLoader()\n\t\t \t\t\t.getResource (pckgname.replace('.', '/'))\n\t\t \t\t\t.getFile()\n\t\t \t); \n\t\t \n\t\t } catch (NullPointerException x) { \n\t\t \tSystem.out.println (\"Nullpointer\");\n\t\t \tthrow new ClassNotFoundException (pckgname + \" does not appear to be a valid package\"); \n\t\t }\n\t\t \n\t\t \n\t\t // IF we have found our package, then\n\t\t // obtain the files withtin\n\t\t if ( ! directory.exists ()) {\n\t\t \tSystem.out.println (\"Directory does not exist\");\n\t\t \tthrow new ClassNotFoundException(pckgname + \" does not appear to be a valid package\"); \n\t\t } \t\t \t\n\t\t \t\n\t\t \n\t \t// Get the list of the files contained in the package \n\t \tString[] files = directory.list ();\n\t\t \t\n\t\t \t\n\t \t// Get the files\n\t \tfor (int i=0; i<files.length; i++) { \n\n\t \t\t// we are only interested in .class files \n\t \t\tif ( ! files[i].endsWith(\".class\")) {\n\t \t\t\tcontinue;\n\t \t\t}\n\t \t\t\t\n \t\t\t// removes the .class extension \n \t\t\tclasses.add(Class.forName (pckgname + '.' + files[i].substring (0, files[i].length() - 6)));\n\t \t\t\t\n\t \t}\n\t\t \n\t\t \n\t \t// Convert the result in an array\n\t\t Class[] classesA = new Class[classes.size()]; \n\t\t classes.toArray (classesA); \n\t\t \n\t\t \n\t\t // Return\n\t\t return classesA;\n\t\t \n\t\t// Generic error\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "public void fetchClassInfo() {\n try {\n telephonyClassName = \"android.telephony.TelephonyManager\";\n listofClass = new String[]{\n \"com.mediatek.telephony.TelephonyManagerEx\",\n \"android.telephony.TelephonyManager\",\n \"android.telephony.MSimTelephonyManager\",\n \"android.telephony.TelephonyManager\"};\n for (int index = 0; index < listofClass.length; index++) {\n if (isTelephonyClassExists(listofClass[index])) {\n if (isMethodExists(listofClass[index], \"getDeviceId\")) {\n if (!simVariant.equalsIgnoreCase(\"\")) {\n break;\n }\n }\n if (isMethodExists(listofClass[index], \"getNetworkOperatorName\")) {\n break;\n } else if (isMethodExists(listofClass[index], \"getSimOperatorName\")) {\n break;\n }\n }\n }\n for (int index = 0; index < listofClass.length; index++) {\n try {\n if (slotName1 == null || slotName1.equalsIgnoreCase(\"\")) {\n getValidSlotFields(listofClass[index]);\n // if(slotName1!=null || !slotName1.equalsIgnoreCase(\"\")){\n getSlotNumber(listofClass[index]);\n } else {\n break;\n }\n } catch (Exception e) {\n LOGE(TAG, \"[fetchClassInfo] Unable to get class info\", e);\n }\n }\n } catch (Exception e) {\n LOGE(TAG, \"[fetchClassInfo] Unable to get class info\", e);\n }\n }", "private void processActivityCheck(RoundEnvironment roundEnv) throws IllegalArgumentException, ClassNotFoundException {\n for (Class<? extends Annotation> annotation : provideAnnotation()) {\n// log(\"annotation \" + annotation.getName());\n for (Element element : roundEnv.getElementsAnnotatedWith(annotation)) {\n// log(\"element \" + element.toString());\n getAnnotatedClass(annotation, element);\n }\n }\n provideFile();\n }", "@SuppressWarnings(\"unchecked\")\n private void resolveClasses() {\n for (String s : filesToResolve) {\n SchemaTupleFactory.LOG.info(\"Attempting to resolve class: \" + s);\n // Step one is to simply attempt to get the class object from the classloader\n // that includes the generated code.\n Class<?> clazz;\n try {\n clazz = classLoader.loadClass(s);\n } catch (ClassNotFoundException e) {\n throw new RuntimeException(\"Unable to find class: \" + s, e);\n }\n\n // Step three is to check if the class is a SchemaTuple. If it isn't,\n // we do not attempt to resolve it, because it is support code, such\n // as anonymous classes.\n if (!SchemaTuple.class.isAssignableFrom(clazz)) {\n return;\n }\n\n Class<SchemaTuple<?>> stClass = (Class<SchemaTuple<?>>)clazz;\n\n // Step four is to actually try to create the SchemaTuple instance.\n SchemaTuple<?> st;\n try {\n st = stClass.newInstance();\n } catch (InstantiationException e) {\n throw new RuntimeException(\"Error instantiating file: \" + s, e);\n } catch (IllegalAccessException e) {\n throw new RuntimeException(\"Error accessing file: \" + s, e);\n }\n\n // Step five is to get information about the class.\n boolean isAppendable = st instanceof AppendableSchemaTuple<?>;\n int id = st.getSchemaTupleIdentifier();\n Schema schema = st.getSchema();\n\n SchemaTupleFactory stf = new SchemaTupleFactory(stClass, st.getQuickGenerator());\n\n for (GenContext context : GenContext.values()) {\n if (context != GenContext.FORCE_LOAD && !context.shouldGenerate(stClass)) {\n SchemaTupleFactory.LOG.debug(\"Context [\"+context+\"] not present for class, skipping.\");\n continue;\n }\n\n // the SchemaKey (Schema sans alias) and appendability are how we will\n // uniquely identify a SchemaTupleFactory\n Triple<SchemaKey, Boolean, GenContext> trip =\n Triple.make(new SchemaKey(schema), isAppendable, context);\n\n schemaTupleFactoriesByTriple.put(trip, stf);\n\n SchemaTupleFactory.LOG.info(\"Successfully resolved class for schema [\"+schema+\"] and appendability [\"+isAppendable+\"]\"\n + \" in context: \" + context);\n }\n schemaTupleFactoriesById.put(id, stf);\n }\n }", "public void init(Class mainClass, List<Class> events) {\n Reflections reflections = new Reflections(mainClass.getPackage().getName());\n for (Class clazz : events) {\n if (!clazz.isAnnotationPresent(Event.class)) {\n logger.info(clazz.getName() + \" hasn't annotated @Event\");\n continue;\n }\n Set<Class<?>> loaderEventOne = reflections.getSubTypesOf(clazz);\n List<Object> listeners = new ArrayList<>();\n for (Class implClass : loaderEventOne) {\n if (implClass.isAnnotationPresent(Listener.class)) {\n try {\n listeners.add(implClass.getDeclaredConstructor().newInstance());\n } catch (InstantiationException | IllegalAccessException | InvocationTargetException | NoSuchMethodException e) {\n logger.error(\"Class which implement \" + clazz.getName() + \" (\" + implClass.getName() + \") should have no arg constructor\");\n }\n } else {\n logger.info(implClass.getName() + \" hasn't annotated @Listener\");\n }\n }\n eventListeners.put(clazz, listeners);\n }\n }", "private void scanAllDirectories()\n throws IOException, InstanceNotFoundException {\n\n int errcount = 0;\n final StringBuilder b = new StringBuilder();\n for (ObjectName key : scanmap.keySet()) {\n final DirectoryScannerMXBean s = scanmap.get(key);\n try {\n if (state == STOPPED) return;\n s.scan();\n } catch (Exception ex) {\n LOG.log(Level.FINE,key + \" failed to scan: \"+ex,ex);\n errcount++;\n append(b,\"\\t\",ex);\n }\n }\n if (errcount > 0) {\n b.insert(0,\"scan partially performed with \"+errcount+\" error(s):\");\n throw new RuntimeException(b.toString());\n }\n }", "List<Class<?>> getManagedClasses();", "private void buildClassPath() throws InterruptedException, IOException, CheckedAnalysisException {\n IClassPathBuilder builder = classFactory.createClassPathBuilder(bugReporter);\n\n for (String path : project.getFileArray()) {\n builder.addCodeBase(classFactory.createFilesystemCodeBaseLocator(path), true);\n }\n for (String path : project.getAuxClasspathEntryList()) {\n builder.addCodeBase(classFactory.createFilesystemCodeBaseLocator(path), false);\n }\n\n builder.scanNestedArchives(analysisOptions.scanNestedArchives);\n\n builder.build(classPath, progress);\n\n appClassList = builder.getAppClassList();\n\n if (PROGRESS) {\n System.out.println(appClassList.size() + \" classes scanned\");\n }\n\n // If any of the application codebases contain source code,\n // add them to the source path.\n // Also, use the last modified time of application codebases\n // to set the project timestamp.\n for (Iterator<? extends ICodeBase> i = classPath.appCodeBaseIterator(); i.hasNext();) {\n ICodeBase appCodeBase = i.next();\n\n if (appCodeBase.containsSourceFiles()) {\n String pathName = appCodeBase.getPathName();\n if (pathName != null) {\n project.addSourceDir(pathName);\n }\n }\n\n project.addTimestamp(appCodeBase.getLastModifiedTime());\n }\n\n }", "private void scan() {\n if (classRefs != null)\n return;\n // Store ids rather than names to avoid multiple name building.\n Set classIDs = new HashSet();\n Set methodIDs = new HashSet();\n\n codePaths = 1; // there has to be at least one...\n\n offset = 0;\n int max = codeBytes.length;\n\twhile (offset < max) {\n\t int bcode = at(0);\n\t if (bcode == bc_wide) {\n\t\tbcode = at(1);\n\t\tint arg = shortAt(2);\n\t\tswitch (bcode) {\n\t\t case bc_aload: case bc_astore:\n\t\t case bc_fload: case bc_fstore:\n\t\t case bc_iload: case bc_istore:\n\t\t case bc_lload: case bc_lstore:\n\t\t case bc_dload: case bc_dstore:\n\t\t case bc_ret:\n\t\t\toffset += 4;\n\t\t\tbreak;\n\n\t\t case bc_iinc:\n\t\t\toffset += 6;\n\t\t\tbreak;\n\t\t default:\n\t\t\toffset++;\n\t\t\tbreak;\n\t\t}\n\t } else {\n\t\tswitch (bcode) {\n // These bcodes have CONSTANT_Class arguments\n case bc_instanceof: \n case bc_checkcast: case bc_new:\n {\n\t\t\tint index = shortAt(1);\n classIDs.add(new Integer(index));\n\t\t\toffset += 3;\n\t\t\tbreak;\n\t\t }\n\n\t\t case bc_putstatic: case bc_getstatic:\n case bc_putfield: case bc_getfield: {\n\t\t\tint index = shortAt(1);\n CPFieldInfo fi = (CPFieldInfo)cpool.get(index);\n classIDs.add(new Integer(fi.getClassID()));\n\t\t\toffset += 3;\n\t\t\tbreak;\n }\n\n // These bcodes have CONSTANT_MethodRef_info arguments\n\t\t case bc_invokevirtual: case bc_invokespecial:\n case bc_invokestatic:\n methodIDs.add(new Integer(shortAt(1)));\n messageSends++;\n\t\t\toffset += 3;\n\t\t\tbreak;\n\n\t\t case bc_jsr_w:\n\t\t case bc_invokeinterface:\n methodIDs.add(new Integer(shortAt(1)));\n messageSends++;\n\t\t\toffset += 5;\n\t\t\tbreak;\n\n // Branch instructions\n\t\t case bc_ifeq: case bc_ifge: case bc_ifgt:\n\t\t case bc_ifle: case bc_iflt: case bc_ifne:\n\t\t case bc_if_icmpeq: case bc_if_icmpne: case bc_if_icmpge:\n\t\t case bc_if_icmpgt: case bc_if_icmple: case bc_if_icmplt:\n\t\t case bc_if_acmpeq: case bc_if_acmpne:\n\t\t case bc_ifnull: case bc_ifnonnull:\n\t\t case bc_jsr:\n codePaths++;\n\t\t\toffset += 3;\n\t\t\tbreak;\n\n case bc_lcmp: case bc_fcmpl: case bc_fcmpg:\n case bc_dcmpl: case bc_dcmpg:\n codePaths++;\n\t\t\toffset++;\n break;\n\n\t\t case bc_tableswitch:{\n\t\t\tint tbl = (offset+1+3) & (~3);\t// four byte boundry\n\t\t\tlong low = intAt(tbl, 1);\n\t\t\tlong high = intAt(tbl, 2);\n\t\t\ttbl += 3 << 2; \t\t\t// three int header\n\n // Find number of unique table addresses.\n // The default path is skipped so we find the\n // number of alternative paths here.\n Set set = new HashSet();\n int length = (int)(high - low + 1);\n for (int i = 0; i < length; i++) {\n int jumpAddr = (int)intAt (tbl, i) + offset;\n set.add(new Integer(jumpAddr));\n }\n codePaths += set.size();\n\n\t\t\toffset = tbl + (int)((high - low + 1) << 2);\n\t\t\tbreak;\n\t\t }\n\n\t\t case bc_lookupswitch:{\n\t\t\tint tbl = (offset+1+3) & (~3);\t// four byte boundry\n\t\t\tint npairs = (int)intAt(tbl, 1);\n\t\t\tint nints = npairs * 2;\n\t\t\ttbl += 2 << 2; \t\t\t// two int header\n\n // Find number of unique table addresses\n Set set = new HashSet();\n for (int i = 0; i < nints; i += 2) {\n // use the address half of each pair\n int jumpAddr = (int)intAt (tbl, i + 1) + offset;\n set.add(new Integer(jumpAddr));\n }\n codePaths += set.size();\n \n\t\t\toffset = tbl + (nints << 2);\n\t\t\tbreak;\n\t\t }\n\n // Ignore other bcodes.\n\t\t case bc_anewarray: \n offset += 3;\n break;\n\n\t\t case bc_multianewarray: {\n\t\t\toffset += 4;\n\t\t\tbreak;\n\t\t }\n\n\t\t case bc_aload: case bc_astore:\n\t\t case bc_fload: case bc_fstore:\n\t\t case bc_iload: case bc_istore:\n\t\t case bc_lload: case bc_lstore:\n\t\t case bc_dload: case bc_dstore:\n\t\t case bc_ret: case bc_newarray:\n\t\t case bc_bipush: case bc_ldc:\n\t\t\toffset += 2;\n\t\t\tbreak;\n\t\t \n\t\t case bc_iinc: case bc_sipush:\n\t\t case bc_ldc_w: case bc_ldc2_w:\n\t\t case bc_goto:\n\t\t\toffset += 3;\n\t\t\tbreak;\n\n\t\t case bc_goto_w:\n\t\t\toffset += 5;\n\t\t\tbreak;\n\n\t\t default:\n\t\t\toffset++;\n\t\t\tbreak;\n\t\t}\n\t }\n\t}\n classRefs = expandClassNames(classIDs);\n methodRefs = expandMethodNames(methodIDs);\n }", "private void buildReferencedClassSet() throws CheckedAnalysisException, InterruptedException {\n\n if (PROGRESS) {\n System.out.println(\"Adding referenced classes\");\n }\n Set<String> referencedPackageSet = new HashSet<String>();\n\n LinkedList<ClassDescriptor> workList = new LinkedList<ClassDescriptor>();\n workList.addAll(appClassList);\n\n Set<ClassDescriptor> seen = new HashSet<ClassDescriptor>();\n Set<ClassDescriptor> appClassSet = new HashSet<ClassDescriptor>(appClassList);\n\n Set<ClassDescriptor> badAppClassSet = new HashSet<ClassDescriptor>();\n HashSet<ClassDescriptor> knownDescriptors = new HashSet<ClassDescriptor>(DescriptorFactory.instance()\n .getAllClassDescriptors());\n int count = 0;\n Set<ClassDescriptor> addedToWorkList = new HashSet<ClassDescriptor>(appClassList);\n\n // add fields\n //noinspection ConstantIfStatement\n if (false)\n for (ClassDescriptor classDesc : appClassList) {\n try {\n XClass classNameAndInfo = Global.getAnalysisCache().getClassAnalysis(XClass.class, classDesc);\n for (XField f : classNameAndInfo.getXFields()) {\n String sig = f.getSignature();\n ClassDescriptor d = DescriptorFactory.createClassDescriptorFromFieldSignature(sig);\n if (d != null && addedToWorkList.add(d))\n workList.addLast(d);\n }\n } catch (RuntimeException e) {\n bugReporter.logError(\"Error scanning \" + classDesc + \" for referenced classes\", e);\n if (appClassSet.contains(classDesc)) {\n badAppClassSet.add(classDesc);\n }\n } catch (MissingClassException e) {\n // Just log it as a missing class\n bugReporter.reportMissingClass(e.getClassDescriptor());\n if (appClassSet.contains(classDesc)) {\n badAppClassSet.add(classDesc);\n }\n }\n }\n\n while (!workList.isEmpty()) {\n if (Thread.interrupted()) {\n throw new InterruptedException();\n }\n ClassDescriptor classDesc = workList.removeFirst();\n\n if (seen.contains(classDesc)) {\n continue;\n }\n seen.add(classDesc);\n\n if (!knownDescriptors.contains(classDesc)) {\n count++;\n if (PROGRESS && count % 5000 == 0) {\n System.out.println(\"Adding referenced class \" + classDesc);\n }\n }\n\n referencedPackageSet.add(classDesc.getPackageName());\n\n // Get list of referenced classes and add them to set.\n // Add superclasses and superinterfaces to worklist.\n try {\n XClass classNameAndInfo = Global.getAnalysisCache().getClassAnalysis(XClass.class, classDesc);\n\n ClassDescriptor superclassDescriptor = classNameAndInfo.getSuperclassDescriptor();\n if (superclassDescriptor != null && addedToWorkList.add(superclassDescriptor)) {\n workList.addLast(superclassDescriptor);\n }\n\n for (ClassDescriptor ifaceDesc : classNameAndInfo.getInterfaceDescriptorList()) {\n if (addedToWorkList.add(ifaceDesc))\n workList.addLast(ifaceDesc);\n }\n\n ClassDescriptor enclosingClass = classNameAndInfo.getImmediateEnclosingClass();\n if (enclosingClass != null && addedToWorkList.add(enclosingClass))\n workList.addLast(enclosingClass);\n\n } catch (RuntimeException e) {\n bugReporter.logError(\"Error scanning \" + classDesc + \" for referenced classes\", e);\n if (appClassSet.contains(classDesc)) {\n badAppClassSet.add(classDesc);\n }\n } catch (MissingClassException e) {\n // Just log it as a missing class\n bugReporter.reportMissingClass(e.getClassDescriptor());\n if (appClassSet.contains(classDesc)) {\n badAppClassSet.add(classDesc);\n }\n } catch (CheckedAnalysisException e) {\n // Failed to scan a referenced class --- just log the error and\n // continue\n bugReporter.logError(\"Error scanning \" + classDesc + \" for referenced classes\", e);\n if (appClassSet.contains(classDesc)) {\n badAppClassSet.add(classDesc);\n }\n }\n }\n // Delete any application classes that could not be read\n appClassList.removeAll(badAppClassSet);\n DescriptorFactory.instance().purge(badAppClassSet);\n\n for (ClassDescriptor d : DescriptorFactory.instance().getAllClassDescriptors()) {\n referencedPackageSet.add(d.getPackageName());\n }\n referencedClassSet = new ArrayList<ClassDescriptor>(DescriptorFactory.instance().getAllClassDescriptors());\n\n // Based on referenced packages, add any resolvable package-info classes\n // to the set of referenced classes.\n if (PROGRESS) {\n referencedPackageSet.remove(\"\");\n System.out.println(\"Added \" + count + \" referenced classes\");\n System.out.println(\"Total of \" + referencedPackageSet.size() + \" packages\");\n for (ClassDescriptor d : referencedClassSet)\n System.out.println(\" \" + d);\n\n }\n\n }", "private void connectClasses(Header [] list)\r\n {\r\n Vector queue;\r\n Vector garbage = new Vector();\r\n\r\n Find.setCrossreference(list);\r\n\r\n for(int i = 0; list != null && i < list.length; i++)\r\n {\r\n queue = list[i].scopes;\r\n\r\n for(int j = 0; j < queue.size(); j++)\r\n for(Iterator iter = ((Scope)queue.get(j)).iterator(); iter.hasNext();)\r\n {\r\n Iterator a = null;\r\n Basic x = (Basic)iter.next();\r\n\r\n if (x instanceof ClassType)\r\n {\r\n ClassType y = (ClassType)x;\r\n ClassType [] z;\r\n boolean done = false;\r\n String st = null;\r\n\r\n if (y.extend != null && y.extend.name != null && y.extend.scope == null)\r\n { // look for superclass\r\n st = y.extend.name.string;\r\n for(a = y.unresolved.iterator(); a.hasNext();)\r\n {\r\n String s = (String)a.next();\r\n if (s.endsWith('.' + st))\r\n {\r\n st = s;\r\n break;\r\n }\r\n }\r\n\r\n z = Find.findClass(st, 0, y.scope);\r\n \r\n for(int k = 0; k < z.length; k++)\r\n if (z[k].scope.javaPath(\"\").endsWith(st) || z[k].scope.buildPath(\"\").endsWith(st))\r\n {\r\n y.extend = z[k];\r\n garbage.add(st);\r\n done = true;\r\n }\r\n }\r\n\r\n for(int k = 0; k < y.implement.length; k++)\r\n if (y.implement[k].name != null && y.implement[k].scope == null)\r\n { // look for interface\r\n st = y.implement[k].name.string;\r\n for(a = y.unresolved.iterator(); a.hasNext();)\r\n {\r\n String s = (String)a.next();\r\n if (s.endsWith('.' + st))\r\n {\r\n st = s;\r\n break;\r\n }\r\n }\r\n done = false;\r\n \r\n z = Find.findClass(st, 0, y.scope);\r\n \r\n for(int l = 0; l < z.length && !done; l++)\r\n if (z[l].scope.javaPath(\"\").endsWith(st) || z[l].scope.buildPath(\"\").endsWith(st))\r\n {\r\n y.implement[k] = z[l];\r\n garbage.add(st);\r\n done = true;\r\n break;\r\n }\r\n }\r\n\r\n a = null;\r\n while(garbage.size() > 0)\r\n {\r\n st = (String)garbage.get(0);\r\n garbage.remove(0);\r\n y.unresolved.remove(st);\r\n }\r\n }\r\n }\r\n }\r\n }", "private void scanDirectory(final File directory) throws AnalyzerException {\n\t\tFile[] files = directory.listFiles();\n\t\tfor (File f : files) {\n\t\t\t// scan .class file\n\t\t\tif (f.isFile() && f.getName().toLowerCase().endsWith(\".class\")) {\n\t\t\t\tInputStream is = null;\n\t\t\t\ttry {\n\t\t\t\t\tis = new FileInputStream(f);\n\t\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\tthrow new AnalyzerException(\n\t\t\t\t\t\t\t\"Cannot read input stream from '\"\n\t\t\t\t\t\t\t\t\t+ f.getAbsolutePath() + \"'.\", e);\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tnew ClassReader(is).accept(scanVisitor,\n\t\t\t\t\t\t\tClassReader.SKIP_CODE);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tthrow new AnalyzerException(\n\t\t\t\t\t\t\t\"Cannot launch class visitor on the file '\"\n\t\t\t\t\t\t\t\t\t+ f.getAbsolutePath() + \"'.\", e);\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tis.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new AnalyzerException(\n\t\t\t\t\t\t\t\"Cannot close input stream on the file '\"\n\t\t\t\t\t\t\t\t\t+ f.getAbsolutePath() + \"'.\", e);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// loop on childs\n\t\t\t\tif (f.isDirectory()) {\n\t\t\t\t\tscanDirectory(f);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "protected void loadAll() {\n\t\ttry {\n\t\t\tloadGroups(this.folder, this.cls, this.cachedOnes);\n\t\t\t/*\n\t\t\t * we have to initialize the components\n\t\t\t */\n\t\t\tfor (Object obj : this.cachedOnes.values()) {\n\t\t\t\t((Component) obj).getReady();\n\t\t\t}\n\t\t\tTracer.trace(this.cachedOnes.size() + \" \" + this + \" loaded.\");\n\t\t} catch (Exception e) {\n\t\t\tthis.cachedOnes.clear();\n\t\t\tTracer.trace(\n\t\t\t\t\te,\n\t\t\t\t\tthis\n\t\t\t\t\t\t\t+ \" pre-loading failed. No component of this type is available till we successfully pre-load them again.\");\n\t\t}\n\t}", "public static void preLoad() {\n\t\tserviceClasses.clear();\n\t\tloadGroups(CLASS_FOLDER, null, serviceClasses);\n\t\tTracer.trace(serviceClasses.size()\n\t\t\t\t+ \" java class names loaded as services.\");\n\t\t/*\n\t\t * clean and pre-load if required\n\t\t */\n\t\tfor (ComponentType aType : ComponentType.values()) {\n\t\t\tif (aType.cachedOnes != null) {\n\t\t\t\taType.cachedOnes.clear();\n\t\t\t}\n\t\t\tif (aType.preLoaded) {\n\t\t\t\taType.loadAll();\n\t\t\t}\n\t\t}\n\t}", "private void prepareScanner() {\r\n\t\tbcLocator = new BCLocator();\r\n\t\tbcGenerator = new BCGenerator();\r\n\t}", "public String[] readClasses();", "private void generateClassFiles(ClassTree classtree) {\n String[] packageNames = configuration.classDocCatalog.packageNames();\n for (int packageNameIndex = 0; packageNameIndex < packageNames.length;\n packageNameIndex++) {\n generateClassFiles(configuration.classDocCatalog.allClasses(\n packageNames[packageNameIndex]), classtree);\n }\n }", "private void describeClassTree(Class<?> inputClass, Set<Class<?>> setOfClasses) {\r\n // can't map null class\r\n if (inputClass == null) {\r\n return;\r\n }\r\n\r\n // don't further analyze a class that has been analyzed already\r\n if (Object.class.equals(inputClass) || setOfClasses.contains(inputClass)) {\r\n return;\r\n }\r\n\r\n // add to analysis set\r\n setOfClasses.add(inputClass);\r\n\r\n // perform super class analysis\r\n describeClassTree(inputClass.getSuperclass(), setOfClasses);\r\n\r\n // perform analysis on interfaces\r\n for (Class<?> hasInterface : inputClass.getInterfaces()) {\r\n describeClassTree(hasInterface, setOfClasses);\r\n }\r\n }", "private List<Class> getClasses(String packageName)\n throws ClassNotFoundException, IOException {\n ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n assert classLoader != null;\n String path = packageName.replace('.', '/');\n Enumeration<URL> resources = classLoader.getResources(path);\n List<File> dirs = new ArrayList<File>();\n while (resources.hasMoreElements()) {\n URL resource = resources.nextElement();\n dirs.add(new File(resource.getFile()));\n }\n ArrayList<Class> classes = new ArrayList<Class>();\n for (File directory : dirs) {\n classes.addAll(findClasses(directory, packageName));\n }\n return classes;\n }", "protected static void loadGroups(String folderName, Class<?> rootClass,\n\t\t\tMap<String, Object> objects) {\n\t\tString packageName = null;\n\t\tif (rootClass != null) {\n\t\t\tpackageName = rootClass.getPackage().getName() + '.';\n\t\t}\n\t\tfor (String resName : FileManager.getResources(componentFolder\n\t\t\t\t+ folderName)) {\n\t\t\tif (resName.endsWith(EXTN) == false) {\n\t\t\t\tTracer.trace(\"Skipping Non-resource \" + resName);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tTracer.trace(\"Going to load components from \" + resName);\n\t\t\ttry {\n\t\t\t\tXmlUtil.xmlToCollection(resName, objects, packageName);\n\t\t\t} catch (Exception e) {\n\t\t\t\tTracer.trace(e, \"Resource \" + resName + \" failed to load.\");\n\t\t\t}\n\t\t}\n\t}", "public static void initClasses() {\n\t // base class must be initialized first\n\t \t SoAction.initClass();\n\t \t \n\t \t SoCallbackAction.initClass();\n\t \t SoGLRenderAction.initClass();\n\t \t SoGetBoundingBoxAction.initClass();\n\t \t SoGetMatrixAction.initClass();\n\t \t SoGetPrimitiveCountAction.initClass();\n\t \t SoHandleEventAction.initClass();\n\t \t SoPickAction.initClass();\n\t \t SoRayPickAction.initClass();\n\t \t SoSearchAction.initClass();\n\t \t SoWriteAction.initClass();\n\t \t \t \t\n\t }", "protected void processPackage(Package myPackage, String parentPackageName)\n {\n Element element = null;\n // local variable to store an attribute\n Attribute attribute = null;\n // local variable to store a connector\n Connector connector = null;\n // local variable to store the roles\n ConnectorEnd sourceRole = null;\n ConnectorEnd targetRole = null;\n \n String packageHierarchy = null; \n\n \n EAEventManager.getInstance().fireEAEvent(\n this,\n \"Extracting information from package \"\n + myPackage.GetName());\n\n if(parentPackageName.equals(\"\"))\n packageHierarchy = myPackage.GetName();\n else\n packageHierarchy = parentPackageName + \"/\" + myPackage.GetName(); \n \n addPackageToGlossary(myPackage, packageHierarchy);\n\n /////////////////////////////////////////////////\n // Process the classes defined in this subpackage\n /////////////////////////////////////////////////\n for (Iterator elementsIter = myPackage.GetElements()\n .iterator(); elementsIter.hasNext();) {\n\n element = (Element) elementsIter.next();\n\n // The class element is used generically\n // WARNING: in some cases, an element of type enumeration\n // ...\n if (element.GetType().equals(EA_TYPE_CLASS)) {\n\n addElementToGlossary(element, packageHierarchy);\n\n ///////////////////////////////////////////////////\n // Process the class attributes\n ///////////////////////////////////////////////////\n for (Iterator attributeIter = element.GetAttributes()\n .iterator(); attributeIter.hasNext();) {\n attribute = (Attribute) attributeIter.next();\n addAttributeToGlossary(attribute, packageHierarchy);\n }\n\n }\n }\n \n }", "private void generalFeatureExtraction () {\n Logger.log(\"Counting how many calls each method does\");\n Chain<SootClass> classes = Scene.v().getApplicationClasses();\n try {\n for (SootClass sclass : classes) {\n if (!isLibraryClass(sclass)) {\n System.out.println(ConsoleColors.RED_UNDERLINED + \"\\n\\n 🔍🔍 Checking invocations in \" +\n sclass.getName() + \" 🔍🔍 \" + ConsoleColors.RESET);\n List<SootMethod> methods = sclass.getMethods();\n for (SootMethod method : methods) {\n featuresMap.put(method, new Features(method));\n }\n }\n }\n } catch (Exception e) { \n }\n System.out.println(\"\\n\");\n }", "@Override\n\t\tprotected Set<BeanDefinitionHolder> doScan(String... basePackages) {\n\t\t\tSet<BeanDefinitionHolder> beanDefinitions = super.doScan(basePackages);\n\t\t\t\n\t\t\tif (beanDefinitions.isEmpty()) {\n\t\t\t\tlogger.warn(\"No MyBatis mapper was found in '\" + PagingMapperScannerConfigurer.this.basePackage\n\t\t\t\t\t\t+ \"' package. Please check your configuration.\");\n\t\t\t} else {\n\t\t\t\tfor (BeanDefinitionHolder holder : beanDefinitions) {\n\t\t\t\t\t\n\t\t\t\t\tGenericBeanDefinition definition = (GenericBeanDefinition) holder.getBeanDefinition();\n\n\t\t\t\t\tif (logger.isDebugEnabled()) {\n\t\t\t\t\t\tlogger.debug(\"Creating MapperFactoryBean with name '\" + holder.getBeanName()\n\t\t\t\t\t\t\t\t+ \"' and '\" + definition.getBeanClassName() + \"' mapperInterface\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// the mapper interface is the original class of the bean\n\t\t\t\t\t// but, the actual class of the bean is MapperFactoryBean\n\t\t\t\t\tdefinition.getPropertyValues().add(\"mapperInterface\", definition.getBeanClassName());\n\t\t\t\t\tdefinition.setBeanClass(PagingMapperFactoryBean.class);\n\t\t\t\t\tdefinition.getPropertyValues().add(\"addToConfig\", PagingMapperScannerConfigurer.this.addToConfig);\n\t\t\t\t\t\n\t\t\t\t\t// checking sql session factory of mybatis object and inject it \n\t\t\t\t\tboolean explicitFactoryUsed = false;\n\t\t\t\t\tif (StringUtils.hasLength(PagingMapperScannerConfigurer.this.sqlSessionFactoryBeanName)) {\n\t\t\t\t\t\tdefinition.getPropertyValues().add(\"sqlSessionFactory\", \n\t\t\t\t\t\t\t\tnew RuntimeBeanReference(PagingMapperScannerConfigurer.this.sqlSessionFactoryBeanName));\n\t\t\t\t\t\texplicitFactoryUsed = true;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (StringUtils.hasLength(PagingMapperScannerConfigurer.this.sqlSessionTemplateBeanName)) {\n\t\t\t\t\t\tif (explicitFactoryUsed) {\n\t\t\t\t\t\t\tlogger.warn(\"Cannot use both: sqlSessionTemplate and sqlSessionFactory together. sqlSessionFactory is ignored.\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdefinition.getPropertyValues().add(\"sqlSessionTemplate\",\n\t\t\t\t\t\t\t\tnew RuntimeBeanReference(PagingMapperScannerConfigurer.this.sqlSessionTemplateBeanName));\n\t\t\t\t\t\tdefinition.getPropertyValues().add(\"sqlSessionFactory\", null);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn beanDefinitions;\n\t\t}", "ISet<Class<?>> collectAllTypeWiredServices();", "protected void createDerivedAnnotations() {\n\t\tString source = \"http://www.polarsys.org/capella/derived\";\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_ProvisionedArchitectureAllocations(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_ProvisioningArchitectureAllocations(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_AllocatedArchitectures(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getBlockArchitecture_AllocatingArchitectures(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_UsedInterfaceLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_UsedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ImplementedInterfaceLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ImplementedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ProvisionedComponentAllocations(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ProvisioningComponentAllocations(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_AllocatedComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_AllocatingComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ProvidedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_RequiredInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ContainedComponentPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ContainedParts(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponent_ContainedPhysicalPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPart_ProvidedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPart_RequiredInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPart_DeployedParts(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPart_DeployingParts(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getArchitectureAllocation_AllocatedArchitecture(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getArchitectureAllocation_AllocatingArchitecture(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponentAllocation_AllocatedComponent(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getComponentAllocation_AllocatingComponent(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getSystemComponent_ParticipationsInCapabilityRealizations(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_ImplementorComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_UserComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_InterfaceImplementations(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_InterfaceUses(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_ProvisioningInterfaceAllocations(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_AllocatingInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_AllocatingComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_ExchangeItems(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_RequiringComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_RequiringComponentPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_ProvidingComponents(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_ProvidingComponentPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_RealizingLogicalInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_RealizedContextInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_RealizingPhysicalInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterface_RealizedLogicalInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceImplementation_InterfaceImplementor(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceUse_InterfaceUser(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceAllocation_AllocatedInterface(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceAllocation_AllocatingInterfaceAllocator(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceAllocator_ProvisionedInterfaceAllocations(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getInterfaceAllocator_AllocatedInterfaces(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getExchangeItemAllocation_AllocatingInterface(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getDeployableElement_DeployingLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getDeploymentTarget_DeploymentLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getAbstractPhysicalArtifact_AllocatorConfigurationItems(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getAbstractPhysicalLinkEnd_InvolvedLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_SourcePhysicalPort(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_TargetPhysicalPort(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_RealizedPhysicalLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalLink_RealizingPhysicalLinks(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPath_FirstPhysicalPathInvolvements(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPath_RealizedPhysicalPaths(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPath_RealizingPhysicalPaths(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPathInvolvement_PreviousInvolvements(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPathInvolvement_InvolvedElement(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPathInvolvement_InvolvedComponent(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPathReference_ReferencedPhysicalPath(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPort_AllocatedComponentPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPort_RealizedPhysicalPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t });\t\n\t\taddAnnotation\n\t\t (getPhysicalPort_RealizingPhysicalPorts(), \n\t\t source, \n\t\t new String[] {\n\t\t });\n\t}", "private static List<Class> findClasses(File directory, String packageName) throws ClassNotFoundException {\n List<Class> classes = new ArrayList<Class>();\n if (!directory.exists()) {\n return classes;\n }\n File[] files = directory.listFiles();\n for (File file : files) {\n if (file.isDirectory()) {\n assert !file.getName().contains(\".\");\n classes.addAll(findClasses(file, packageName + \".\" + file.getName()));\n } else if (file.getName().endsWith(\".class\")) {\n classes.add(Class.forName(packageName + '.' + file.getName().substring(0, file.getName().length() - 6)));\n }\n }\n return classes;\n }", "Set<Class<? extends Annotation>> getScanTypeAnnotations();", "public static void initPackage() {\n\t\t(new Branch()).getCache();\n\t\t(new Change()).getCache();\n\t\t(new Client()).getCache();\n\t\t(new DirEntry()).getCache();\n\t\t(new FileEntry()).getCache();\n\t\t(new Job()).getCache();\n\t\t(new Label()).getCache();\n\t\t(new User()).getCache();\n\t\tProperties props = System.getProperties();\n\t}", "public List<? extends BaseClassInfo> getClasses(HasMetricsFilter filter) {\n if (classLookup == null) {\n buildClassLookupMap();\n }\n List<BaseClassInfo> result = newArrayList();\n for (BaseClassInfo classInfo : classLookup.values()) {\n if (filter.accept(classInfo)) {\n result.add(classInfo);\n }\n }\n return result;\n }", "IClassDefinition[] resolveAncestry(ICompilerProject project);", "public interface ComponentTypeScanner<A extends Annotation, C> {\n\n /**\n * Handles the discovery of a component type.\n *\n * @param annotation an instance of the annotation which caused this scanner to be notified.\n * @param type a reference to the component type.\n */\n default void onDiscovery(@Nonnull A annotation, @Nonnull Class<? extends C> type) {\n }\n\n /**\n * Handles the pre-construction (e.g. when it is decided that the component is to be constructed\n * but has yet to be constructed).\n *\n * @param annotation an instance of the annotation which caused this scanner to be notified.\n * @param type a reference to the component type.\n */\n default void onPreConstruct(@Nonnull A annotation, @Nonnull Class<? extends C> type) {\n }\n\n /**\n * Handles the construction of a new component instance.\n *\n * @param annotation an instance of the annotation which caused this scanner to be notified.\n * @param instance an instance of the constructed component.\n */\n default void onConstruct(@Nonnull A annotation, @Nonnull C instance) {\n }\n\n /**\n * Handles the destruction of a new component instance.\n *\n * @param annotation an instance of the annotation which caused this scanner to be notified.\n * @param instance an instance of the constructed component.\n */\n default void onDestruct(@Nonnull A annotation, @Nonnull C instance) {\n }\n\n /**\n * Handles the post-destruction (e.g. when an instance has been removed from the context).\n *\n * @param annotation an instance of the annotation which caused this scanner to be notified.\n * @param type a reference to the component type.\n */\n default void onPostDestruct(@Nonnull A annotation, @Nonnull Class<? extends C> type) {\n }\n}", "@BeforeClass\n public void loadGeneratedClasses() throws IOException, ClassNotFoundException {\n ClassLoader classLoader = Thread.currentThread().getContextClassLoader();\n assertNotNull(classLoader, \"Unable to load ClassLoader to find generated JPA Java classes.\");\n \n Enumeration<URL> jpaClassFileURL = classLoader.getResources(\"com/goldstandard/model/\");\n assertTrue(jpaClassFileURL.hasMoreElements(), \"Cannot find com/goldstandard/model/ resource\");\n \n // There should only be one base resource directory\n File jpaClassFileDir = new File(jpaClassFileURL.nextElement().getFile());\n \n generatedClassList = new ArrayList<Class<?>>();\n generatedClassNameMap = new HashMap<String, Class<?>>();\n generatedEnumNameMap = new HashMap<String, Class<?>>();\n \n // Loop through all the class files in the com.goldstandard.model package\n for (File classFile : jpaClassFileDir.listFiles()) {\n Matcher matcher = GENERATED_CLASS_PATTERN.matcher(classFile.getCanonicalPath());\n if (matcher.matches()) {\n String packageName = matcher.group(1).replace('/', '.');\n String className = matcher.group(2);\n \n // Load up the generated class and add it to the data provider\n Class<?> generatedClass = Class.forName(packageName + \".\" + className);\n if (!generatedClass.isEnum()) {\n generatedClassList.add(generatedClass);\n generatedClassNameMap.put(generatedClass.getAnnotation(Table.class).name(), generatedClass);\n } else {\n generatedEnumNameMap.put(className, generatedClass);\n }\n }\n }\n \n assertTrue(generatedClassList.size() > 0, \"Did not find any generated classes\");\n }", "public static void load() throws IOException {\n ClassPath classPath = ClassPath.from(ClassLoader.getSystemClassLoader());\n //System.out.println(\"Length:\"+classPath.getTopLevelClasses(\"util\").size());\n for (ClassPath.ClassInfo classInfo : classPath.getTopLevelClasses(\"util\")) {\n Scene.v().addBasicClass(classInfo.getName(), SootClass.BODIES);\n sootClasses.add(classInfo.getName());\n }\n }", "public static void main(String[] args) throws ClassNotFoundException {\n Class.forName(\"Mgr01\");\n }", "private void getServiceClasses(Class<?> service, Set<ProviderClass> sp) {\n LOGGER.log(Level.CONFIG, \"Searching for providers that implement: \" + service);\n Class<?>[] pca = ServiceFinder.find(service, true).toClassArray();\n for (Class pc : pca) {\n if (constrainedTo(pc)) {\n LOGGER.log(Level.CONFIG, \" Provider found: \" + pc);\n }\n }\n // Add service-defined providers to the set after application-defined\n for (Class pc : pca) {\n if (constrainedTo(pc)) {\n sp.add(new ProviderClass(pc, true));\n }\n }\n }", "private void listAllClasses(List<Path> foundFiles, Path root) {\r\n if (root.toFile().isFile()) {\r\n foundFiles.add(root);\r\n } else {\r\n try (DirectoryStream<Path> stream = Files.newDirectoryStream(root, filter)) {\r\n for (Path path : stream) {\r\n if (Files.isDirectory(path)) {\r\n listAllClasses(foundFiles, path);\r\n } else {\r\n foundFiles.add(path);\r\n }\r\n }\r\n } catch (AccessDeniedException e) {\r\n logger.error(\"Access denied to directory {}\", root, e);\r\n } catch (IOException e) {\r\n logger.error(\"Error while reading directory {}\", root, e);\r\n }\r\n }\r\n }", "private static void registerFromPackage(String packageName, String packageURL, FileFilter fileFilter) {\n File dir = new File(packageURL);\n if (!dir.exists() || !dir.isDirectory()) return;\n File[] dirFiles = dir.listFiles(fileFilter);\n for (File file : dirFiles)\n if (file.isDirectory()) {\n registerFromPackage(packageName + \".\" + file.getName(), file.getAbsolutePath(), fileFilter);\n } else {\n String className = file.getName().substring(0, file.getName().indexOf(\".\"));\n try {\n Class<?> aClass = Class.forName(packageName + \".\" + className);\n Annotation[] annotations = aClass.getAnnotations();\n //TODO 并不一定是按照顺序的,而且未来有可能不只是2个注解\n\n // 扫描注册 controller requestMapping\n if (annotations.length > 1 && annotations[0].annotationType().equals(Controller.class) && annotations[1].annotationType().equals(RequestMapping.class)) {\n String preUrl = aClass.getAnnotation(RequestMapping.class).value();\n Method[] methods = aClass.getMethods();\n for (Method method : methods) {\n Annotation requestMapping = method.getAnnotation(RequestMapping.class);\n if (requestMapping != null) {\n String pixUrl = ((RequestMapping) requestMapping).value();\n register(preUrl + pixUrl, new Service(aClass.asSubclass(ServiceInterface.class).getConstructor().newInstance(), method));\n System.out.println(((RequestMapping) requestMapping).value());\n }\n }\n\n }\n\n //放弃以下早期的扫描服务代码\n // 实现了注解,并且实现了接口\n// if (annotation != null && ServiceInterface.class.isAssignableFrom(aClass)) {\n//\n//// register(annotation.urlPattern(),aClass.asSubclass(ServiceInterface.class).getDeclaredConstructor().newInstance());\n//// System.out.println(\"成功注册服务: \" + annotation.urlPattern() + \" \" + className);\n// }\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n } catch (InstantiationException e) {\n e.printStackTrace();\n } catch (NoSuchMethodException e) {\n e.printStackTrace();\n } catch (InvocationTargetException e) {\n e.printStackTrace();\n }\n }\n }", "public ClassAnnotationMetaDataFilter(Class<?>[] annos) {\n _annos = new HashSet<>();\n for (Class<?> anno : annos) {\n _annos.add(Type.getDescriptor(anno));\n }\n }", "private void placeClasses (List<String> classes)\n {\n for (String className : classes)\n {\n ProjectDependenciesAnalyzer.DependencyInfo info = infos.get (className);\n Cell cell = new Cell (className,\n (int) (info.getNormalizedUsing () * grid.getWidth ()),\n (int) ((1.0 - info.getNormalizedExtending ()) * grid.getHeight ()),\n info.getUsedCount () + info.getUsingCount ());\n grid.placeCell (cell);\n }\n }", "private static List<Class<?>> findClasses(File directory, String packageName) throws ClassNotFoundException {\n List<Class<?>> classes = new ArrayList<Class<?>>();\n if (!directory.exists()) {\n return classes;\n }\n File[] files = directory.listFiles();\n for (File file : files) {\n if (file.isDirectory()) {\n assert !file.getName().contains(\".\");\n classes.addAll(findClasses(file, packageName + \".\" + file.getName()));\n } else if (file.getName().endsWith(\".class\")) {\n classes.add(Class.forName(packageName + '.' + file.getName().substring(0, file.getName().length() - 6)));\n }\n }\n return classes;\n }", "private void _loadProvidersLocked() {\n if (GpsLocationProvider.isSupported()) {\n // Create a gps location provider\n mGpsLocationProvider = new GpsLocationProvider(mContext);\n LocationProviderImpl.addProvider(mGpsLocationProvider);\n }\n\n // Load fake providers if real providers are not available\n File f = new File(LocationManager.PROVIDER_DIR);\n if (f.isDirectory()) {\n File[] subdirs = f.listFiles();\n for (int i = 0; i < subdirs.length; i++) {\n if (!subdirs[i].isDirectory()) {\n continue;\n }\n\n String name = subdirs[i].getName();\n\n if (LOCAL_LOGV) {\n Log.v(TAG, \"Found dir \" + subdirs[i].getAbsolutePath());\n Log.v(TAG, \"name = \" + name);\n }\n\n // Don't create a fake provider if a real provider exists\n if (LocationProviderImpl.getProvider(name) == null) {\n LocationProviderImpl provider = null;\n try {\n File classFile = new File(subdirs[i], \"class\");\n // Look for a 'class' file\n provider = LocationProviderImpl.loadFromClass(classFile);\n\n // Look for an 'kml', 'nmea', or 'track' file\n if (provider == null) {\n // Load properties from 'properties' file, if present\n File propertiesFile = new File(subdirs[i], \"properties\");\n\n if (propertiesFile.exists()) {\n provider = new TrackProvider(name);\n ((TrackProvider)provider).readProperties(propertiesFile);\n\n File kmlFile = new File(subdirs[i], \"kml\");\n if (kmlFile.exists()) {\n ((TrackProvider) provider).readKml(kmlFile);\n } else {\n File nmeaFile = new File(subdirs[i], \"nmea\");\n if (nmeaFile.exists()) {\n ((TrackProvider) provider).readNmea(name, nmeaFile);\n } else {\n File trackFile = new File(subdirs[i], \"track\");\n if (trackFile.exists()) {\n ((TrackProvider) provider).readTrack(trackFile);\n }\n }\n }\n }\n }\n if (provider != null) {\n LocationProviderImpl.addProvider(provider);\n }\n // Grab the initial location of a TrackProvider and\n // store it as the last known location for that provider\n if (provider instanceof TrackProvider) {\n TrackProvider tp = (TrackProvider) provider;\n mLastKnownLocation.put(tp.getName(), tp.getInitialLocation());\n }\n } catch (Exception e) {\n Log.e(TAG, \"Exception loading provder \" + name, e);\n }\n }\n }\n }\n\n updateProvidersLocked();\n }", "@Override\n public void execute(Map<String, FileInfo> fileInfos) throws Exception {\n FileInfo fileInfo = fileInfos.computeIfAbsent(COMMON_FILE, FileInfo::new);\n fileInfo.setImports(ImmutableSet.of());\n fileInfo.getStructInfos().put(EMPTY.getName(), EMPTY);\n EMPTY.setFileInfo(fileInfo);\n // create loaders\n enumLoader = new EnumLoader(name -> fileInfos.computeIfAbsent(name, FileInfo::new));\n structLoader = new StructLoader(enumLoader);\n rpcLoader = new ServiceLoader(structLoader);\n // load classes\n for (Class<?> clz : ScanUtils.scanClass(packageName, this::filterClass)) {\n if (clz.isInterface()) {\n rpcLoader.execute(clz);\n interfaceCount++;\n } else if (clz.getInterfaces().length > 1) {\n structLoader.execute(clz);\n classCount++;\n } else if (clz.getInterfaces().length > 0) {\n enumLoader.execute(clz);\n enumCount++;\n }\n }\n }", "protected void generateClassFiles(RootDoc root, ClassTree classtree) {\n generateClassFiles(classtree);\n PackageDoc[] packages = root.specifiedPackages();\n for (int i = 0; i < packages.length; i++) {\n generateClassFiles(packages[i].allClasses(), classtree);\n }\n }", "public void process(byte[] inputClass) throws IOException {\n\t\tClassNode classNode = BytecodeUtils.getClassNode(inputClass);\n\t\t// TODO: address innerclasses, classNode.innerClasses, could these even be found from class files? they would be different files...\n\t\tif(classNode.invisibleAnnotations != null){\n\t\t\tfor(Object annotationObject : classNode.invisibleAnnotations){\n\t\t\t\tAnnotationNode annotationNode = (AnnotationNode) annotationObject;\n\t\t\t\tJREFAnnotationIdentifier checker = new JREFAnnotationIdentifier();\n\t\t\t\tchecker.visitAnnotation(annotationNode.desc, false);\n\t\t\t\tif(checker.isJREFAnnotation()){\n\t\t\t\t\tString qualifiedClassName = classNode.name + \".class\";\n\t\t\t\t\tif(checker.isDefineTypeAnnotation()){\n\t\t\t\t\t\tif(runtimeModifications.getJarEntrySet().contains(qualifiedClassName)){\n\t\t\t\t\t\t\truntimeModifications.add(qualifiedClassName, inputClass, true);\n//\t\t\t\t\t\t\tLog.info(\"Replaced: \" + qualifiedClassName + \" in \" + runtimeModifications.getJarFile().getName());\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\truntimeModifications.add(qualifiedClassName, inputClass, false);\n//\t\t\t\t\t\t\tLog.info(\"Inserted: \" + qualifiedClassName + \" into \" + runtimeModifications.getJarFile().getName());\n\t\t\t\t\t\t}\n\t\t\t\t\t} else if(checker.isMergeTypeAnnotation()){\n\t\t\t\t\t\tString qualifiedParentClassName = classNode.superName + \".class\";\n\t\t\t\t\t\tbyte[] baseClass = runtimeModifications.extractEntry(qualifiedParentClassName);\n\t\t\t\t\t\tbyte[] mergedClass = mergeClasses(baseClass, inputClass);\n\t\t\t\t\t\truntimeModifications.add(qualifiedParentClassName, mergedClass, true);\n\t\t\t\t\t\t// TODO: clean up outputClass somehow, probably need to make a local temp\n\t\t\t\t\t\t// directory which gets deleted at the end of the build\n//\t\t\t\t\t\tLog.info(\"Merged: \" + qualifiedClassName + \" into \" + qualifiedParentClassName + \" in \" + runtimeModifications.getJarFile().getName());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void fillEmbeddedTypes() {\n List<String> otherClassesNames = new ArrayList<>(PRIMITIVE_TYPES);\n otherClassesNames.add(\"[]\");\n otherClassesNames.add(\"...\");\n\n List<TypeConstructor> otherClasses = new ArrayList<>();\n for (String type : otherClassesNames) {\n Classifier classifier = new Classifier(type, Language.JAVA, \"\", null, new ArrayList<MemberEntity>(), \"\");\n otherClasses.add(classifier);\n QualifiedName name = new QualifiedName(OTHER_PACKAGE, type);\n classes.put(name, classifier);\n parameters.put(name, new ParametersDescription());\n superTypes.put(name, new ArrayList<JavaType>());\n createClassMaps(name);\n }\n\n PackageEntity otherPackage = new PackageEntity(OTHER_PACKAGE, Language.JAVA, otherClasses,\n new ArrayList<MemberEntity>(), new ArrayList<PackageEntity>(), \"\", null);\n packages.put(OTHER_PACKAGE, otherPackage);\n\n for (TypeConstructor otherClass : otherClasses) {\n otherClass.setContainingPackage(otherPackage);\n }\n }", "private void initClassloaders() {\n\t\tthis.commonloader = createClassloader(\"common\",null);\n\t\tthis.sharedloader = createClassloader(\"shared\", commonloader);\n\t\tthis.catalinaloader = createClassloader(\"server\", commonloader);\n\t}", "@Override\n public List<String> call() {\n List<String> nameList = null;\n nameList = doScan(basePackage, new ArrayList<>());\n\n return nameList;\n }", "private List<String> getClassesInPackage(String packageUniqueName) {\n List<String> result = new ArrayList<String>();\n if (theModel.packages.containsKey(packageUniqueName)){\n \tTreeSet<String> children = theModel.packages.get(packageUniqueName).children;\n \tif ((children != null)){\n \t\tfor (String uniqueName : children){\n \t\t\tFamixClass foundClass = theModel.classes.get(uniqueName);\n \t\t\tif (foundClass != null){\n \t\t\t\tresult.add(uniqueName);\n \t\t\t\tif (foundClass.hasInnerClasses){\n \t\t\t\t\tresult.addAll(foundClass.children);\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}\n }\n return result;\n }", "public SELF the_analyzer_recognizes(Class... classHierarchyToScanFor) {\n builder.addHierarchy(classHierarchyToScanFor);\n return self();\n }", "public void main(ArrayList<String> files) throws IOException {\n\t\tDesignParser.CLASSES = files;\n\t\t\n\t\tthis.model = new Model();\n\n\t\tfor (String className : CLASSES) {\n//\t\t\tSystem.out.println(\"====================\");\n\t\t\t// ASM's ClassReader does the heavy lifting of parsing the compiled\n\t\t\t// Java class\n//\t\t\tSystem.out.println(\"Analyzing: \" + className);\n//\t\t\tSystem.out.println(className + \"[\");\n\t\t\tClassReader reader = new ClassReader(className);\n\t\t\t\t\t\t\n\t\t\t// make class declaration visitor to get superclass and interfaces\n\t\t\tClassVisitor decVisitor = new ClassDeclarationVisitor(Opcodes.ASM5, this.model);\n\t\t\t\n\t\t\t// DECORATE declaration visitor with field visitor\n\t\t\tClassVisitor fieldVisitor = new ClassFieldVisitor(Opcodes.ASM5, decVisitor, this.model);\n\t\t\t\n\t\t\t// DECORATE field visitor with method visitor\n\t\t\tClassVisitor methodVisitor = new ClassMethodVisitor(Opcodes.ASM5, fieldVisitor, this.model);\n\t\t\t\n\t\t\t// TODO: add more DECORATORS here in later milestones to accomplish\n\t\t\t// specific tasks\n\t\t\tClassVisitor extensionVisitor = new ExtensionVisitor(Opcodes.ASM5, methodVisitor, this.model);\n\t\t\t\n\t\t\tClassVisitor implementationVisitor = new ImplementationVisitor(Opcodes.ASM5, extensionVisitor, this.model);\n\t\t\t\t\t\t\n\t\t\tClassVisitor usesVisitor = new UsesVisitor(Opcodes.ASM5, implementationVisitor, this.model);\n\t\t\t\n\t\t\tClassVisitor compositionVisitor = new CompositionVisitor(Opcodes.ASM5, usesVisitor, this.model);\n\t\t\t\n\t\t\t// Tell the Reader to use our (heavily decorated) ClassVisitor to\n\t\t\t// visit the class\n\t\t\treader.accept(compositionVisitor, ClassReader.EXPAND_FRAMES);\n//\t\t\tSystem.out.println(\"\\n]\");\n\t\t}\n//\t\tSystem.out.println(\"End Of Code\");\n\t}", "public static boolean start(RootDoc root) {\n System.out.println(\"ClassDoc packages: \" + root.classes().length);\n Path rootPath = FileSystems.getDefault().getPath(gitRepoRoot);\n\n for (String hierarchyRoot: hierarchyRoots) {\n ClassDoc hierarchyRootDoc = root.classNamed(hierarchyRoot);\n if (hierarchyRootDoc == null) {\n System.err.printf(\"Root class not found: '%s'\\n\", hierarchyRoot);\n System.exit(-2);\n }\n ClassTree javadocTree = new ClassTree(root, new EmptyJavadocConfiguration());\n\n List<ClassDoc> classDocs;\n\n if (hierarchyRootDoc.isInterface()) {\n classDocs = javadocTree.implementingclasses(hierarchyRootDoc);\n } else {\n classDocs = javadocTree.allSubs(hierarchyRootDoc, false);\n }\n classDocs.add(hierarchyRootDoc); //not to forget the main one\n\n\n // for (ClassDoc classDoc : root.classes()) {\n for (ClassDoc classDoc : classDocs) {\n Tag[] sinceTags = classDoc.tags(\"since\");\n String sinceVal = null;\n if (sinceTags != null && sinceTags.length > 0) {\n if (sinceTags.length > 1) {\n sinceVal = \"Multiple since tags!\";\n } else {\n sinceVal = sinceTags[0].text();\n }\n }\n\n\n Path containingPath = classDoc.position().file().toPath();\n String containingFileName = containingPath.getFileName().toString();\n String className = classDoc.name();\n System.out.printf(\"Class: %s (%s): @since: %s\\n\", className, containingFileName, (sinceVal == null) ? \"not found\" : sinceVal);\n currentFileToPath.put(containingFileName, rootPath.relativize(containingPath).toString());\n if (firstOccurance.containsKey(containingFileName)) {\n System.err.printf(\"Already stored %s from %s, must be an inner class; skipping!\\n\", className, containingFileName);\n } else {\n firstOccurance.put(containingFileName, sinceVal);\n }\n }\n }\n return true;\n }", "private LSMEngineBuilder<T> buildLevelProcessors(String packageName) {\n try {\n ApplicationContext property =\n ApplicationContextGenerator.GeneratePropertyWithAnnotation(packageName);\n buildLevelProcessors(property);\n } catch (Exception e) {\n logger.error(e.getMessage());\n }\n return this;\n }", "public abstract Annotations getClassAnnotations();", "private ArrayList<Class<Critter>> getCritterClasses(Package pkg) {\n\t\tArrayList<Class<Critter>> classes = new ArrayList<Class<Critter>>();\n\t\tString packagename = pkg.getName();\n\t\tURL resource = ClassLoader.getSystemClassLoader().getResource(packagename);\n\t\tString path = resource.getFile(); //path to package\n\t\tFile directory;\n\t\ttry {\n\t\t\tdirectory = new File(resource.toURI());\n\t\t} catch (Exception e) {\n\t\t\treturn null;\n\t\t}\n\t\tif (directory.exists()) {\n\t\t\tString[] files = directory.list();\n\t\t\tfor (String file : files) {\n\t\t\t\tif (file.endsWith(\".class\")) {\n\t\t\t\t\t// removes the .class extension\n\t\t\t\t\tString className = packagename + '.' + file.substring(0, file.length() - 6);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tClass classObj = Class.forName(className);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tObject obj = classObj.newInstance();\n\t\t\t\t\t\t\tif (obj instanceof Critter) {\n\t\t\t\t\t\t\t\tclasses.add(classObj);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\tcontinue; //Skip if class cannot be made into object\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn classes;\n\t}", "List<String> getClassNames() {\n List<String> allGeneratedClasses = new ArrayList<String>();\n for (int i = 0; i < classesToScan.size(); i++) {\n String lookupName = classesToScan.get(i);\n byte classBytes[] = getClassBytes(lookupName);\n if (classBytes == null) {\n /*\n * Weird case: javac might generate a name and reference the class in\n * the bytecode but decide later that the class is unnecessary. In the\n * bytecode, a null is passed for the class.\n */\n continue;\n }\n \n /*\n * Add the class to the list only if it can be loaded to get around the\n * javac weirdness issue where javac refers a class but does not\n * generate it.\n */\n if (CompilingClassLoader.isClassnameGenerated(lookupName)\n && !allGeneratedClasses.contains(lookupName)) {\n allGeneratedClasses.add(lookupName);\n }\n AnonymousClassVisitor cv = new AnonymousClassVisitor();\n new ClassReader(classBytes).accept(cv, 0);\n List<String> innerClasses = cv.getInnerClassNames();\n for (String innerClass : innerClasses) {\n // The innerClass has to be an inner class of the lookupName\n if (!innerClass.startsWith(mainClass + \"$\")) {\n continue;\n }\n /*\n * TODO (amitmanjhi): consider making this a Set if necessary for\n * performance\n */\n // add the class to classes\n if (!classesToScan.contains(innerClass)) {\n classesToScan.add(innerClass);\n }\n }\n }\n Collections.sort(allGeneratedClasses, new GeneratedClassnameComparator());\n return allGeneratedClasses;\n }", "private static Class<?>[] loadInClassloader(ClassLoader loader, Class<?>[] classes)\n throws ClassNotFoundException {\n List<Class<?>> trackingClasses = Lists.newArrayListWithExpectedSize(classes.length);\n for (Class<?> cls : classes) {\n trackingClasses.add(loadInClassloader(loader, cls));\n }\n return trackingClasses.toArray(new Class<?>[classes.length]);\n }", "public void onScanType(Set<? extends Annotation> annotations, Class<?> clazz, Object instance);", "private List<Class> findClasses(File directory, String packageName) throws ClassNotFoundException {\n List<Class> classes = new ArrayList<Class>();\n if (!directory.exists()) {\n return classes;\n }\n File[] files = directory.listFiles();\n for (File file : files) {\n if (file.isDirectory()) {\n assert !file.getName().contains(\".\");\n classes.addAll(findClasses(file, packageName + \".\" + file.getName()));\n } else if (file.getName().endsWith(\".class\")) {\n classes.add(Class.forName(packageName + '.' + file.getName().substring(0, file.getName().length() - 6)));\n }\n }\n return classes;\n }", "Class<?>[] getHandledClasses();", "@SuppressWarnings({\"UnstableApiUsage\", \"unchecked\"})\n\tpublic void loadAllHacks() {\n\t\tfinal ConfigurationSection hackConfigs = plugin.getConfig().getConfigurationSection(\"hacks\");\n\t\tif (hackConfigs == null) {\n\t\t\tthis.plugin.warning(\"There are no hacks defined under 'hacks' the config. Is this right?\");\n\t\t\treturn;\n\t\t}\n\t\ttry {\n\t\t\tfinal ClassPath getSamplersPath = ClassPath.from(plugin.exposeClassLoader());\n\t\t\tfor (final var classInfo : getSamplersPath.getTopLevelClassesRecursive(HACKS_PATH)) {\n\t\t\t\ttry {\n\t\t\t\t\tfinal Class<?> clazz = classInfo.load();\n\t\t\t\t\tif (clazz == null || !SimpleHack.class.isAssignableFrom(clazz)) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tthis.plugin.info(\"Found hack class [\" + clazz.getName() + \"]\");\n\t\t\t\t\tloadHack((Class<SimpleHack<?>>) clazz, hackConfigs.getConfigurationSection(clazz.getSimpleName()));\n\t\t\t\t}\n\t\t\t\tcatch (final NoClassDefFoundError exception) {\n\t\t\t\t\tthis.plugin.warning(\"Unable to load hack \\\"\" + classInfo.getSimpleName() + \"\\\" probably due to a \" +\n\t\t\t\t\t\t\t\"dependency / import error.\", exception);\n\t\t\t\t\t//continue;\n\t\t\t\t}\n\t\t\t\tcatch (final Exception exception) {\n\t\t\t\t\tthis.plugin.warning(\"Failed to complete hack discovery of: \" + classInfo.getName(), exception);\n\t\t\t\t\t//continue;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch (final Exception exception) {\n\t\t\tthis.plugin.warning(\"Failed to complete hack registration\");\n\t\t\texception.printStackTrace();\n\t\t\treturn;\n\t\t}\n\t\tif (this.hacks.isEmpty()) {\n\t\t\tthis.plugin.warning(\"No hacks have been loaded.\");\n\t\t\t//return;\n\t\t}\n\t}" ]
[ "0.7452836", "0.67762566", "0.66727877", "0.6667155", "0.6529302", "0.64481086", "0.62938184", "0.5963636", "0.59091264", "0.5895804", "0.5864465", "0.57508177", "0.5738672", "0.5733751", "0.5620459", "0.56057405", "0.5599513", "0.556531", "0.556511", "0.55602866", "0.55508256", "0.5543247", "0.5536544", "0.55022144", "0.54853195", "0.548388", "0.5475445", "0.5454411", "0.54399383", "0.5437364", "0.54307854", "0.54297346", "0.5393671", "0.53810257", "0.53570133", "0.5351211", "0.5349206", "0.5307378", "0.52783257", "0.52396464", "0.5221276", "0.521119", "0.52006483", "0.5169278", "0.5169227", "0.51490015", "0.5138112", "0.51321626", "0.5125275", "0.51176375", "0.5100394", "0.50957775", "0.50669646", "0.50556314", "0.5046635", "0.5001423", "0.49922293", "0.4990361", "0.49885282", "0.49736807", "0.49598622", "0.49569792", "0.49565935", "0.494884", "0.4934016", "0.492055", "0.49179786", "0.4908739", "0.48992905", "0.48970243", "0.4876937", "0.48767126", "0.48736545", "0.4870566", "0.48653862", "0.4859441", "0.4858145", "0.48578385", "0.48537272", "0.4851132", "0.48490474", "0.48480055", "0.48461974", "0.48441827", "0.48364857", "0.48364758", "0.48358715", "0.4834653", "0.48296183", "0.4824698", "0.48187652", "0.48146826", "0.48110512", "0.48110142", "0.48031148", "0.47990865", "0.4795903", "0.47952646", "0.47938275", "0.47901538" ]
0.4955459
63
Get the built lsmEngine
public LSMEngine<T> build() { return lsmEngine; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Engine getEngine(){\n Engine engine = null;\n try {\n engine = mapper.readValue(new File(Constants.ENGINE_FILE_PATH), Engine.class);\n } catch ( Exception e ) {\n e.printStackTrace();\n }\n return engine;\n }", "private TracingEngine getEngine() {\n try {\n return engine.get(\"\", reloadEngine());\n } catch (final ExecutionException e) {\n return new NoopTracingEngine();\n }\n }", "public static GameEngine getInstance() {\n return INSTANCE;\n }", "public String getEngine() {\n return this.engine;\n }", "public CheckEngineLight build() {\r\n return checkEngineLight;\r\n }", "public static Engine getInstance() {\n if (engineInstance == null) {\n synchronized (Engine.class) {\n if (engineInstance == null) {\n engineInstance = new Engine();\n }\n }\n }\n return engineInstance;\n }", "public Engine getEngine() {\n return engine;\n }", "public GameEngine getEngine() {\n\t\treturn engine;\n\t}", "public static EngineBuilderFactory getInstance() {\n if (instance == null) {\n instance = new EngineBuilderFactory();\n }\n\n return instance;\n }", "public static synchronized Engine resetEngine() {\n if (engineInstance != null) {\n engineInstance = new Engine();\n }\n return engineInstance;\n }", "public static GameManager getInstance() {\n return ourInstance;\n }", "public static Arm getInstance() {\n if (instance == null) {\n instance = new Arm();\n }\n return instance;\n }", "@Override\n\tpublic Engine onLoadEngine() {\n\t\tthis.mCamera = new Camera(0, 0, CAMERA_WIDTH, CAMERA_HEIGHT);\n\t\treturn new Engine(new EngineOptions(true, ScreenOrientation.LANDSCAPE, new RatioResolutionPolicy(CAMERA_WIDTH, CAMERA_HEIGHT), this.mCamera));\n\t}", "public static Engine getEngineInstance(String from, String to)\r\n\t\t\tthrows InitializeException {\r\n\t\tif (engineInstance == null) {\r\n\t\t\tEngineContext context = new EngineContext();\r\n\t\t\tProperties prop = loadConfig();\r\n\t\t\tcontext.config(prop);\r\n\t\t\tcontext.init(from, to);\r\n\t\t\tengineInstance = new Engine(context);\r\n\t\t}\r\n\t\treturn engineInstance;\r\n\t}", "public static NativeLibraryLoader getInstance() {\n return instance;\n }", "public TemplateEngine getEngine( String name );", "private WrappedEngine() {\n logger = new ONDEXCoreLogger();\n addONDEXListener(logger);\n pluginLogger = new ONDEXPluginLogger();\n EnvironmentVariable ev = new EnvironmentVariable(\"ONDEX VAR=\" + Config.ondexDir);\n ev.setLog4jLevel(Level.INFO);\n fireEventOccurred(ev);\n }", "@Override\n public void initEngine() {\n \n }", "@Override\n public void initEngine() {\n \n }", "public static PhysicsEngine getInstance() {\n if (instance == null) {\n instance = new PhysicsEngine();\n }\n return instance;\n }", "public CheckEngineLightBuilder() {\r\n checkEngineLight = new CheckEngineLight();\r\n }", "public static EngineFactory m10435a() {\n if (f10220a == null) {\n synchronized (EngineFactory.class) {\n if (f10220a == null) {\n f10220a = new EngineFactory();\n }\n }\n }\n return f10220a;\n }", "public Engine getEngine_test() {\n\t\treturn engine;\n\t}", "public static synchronized final MaxModule getModule() {\n if (sModule == null) {\n sModule = new MMXModule();\n }\n return sModule;\n }", "public static IXccdfEngine createEngine(IPlugin plugin) {\r\n \treturn new OEMEngine(plugin, SystemEnumeration.ANY);\r\n }", "public SVB getSVBEngine() {\n return SVBEngine;\n }", "public static Multivalent getInstance() {\n\tif (instance_==null) {\n\t\tif (standalone_) System.out.println(\"VERSION = \"+VERSION);\n\n\t\tcl_ = new URLClassLoader(findJARs());\n\n\t\tinstance_ = new Multivalent(); // loaded with different ClassLoader than behaviors and layers\n\t\t//try { instance_ = (Multivalent)cl_.loadClass(\"multivalent.Multivalent\"/*Multivalent.class.getName()*/).newInstance(); } catch (Exception canthappen) { System.err.println(canthappen); }\n\t\t//assert cl_ == instance_.getClass().getClassLoader(): cl_+\" vs \"+instance_.getClass().getClassLoader();\n\t\t//System.out.println(\"Multivalent.class class loader = \"+instance_.getClass().getClassLoader());\n\n\t\tinstance_.readTables();\n\t}\n\treturn instance_;\n }", "public static ProcessEngine getProcessEngine(String processEngineName) {\n if (!isInitialized()) {\n init();\n }\n return processEngines.get(processEngineName);\n }", "@Override\n\tpublic Engine onLoadEngine(){\n\t\tmEngine=new Engine(new EngineOptions(true, ScreenOrientation.PORTRAIT, new FillResolutionPolicy(), new Camera(0, 0, MoveBackground.WIDTH, MoveBackground.height)));\n\t\treturn mEngine;\n\t}", "public String getEngineName() {\n return engineName;\n }", "public static IXccdfEngine createEngine(IPlugin plugin, SystemEnumeration... systems) {\r\n \treturn new OEMEngine(plugin, systems);\r\n }", "public DcModule getModule();", "SwmlFactory getSwmlFactory();", "public Engine build() {\n this.extensions.add(new CoreExtension());\n \n // load extensions\n this.extensions.forEach(extension -> {\n this.renderers.putAll(extension.getRenderers());\n this.directives.putAll(extension.getDirectives());\n this.nodeParsers.putAll(extension.getNodeParsers());\n this.filters.putAll(extension.getFilters());\n this.tests.putAll(extension.getTests());\n this.unaryOperators.putAll(extension.getUnaryOperators());\n this.binaryOperators.putAll(extension.getBinaryOperators());\n this.factories.addAll(extension.getNodeVisitorFactories());\n this.safeNodes.addAll(extension.getSafeNodes());\n });\n \n // create an operator token parser\n TokenParser unaryOperatorParser = TokenParser.in(TokenType.OPERATOR, this.unaryOperators.keySet().toArray(new String[]{}));\n TokenParser binaryOperatorParser = TokenParser.in(TokenType.OPERATOR, this.binaryOperators.keySet().toArray(new String[]{}));\n TokenParser operatorParser = unaryOperatorParser.or(binaryOperatorParser);\n \n // create a execute token parser\n TokenParser executeOpenParser = TokenParser.from(TokenType.EXECUTE_OPEN, compile(quote(this.executeOpen)), false);\n TokenParser executeCloseParser = TokenParser.from(TokenType.EXECUTE_CLOSE, compile(quote(this.executeClose)), false);\n TokenParser executeParser = executeOpenParser.then(NAME).then(operatorParser.or(EXPRESSION).until(executeCloseParser));\n this.starts.add(this.executeOpen);\n \n // create a print token parser\n TokenParser printOpenParser = TokenParser.from(TokenType.PRINT_OPEN, compile(quote(this.printOpen)), false);\n TokenParser printCloseParser = TokenParser.from(TokenType.PRINT_CLOSE, compile(quote(this.printClose)), false);\n TokenParser printParser = printOpenParser.then(operatorParser.or(EXPRESSION).until(printCloseParser));\n this.starts.add(this.printOpen);\n \n // create a comment token parser\n TokenParser commentOpenParser = TokenParser.from(TokenType.COMMENT_OPEN, compile(quote(this.commentOpen)), false);\n TokenParser commentCloseParser = TokenParser.from(TokenType.COMMENT_CLOSE, compile(quote(this.commentClose)), false);\n TokenParser commentInner = TokenParser.until(TokenType.TEXT, this.commentClose);\n TokenParser commentParser = commentOpenParser.then(commentInner.optional()).then(commentCloseParser);\n this.starts.add(this.commentOpen);\n \n // create a text token parser\n TokenParser leadingText = TokenParser.until(TokenType.TEXT, this.starts);\n TokenParser text = TokenParser.from(TokenType.TEXT, Pattern.compile(\"^.*\", Pattern.DOTALL | Pattern.MULTILINE), false);\n \n TokenParser principal = commentParser.or(executeParser).or(printParser).or(leadingText).zeroOrMore().then(text.optional()).then(EOF);\n this.tokenizerBuilder.parser(principal);\n Tokenizer tokenizer = this.tokenizerBuilder.build();\n \n ExpressionParser expressionParser = new ExpressionParser(this.unaryOperators, this.binaryOperators);\n \n Engine engine = new Engine(this.environment, expressionParser,\n renderers, directives, nodeParsers, \n filters, tests, factories, safeNodes,\n tokenizer);\n return engine;\n }", "public static Light getInstance() {\n\treturn INSTANCE;\n }", "protected VaryGrammarRuntimeModule createRuntimeModule() {\n\t\treturn new VaryGrammarRuntimeModule() {\n\t\t\t@Override\n\t\t\tpublic ClassLoader bindClassLoaderToInstance() {\n\t\t\t\treturn VaryGrammarInjectorProvider.class\n\t\t\t\t\t\t.getClassLoader();\n\t\t\t}\n\t\t};\n\t}", "static OpenSamlImplementation getInstance() {\n\t\treturn instance;\n\t}", "protected WjrStoreLoader getStoreLoader() {\r\n\t\treturn WjrJUnitLogicFactory.getStoreLoader();\r\n\t}", "public ProgramModule getRootModule(String treeName);", "public static PipelineManager getInstance() {\n if (INSTANCE == null){\n synchronized(PipelineManager.class) {\n if(INSTANCE == null) {\n INSTANCE = new PipelineManager();\n }\n }\n }\n return INSTANCE;\n }", "public Engine() {\n super(0,0,0,0,null, \"ENGINE\");\n }", "@Override\n protected int createProgram(Context context) {\n return PGLNativeIpl.loadLipsHighLightProgram();\n }", "protected PlayLangRuntimeModule createRuntimeModule() {\n\t\treturn new PlayLangRuntimeModule() {\n\t\t\t@Override\n\t\t\tpublic ClassLoader bindClassLoaderToInstance() {\n\t\t\t\treturn PlayLangInjectorProvider.class\n\t\t\t\t\t\t.getClassLoader();\n\t\t\t}\n\t\t};\n\t}", "public EngineConfig getEngineConfig()\n\t{\n\t\treturn config;\n\t}", "public static GameManager getInstance() { \n \t\tif (instance == null){\n \t\t\tinstance = new GameManager (); \n \t\t}\n \t\treturn instance;\n \t}", "Module module() {\n return module;\n }", "public static ISoftwareArchitectureProductLineSynthesis getSAPLCreatorByName(String name) {\n\t\tIConfigurationElement[] adapterExtensionPoints = Platform.getExtensionRegistry()\n\t\t\t\t.getConfigurationElementsFor(SAPLRE_EXTENSIONPOINT);\n\t\tfor (IConfigurationElement saplaCreatorExtensionPoint : adapterExtensionPoints) {\n\t\t\tif (saplaCreatorExtensionPoint.getAttribute(\"name\").equals(name)) {\n\t\t\t\ttry {\n\t\t\t\t\treturn (ISoftwareArchitectureProductLineSynthesis) saplaCreatorExtensionPoint.createExecutableExtension(\"class\");\n\t\t\t\t} catch (CoreException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public String getEngineVersion() {\n return this.engineVersion;\n }", "public ProgramModule getModule(String treeName, String name);", "protected EV3DevPlatform getPlatform() {\n\n //TODO Duplicated code\n final String BATTERY = \"/power_supply\";\n final String BATTERY_PATH = ROOT_PATH + BATTERY;\n final String BATTERY_EV3 = \"legoev3-battery\";\n final String BATTERY_PISTORMS = \"pistorms-battery\";\n final String BATTERY_BRICKPI = \"brickpi-battery\";\n final String BATTERY_BRICKPI3 = \"brickpi3-battery\";\n final String EV3BRICK_DISCOVERY_PATTERN_PATH = BATTERY_PATH + \"/\" + BATTERY_EV3;\n final String PISTORMS_DISCOVERY_PATTERN_PATH = BATTERY_PATH + \"/\" + BATTERY_PISTORMS;\n final String BRICKPI_DISCOVERY_PATTERN_PATH = BATTERY_PATH + \"/\" + BATTERY_BRICKPI;\n final String BRICKPI3_DISCOVERY_PATTERN_PATH = BATTERY_PATH + \"/\" + BATTERY_BRICKPI3;\n\n if(Sysfs.existPath(EV3BRICK_DISCOVERY_PATTERN_PATH)){\n if(log.isTraceEnabled())\n log.trace(EV3BRICK_DISCOVERY_PATTERN_PATH);\n log.trace(\"Detected platform: \" + EV3DevPlatform.EV3BRICK);\n return EV3DevPlatform.EV3BRICK;\n } else if(Sysfs.existPath(PISTORMS_DISCOVERY_PATTERN_PATH)){\n if(log.isTraceEnabled())\n log.trace(PISTORMS_DISCOVERY_PATTERN_PATH);\n log.trace(\"Detected platform: \" + EV3DevPlatform.PISTORMS);\n return EV3DevPlatform.PISTORMS;\n } else if(Sysfs.existPath(BRICKPI_DISCOVERY_PATTERN_PATH)){\n if(log.isTraceEnabled())\n log.trace(BRICKPI_DISCOVERY_PATTERN_PATH);\n log.trace(\"Detected platform: \" + EV3DevPlatform.BRICKPI);\n return EV3DevPlatform.BRICKPI;\n } else if(Sysfs.existPath(BRICKPI3_DISCOVERY_PATTERN_PATH)){\n if(log.isTraceEnabled())\n log.trace(BRICKPI3_DISCOVERY_PATTERN_PATH);\n log.trace(\"Detected platform: \" + EV3DevPlatform.BRICKPI3);\n return EV3DevPlatform.BRICKPI3;\n } else {\n final String OS_NAME = System.getProperty(\"os.name\");\n final String OS_VERSION = System.getProperty(\"os.version\");\n final String message = \"Platform not supported: \" + OS_NAME + \" \" + OS_VERSION;\n log.error(message);\n throw new RuntimeException(message);\n }\n }", "public ProgramModule getRootModule(long treeID);", "public static ComModule getInstance() {\n\t\ttry {\n\t\t\tClass<?> moduleClass = Class.forName(Constants.MODULE_CLASSNAME);\n\t\t\tMethod getinst = moduleClass.getDeclaredMethod(\"getInstance\");\n\t\t\treturn (ComModule) getinst.invoke(null);\n\t\t} catch (Throwable e) {\n\t\t\tthrow new IllegalStateException(e);\n\t\t}\n\t}", "public String getEngineVersion() {\n return this.EngineVersion;\n }", "public synchronized static GameManager getInstance() {\n if (null == gameManager) {\n gameManager = new GameManager();\n }\n return gameManager;\n }", "public String getEngineId()\n {\n return engineId;\n }", "Object getPlatform();", "public static GameLevelManager getInstance() {\n\t\tif (null == mGameLevelManager) {\n\t\t\tmGameLevelManager = new GameLevelManager();\n\t\t}\n\t\treturn mGameLevelManager;\n\t}", "public static LevelInstanceManager getLevelManager(World world) {\n\n IWorldInstanceManager wim = EphemeralWorlds.LEVEL_DATA.get(world.getLevelProperties());\n\n return (LevelInstanceManager)wim;\n }", "public static JavaLang getInstance()\n\t{\n\t\treturn inst;\n\t}", "public RubyModule getModule(String name) {\n return (RubyModule) objectClass.getConstantAt(name);\n }", "@Override\n\t\tpublic Engine onLoadEngine() {\n\t\t\tToast.makeText(this, \"Touch the screen to add objects.\", Toast.LENGTH_LONG).show();\n\t\t\tfinal Camera camera = new Camera(0, 0, CAMERA_WIDTH, CAMERA_HEIGHT);\n\t\t\tfinal EngineOptions engineOptions = new EngineOptions(true, ScreenOrientation.LANDSCAPE, new RatioResolutionPolicy(CAMERA_WIDTH, CAMERA_HEIGHT), camera);\n\t\t\tengineOptions.getTouchOptions().setRunOnUpdateThread(true);\n\t\t\treturn new Engine(engineOptions);\n\t\t}", "Analytics_Engine createAnalytics_Engine();", "EnvironmentmmFactory getEnvironmentmmFactory();", "public Engine toEngine(SbiEngines hibEngine){\r\n\t\tEngine eng = new Engine();\r\n\t\teng.setCriptable(new Integer(hibEngine.getEncrypt().intValue()));\r\n\t\teng.setDescription(hibEngine.getDescr());\r\n\t\teng.setDirUpload(hibEngine.getObjUplDir());\r\n\t\teng.setDirUsable(hibEngine.getObjUseDir());\r\n\t\teng.setDriverName(hibEngine.getDriverNm());\r\n\t\teng.setId(hibEngine.getEngineId());\r\n\t\teng.setName(hibEngine.getName());\r\n\t\teng.setLabel(hibEngine.getLabel());\r\n\t\teng.setSecondaryUrl(hibEngine.getSecnUrl());\r\n\t\teng.setUrl(hibEngine.getMainUrl());\r\n\t\teng.setLabel(hibEngine.getLabel());\r\n\t\treturn eng;\r\n\t}", "public static LanguageModel load() throws Exception {\n try {\n if (lm_ == null) {\n FileInputStream fiA = new FileInputStream(Config.languageModelFile);\n ObjectInputStream oisA = new ObjectInputStream(fiA);\n lm_ = (LanguageModel) oisA.readObject();\n }\n } catch (Exception e) {\n throw new Exception(\"Unable to load language model. You may not have run buildmodels.sh!\");\n }\n return lm_;\n }", "public MetadataModule getPhysicalModule() {\n\t\treturn attributes.getModule();\n\t}", "@Override\n\tpublic Engine onLoadEngine() {\n\t\tToast.makeText(this, \"You move my sprite right round, right round...\", Toast.LENGTH_LONG).show();\n\t\tthis.mCamera = new Camera(0, 0, CAMERA_WIDTH, CAMERA_HEIGHT);\n\t\treturn new Engine(new EngineOptions(true, ScreenOrientation.LANDSCAPE, new RatioResolutionPolicy(CAMERA_WIDTH, CAMERA_HEIGHT), this.mCamera));\n\t}", "public String getDatabaseEngine() {\n return this.databaseEngine;\n }", "public static SDLMod getModState() {\n\tint modstate = SWIG_SDLEvent.SDL_GetModState();\n\treturn SDLMod.get(modstate);\n }", "public static final ReasonerFrontend getInstance() {\r\n return INSTANCE;\r\n }", "private IEngineExecutor m10437c() {\n return m10434a(new OfflineSynthesizer());\n }", "StartedModule<?> getComponent(UUID id);", "public EngineSwitch() {\n\t\tif (modelPackage == null) {\n\t\t\tmodelPackage = EnginePackage.eINSTANCE;\n\t\t}\n\t}", "public static SolarSystem load() {\n\t\treturn null;\n\t}", "ModuleAssembly module( String name );", "public Game getNewInstance() {\n try {\n return classObj.newInstance();\n } catch (Exception e) {\n e.printStackTrace();\n throw new RuntimeException(\"Error generating \" + this + \" game\");\n }\n }", "public EngineClass clone()\n {\n EngineClass cloneEngineClass = new EngineClass( this );\n return cloneEngineClass;\n }", "GameConfiguration getGameConfiguration();", "private IEngineExecutor m10436b() {\n return m10434a(new OnlineSynthesizer());\n }", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/include/llvm/IR/Module.h\", line = 241,\n FQN=\"llvm::Module::getModuleInlineAsm\", NM=\"_ZNK4llvm6Module18getModuleInlineAsmEv\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/AsmWriter.cpp -nm=_ZNK4llvm6Module18getModuleInlineAsmEv\")\n //</editor-fold>\n public /*const*/std.string/*&*/ getModuleInlineAsm() /*const*/ {\n return GlobalScopeAsm;\n }", "public static synchronized EngagementAgent getInstance(Context context)\n {\n /* Always check this even if we instantiate once to trigger null pointer in all cases */\n if (sInstance == null)\n sInstance = new EngagementAgent(context.getApplicationContext());\n return sInstance;\n }", "protected Program getProgram() {\n final Holder<Program> holder = Holder.of( null );\n Hook.PROGRAM.run( holder );\n if ( holder.get() != null ) {\n return holder.get();\n }\n\n return Programs.standard();\n }", "public Object ae() {\n try {\n return this.ad.newInstance();\n } catch (IllegalAccessException | InstantiationException e) {\n throw new RuntimeException();\n }\n }", "public static Algorithm get() {\n \t\treturn currentAlgorithmStack.get().peek();\n \t}", "private Engine() {\n\n }", "public static GameManager getInstance() {\n if (GameManager.instance == null) {\n GameManager.instance = new GameManager();\n }\n return GameManager.instance;\n }", "private Jenkins getJenkinsInstance() {\n\n if (Jenkins.getInstance() != null) {\n return Jenkins.getInstance();\n } else {\n throw new RuntimeException(\"Jenkins instance not yet initialized\");\n }\n }", "public String getEngineQualifiedName()\n {\n return engineQualifiedName;\n }", "public static EglBase create() {\n return create(null /* shaderContext */, CONFIG_PLAIN);\n }", "public static LanguageModel load() throws Exception {\n\t\ttry {\n\t\t\tif (lm_==null){\n\t\t\t\tFileInputStream fiA = new FileInputStream(Config.languageModelFile);\n\t\t\t\tObjectInputStream oisA = new ObjectInputStream(fiA);\n\t\t\t\tlm_ = (LanguageModel) oisA.readObject();\n\t\t\t}\n\t\t} catch (Exception e){\n\t\t\tthrow new Exception(\"Unable to load language model. You may have not run build corrector\");\n\t\t}\n\t\treturn lm_;\n\t}", "public AppEngineDataStoreFactory build() {\n return new AppEngineDataStoreFactory(this);\n }", "Module getModule(ModuleCode modCode) throws CommandException;", "public static VideoChunkProviderFactory getInstance()\r\n {\r\n return ourInstance;\r\n }", "public static ToolRegistery getInstance(){\n\t\treturn InstanceKeeper.instance;\n\t}", "Lighter build();", "public OAuth2Manager get() {\n OAuth2Manager a = this.f30636a.mo34992a((C11818g) this.f30637b.get(), (C11766a) this.f30638c.get(), (C13325v) this.f30639d.get(), (C11125d) this.f30640e.get(), C12020b.m31668a(this.f30641f), (C11791e) this.f30642g.get(), C12020b.m31668a(this.f30643h));\n C12021c.m31671a(a, \"Cannot return null from a non-@Nullable @Provides method\");\n return a;\n }", "public Connect4GameLogic getLoadGame(){\n return m_Connect4GameLogic;\n }", "public ESEngine addESEngine() {\n\t\treturn new ESUFOEngine(); // Specific to regular UFO\n\t}", "public boolean isEngineOn();", "public Module build() {\n return new Module(moduleCode, moduleTitle, academicYear, semester,\n students, tags);\n }" ]
[ "0.6421494", "0.63402116", "0.5961244", "0.5836788", "0.581268", "0.58105034", "0.5737963", "0.5720729", "0.57174695", "0.54588026", "0.5253237", "0.52394736", "0.5207137", "0.52060866", "0.5200341", "0.5115114", "0.507465", "0.50648564", "0.50648564", "0.5057413", "0.50464326", "0.5044779", "0.50227475", "0.49891558", "0.49885", "0.49876487", "0.49845654", "0.49841696", "0.49824098", "0.49820796", "0.49713457", "0.49459708", "0.49288157", "0.49173746", "0.49095407", "0.49091914", "0.490582", "0.49049622", "0.4900256", "0.4887564", "0.48780316", "0.48652232", "0.4863937", "0.48585388", "0.48493654", "0.48419082", "0.48354143", "0.48240167", "0.48016647", "0.4788968", "0.47842082", "0.4780554", "0.4773578", "0.47684032", "0.4767132", "0.47588295", "0.47443336", "0.47428825", "0.47379965", "0.4735525", "0.47298467", "0.4726844", "0.47244963", "0.47234598", "0.47106907", "0.470682", "0.4689596", "0.46835667", "0.46824554", "0.4676592", "0.46695486", "0.46692884", "0.46682575", "0.46655655", "0.46636996", "0.4663099", "0.46629596", "0.46626142", "0.46616635", "0.4659558", "0.46538472", "0.46535853", "0.46516523", "0.4651089", "0.46496964", "0.46436462", "0.46318454", "0.46288487", "0.46277887", "0.46257576", "0.46118608", "0.46111944", "0.46100247", "0.46005732", "0.45998618", "0.45936114", "0.4592562", "0.4592437", "0.45886433", "0.4582959" ]
0.7712788
0
generate level processors Chain
private <R extends IRequest, C extends RequestContext> LevelProcessorChain<T, R, C> generateLevelProcessorsChain( List<String> levelProcessorClassNames) { LevelProcessorChain<T, R, C> levelProcessChain = new LevelProcessorChain<>(); try { if (levelProcessorClassNames.size() > 0) { ILevelProcessor iLevelProcess = levelProcessChain.nextLevel(generateLevelProcessor(levelProcessorClassNames.get(0))); for (int i = 1; i < levelProcessorClassNames.size(); i++) { iLevelProcess = iLevelProcess.nextLevel(generateLevelProcessor(levelProcessorClassNames.get(i))); } } } catch (Exception e) { logger.error(e.getMessage()); } return levelProcessChain; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private LSMEngineBuilder<T> buildLevelProcessors(ApplicationContext applicationContext) {\n LevelProcessorChain<T, IInsertionRequest, InsertRequestContext> insertionLevelProcessChain =\n generateLevelProcessorsChain(applicationContext.getInsertionLevelProcessClass());\n LevelProcessorChain<T, IDeletionRequest, DeleteRequestContext> deletionLevelProcessChain =\n generateLevelProcessorsChain(applicationContext.getDeletionLevelProcessClass());\n LevelProcessorChain<T, IQueryRequest, QueryRequestContext> queryLevelProcessChain =\n generateLevelProcessorsChain(applicationContext.getQueryLevelProcessClass());\n return buildQueryManager(queryLevelProcessChain)\n .buildInsertionManager(insertionLevelProcessChain)\n .buildDeletionManager(deletionLevelProcessChain);\n }", "private LSMEngineBuilder<T> buildLevelProcessors(String packageName) {\n try {\n ApplicationContext property =\n ApplicationContextGenerator.GeneratePropertyWithAnnotation(packageName);\n buildLevelProcessors(property);\n } catch (Exception e) {\n logger.error(e.getMessage());\n }\n return this;\n }", "Chain createChain();", "public void getJobMixAndMakeProcesses(){\n if(jobType == 1){\n //type 1: there is only one process, with A=1 and B=C=0\n //since there is only one process, no the currentWord is 111%processSize\n processes.add(new process(1, 1, 0, 0, 111 % processSize));\n\n }else if(jobType ==2){\n //type 2: there are four processes, each with A=1, B=C=0\n for(int i=1; i<5; i++){\n processes.add(new process(i, 1, 0, 0, (111*i) % processSize));\n }\n\n\n }else if(jobType ==3){\n //type 3: there are four processes, each with A=B=C=0\n for(int i=1; i<5; i++){\n processes.add(new process(i,0, 0, 0, (111*i) % processSize));\n }\n\n }else{\n System.out.println(\"job type 4!!\");\n //process 1 with A=0.75, B=0.25, C=0\n processes.add(new process(1, 0.75, 0.25, 0, (111) % processSize));\n //process 2 with A=0.75, B= 0, C=0.25\n processes.add(new process(2, 0.75, 0, 0.25, (111*2) % processSize));\n //process 3 with A=0.75, B=0.125, C=0.125\n processes.add(new process(3, 0.75, 0.125, 0.125, (111*3) % processSize));\n //process 4 with A=0.5, B=0.125, C=0.125\n processes.add(new process(4, 0.5, 0.125, 0.125, (111*4) % processSize));\n\n }\n\n }", "private static Handler buildChain() {\n Handler ForAbroad = new ForAbroad();\n\n //chain.XmlHandler is the successor of chain.Mp3Handler.\n Handler ForCountry = new ForCountry(ForAbroad);\n\n return new ForCity(ForCountry);\n }", "private void iterateLandProducers(){\n landPrimaryProducerManager.produceAll();\n\n for(Map.Entry<Sector, SecondaryProducer> v : landSecondaryProducerManager.getManagerMap().entrySet()){\n resourceManager.addProducerResourceVisitor(v.getValue(), v.getKey());\n }\n landSecondaryProducerManager.produceAll();\n }", "Chain getChain();", "public void generatePopulation() {\n\t\t\n\t\tif (SCType.getScLayers() <= 2)\n\t\t\tLogger.logError(\"To few supply chain layers, minimum of 3 required:\" + SCType.getScLayers());\n\t\t\n\t\tArrayList<CountryAgent> countryAgents = SU.getObjectsAll(CountryAgent.class);\t\t\n\t\tfor (CountryAgent country : countryAgents) {\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.PRODUCER)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_PRODUCERS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.PRODUCER);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.INTERNATIONAL)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_INTERNATIONALS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.INTERNATIONAL);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.WHOLESALER)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_WHOLESALERS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.WHOLESALER);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.RETAIL)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_RETAILERS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.RETAIL);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (country.containsSCType(SCType.CONSUMER)) {\n\t\t\t\tfor (int i = 0; i < Constants.N_CONSUMERS; i++) {\n\t\t\t\t\tcountry.spawnAgent(SCType.CONSUMER);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Set possible new suppliers and clients\n\t\tfor (BaseAgent agent : SU.getObjectsAll(BaseAgent.class)) {\n\t\t\tagent.setPossibleNewSuppliersAndClients();\n\t\t}\n\t\t\n\t\tSU.getDataCollector().addAllCurrentStock();\n\t}", "public void levelOrderTraversalBruteForce(){\n System.out.println(\"levelOrderTraversalBruteForce\");\n\n for(int level = 1; level <=height(); level++){\n printLevel(level);\n }\n System.out.println();\n }", "public static void main(String[] args) {\n levelOrderTraversal(Utils.buildTree(Arrays.asList(1, 2, 5, 3, 4, 6)));\n }", "NodeChain createNodeChain();", "@SuppressWarnings(\"rawtypes\")\n\tprivate void generatePipeModels(){\n\t\t//Pipe center model\n\t\tmodels().getBuilder(BLOCK_DIR + \"/pipe_center\")\n\t\t\t.element().from(5, 5, 5).to(11, 11, 11).allFaces((dir, face) -> face.texture(\"#side\")).end();\n\t\t\n\t\t//X+ facing pipe segment, to be rotated in blockstate json\n\t\tElementBuilder segmentBuilder = models().getBuilder(BLOCK_DIR + \"/pipe_segment\").texture(\"particle\", \"#side\")\n\t\t\t.element().from(5, 5, 11).to(11, 11, 16);\n\t\tfor(Direction dir : Direction.values()){ //TODO: This adds an extra face inside the center model\n\t\t\tif(dir.getAxis() == Direction.Axis.Z)continue;\n\t\t\tsegmentBuilder.face(dir).texture(\"#side\");\n\t\t}\n\t\t\n\t\t//Pipe inventory model\n\t\tmodels().withExistingParent(\"pipe_inventory\", BLOCK_DIR + \"/block\")\n\t\t\t.element().from(5, 0, 5).to(11, 16, 11).allFaces((dir, face) -> {\n\t\t\t\tface.texture(\"#side\");\n\t\t\t});\n\t}", "public void constructHierarchy(){\n\t\t// populate parents for the globally defined param specs\n\t\tfor (ListIterator<ParamSpec> iterator = m_paramSpecs.listIterator(m_paramSpecs.size()); iterator.hasPrevious();) {\n\t\t\tParamSpec ps = iterator.previous();\n\t\t\tpopulateParent(ps);\n\t\t}\n\t\t// populate values for the globally defined param specs\n\t\tfor (ListIterator<ParamSpec> iterator = m_paramSpecs.listIterator(m_paramSpecs.size()); iterator.hasPrevious();) {\n\t\t\tParamSpec ps = iterator.previous();\n\t\t\tps.lookupValues();\n\t\t}\n\t\t\n\t\t// populate parents for the command specs and their contained param specs\n\t\tfor (CommandSpec cs : m_commandSpecs){\n\t\t\tpopulateParent(cs);\n\t\t\tif (cs.getParamSpecs() != null){\n\t\t\t\tfor (ParamSpec ps : cs.getParamSpecs()){\n\t\t\t\t\tpopulateParent(ps);\n\t\t\t\t}\n\t\t\t\tfor (ParamSpec ps : cs.getParamSpecs()){\n\t\t\t\t\tps.lookupValues();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void compose() {\n for(Group group : inputGroupList){\n if(group.getGroups().size() > 0){\n LinkedList<Integer> upperGroups = group.getGroups();\n for(int i = 0; i < upperGroups.size(); i++){\n int id = upperGroups.get(i);\n Group upper = findById(id);\n upper.addChild(group);\n }\n } else{\n root.addChild(group);\n }\n }\n for(Address adr : inputAddressList){\n if(adr.getGroups().size() > 0){\n LinkedList<Integer> upperGroups = adr.getGroups();\n for(int i = 0; i < upperGroups.size(); i++){\n int id = upperGroups.get(i);\n Group upper = findById(id);\n upper.addChild(adr);\n adr.addParent(upper);\n }\n } else{\n root.addChild(adr);\n }\n }\n\n assert(root.getChildren().size() > 0);\n }", "@Override\n public void pipeStart() {\n // Recursively, start the pipeline steps' threads from back to front.\n if (nextPipeStep != null) {\n nextPipeStep.pipeStart();\n }\n // This is global to all encoders, so start all encoders' threads\n for (Encoder e: instances) {\n e.start(); \n }\n }", "void process(N origin, TreeNodeProcessor<N> processor);", "void genPromote(Collection ret, int from, int to, int bits) {\n\tfor (char i = KNIGHT; i <= QUEEN; ++i) {\n\tBouger g = new Bouger(from, to, i, (bits | 32), 'P');\n\tg.setScore(1000000 + (i * 10));\n\tret.add(g);\n\t}\n\t}", "public ProcessingPipeline buildPipeline(Environment environment)\n throws Exception {\n\n \t\tthis.setupConcreteProcessor(environment);\n\n \t\treturn this.concreteProcessor.buildPipeline(environment);\n }", "private Level produce() {\n\t\tint[][]grid = new int[row][column];\n\t\tArrayList<Point> goals = new ArrayList<Point>();\n\t\tint newRand = 0;\n\t\tfor (int x = 0; x < row; x++)\t{\n\t\t\tfor (int y = 0; y < column; y++)\t{\n\t\t\t\tnewRand = rand.nextInt(TOTAL);\n\t\t\t\tif (newRand < CAT_1)\t{\n\t\t\t\t\tgrid[x][y] = 1;\n\t\t\t\t} else if (newRand < CAT_2)\t{\n\t\t\t\t\tgrid[x][y] = 2;\n\t\t\t\t} else if (newRand < CAT_3)\t{\n\t\t\t\t\tgrid[x][y] = 3;\n\t\t\t\t} else if (newRand < CAT_4)\t{\n\t\t\t\t\tgrid[x][y] = 4;\n\t\t\t\t} else if (newRand < CAT_5)\t{\n\t\t\t\t\tgoals.add(new Point(x,y));\n\t\t\t\t} else if (newRand < TOTAL)\t{\n\t\t\t\t\tgrid[x][y] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn new Level(grid, row, column, goals);\n\t}", "public static void main(String[] args) {\n\t\tBinaryTree<Integer> root=BinaryTreeUse.takeInputLevelWise();\n\t\tint k=5;\n\t\tint level=level(root,0,k);\n\t\tSystem.out.println(parent.data);\n\t\tcousin(root, 0, level, k);\n\t}", "Collection<? extends Object> getNarratorChain();", "public static void main(final String[] args) {\n for (int i = 0; i < 3; i++) {\n System.out.println(\"Count: \" + level1(i));\n }\n }", "@Override\n\tpublic String visitProgram(ProgramContext ctx) {\n\t\tfor(int i=0; i< ctx.getChildCount();i++)\n\t\t visit(ctx.getChild(i));\n\t\treturn sb.toString();\n\t}", "private void updateHighLevelInfo() {\n\t\t// update activities mapping at high level petri net\n\t\tfor (HLActivity activity : process.getActivities()) {\n\t\t\t// update the choice node itself\n\t\t\tTransition transNode = (Transition) highLevelPN.findModelGraphVertexForActivity(activity.getID());\n\t\t\tColoredTransition transNsim = (ColoredTransition) this.findTransition(transNode);\n\t\t\thighLevelPN.replaceModelGraphVertexForActivity(transNode, transNsim);\n\t\t}\n\t\t// update choices mapping at high level petri net\n\t\tfor (HLChoice choice : process.getChoices()) {\n\t\t\t// update the choice node itself\n\t\t\tPlace choiceNode = (Place) highLevelPN.findModelGraphVertexForChoice(choice.getID());\n\t\t\tColoredPlace choiceNsim = (ColoredPlace) this.findPlace(choiceNode.getIdentifier());\n\t\t\thighLevelPN.replaceModelGraphVertexForChoice(choiceNode, choiceNsim);\n\t\t}\n\t\t// update the hlActivity links at the ColoredTransition\n\t\tIterator it = this.getTransitions().iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tColoredTransition simTrans = (ColoredTransition) it.next();\n\t\t\tHLActivity hlTrans = highLevelPN.findActivity(simTrans);\n\t\t\tsimTrans.setHighLevelTransition(hlTrans);\n\t\t}\n\t\t\n\t\t// Add the group for all resources to each transition and to the process\n\t\t// the group for all resources may only be attached to a transition in the case\n\t\t// that no group has been defined for that transition\n\t\tArrayList<HLID> allResourceIDs = new ArrayList<HLID>();\n\t\tIterator<HLResource> resourceIt = process.getResources().iterator();\n\t\twhile (resourceIt.hasNext()) {\n\t\t\tallResourceIDs.add(resourceIt.next().getID());\n\t\t}\n\t}", "private static void populateBlocks() {\n\n //TODO set sensors for each\n\n /* Path A */\n SW1A.setProceeding(new Block[]{SW2A, STA1Z, SW2B});\n SW1A.setPreceding(new Block[]{PTH5A});\n\n SW2A.setProceeding(new Block[]{LD1A});\n SW2A.setPreceding(new Block[]{SW1A});\n\n SW3A.setProceeding(new Block[]{SW4A});\n SW3A.setPreceding(new Block[]{LD1A});\n\n SW4A.setProceeding(new Block[]{PTH1A});\n SW4A.setPreceding(new Block[]{SW3A, STA1Z, SW3B});\n\n PTH1A.setProceeding(new Block[]{PTH2A});\n PTH1A.setPreceding(new Block[]{SW4A});\n\n PTH2A.setProceeding(new Block[]{PTH3A});\n PTH2A.setPreceding(new Block[]{PTH1A});\n\n PTH3A.setProceeding(new Block[]{PTH4A});\n PTH3A.setPreceding(new Block[]{PTH2A});\n\n PTH4A.setProceeding(new Block[]{PTH5A});\n PTH4A.setPreceding(new Block[]{PTH3A});\n\n PTH5A.setProceeding(new Block[]{SW1A});\n PTH5A.setPreceding(new Block[]{PTH4A});\n\n LD1A.setProceeding(new Block[]{SW3A});\n LD1A.setPreceding(new Block[]{SW2A});\n\n\n /* Station */\n STA1Z.setProceeding(new Block[]{SW4A});\n STA1Z.setPreceding(new Block[]{SW1A});\n\n\n /* Path B */\n //TODO path B items aren't in yet\n LD1B.setProceeding(new Block[]{SW3B});\n LD1B.setPreceding(new Block[]{SW2B});\n\n SW2B.setProceeding(new Block[]{LD1B});\n SW2B.setPreceding(new Block[]{SW1B});\n\n SW3B.setProceeding(new Block[]{SW4B});\n SW3B.setPreceding(new Block[]{LD1B});\n\n\n /* Maintenance Bay */\n //TODO maintenance bay items aren't in yet\n\n\n\n\n /* Set up array */\n blocksArray = new Block[] {}; //TODO fill\n }", "public static void main(String[] args) {\n\n\n\t\tArrayList<Node> N = new ArrayList<Node>();\n\t\t\n\t\t/*\n\t\t * ##### Encoding Model 2 ###### \n\t\t */\n\t\t\n\t\t\n\t\t/*\n\t\t * Encoding the privilege nodes\n\t\t */\n\t\tfor(int i=1; i<7; i++)\n\t\t{\n\t\t\tN.add(new Node(\"p\"+i, 1));\n\t\t}\n\t\t\n\t\t/*\n\t\t * Encoding the exploit nodes\t\t \n\t\t */\n\t\tfor(int i=1; i<8; i++)\n\t\t{\n\t\t\tN.add(new Node(\"e\"+i, 2));\n\t\t}\n\t\t\n\t\t/*\n\t\t * Encoding the child nodes\n\t\t */\n\t\tfor(int i=1; i<12; i++)\n\t\t{\n\t\t\tN.add(new Node(\"c\"+i, 0));\n\t\t}\n\t\t\n\t\t/*\n\t\t * Assigning the children and parent(s) for each node according to model 2\n\t\t */\n\t\t\n\t\tArrayList<Node> nil = new ArrayList<Node>();\n\t\t\n\t\tN.get(0).setParents(nil);\n\t\tN.get(0).addChild(N.get(6));\n\t\t\n\t\tN.get(6).addParent(N.get(0));\n\t\tN.get(6).addChild(N.get(1));\n\t\tN.get(6).addChild(N.get(13));\n\t\tN.get(6).addChild(N.get(14));\n\t\t\n\t\tN.get(1).addParent(N.get(6));\n\t\tN.get(1).addChild(N.get(7));\n\t\tN.get(1).addChild(N.get(8));\n\t\t\n\t\tN.get(7).addParent(N.get(1));\n\t\tN.get(7).addChild(N.get(15));\n\t\tN.get(7).addChild(N.get(2));\n\t\t\n\t\tN.get(2).addParent(N.get(7));\n\t\tN.get(2).addChild(N.get(10));\t\t\n\t\t\n\t\tN.get(8).addParent(N.get(1));\n\t\tN.get(8).addChild(N.get(16));\n\t\tN.get(8).addChild(N.get(3));\n\t\t\n\t\tN.get(3).addParent(N.get(8));\n\t\tN.get(3).addChild(N.get(9));\n\t\t\n\t\tN.get(10).addParent(N.get(2));\n\t\tN.get(10).addChild(N.get(5));\n\t\tN.get(10).addChild(N.get(19));\n\t\tN.get(10).addChild(N.get(20));\n\t\t\n\t\tN.get(9).addParent(N.get(3));\n\t\tN.get(9).addChild(N.get(4));\n\t\tN.get(9).addChild(N.get(17));\n\t\tN.get(9).addChild(N.get(18));\n\t\t\n\t\tN.get(4).addParent(N.get(9));\n\t\tN.get(4).addChild(N.get(12));\n\t\t\n\t\tN.get(5).addParent(N.get(10));\n\t\tN.get(5).addChild(N.get(11));\n\t\t\n\t\tN.get(12).addParent(N.get(4));\n\t\tN.get(12).addChild(N.get(22));\n\t\tN.get(12).addChild(N.get(23));\n\t\t\n\t\tN.get(11).addParent(N.get(5));\n\t\tN.get(11).addChild(N.get(21));\n\t\tN.get(11).addChild(N.get(23));\n\t\t\n\t\tN.get(13).addParent(N.get(6));\n\t\tN.get(14).addParent(N.get(6));\n\t\tN.get(15).addParent(N.get(7));\n\t\tN.get(16).addParent(N.get(8));\n\t\tN.get(17).addParent(N.get(9));\n\t\tN.get(18).addParent(N.get(9));\n\t\tN.get(19).addParent(N.get(10));\n\t\tN.get(20).addParent(N.get(10));\n\t\tN.get(21).addParent(N.get(11));\n\t\tN.get(22).addParent(N.get(12));\n\t\tN.get(23).addParent(N.get(11));\n\t\tN.get(23).addParent(N.get(12));\n\t\t\n\t\t\n\t\t/*\n\t\t * Encoding the C,I,A values for each node\n\t\t */\n\t\t\n\t\tN.get(0).setImpacts(4, 4, 4);\n\t\tN.get(1).setImpacts(1, 2, 3);\n\t\tN.get(2).setImpacts(2, 2, 1);\n\t\tN.get(3).setImpacts(1, 2, 1);\n\t\tN.get(4).setImpacts(1, 1, 1);\n\t\tN.get(5).setImpacts(3, 2, 3);\n\t\tN.get(13).setImpacts(3,3,3);\n\t\tN.get(14).setImpacts(3,3,3);\n\t\tN.get(15).setImpacts(3,3,3);\n\t\tN.get(16).setImpacts(3,3,3);\n\t\tN.get(17).setImpacts(3,3,3);\n\t\tN.get(18).setImpacts(3,3,3);\n\t\tN.get(19).setImpacts(3,3,3);\n\t\tN.get(20).setImpacts(3,3,3);\n\t\tN.get(21).setImpacts(3,3,3);\n\t\tN.get(22).setImpacts(3,3,3);\n\t\tN.get(23).setImpacts(2,2,1);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t/*\n\t\t * This block helps see the setup of the whole tree. \n\t\t * Comment out if not required to see the parent children relationship of each node.\n\t\t */\n\t\t\n\t\tfor(int i=0; i<24; i++)\n\t\t{\n\t\t\tSystem.out.println(\"\\n\\n\" + N.get(i).getName() + \" < C=\" + N.get(i).getImpactC() + \", I=\" + N.get(i).getImpactI() + \", A=\" + N.get(i).getImpactA() + \" >\" );\n\t\t\tSystem.out.println(\"Parents: \");\n\t\t\tfor(int j=0; j<N.get(i).getParents().size(); j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(N.get(i).getParents().get(j).getName() + \" \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\\nChildren: \");\n\t\t\tfor(int k=0; k<N.get(i).getChildren().size(); k++)\n\t\t\t{\n\t\t\t\tSystem.out.print(N.get(i).getChildren().get(k).getName() + \" \");\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t/*\n\t\t * Calling the method which will perform the C,I,A impact analysis \n\t\t */\n\t\t\n\t\t//Node n = new Node(); //Commented out as extended Main to Node and declared impactAnalysis() as static \n\t\t\n\t\tImpactAnalyzer ia = new ImpactAnalyzer();\n\t\tia.analyze(2, 2, 1, N);\n\t\t\n\t\t\n\t\t\n\t}", "private void buildHierarchy(MocaTraceType aTraceType) {\n\t\tlogger.debug(aTraceType.toString());\n\n\t\tfor (List<EventProducer> groupOfProducers : consecutiveProducers\n\t\t\t\t.get(aTraceType)) {\n\t\t\t// If only one EP in the group\n\t\t\tif (groupOfProducers.size() == 1) {\n\t\t\t\tif (trimLoneEventProducers) {\n\t\t\t\t\t// Ignore it\n\t\t\t\t\tignoredEventProd.get(aTraceType).add(Long.valueOf(groupOfProducers.get(0).getName()));\n\t\t\t\t\tcontinue;\n\t\t\t\t} else {\n\t\t\t\t\tif(IsVirtualAddressing(aTraceType) && trimOutOfStructs &&\n\t\t\t\t\t\t\t!groupOfProducers.get(0).getName().matches(\"^\\\\d+$\") )\n\t\t\t\t\t\t\tcontinue; //Trim Out of Structs\n\t\t\t\t\t// Just add it to the list\n\t\t\t\t\tallProducers.get(aTraceType).addAll(groupOfProducers);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Expand hierarchy\n\t\t\t\tint dividingFactor = findDividingFactor(groupOfProducers);\n\t\t\t\tif (dividingFactor > 0) {\n\t\t\t\t\tallProducers.get(aTraceType).addAll(\n\t\t\t\t\t\t\tcreateHierarchy(groupOfProducers, 0.0,\n\t\t\t\t\t\t\t\t\troot.get(aTraceType).getId(),\n\t\t\t\t\t\t\t\t\tdividingFactor));\n\t\t\t\t} else {\n\t\t\t\t\tallProducers.get(aTraceType).addAll(groupOfProducers);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Build Index\n\t\tfor (EventProducer aProd : allProducers.get(aTraceType)) {\n\t\t\tproducersIndex.get(aTraceType).put(aProd.getName(), aProd);\n\t\t}\n\n\t}", "private static void buildHierarchicalGraphs() {\n \tLOG.info(\"Begin building of hierarchical graph for each user.\");\n \t\n \tDBUtil.open();\n \t\n \t// Create a reader for users\n \tLOG.debug(\"Create a UserReader.\");\n \tUserReader userReader = (UserReader) ReaderFactory.instance().getUserReader();\n\n\t\t// Create the processor to test\n \tLOG.debug(\"Create HierarchicalGraphProcessor.\");\n\t\tHierarchicalGraphProcessor hgProc = new HierarchicalGraphProcessor();\n\t\t\n\t\t// Setup the reader\n\t\tuserReader.setProcessor(hgProc);\n\t\tuserReader.attach(hgProc, Interests.UserFinished);\n\t\t\n\t\t// Read the user resources to process\n\t\tLOG.debug(\"Read users out of the database with a minimum of {} and a maximum of {} points.\", userReader.getMinUserPoints(), userReader.getMaxUserPoints());\n\t\tuserReader.read();\n \t\n \tLOG.info(\"Finished building of hierarchical graphs.\");\n }", "@Override\n public Map flowControl() throws Exception {\n ELKAopLogger.logStr(\"this is phone user\");\n\n // 拼装产品节点\n preProductInfo();\n\n // 拼装ext节点-tradeRelation\n preExt();\n\n // 拼装base\n preBase();\n\n // 拼装其他产品节点\n preTradeOther();\n\n // 调预提交\n callPreSub();\n\n return null;\n }", "@Test\r\n\tvoid mapLMethod() {\r\n\t\tMap<String, List<TransactionBean>> postsPerType = transactions.stream()\r\n .collect(Collectors.groupingBy(TransactionBean::getValue));\r\n\t\tSystem.out.println(ToStringBuilder.reflectionToString(postsPerType, new MultilineRecursiveToStringStyle()));\r\n\r\n\t}", "private SBomCombiner()\n\t{}", "private void buildGraph() {\n\t\tfor (Map<String, Channel> map: this.channels.values()) {\n\t\t\t// Add all channels\n\t\t\t\n\t\t\t// TODO: deal with channels spread over multiple redis instances (replicated)\n\t\t\t\n\t\t\t// Add all but ignore if some channels should be ignored\n\t\t\tfor (Map.Entry<String, Channel> entry: map.entrySet()) {\n\t\t\t\tif (IGNORE_UNICAST_AND_SUBSCRIBE) {\n\t\t\t\t\tif (entry.getKey().startsWith(\"unicast\") == false && entry.getKey().startsWith(\"sub\") == false) {\n\t\t\t\t\t\tif (entry.getKey().startsWith(\"tile\")) {\n\t\t\t\t\t\t\tchannelList.add(entry.getValue());\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tchannelList.add(entry.getValue());\n\t\t\t\t}\n\t\t\t}\n\t\t\t//channelList.addAll(map.values());\n\t\t}\n\t\t\n\t\t// Double-iteration to build pairs\n\t\tfor (Channel channel1: channelList) {\n\t\t\tfor (Channel channel2: channelList) {\n\t\t\t\tif (channel1 != channel2) {\n\t\t\t\t\t// Put channels as nodes in the set\n\t\t\t\t\tthis.nodes.add(channel1.getChannelName());\n\t\t\t\t\tthis.nodes.add(channel2.getChannelName());\n\t\t\t\t\t\n\t\t\t\t\t// Build pair\n\t\t\t\t\tChannelPair pair = new ChannelPair(channel1.getChannelName(), channel2.getChannelName());\n\t\t\t\t\t\n\t\t\t\t\t// Check if it is contained in the map\n\t\t\t\t\tif (this.pairMultiplicity.containsKey(pair) == false) {\n\t\t\t\t\t\t// Count common subscribers\n\t\t\t\t\t\tint commonSubscribers = countCommonSubscribers(channel1, channel2);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (commonSubscribers > 0) {\n\t\t\t\t\t\t\t// Perform computation and add it\n\t\t\t\t\t\t\tthis.pairMultiplicity.put(pair, commonSubscribers);\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}\n\t}", "public static List<Pipeline> createDefaultPipelines() {\n //Pipeline 1\n IPCondition ipCondition = new IPCondition(PolicyConstants.IP_RANGE_TYPE);\n ipCondition.setStartingIP(\"192.168.12.3\");\n ipCondition.setEndingIP(\"192.168.88.19\");\n IPCondition ipConditionSpecific = new IPCondition(PolicyConstants.IP_SPECIFIC_TYPE);\n ipConditionSpecific.setSpecificIP(\"123.42.14.56\");\n\n //adding above conditions to condition list of pipeline 1\n List<Condition> conditionsList = new ArrayList<>(); //contains conditions for each pipeline\n conditionsList.add(ipCondition);\n conditionsList.add(ipConditionSpecific);\n //set quota policy with bandwidth limit\n BandwidthLimit bandwidthLimit = new BandwidthLimit(TIME_UNIT_MONTH, 1, 1000, PolicyConstants.MB);\n QuotaPolicy quotaPolicy1 = new QuotaPolicy();\n quotaPolicy1.setType(PolicyConstants.BANDWIDTH_TYPE);\n quotaPolicy1.setLimit(bandwidthLimit);\n\n Pipeline pipeline1 = new Pipeline();\n pipeline1.setId(0);\n pipeline1.setConditions(conditionsList);\n pipeline1.setQuotaPolicy(quotaPolicy1);\n\n //End of pipeline 1 -> Beginning of pipeline 2\n HeaderCondition headerCondition = new HeaderCondition();\n headerCondition.setHeader(\"Browser\");\n headerCondition.setValue(\"Chrome\");\n JWTClaimsCondition jwtClaimsCondition = new JWTClaimsCondition();\n jwtClaimsCondition.setClaimUrl(\"/path/path2\");\n jwtClaimsCondition.setAttribute(\"attributed\");\n QueryParameterCondition queryParameterCondition = new QueryParameterCondition();\n queryParameterCondition.setParameter(\"Location\");\n queryParameterCondition.setValue(\"Colombo\");\n\n //adding conditions to condition list of pipeline2\n conditionsList = new ArrayList<>();\n conditionsList.add(headerCondition);\n conditionsList.add(jwtClaimsCondition);\n conditionsList.add(queryParameterCondition);\n //pipeline 2 with request count as quota policy\n RequestCountLimit requestCountLimit = new RequestCountLimit(TIME_UNIT_SECONDS, 1, 1000);\n QuotaPolicy quotaPolicy2 = new QuotaPolicy();\n quotaPolicy2.setType(REQUEST_COUNT_TYPE);\n quotaPolicy2.setLimit(requestCountLimit);\n\n Pipeline pipeline2 = new Pipeline();\n pipeline2.setId(1);\n pipeline2.setConditions(conditionsList);\n pipeline2.setQuotaPolicy(quotaPolicy2);\n //adding pipelines\n List<Pipeline> pipelineList = new ArrayList<>(); //contains all the default pipelines\n pipelineList.add(pipeline1);\n pipelineList.add(pipeline2);\n return pipelineList;\n}", "private FilterPipeline createPipeline() {\n Filter filterZero = createDefaultPatternFilter(0);\n Filter filterTwo = createDefaultPatternFilter(2); \n Sorter sorter = new ShuttleSorter();\n Filter[] filters = new Filter[] {filterZero, filterTwo, sorter};\n FilterPipeline pipeline = new FilterPipeline(filters);\n return pipeline;\n }", "public static void main(String[] args) {\n String levelNodes = \"1,2,3,#,#,4,#,#,#\";\n TreeNode<String> level = of(levelNodes, \"#\", TraverseType.LEVEL);\n System.out.println(level);\n\n\n String postNodes = \"#,#,2,#,#,4,#,3,1\";\n TreeNode<String> post = of(postNodes, \"#\", TraverseType.POST);\n System.out.println(post);\n\n\n String preNodes = \"1,2,#,#,3,4,#,#,#\";\n TreeNode<String> pre = of(preNodes, \"#\", TraverseType.PRE);\n System.out.println(pre);\n }", "protected void generate() {\n\t\tcpGenerator( nx, ny, nz, ClosePackedLattice.HCP);\n\t}", "@Override\n protected void compute() {\n\n if(this.workLoad > 16){\n System.out.println(\"Splitting Workload :: \"+this.workLoad);\n List<MyRecursiveAction> subTasks = new ArrayList<>();\n subTasks.addAll(createSubTasks());\n\n subTasks.forEach(tasks -> {\n tasks.fork();\n });\n }else{\n System.out.println(\"Doing Workload myself :: \"+this.workLoad);\n }\n }", "public BuildALevel(List<String> level) {\n this.level = level;\n this.map = new TreeMap<String, String>();\n // call the splitLevelDetails method\n splitLevelDetails();\n }", "public void makeContexts() {\n \n // make map of ContextTreeNode objects for all taxonomic contexts, indexed by root node name\n HashMap<String, ContextTreeNode> contextNodesByRootName = new HashMap<String, ContextTreeNode>();\n for (ContextDescription cd : ContextDescription.values()) {\n contextNodesByRootName.put(cd.licaNodeName, new ContextTreeNode(new TaxonomyContext(cd, this)));\n }\n \n TraversalDescription prefTaxParentOfTraversal = Traversal.description().depthFirst().\n relationships(RelType.PREFTAXCHILDOF, Direction.OUTGOING);\n \n // for each ContextTreeNode (i.e. each context)\n for (Entry<String, ContextTreeNode> entry: contextNodesByRootName.entrySet()) {\n \n String childName = entry.getKey();\n ContextTreeNode contextNode = entry.getValue();\n \n // traverse back up the taxonomy tree from the root of this context toward life\n for (Node parentNode : prefTaxParentOfTraversal.traverse(contextNode.context.getRootNode()).nodes()) {\n \n // if/when we find a more inclusive (i.e. parent) context\n String parentName = String.valueOf(parentNode.getProperty(\"name\"));\n if (contextNodesByRootName.containsKey(parentName) && (parentName.equals(childName) == false)) {\n \n System.out.println(\"Adding \" + childName + \" as child of \" + parentName);\n \n // add this link in the contextNode hierarchy and move to the next contextNode\n ContextTreeNode parentContextNode = contextNodesByRootName.get(parentName);\n parentContextNode.addChild(contextNode);\n break;\n \n }\n }\n }\n \n // get the root of the ContextTreeNode tree (i.e. most inclusive context)\n ContextTreeNode contextHierarchyRoot = contextNodesByRootName.get(LIFE_NODE_NAME);\n \n System.out.println(\"\\nHierarchy for contexts (note: paraphyletic groups do not have their own contexts):\");\n printContextTree(contextHierarchyRoot, \"\");\n System.out.println(\"\");\n \n // make the contexts!\n makeContextsRecursive(contextHierarchyRoot);\n \n }", "@Override\n public Petrinet compose(String id, Set<String> flags, Context context, Petrinet... petrinets) throws CompilationException {\n\n Petrinet x = petrinets[0].reId(\"G\");\n MultiProcessModel model = buildmpmFromPetri(x);\n Map<Multiset<PetriNetPlace>, AutomatonNode> markingToNode = model.getProcessNodesMapping().getMarkingToNode();\n //Map<AutomatonNode, Multiset<PetriNetPlace> > nodeToMarking = model.getProcessNodesMapping().getNodeToMarking();\n\n return composeM(id,flags,context,markingToNode,x);\n }", "@Override\n protected List<CriticalNode<N>> constructQueues(Collection<N> allNodes, Collection<L> allLinks, Collection<List<N>> allPaths, GraphPathsData<N> graphPathsData) {\n List<Pair<List<N>, PathLength>> pathWithLengthPairs = GraphPathsData.computeLengthsOfPaths(\n lengthComputer, allPaths, allNodes, allLinks, false\n );\n Map<N, Integer> nodeToLengthOfCriticalPathFromBegin = pathWithLengthPairs.stream().collect(Collectors.toMap(\n //Key = first node of path\n pathWithLengthFromBegin -> CollectionUtils.getLastOrNull(pathWithLengthFromBegin.first),\n //Value = length of path in weight\n pathWithLengthFromBegin -> pathWithLengthFromBegin.second.inNumberOfNodes\n ));\n\n return graphPathsData.pathsWithLengths.stream()\n //Map pair {path, pathLength} to pair {{path, pathLength}, coherence}\n .map(pathWithLengthPair -> Pair.create(\n pathWithLengthPair,\n CoherenceComputer.getCoherence(CollectionUtils.getFirstOrNull(pathWithLengthPair.first), allLinks)\n ))\n //Sort paths\n .sorted(\n //Sort by coherence\n Comparator.<Pair<Pair<List<N>, PathLength>, Integer>, Integer>comparing(Pair::getSecond)\n //Max first\n .reversed()\n //If equal coherence - sort by number of nodes left to beginning of graph\n .thenComparing(\n pathWithLengthPairWithCoherencePair ->\n nodeToLengthOfCriticalPathFromBegin.get(\n CollectionUtils.getFirstOrNull(\n pathWithLengthPairWithCoherencePair.first.first\n )\n )\n )\n )\n //pair {{path, lengthOfPath}, coherence} -> CriticalNode(firstNodeOfPath, {coherence, lengthOfPathInNumberOfNodes})\n .map(pathWithLengthPairWithCoherencePair -> new CriticalNode<>(\n CollectionUtils.getFirstOrNull(pathWithLengthPairWithCoherencePair.first.first),\n new Tuple<>(\n pathWithLengthPairWithCoherencePair.second,\n nodeToLengthOfCriticalPathFromBegin.get(\n CollectionUtils.getFirstOrNull(\n pathWithLengthPairWithCoherencePair.first.first\n )\n )\n )\n ))\n .collect(Collectors.toList());\n }", "private Output newStage(Output finalOutput, int level) {\n Output out = new MappingChainOutput(chain[level], finalOutput);\n\n if (level == 0) {\n /* At the top level, we're done */\n return out;\n } else {\n /* Pass this Output for the previous stage to write to */\n return newStage(out, level - 1);\n }\n }", "public static void levelOrderLinewiseZZ(Node node){\n Stack<Node> st1= new Stack<>();\n Stack<Node> st2= new Stack<>();\n\n int cnt=0;\n st1.push(node);\n\n while(st1.size()>0)\n {\n int n= st1.size();\n if(cnt%2==0){\n while(n>0) {\n Node nn=st1.pop();\n System.out.print(nn.data+\" \");\n for (int i = 0; i < nn.children.size(); i++) {\n st2.push(nn.children.get(i));\n }\n n--;\n }\n }\n else{\n while(n>0){\n Node nn=st1.pop();\n System.out.print(nn.data+\" \");\n for(int i=nn.children.size()-1;i>=0;i--)\n {\n st2.push(nn.children.get(i));\n }\n n--;\n }\n }\n System.out.println();\n cnt++;\n Stack<Node> temp=st1;\n st1=st2;\n st2=temp;\n }\n\n\n }", "public Map<UnitPlus, List<UnitPlus>> createCFG() {\n\t\t// try {\n\t\t// Class<?> classType = Class.forName(classNameString);\n\t\t// methods = classType.getDeclaredMethods();\n\t\t// for (Method method : methods) {\n\t\t// Class<?>[] parameterTypes = method.getParameterTypes();\n\t\t// List<Class<?>> parameterList = new ArrayList<>();\n\t\t// for(Class<?> parameterType:parameterTypes){\n\t\t// parameterList.add(parameterType);\n\t\t// System.out.println(parameterType);\n\t\t// }\n\t\t// SootMethod sootmethod = sootclass.getMethod(method.getName(),\n\t\t// parameterList);\n\t\t// Body body = sootmethod.retrieveActiveBody();\n\t\t// UnitGraph unitGraph = new ExceptionalUnitGraph(body);\n\t\t// methodToUnitGraph.put(methodName, unitGraph);\n\n\t\tList<SootMethod> sootMethods = sootclass.getMethods();\n\t\tfor (SootMethod sootMethod : sootMethods) {\n\t\t\tBody body = sootMethod.retrieveActiveBody();\n\t\t\tUnitGraph unitGraph = new ExceptionalUnitGraph(body);\n\t\t\tList<Type> parameterList = sootMethod.getParameterTypes();\n\t\t\tMethodPlus Method = new MethodPlus(sootMethod.getName(), classNameString,\n\t\t\t\t\tparameterList);\n\t\t\tMethods.add(Method);\n\t\t\tmethodToUnitGraph.put(Method, unitGraph);\n\t\t\tthis.createCFGsForMethod(unitGraph, Method);\n\t\t}\n\n\t\t// }\n\t\t// } catch (ClassNotFoundException e) {\n\t\t// e.printStackTrace();\n\t\t// }\n\t\tthis.createCompleteCFG();\n\t\tthis.combineAllCFGs();\n\n\t\treturn completeCFG;\n\t}", "@Test\n public void shouldGetTheLevelsInSortedOrder() {\n String currentPipeline = \"P1\";\n ValueStreamMap graph = new ValueStreamMap(currentPipeline, null);\n graph.addUpstreamNode(new PipelineDependencyNode(\"d1\", \"d1\"), null, currentPipeline);\n graph.addUpstreamNode(new PipelineDependencyNode(\"d2\", \"d2\"), null, currentPipeline);\n graph.addUpstreamNode(new PipelineDependencyNode(\"d3\", \"d3\"), null, \"d1\");\n graph.addUpstreamNode(new PipelineDependencyNode(\"d3\", \"d3\"), null, \"d2\");\n\n List<List<Node>> nodesAtEachLevel = graph.presentationModel().getNodesAtEachLevel();\n\n assertThat(nodesAtEachLevel.size(), is(3));\n assertThat(nodesAtEachLevel.get(0).get(0).getName(), is(\"d3\"));\n assertThat(nodesAtEachLevel.get(1).get(0).getName(), is(\"d1\"));\n assertThat(nodesAtEachLevel.get(1).get(1).getName(), is(\"d2\"));\n assertThat(nodesAtEachLevel.get(2).get(0).getName(), is(currentPipeline));\n }", "public String\n generate\n (\n boolean first, \n boolean last, \n int level \n ) \n throws GenerateException \n {\n StringBuilder buf = new StringBuilder();\n\n buf.append(openScope(first, level)); \n \n LinkedList<Comparable> missingKeys = null;\n if(!pChildren.isEmpty()) {\n BaseGenerator firstChild = pChildren.get(pChildren.firstKey());\n\n LinkedList<Comparable> ordered = null;\n try {\n ordered = firstChild.getCellPolicy().validateAndOrder(getChildKeys());\n }\n catch(GenerateException ex) {\n throw new GenerateException\n (toString() + \"\\n\" + ex.getMessage()); \n }\n\n Comparable firstKey = ordered.getFirst();\n Comparable lastKey = ordered.getLast();\n for(Comparable key : ordered) {\n BaseGenerator child = pChildren.get(key);\n try {\n buf.append(child.generate(key.equals(firstKey), key.equals(lastKey), level+1));\n }\n catch(GenerateException ex) {\n throw new GenerateException\n (toString() + \" -> \" + ex.getMessage()); \n }\n }\n }\n\n buf.append(closeScope(last, level)); \n\n return buf.toString();\n }", "private void initCounterChains() {\n ArrayList<String> cmds = new ArrayList<>(10);\n try {\n String inputChain = \"os_count_inp\";\n String outputChain = \"os_count_out\";\n String forwardChain = \"os_count_fwd\";\n String[] chains = {inputChain, outputChain, forwardChain};\n String currentRules = ShellExecutor.executeRoot(\"iptables -S\");\n for (String chain : chains) {\n if (!currentRules.contains(chain)) {\n cmds.add(\"iptables -N\" + chain);\n if (chain.equals(inputChain)) {\n cmds.add(\"iptables -I INPUT -j \" + chain);\n } else if (chain.equals(outputChain)) {\n cmds.add(\"iptables -I OUTPUT -j \" + chain);\n } else if (chain.equals(forwardChain)) {\n cmds.add(\"iptables -I FORWARD -j \" + chain);\n }\n }\n }\n ShellExecutor.executeRoot(cmds);\n } catch (Exception e) {\n this.err(\"Error while initCounterChains\", e);\n }\n }", "private void generateSteps() {\n for (GlobalState g : this.globalStates) {\n List<String> faults = g.getPendingFaults(); \n if(faults.isEmpty()) {\n // Identifying all available operation transitions (when there \n // are no faults), and adding them as steps\n List<String> gSatisfiableReqs = g.getSatisfiableReqs();\n \n for(Node n : nodes) {\n String nName = n.getName();\n String nState = g.getStateOf(nName);\n List<Transition> nTau = n.getProtocol().getTau().get(nState);\n for(Transition t : nTau) {\n boolean firable = true;\n for(String req : t.getRequirements()) {\n if(!(gSatisfiableReqs.contains(n.getName() + \"/\" + req)))\n firable = false;\n }\n if(firable) {\n // Creating a new mapping for the actual state of n\n Map<String,String> nextMapping = new HashMap();\n nextMapping.putAll(g.getMapping());\n nextMapping.put(nName, t.getTargetState());\n // Searching the ref to the corresponding global \n // state in the list globalStates\n GlobalState next = search(nextMapping);\n // Adding the step to list of steps in g\n g.addStep(new Step(nName,t.getOperation(),next));\n }\n }\n }\n } else {\n // Identifying all settling handlers for handling the faults\n // pending in this global state\n for(Node n: nodes) {\n // Computing the \"targetState\" of the settling handler for n\n String targetState = null;\n \n String nName = n.getName();\n String nState = g.getStateOf(nName);\n Map<String,List<String>> nRho = n.getProtocol().getRho();\n \n List<String> nFaults = new ArrayList();\n for(String req : nRho.get(nState)) {\n if(faults.contains(nName + \"/\" + req)) \n nFaults.add(req);\n }\n\n // TODO : Assuming handlers to be complete \n\n if(nFaults.size() > 0) {\n Map<String,List<String>> nPhi = n.getProtocol().getPhi();\n for(String handlingState : nPhi.get(nState)) {\n // Check if handling state is handling all faults\n boolean handles = true;\n for(String req : nRho.get(handlingState)) {\n if(nFaults.contains(req))\n handles = false;\n }\n\n // TODO : Assuming handlers to be race-free\n\n // Updating targetState (if the handlingState is \n // assuming a bigger set of requirements)\n if(handles) {\n if(targetState == null || nRho.get(handlingState).size() > nRho.get(targetState).size())\n targetState = handlingState;\n }\n }\n // Creating a new mapping for the actual state of n\n Map<String,String> nextMapping = new HashMap();\n nextMapping.putAll(g.getMapping());\n nextMapping.put(nName, targetState);\n // Searching the ref to the corresponding global \n // state in the list globalStates\n GlobalState next = search(nextMapping);\n // Adding the step to list of steps in g\n g.addStep(new Step(nName,next));\n }\n }\n }\n }\n }", "public static void main(String[] args) {\n\t\tBinary_Tree_Level_Order_Traversal_102 b=new Binary_Tree_Level_Order_Traversal_102();\n\t\tTreeNode root=new TreeNode(3);\n\t\troot.left=new TreeNode(9);\n\t\troot.right=new TreeNode(20);\n\t\troot.right.left=new TreeNode(15);\n\t\troot.right.right=new TreeNode(7);\n\t\tList<List<Integer>> res=b.levelOrder(root);\n\t\tfor(List<Integer> list:res){\n\t\t\tfor(Integer i:list){\n\t\t\t\tSystem.out.print(i+\" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "@Override\r\n\tpublic Node visitPipeSkel(PipeSkelContext ctx) {\n\t\treturn super.visitPipeSkel(ctx);\r\n\t}", "public static void buildStage2 ()\r\n {\r\n \r\n lgt.findParent(); //4\r\n lgt.findChild(0); //6\r\n lgt.insert(12);\r\n lgt.findParent();\r\n lgt.insert(13);\r\n lgt.findParent();\r\n lgt.insert(14);\r\n \r\n lgt.findRoot();\r\n lgt.findChild(0);//2\r\n lgt.findChild(0);//5\r\n lgt.insert(8);\r\n lgt.findParent();\r\n lgt.insert(9);\r\n lgt.findParent();\r\n lgt.insert(10);\r\n lgt.findParent();\r\n lgt.insert(11);\r\n \r\n }", "public static void levelOrderLinewiseZZ(Node node){\r\n Stack<Node> mainS = new Stack<>();\r\n Stack<Node> childS = new Stack<>();\r\n \r\n //. Add node to Stack\r\n mainS.push(node);\r\n //Define level\r\n int lvl = 1;\r\n \r\n while(mainS.size() > 0){\r\n //1. Get + print\r\n Node rem = mainS.pop();\r\n System.out.print(rem.data + \" \");\r\n \r\n if(lvl % 2 == 1){\r\n //odd level = left->right additon of children is done\r\n for(int i=0; i<rem.children.size(); i++){\r\n Node child = rem.children.get(i);\r\n //Addition is done in child stack\r\n childS.push(child);\r\n }\r\n }\r\n else{\r\n //even level = right to left additon of children is done\r\n for(int i=rem.children.size()-1; i>=0; i--){\r\n Node child = rem.children.get(i);\r\n //Addition is done in child stack\r\n childS.push(child);\r\n }\r\n }\r\n \r\n if(mainS.size() == 0){\r\n //Print Enter\r\n System.out.println();\r\n \r\n //Increase the level\r\n lvl++;\r\n \r\n //Swap the stacks\r\n Stack<Node> temp = mainS;\r\n mainS = childS;\r\n childS = temp;\r\n }\r\n }\r\n }", "public static void main(String[] args) {\n\n\t\t\n\t\tProces p1= new Proces(20, 0, 10);\n\t\tProces p2= new Proces(10, 1, 10);\n\t\tProces p3= new Proces(30, 6, 10);\n\t\tProces p4= new Proces(9, 7, 10);\n\t\tArrayList<Proces> procesy1= new ArrayList<Proces>();\n\t\tprocesy1.add(p1);\n\t\tprocesy1.add(p2);\n\t\tprocesy1.add(p3);\n\t\tprocesy1.add(p4);\n\t\tProcesor proc1= new Procesor(1, procesy1);\n\t\n\t\t\n\t\t\n\t\tArrayList<Proces> procesy2= new ArrayList<Proces>();\n\t\tprocesy2.add(new Proces(40, 2, 14));\n\t\tprocesy2.add(new Proces(20, 8, 9));\n\t\tprocesy2.add(new Proces(30, 2, 3));\n\t\tprocesy2.add(new Proces(10, 4, 5));\n\t\tprocesy2.add(new Proces(4, 7, 14));\n\t\tProcesor proc2= new Procesor(2, procesy2);\n\t\n\t\t\n\t\t\n\t\tArrayList<Procesor> procesory= new ArrayList<Procesor>();\n\t\tprocesory.add(proc1);\n\t\tprocesory.add(proc2);\n\t\t\n\t\tint ileProcesorow=2;\n\t\tint progR=20;\n\t\tint progP=20;\n\t\tint iloscZapytanZ=10;\n\t\tint okresPomiaruObciazen=1;\n\t\t\n\t\tAlgorithms al= new Algorithms(procesory, progP, iloscZapytanZ, progR);\n\t\tal.wyswietlProcesory();\n\t\tal.symulacjaPierwsza(okresPomiaruObciazen);\n\t\tal.symulacjaDruga(okresPomiaruObciazen);\n\t\tal.symulacjaTrzecia(okresPomiaruObciazen);\n\t\t\n\t\t\n\t\t\n\t}", "void genPush(Collection ret, int from, int to, int bits) {\n\tif ((bits & 16) != 0) {\n\tif (side == LIGHT) {\n\tif (to <= H8) {\n\tgenPromote(ret, from, to, bits);\n\treturn;\n\t}\n\t} else {\n\tif (to >= A1) {\n\tgenPromote(ret, from, to, bits);\n\treturn;\n\t}\n\t}\n\t}\n\n\tBouger g = new Bouger(from, to, 0, bits, pieceChar[piece[from]]);\n\n\tif (color[to] != EMPTY)\n\tg.setScore(1000000 + (piece[to] * 10) - piece[from]);\n\telse\n\tg.setScore(history[from][to]);\n\tret.add(g);\n\t}", "@Override\n\tpublic void genLevel(File f) {\n\t\t\n\t}", "public Flux<TransferTaskParent> runPipeline()\n {\n return transfersService.streamParentMessages()\n .groupBy(m -> { try { return groupByTenant(m); } catch (ServiceException ex) { return Mono.empty(); } } )\n .flatMap(group ->\n {\n Scheduler scheduler = Schedulers.newBoundedElastic(5, 10, \"ParentPool:\" + group.key());\n return group.flatMap(m ->\n deserializeParentMessage(m)\n .flatMap(t1 -> Mono.fromCallable(() -> doParentStepOne(t1))\n .publishOn(scheduler)\n .retryWhen(Retry.backoff(MAX_RETRIES, Duration.ofSeconds(1))\n .maxBackoff(Duration.ofMinutes(60))\n .filter(e -> e.getClass() == IOException.class) )\n .onErrorResume(e -> doErrorParentStepOne(m, e, t1) ) )\n .flatMap(t2 -> { m.ack(); return Mono.just(t2); }) );\n } );\n }", "public static void main(String[] args){\n\t\t\n\t\tfor (int i = 0; i<999999;i++) results.add(0);\t\n\n\t\tsetChain(1L);\n\t\tboolean switcher = true;\n\t\t//while switch=true ... and once chain length is added to, switch = false\n \t\tlong best = 0L;\n\t\tint index=0;\n\t\t\t\n\t\tfor (long j = 1L; j < 1000000L; j++) {\n\n\t\t\tsetCur((int)j);\n\n\t\t\tfindChain(j);//} catch(Exception e){System.out.println(\"stackOverFlow :D\");}\n\t\t\tif (getChain() > best) {best = getChain(); index=getCur();}\n\t\t\t//now store results for later use if we come across that number.\n\t\t\tresults.set(getCur()-1, (int)getChain());\t\n\t\t\tsetChain(1L); //reset\n\t\t\t/* \t\n\t\t\tswitcher=true;\n\t\t\tint i = j;\n\t\t\twhile (switcher) {\n\n\t\t\t\tif (i==1) {//results.add(chainLength); \n\t\t\t\t\tif (chainLength > best) { best=chainLength; index = j;}\n\t\t\t \tchainLength=1; switcher=false;}\n\t\n\t\t\t\telse { i=recurse(i); chainLength++; }\t\n\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t*/\n//\t\t }\n\t\t}\n\t\tSystem.out.println(index);\n\t}", "protected void backwardPhase() {\r\n HashSet seenBefore = new HashSet();\r\n\r\n for (int i = nodeCount-1; i >= 0; i--) {\r\n BBNNode node = nodes[i];\r\n //System.out.print(i+\": \"+node+\" = \");\r\n\r\n if (!seenBefore.contains(node)) {\r\n seenBefore.add(node);\r\n baseNodes[i].add(node);\r\n lambdaParameters[i].add(node);\r\n\r\n //System.out.print(\"P(\"+node);\r\n\r\n /*\r\n * Adding the parents to be included into the lambda parameter\r\n */\r\n List parents = node.getParents();\r\n if (parents != null) {\r\n //System.out.print(\"|\");\r\n for (Iterator j = parents.iterator(); j.hasNext(); ) {\r\n BBNNode parent = (BBNNode) j.next();\r\n lambdaParameters[i].add(parent);\r\n //System.out.print(parent.toString());\r\n //if (j.hasNext()) System.out.print(\", \");\r\n }\r\n }\r\n //System.out.print(\")\");\r\n }\r\n\r\n /*\r\n * Looking for P(child | curNode, otherParents...) to be included in the\r\n * current bucket\r\n */\r\n for (Iterator j = node.getChildren().iterator(); j.hasNext(); )\r\n {\r\n BBNNode child = (BBNNode) j.next();\r\n if (!seenBefore.contains(child)) {\r\n //System.out.print(\" P(\"+child);\r\n seenBefore.add(child);\r\n baseNodes[i].add(child);\r\n lambdaParameters[i].add(child);\r\n\r\n List childParents = child.getParents();\r\n if (childParents != null) {\r\n //System.out.print(\"|\");\r\n for (Iterator k = child.getParents().iterator(); k.hasNext(); ) {\r\n BBNNode childParent = (BBNNode) k.next();\r\n lambdaParameters[i].add(childParent);\r\n //System.out.print(childParent.toString());\r\n //System.out.print(\", \");\r\n }\r\n }\r\n //System.out.print(\")\");\r\n }\r\n }\r\n\r\n assert (lambdaParameters[i].size() > 0);\r\n\r\n// for (Iterator j = lambdaTable[i].iterator(); j.hasNext(); ) {\r\n// int idx = ((Integer) j.next()).intValue();\r\n// System.out.print(\" lambda_\"+nodes[idx]+\"(\");\r\n// for (Iterator k = lambdaParameters[idx].iterator(); k.hasNext(); ) {\r\n// BBNNode n = (BBNNode) k.next();\r\n// if (n != nodes[idx]) System.out.print(n+\",\");\r\n// }\r\n// System.out.print(\")\");\r\n// }\r\n// System.out.println();\r\n\r\n // Build the lambda\r\n LinkedList nodeList = new LinkedList();\r\n LinkedList nodeNameList = new LinkedList();\r\n for (Iterator j = lambdaParameters[i].iterator(); j.hasNext(); ) {\r\n BBNNode param = (BBNNode) j.next();\r\n nodeList.add(param);\r\n nodeNameList.add(param.getName());\r\n }\r\n lambda[i] = new BBNCPF(nodeNameList);\r\n nodeNameList = null; // we don't use this, so let it be garbage collected\r\n //System.out.print(\"lambda parameters \"+nodeList);\r\n\r\n buildLambda(i, nodeList, new Hashtable());\r\n\r\n // Do this except the lowest bucket\r\n if (i > 0) {\r\n // Find the highest bucket index that is lower than the current bucket\r\n int highestBucketIndex = -1;\r\n for (Iterator j = nodeList.iterator(); j.hasNext(); ) {\r\n Object param = j.next();\r\n int idx = ((Integer) indexCache.get(param)).intValue();\r\n if (idx < i && idx > highestBucketIndex) {\r\n highestBucketIndex = idx;\r\n }\r\n }\r\n if (highestBucketIndex > -1) {\r\n lambdaTable[highestBucketIndex].add(new Integer(i));\r\n // make this node's lambda parameters as the highest bucket's parameters\r\n // except this current node.\r\n nodeList.remove(node);\r\n lambdaParameters[highestBucketIndex].addAll(nodeList);\r\n \r\n //System.out.print(\", to bucket \"+highestBucketIndex);\r\n }\r\n }\r\n //System.out.println();\r\n }\r\n }", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:00:49.367 -0500\", hash_original_method = \"B186F7F0BF353B1A746862E337C50A69\", hash_generated_method = \"7727160CCA8A9EE39BE8CC36CB939BC2\")\n \npublic void pushContext ()\n {\n int max = contexts.length;\n\n contexts [contextPos].declsOK = false;\n contextPos++;\n\n // Extend the array if necessary\n if (contextPos >= max) {\n Context newContexts[] = new Context[max*2];\n System.arraycopy(contexts, 0, newContexts, 0, max);\n max *= 2;\n contexts = newContexts;\n }\n\n // Allocate the context if necessary.\n currentContext = contexts[contextPos];\n if (currentContext == null) {\n contexts[contextPos] = currentContext = new Context();\n }\n\n // Set the parent, if any.\n if (contextPos > 0) {\n currentContext.setParent(contexts[contextPos - 1]);\n }\n }", "@Override\n\tprotected void buildCircuit() {\n\t\tthis.circuit.add(new Point2f(97, -98));\n\t\tthis.circuit.add(new Point2f(-3, -98));\n\t\tthis.circuit.add(new Point2f(-3, -2));\n\t\t\n\t\t// U-turn (step 2)\n\t\tthis.circuit.add(new Point2f(-111, -2));\n\t\tthis.circuit.add(new Point2f(-111, 2));\n\t\t\n\t\t// Semi-Loop, bottom-left block (step 3)\n\t\tthis.circuit.add(new Point2f(-3, 2));\n\t\tthis.circuit.add(new Point2f(-3, 106));\n\t\tthis.circuit.add(new Point2f(97, 106));\n\t}", "protected void constructPartitions( Callback c, List nodes, int level ){\n //we want to ignore the dummy node partition\n String id = getPartitionID( mCurrentDepth );\n Partition p = new Partition( nodes, id );\n p.setIndex( mCurrentDepth );\n\n p.constructPartition();\n mLogger.log( \"Partition \" + p.getID() + \" is :\" + p.getNodeIDs(),\n LogManager.DEBUG_MESSAGE_LEVEL );\n c.cbPartition( p );\n\n }", "void printLevelOrder() \n { \n int h = height(this); \n int i; \n for (i=1; i<=h; i++) \n printGivenLevel(this, i); \n }", "public <P> ConsumerChain(\n List<ProcessorNode<?,?>> chain, ConsumerNode<P> consumer){\n super(chain, consumer);\n }", "@Override\n public void chainNumber(int level) {\n if (this.level == level)\n {\n System.out.println(\"Tickets Screen\"); //If this link handles the object, this line will be displayed\n }\n else \n {\n next.chainNumber(level); //If this link does not handle the object, it passes the object to the next link\n System.out.println(\"Tickets does not handle this request\");\n }\n }", "public MultiLevelQueue()\n {\n levels = new TreeMap<>();\n }", "private void buildInternalRepresentations() {\n new DAGBuilder(data).buildMethods(this);//.dump();\n }", "@Override\r\n\tpublic Node visitSequential(SequentialContext ctx) {\n\t\treturn super.visitSequential(ctx);\r\n\t}", "private synchronized void buildConcreteProcessor(Environment env) throws Exception {\n if (this.concreteProcessor != null && this.source.getLastModified() == this.lastModified) {\n // Nothing changed\n return;\n }\n\n long startTime = System.currentTimeMillis();\n\n // Dispose the old processor, if any\n if (this.concreteProcessor != null) {\n this.concreteProcessor.markForDisposal();\n }\n\n // Get a builder\n TreeBuilder builder = (TreeBuilder)this.builderSelector.select(\"sitemap\");\n ConcreteTreeProcessor newProcessor = new ConcreteTreeProcessor(this);\n long newLastModified;\n this.setupLogger(newProcessor);\n //FIXME (SW): why do we need to enterProcessor here?\n CocoonComponentManager.enterEnvironment(env, this.manager, this);\n try {\n if (builder instanceof Recomposable) {\n ((Recomposable)builder).recompose(this.manager);\n }\n builder.setProcessor(newProcessor);\n\n newLastModified = this.source.getLastModified();\n\n ProcessingNode root = builder.build(this.source);\n\n newProcessor.setProcessorData(builder.getSitemapComponentManager(), root, builder.getDisposableNodes());\n } finally {\n CocoonComponentManager.leaveEnvironment();\n this.builderSelector.release(builder);\n }\n\n if (this.getLogger().isDebugEnabled()) {\n double time = (this.lastModified - startTime) / 1000.0;\n this.getLogger().debug(\"TreeProcessor built in \" + time + \" secs from \" + this.source.getURI());\n }\n\n // Switch to the new processor (ensure it's never temporarily null)\n this.concreteProcessor = newProcessor;\n this.lastModified = newLastModified;\n }", "public int produce(int min, int max, int start, int subpopulation, Individual[] inds, ec.EvolutionState state, int thread)\n/* */ {\n/* 27 */ int n = this.sources[0].produce(min, max, start, subpopulation, inds, state, thread);\n/* */ \n/* */ \n/* */ \n/* 31 */ if (!state.random[thread].nextBoolean(this.likelihood)) {\n/* 32 */ return reproduce(n, start, subpopulation, inds, state, thread, false);\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* 38 */ if (!(this.sources[0] instanceof ec.BreedingPipeline)) {\n/* 39 */ for (int q = start; q < n + start; q++) {\n/* 40 */ inds[q] = ((Individual)inds[q].clone());\n/* */ }\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 48 */ if (!(inds[start] instanceof TestCaseCandidate))\n/* 49 */ state.output.fatal(\"OurMutatorPipeline didn't get an Chromosome.The offending individual is in subpopulation \" + \n/* 50 */ subpopulation + \" and it's:\" + inds[start]);\n/* 51 */ ChromosomeSpecies species = (ChromosomeSpecies)inds[start].species;\n/* */ \n/* */ \n/* */ \n/* 55 */ for (int q = start; q < n + start; q++)\n/* */ {\n/* 57 */ TestCaseCandidate i = (TestCaseCandidate)inds[q];\n/* 58 */ double mutp = 1.0D / i.getGenes().size();\n/* */ \n/* 60 */ double[] propa = new double[i.getGenes().size()];\n/* 61 */ for (int x = 0; x < i.getGenes().size(); x++)\n/* 62 */ propa[x] = mutp;\n/* 63 */ for (int x = 0; x < i.getGenes().size(); x++) {\n/* 64 */ if (state.random[thread].nextBoolean(propa[x]))\n/* */ {\n/* */ \n/* 67 */ ((csbst.generators.AbsractGenerator)i.getGenes().get(x)).mutate();\n/* */ }\n/* */ }\n/* */ \n/* 71 */ i.evaluated = false;\n/* */ }\n/* */ \n/* 74 */ return n;\n/* */ }", "public void buildGraph(){\n\t}", "private TreeMap<Integer, PackratParser<Expression>> makeExpressionParsers (CtClass clazz) {\n TreeMap<Integer, PackratParser<Expression>> map = new TreeMap<>();\n\n for (Map.Entry<Integer, List<IROperator>> entry : operators.getOperators(clazz).entrySet()) {\n Integer priority = entry.getKey();\n map.put(priority, choice(getOperationParsersFromCache(priority, entry.getValue())));\n }\n\n TreeMap<Integer, PackratParser<Expression>> parsers = new TreeMap<>();\n\n PackratParser<Expression> next = getDefaultParserFromCache(clazz);\n\n for (Integer priority : map.descendingKeySet()) {\n PackratParser<Expression> cur = choice(map.get(priority), next);\n parsers.put(priority, cur);\n next = cur;\n }\n\n return parsers;\n }", "public AbstractRecombinator() \r\n\t{\r\n\t\tsuper();\r\n\t\tsetPpl();\r\n\t\tsetSpl();\t\t\r\n\t}", "static void generate(Proc proc, PrintWriter outData)\r\n {\r\n for (int i=0; i < proc.lines.size(); i++)\r\n {\r\n //String l = (String) proc.lines.elementAt(i);\r\n Line line = \tproc.lines.elementAt(i);\r\n outData.println(line.line);\r\n }\r\n outData.println();\r\n }", "public static void create(int steps) {\n\t\tlocalPlaces = 40;\n\t\toutPlaces = 3;\n\n\t\t// Initial marking: \n\t\tinitPlaces = new int[] {0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0};\n\t\ttileInitPlaces = 20;\n\n\t\t// Output mapping:\n\t\tint offs = 0;\n\t\ttOutMap = new OutMap[outPlaces];\n\t\ttOutMap[offs++] = new OutMap(-1, 37);\n\t\ttOutMap[offs++] = new OutMap(-1, 35);\n\t\ttOutMap[offs++] = new OutMap(1, 0);\n\n\t\t// Transitions:\n\t\toffs = 0;\n\t\ttransitions = 24; // (12 aligned to 4) x 2 steps\n\t\ttmap = new Transition[transitions];\n\n\t\t// {0xoi, inp-s, outp-s}\n\t\ttmap[offs++] = new Transition(0x22, 4, 1, 41 /* out */ , 40 /* out */ ); // 0: ccw_take_left_fork *choice\n\t\ttmap[offs++] = new Transition(0x22, 4, 12, 9, 5); // 1: take_right_fork *choice\n\t\ttmap[offs++] = new Transition(0x21, 0, 1, 4); // 2: ccw_put_left_fork\n\t\ttmap[offs++] = new Transition(0x21, 10, 11, 3); // 3: put_left_fork\n\n\t\ttmap[offs++] = new Transition(0x31, 7, 10, 2, 8); // 4: start_thinking\n\t\ttmap[offs++] = new Transition(0x13, 9, 6, 8, 7); // 5: start_eating\n\t\ttmap[offs++] = new Transition(0x21, 2, 4, 12); // 6: put_right_fork\n\t\ttmap[offs++] = new Transition(0x31, 13, 20 /* next */ , 18, 14); // 7: cw_start_thinking\n\n\t\ttmap[offs++] = new Transition(0x13, 11, 3, 5, 6); // 8: take_left_fork *choice\n\t\ttmap[offs++] = new Transition(0x13, 11, 16, 17, 19); // 9: cw_take_right_fork *choice\n\t\ttmap[offs++] = new Transition(0x21, 18, 16, 11); // 10: cw_put_right_fork\n\t\ttmap[offs++] = new Transition(0x13, 14, 19, 15, 13); // 11: cw_start_eating\n\n\t\ttmap[offs++] = new Transition(0x22, 24, 21, 15 /* prev */ , 17 /* prev */ ); // 0: ccw_take_left_fork *choice\n\t\ttmap[offs++] = new Transition(0x22, 24, 32, 29, 25); // 1: take_right_fork *choice\n\t\ttmap[offs++] = new Transition(0x21, 20, 21, 24); // 2: ccw_put_left_fork\n\t\ttmap[offs++] = new Transition(0x21, 30, 31, 23); // 3: put_left_fork\n\n\t\ttmap[offs++] = new Transition(0x31, 27, 30, 22, 28); // 4: start_thinking\n\t\ttmap[offs++] = new Transition(0x13, 29, 26, 28, 27); // 5: start_eating\n\t\ttmap[offs++] = new Transition(0x21, 22, 24, 32); // 6: put_right_fork\n\t\ttmap[offs++] = new Transition(0x31, 33, 42 /* out */ , 38, 34); // 7: cw_start_thinking\n\n\t\ttmap[offs++] = new Transition(0x13, 31, 23, 25, 26); // 8: take_left_fork *choice\n\t\ttmap[offs++] = new Transition(0x13, 31, 36, 37, 39); // 9: cw_take_right_fork *choice\n\t\ttmap[offs++] = new Transition(0x21, 38, 36, 31); // 10: cw_put_right_fork\n\t\ttmap[offs++] = new Transition(0x13, 34, 39, 35, 33); // 11: cw_start_eating\n\n\t\tif(PPNDevice.logMessages)\n\t\t\tSystem.out.printf(\"localPlaces: %d\\ntransitions: %d\\n\", localPlaces, transitions);\n\t}", "public static void build ()\r\n {\r\n lgt.insert(1);\r\n lgt.insert(2);\r\n lgt.insert(5);\r\n \r\n lgt.findRoot();\r\n lgt.insert(3);\r\n \r\n lgt.findRoot();\r\n lgt.insert(4);\r\n \r\n lgt.insert(6);\r\n lgt.findParent();\r\n lgt.insert(7);\r\n \r\n }", "TargetChain createTargetChain();", "public void levelOrder(){\n Iterator iter = iterator();\n while(iter.hasNext() == true) {\n System.out.println(iter.next());\n }\n }", "private HashSet<SootMethod> getMethodsInvokingAtLevel(SootMethod method,\r\n\t\t\tint level) {\n\t\tHashSet<SootMethod> workSet = new HashSet<SootMethod>();\r\n\t\tworkSet.add(method);\r\n\t\t\r\n\t\tHashSet<SootMethod> newWorkset = new HashSet<SootMethod>(1);\r\n\t\tHashSet<SootMethod> topLevel = new HashSet<SootMethod>();\r\n\t\tHashSet<SootMethod> processed = new HashSet<SootMethod>(1);\r\n\t\tfor(int i=0; i< level; i++){\r\n\t\t\tif(i !=0){\r\n\t\t\t\tfor (SootMethod sootMethod : newWorkset) {\r\n\t\t\t\t\tif(!processed.contains(sootMethod))\r\n\t\t\t\t\t\tworkSet = new HashSet<SootMethod>(newWorkset);\r\n\t\t\t\t}\r\n\t\t\t\tnewWorkset = new HashSet<SootMethod>(1);\r\n\t\t\t}\r\n\t\t\tif(workSet.isEmpty())\r\n\t\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tHashSet<SootMethod> implementedMethods = new HashSet<SootMethod>();\r\n\t\t\tfor (SootMethod m : workSet) {\r\n\t\t\t\tfor (SootClass interfaze : m.getDeclaringClass().getInterfaces()) {\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\tSootMethod m2 = interfaze.getMethod(m.getName(), \r\n\t\t\t\t\t\t\t\tm.getParameterTypes(), m.getReturnType());\r\n\t\t\t\t\t\tif(!processed.contains(m2))\r\n\t\t\t\t\t\t\timplementedMethods.add(m2);\r\n\t\t\t\t\t}catch (RuntimeException e) {\r\n\t\t\t\t\t\t//e.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tworkSet.addAll(implementedMethods);\r\n\t\t\tIterator<SootMethod> iter = workSet.iterator();\r\n\t\t\t\r\n\t\t\twhile(iter.hasNext()){\r\n\t\t\t\tSootMethod m = iter.next();\r\n\t\t\t\tif(getMethodsInvoking(m) != null){\r\n\t\t\t\t\tnewWorkset.addAll(getMethodsInvoking(m));\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\ttopLevel.add(m);\r\n\t\t\t}\r\n\t\t\tprocessed.addAll(workSet);\r\n\t\t}\r\n\t\tprocessed.remove(method);\r\n\t\ttadaMethodInvokedByMap.put(method, processed);\r\n\t\ttopLevel.addAll(newWorkset);\r\n\t\treturn topLevel;\r\n\t}", "private void AddHandlersProcessing()\n {\n \n for(MessageHandler handler : actorData.MessageHandlers())\n {\n Location handlerProc_h = new Location(String.format(\"handlerProc_%s\", actorData.MessageHandlerName(handler)));\n handlerProc_h.AddFlow(new Flow(actorData.GetUrgentFlow()));\n handlerProc_h.AddInvarient(actorData.GetUrgentInvarient());\n comp.AddTransition(new HybridTransitionBuilder().\n SetOrigin(idleLoc).\n SetDestination(handlerProc_h).\n SetSynclabel(actorData.ExecuteLabelFor(handler)).\n // AddAssignment(actorData.SetBusyAssignment()).\n Build());\n \n CreateHandler(handler, comp, handlerProc_h);\n }\n }", "@Override\n public void construct() {\n Metric metric =\n new CPU_Utilization(1) {\n @Override\n public MetricFlowUnit gather(Queryable queryable) {\n return MetricFlowUnit.generic();\n }\n };\n Symptom earthSymptom =\n new Symptom(1) {\n @Override\n public SymptomFlowUnit operate() {\n return SymptomFlowUnit.generic();\n }\n\n @Override\n public String name() {\n return EARTH_KEY;\n }\n };\n Symptom moonSymptom =\n new Symptom(1) {\n @Override\n public SymptomFlowUnit operate() {\n return SymptomFlowUnit.generic();\n }\n\n public String name() {\n return MOON_KEY;\n }\n };\n\n Metric skyLabCpu =\n new CPU_Utilization(1) {\n @Override\n public MetricFlowUnit gather(Queryable queryable) {\n return MetricFlowUnit.generic();\n }\n };\n Symptom skyLabsSymptom =\n new Symptom(1) {\n @Override\n public SymptomFlowUnit operate() {\n return SymptomFlowUnit.generic();\n }\n\n public String name() {\n return SKY_LABS_KEY;\n }\n };\n\n addLeaf(metric);\n addLeaf(skyLabCpu);\n earthSymptom.addAllUpstreams(Collections.singletonList(metric));\n moonSymptom.addAllUpstreams(Collections.singletonList(earthSymptom));\n skyLabsSymptom.addAllUpstreams(\n new ArrayList<Node<?>>() {\n {\n add(earthSymptom);\n add(moonSymptom);\n add(skyLabCpu);\n }\n });\n\n metric.addTag(LOCUS_KEY, EARTH_KEY);\n earthSymptom.addTag(LOCUS_KEY, EARTH_KEY);\n moonSymptom.addTag(LOCUS_KEY, MOON_KEY);\n skyLabCpu.addTag(LOCUS_KEY, SKY_LABS_KEY);\n skyLabsSymptom.addTag(LOCUS_KEY, SKY_LABS_KEY);\n }", "public void buildPriors() {\n\t\t// grab the list of all class labels for this fold\n\t\tList<List<String>> classListHolder = dc.getClassificationFold();\n\t\tint totalClasses = 0; // track ALL class occurrences for this fold\n\t\tint[] totalClassOccurrence = new int[classes.size()]; // track respective class occurrence\n\t\tfor (int i = 0; i < 10; i++) {\n\t\t\tif (i == testingFold) {\n\t\t\t\tcontinue; // skip testing fold\n\t\t\t} else {\n\t\t\t\tcurrentFold = i;\n\t\t\t} // end if\n\n\t\t\t// grab the list of all classes for this current fold\n\t\t\tList<String> classList = classListHolder.get(currentFold);\n\t\t\t// track the total number of classes in this fold and their occurrences\n\t\t\ttotalClasses += classList.size();\n\t\t\t// for each class occurrence, match it to a class and track its occurrence\n\t\t\tfor (String className : classList) {\n\t\t\t\tfor (int j = 0; j < classes.size(); j++) {\n\t\t\t\t\tif (className.equals(classes.get(j))) {\n\t\t\t\t\t\ttotalClassOccurrence[j]++;\n\t\t\t\t\t} // end if\n\t\t\t\t} // end for\n\t\t\t} // end for\n\t\t} // end for\n\n\t\t// divide a particular class occurrence by total number of classes across training set\n\t\tfor (int i = 0; i < classPriors.length; i++) {\n\t\t\tclassPriors[i] = totalClassOccurrence[i] / totalClasses;\n\t\t} // end for\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.print(treeByLevels(new Node(new Node(null, new Node(null, null, 4), 2),\n\t\t\t\tnew Node(new Node(null, null, 5), new Node(null, null, 6), 3), 1)));\n\t}", "@Override\n\tpublic List<Element> execute(Node thisNode) {\n\n\t\tif (thisNode.getContactTable().size() <= level) {\n\t\t\t// TODO: reactivate next line\n\t\t\t//thisNode.getContactTable().joinLevels();\n\t\t\t// TODO: deactivcate next 2 lines\n\t\t\t//System.out.println(\"#as#dasd#\"+thisNode.getContactTable().size());\n\n\t\t\t// this optimization ensures that no redundant levels are created\n\t\t\tNode lastJoiningNode = thisNode.getContactTable().getLastJoiningNode();\n\t\t\tint newPrefix;\n\t\t\tif (lastJoiningNode != null && lastJoiningNode != joiningNode) {\n\t\t\t\tnewPrefix = Main.skipGraph.generatePrefix();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tnewPrefix = (prefix-1)*(-1);\n\t\t\t}\n\n\t\t\t// if prefixes are identical join on level\n\t\t\tif (newPrefix == prefix) {\n\t\t\t\tContact contact = joiningNode.thisContact();\n\t\t\t\tContactLevel newContactLevel = new ContactLevel(contact, contact, newPrefix);\n\t\t\t\tthisNode.getContactTable().addLevel(newContactLevel);\n\t\t\t\t// updates nextNode on joining node\n\t\t\t\tModifyContactsOperation setPrevOnJoining = new SetContactOperation(level, prefix, PREV, thisNode);\n\t\t\t\tModifyContactsOperation setNextOnJoining = new SetContactOperation(level, prefix, NEXT, thisNode);\n\t\t\t\tjoiningNode.execute(setPrevOnJoining);\n\t\t\t\tjoiningNode.execute(setNextOnJoining);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tContact contact = thisNode.thisContact();\n\t\t\t\tContactLevel newContactLevel = new ContactLevel(contact, contact, newPrefix);\n\t\t\t\tthisNode.getContactTable().addLevel(newContactLevel);\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\n\t\t// local variables\n\t\tNode nextNode = thisNode.getContactTable().getLevel(level-1).getNextContact().getNode();\n\n\t\t// node has the same prefix on this level as joining node\n\t\tif (thisNode.getContactTable().getLevel(level).getPrefix() == prefix) {\n\n\t\t\tNode prevNode = thisNode.getContactTable().getLevel(level).getPrevContact().getNode();\n\t\t\t// updates nextNode on previous node\n\t\t\tModifyContactsOperation setNextOnPrev = new SetContactOperation(level, prefix, NEXT, joiningNode);\n\t\t\tprevNode.execute(setNextOnPrev);\n\t\t\t// updates prevNode on joining node\n\t\t\tModifyContactsOperation setPrevOnJoining = new SetContactOperation(level, prefix, PREV, prevNode);\n\t\t\tjoiningNode.execute(setPrevOnJoining);\n\t\t\t// updates nextNode on joining node\n\t\t\tModifyContactsOperation setNextOnJoining = new SetContactOperation(level, prefix, NEXT, thisNode);\n\t\t\tjoiningNode.execute(setNextOnJoining);\n\t\t\t// updates prevNode on this node\n\t\t\tthisNode.getContactTable().getLevel(level).setPrevContact(joiningNode);\n\t\t}\n\t\t// node has a different prefix on this level and forwards request to the next node on this level\n\t\t// (making sure nextNode != joiningNode)\n\t\telse if (nextNode != thisNode && nextNode != joiningNode) {\n\t\t\tnextNode.execute(this);\n\t\t}\n\t\treturn null;\n\t}", "public void determinePartitions( Callback c ){\n mCurrentDepth = 0;\n GraphNode node;\n GraphNode child;\n int depth = 0;\n List levelList = new java.util.LinkedList();\n int i = 0;\n //they contain those nodes whose parents have not been traversed as yet\n //but the BFS did it.\n List orphans = new java.util.LinkedList();\n\n\n //set the depth of the dummy root as 0\n mRoot.setDepth( mCurrentDepth );\n\n mQueue.addLast( mRoot );\n\n while( !mQueue.isEmpty() ){\n node = (GraphNode)mQueue.getFirst();\n depth = node.getDepth();\n if( mCurrentDepth < depth ){\n\n if( mCurrentDepth > 0 ){\n //we are done with one level!\n constructPartitions( c, levelList, mCurrentDepth );\n }\n\n\n //a new level starts\n mCurrentDepth++;\n levelList.clear();\n }\n mLogger.log( \"Adding to level \" + mCurrentDepth + \" \" + node.getID(),\n LogManager.DEBUG_MESSAGE_LEVEL);\n levelList.add( node );\n\n //look at the orphans first to see if any\n //of the dependency has changed or not.\n /*it = orphans.iterator();\n while(it.hasNext()){\n child = (GraphNode)it.next();\n if(child.parentsBlack()){\n child.setDepth(depth + 1);\n System.out.println(\"Set depth of \" + child.getID() + \" to \" + child.getDepth());\n\n child.traversed();\n mQueue.addLast(child);\n }\n\n //remove the child from the orphan\n it.remove();\n }*/\n\n\n node.setColor( GraphNode.BLACK_COLOR );\n for( Iterator it = node.getChildren().iterator(); it.hasNext(); ){\n child = (GraphNode)it.next();\n if(!child.isColor( GraphNode.GRAY_COLOR ) &&\n child.parentsColored( GraphNode.BLACK_COLOR )){\n mLogger.log( \"Adding to queue \" + child.getID(),\n LogManager.DEBUG_MESSAGE_LEVEL );\n child.setDepth( depth + 1 );\n child.setColor( GraphNode.GRAY_COLOR );\n mQueue.addLast( child );\n }\n /*else if(!child.isTraversed() && !child.parentsBlack()){\n //we have to do the bumping effect\n System.out.println(\"Bumping child \" + child);\n orphans.add(child);\n }*/\n }\n node = (GraphNode)mQueue.removeFirst();\n mLogger.log( \"Removed \" + node.getID(),\n LogManager.DEBUG_MESSAGE_LEVEL);\n }\n\n //handle the last level of the BFS\n constructPartitions( c, levelList, mCurrentDepth );\n\n\n //all the partitions are dependant sequentially\n for( i = mCurrentDepth; i > 1; i-- ){\n constructLevelRelations( c, i - 1, i );\n\n }\n\n done( c );\n }", "private void setup(){\n buildTree(2);\n }", "public static void main(String[] args) throws IOException {\n PopulationModelDefinition def = new PopulationModelDefinition(\n new EvaluationEnvironment(),\n ChordModel::generatePopulationRegistry,\n ChordModel::getRules,\n ChordModel::getMeasures,\n (e, r) -> new HashMap<>(),\n ChordModel::states);\n def.setParameter(\"N\",new SibillaDouble(1000));\n PopulationModel model = def.createModel();\n\n List<Trajectory> trajectories = new LinkedList();\n byte[] trajectoryBytes = BytearrayToFile.fromFile(\".\", \"chordTrajectory_Samplings100_Deadline600_N1000_Samples6\");\n\n Trajectory toAdd = TrajectorySerializer.deserialize(trajectoryBytes, model);\n Sample firstSample =(Sample) toAdd.getData().get(0);\n PopulationState firstState = (PopulationState) firstSample.getValue();\n System.out.printf(\"Population model registry size: %d\", model.stateByteArraySize() / 4);\n System.out.printf(\"\\nChord with externalizable\\nSamples: %d\\nState population vector size: %d\", toAdd.getData().size(), firstState.getPopulationVector().length);\n trajectories.add(toAdd);\n\n ComputationResult result = new ComputationResult(trajectories);\n\n byte[] customBytes = ComputationResultSerializer.serialize(result, model);\n byte[] customBytesCompressed = Compressor.compress(customBytes);\n byte[] apacheBytes = Serializer.getSerializer(SerializerType.APACHE).serialize(result);\n byte[] apacheBytesCompressed = Compressor.compress(apacheBytes);\n byte[] fstBytes = Serializer.getSerializer(SerializerType.FST).serialize(result);\n byte[] fstBytesCompressed = Compressor.compress(fstBytes);\n\n System.out.printf(\"\\nCustom bytes: %d\\nApache bytes: %d\\nFst bytes: %d\", customBytes.length, apacheBytes.length, fstBytes.length);\n System.out.printf(\"\\nCustom bytes compressed: %d\\nApache bytes compressed: %d\\nFst bytes compressed: %d\", customBytesCompressed.length, apacheBytesCompressed.length, fstBytesCompressed.length);\n }", "void startPCT(){\n int i=0;\n int j=0;\n// System.out.print(\"Number of Producers: \"+numOfProducers+\n// \", Number of Consumers \"+numOfConsumers+\", \");\n _myBuffer.PrintStatus();\n// System.out.println(\"Producers priority = \"+_prodPriority+\n// \", Consumers priority = \"+_consPriority);\n// System.out.println(\"Starting the program :\");\n// System.out.println(\"----------------------\");\n while (i<numOfProducers || j<numOfConsumers){\n if (i<numOfProducers) {\n //System.out.println(\"Starting producer \"+i);\n threadProducer[i].start();\n }\n if (j<numOfConsumers) {\n threadConsumer[j].start();\n //System.out.println(\"Starting consumer \"+i);\n }\n i++;\n if (i<numOfProducers) {\n threadProducer[i].start();\n //System.out.println(\"Starting producer \" +i);\n }\n i++;\n j++;\n }\n }", "protected void buildHirarchyTree() {\r\n\t\tfor(SupplyZone s : supplyZoneLines){\r\n\t\t\tZoneNode currentZone = zoneNodeMap.get(s.getZoneName());\r\n\t\t\tZoneNode parentZone = zoneNodeMap.get(s.getParentZoneName());\r\n\t\t\tif(parentZone == null){\r\n\t\t\t\tzonesTreeRoot = currentZone;\r\n\t\t\t}\r\n\t\t\tcurrentZone.setParent(parentZone);\r\n\t\t\tif (parentZone != null) parentZone.addChild(currentZone); \r\n\t\t}\r\n\r\n\t}", "private void fourNodesTopo() {\n ReadWriteTransaction tx = dataBroker.newReadWriteTransaction();\n n(tx, true, \"n1\", Stream.of(pB(\"n1:1\"), pB(\"n1:2\"), pI(\"n1:3\"), pO(\"n1:4\"), pO(\"n1:5\")));\n n(tx, true, \"n2\", Stream.of(pB(\"n2:1\"), pB(\"n2:2\"), pO(\"n2:3\"), pI(\"n2:4\"), pI(\"n2:5\")));\n n(tx, true, \"n3\", Stream.of(pB(\"n3:1\"), pB(\"n3:2\"), pO(\"n3:3\"), pO(\"n3:4\"), pI(\"n3:5\")));\n n(tx, true, \"n4\", Stream.of(pB(\"n4:1\"), pB(\"n4:2\"), pI(\"n4:3\"), pI(\"n4:4\"), pO(\"n4:5\")));\n l(tx, \"n1\", \"n1:5\", \"n2\", \"n2:5\", OperationalState.ENABLED, ForwardingDirection.UNIDIRECTIONAL);\n l(tx, \"n1\", \"n1:4\", \"n4\", \"n4:4\", OperationalState.ENABLED, ForwardingDirection.UNIDIRECTIONAL);\n l(tx, \"n2\", \"n2:3\", \"n4\", \"n4:3\", OperationalState.ENABLED, ForwardingDirection.UNIDIRECTIONAL);\n l(tx, \"n3\", \"n3:4\", \"n2\", \"n2:4\", OperationalState.ENABLED, ForwardingDirection.UNIDIRECTIONAL);\n l(tx, \"n4\", \"n4:5\", \"n3\", \"n3:5\", OperationalState.ENABLED, ForwardingDirection.UNIDIRECTIONAL);\n try {\n tx.submit().checkedGet();\n } catch (TransactionCommitFailedException e) {\n e.printStackTrace();\n }\n }", "public Tuple2<PhysicalPlan, Map<Integer, CheckpointPlan>> generate() {\n CopyOnWriteArrayList<PassiveCompletableFuture<PipelineStatus>>\n waitForCompleteBySubPlanList = new CopyOnWriteArrayList<>();\n\n Map<Integer, CheckpointPlan> checkpointPlans = new HashMap<>();\n final int totalPipelineNum = pipelines.size();\n Stream<SubPlan> subPlanStream =\n pipelines.stream()\n .map(\n pipeline -> {\n this.pipelineTasks.clear();\n this.startingTasks.clear();\n this.subtaskActions.clear();\n final int pipelineId = pipeline.getId();\n final List<ExecutionEdge> edges = pipeline.getEdges();\n\n List<SourceAction<?, ?, ?>> sources = findSourceAction(edges);\n\n List<PhysicalVertex> coordinatorVertexList =\n getEnumeratorTask(\n sources, pipelineId, totalPipelineNum);\n coordinatorVertexList.addAll(\n getCommitterTask(edges, pipelineId, totalPipelineNum));\n\n List<PhysicalVertex> physicalVertexList =\n getSourceTask(\n edges, sources, pipelineId, totalPipelineNum);\n\n physicalVertexList.addAll(\n getShuffleTask(edges, pipelineId, totalPipelineNum));\n\n CompletableFuture<PipelineStatus> pipelineFuture =\n new CompletableFuture<>();\n waitForCompleteBySubPlanList.add(\n new PassiveCompletableFuture<>(pipelineFuture));\n\n checkpointPlans.put(\n pipelineId,\n CheckpointPlan.builder()\n .pipelineId(pipelineId)\n .pipelineSubtasks(pipelineTasks)\n .startingSubtasks(startingTasks)\n .pipelineActions(pipeline.getActions())\n .subtaskActions(subtaskActions)\n .build());\n return new SubPlan(\n pipelineId,\n totalPipelineNum,\n initializationTimestamp,\n physicalVertexList,\n coordinatorVertexList,\n jobImmutableInformation,\n executorService,\n runningJobStateIMap,\n runningJobStateTimestampsIMap);\n });\n\n PhysicalPlan physicalPlan =\n new PhysicalPlan(\n subPlanStream.collect(Collectors.toList()),\n executorService,\n jobImmutableInformation,\n initializationTimestamp,\n runningJobStateIMap,\n runningJobStateTimestampsIMap);\n return Tuple2.tuple2(physicalPlan, checkpointPlans);\n }", "public void generateLevel() {\n\t\tfor (int y = 0; y < this.height; y++) {\n\t\t\tfor (int x = 0; x < this.width; x++) {\n\t\t\t\tif (x * y % 10 < 5)\n\t\t\t\t\ttiles[x + y * width] = Tile.GRASS.getId();\n\t\t\t\telse\n\t\t\t\t\ttiles[x + y * width] = Tile.STONE.getId();\n\t\t\t}\n\t\t}\n\t}", "private void propagateFeatures () {\n Logger.log(\"Propagating invocations through the Call Graph - DFS\");\n Set<SootMethod> calculated = new HashSet<SootMethod>();\n Chain<SootClass> classes = Scene.v().getApplicationClasses();\n SootClass c = null;\n SootMethod m = null;\n try {\n for (SootClass sclass : classes) {\n c = sclass;\n List<SootMethod> methods = sclass.getMethods();\n for (SootMethod method : methods) {\n m = method;\n if (!calculated.contains(method)) {\n propagateFeatures(method, calculated);\n }\n }\n }\n } catch (Exception e) {\n // handling\n }\n }", "@Override\n\tprotected void setup(Reducer<LongWritable, Text, Text, Text>.Context context)\n\t\t\tthrows IOException, InterruptedException {\n\t\tsuper.setup(context);\n\t\tminPnts=Long.parseLong(context.getConfiguration().get(\"minPnts\"));\n\t\tepsilon=Double.parseDouble(context.getConfiguration().get(\"epsilon\"));\n\t\toutput = new MultipleOutputs<Text,Text>(context);\n\t\tPath[] cacheFilesLocal = DistributedCache.getLocalCacheFiles(context.getConfiguration());\n\t\tfor (Path eachPath : cacheFilesLocal) {\n\t\t\t\n\t\t\tloadPartition(eachPath, context);\n\t\t\t\n\t\t}\n\t}", "public static void main(String[] args) \n\t{\n\t\ttree x = new tree(0);\n\t\t\n\t\ttreenode r = x.root;\n\t\t\n//\t\ttreenode c = r;\n//\t\tfor(int i =1;i<=4;i++)\n//\t\t{\n//\t\t\tfor(int j=0;j<=8;j=j+4)\n//\t\t\t{\n//\t\t\t\ttreenode n = new treenode(i+j);\n//\t\t\t\tif(j==0)\n//\t\t\t\t{\n//\t\t\t\t\tr.child.add(n);\n//\t\t\t\t\tc = n;\n//\t\t\t\t}\n//\t\t\t\telse\n//\t\t\t\t{\n//\t\t\t\t\tc.child.add(n);\n//\t\t\t\t\tc = n;\n//\t\t\t\t}\n//\t\t\t}\n//\t\t}\n\t\ttreenode c1 = r;\n\t\ttreenode c2 = r;\n\t\ttreenode c3 = r;\n\t\ttreenode c4 = r;\n\t\tfor(int i=1;i<13;i++)\n\t\t{\n\t\t\ttreenode n = new treenode(i);\n\t\t\tif(i%4==1)\n\t\t\t{\n\t\t\t\tc1.child.add(n);\n\t\t\t\tc1 = n;\n\t\t\t}\n\t\t\tif(i%4==2)\n\t\t\t{\n\t\t\t\tc2.child.add(n);\n\t\t\t\tc2 = n;\n\t\t\t}\n\t\t\tif(i%4==3)\n\t\t\t{\n\t\t\t\tc3.child.add(n);\n\t\t\t\tc3 = n;\n\t\t\t}\n\t\t\tif(i%4==0)\n\t\t\t{\n\t\t\t\tc4.child.add(n);\n\t\t\t\tc4 = n;\n\t\t\t}\n\t\t}\n\t\tx.traverse(r);\n\t}", "private static void collectLastDefsBeforeCall(CallerClass caller) {\n Map<String,Map<BytecodeInstruction,Map<Integer,Set<BasicBlock>>>> nodesForAllCouplingPaths = new HashMap<>();\n// Set<BytecodeInstruction> nodesForAllCouplingPaths = new HashSet<>();\n // method --> call_site --> variable --> Set<Edges>\n Map<String,Map<BytecodeInstruction,Map<String,Set<ControlFlowEdge>>>> edgesForAllCouplingPaths = new HashMap<>();\n// Set<ControlFlowEdge> edgesForAllCouplingPaths = new HashSet<>();\n\n// List<BytecodeInstruction> handled = new ArrayList<>();\n\n\n\n\n for (String method: caller.getInvolvedMethods()){\n Map<BytecodeInstruction,List<Type>> callSitesOfMethod = caller.getCallSitesOfMethod(method);\n if(callSitesOfMethod == null){\n LOG.info(\"method {} does not have call_site.\",method);\n continue;\n }\n nodesForAllCouplingPaths.put(method,new HashMap<>());\n edgesForAllCouplingPaths.put(method,new HashMap<>());\n for (Map.Entry<BytecodeInstruction, List<Type>> entry : callSitesOfMethod.entrySet()) {\n List<BytecodeInstruction> parents = new ArrayList<>();\n BytecodeInstruction call_site = entry.getKey();\n List<Type> types = entry.getValue();\n nodesForAllCouplingPaths.get(method).put(call_site,new HashMap<>());\n edgesForAllCouplingPaths.get(method).put(call_site,new HashMap<>());\n List<String> varNames = detectVariableNames(call_site,types,caller.getMethodCFG(call_site.getMethodName()));\n int varCounter = 0;\n for(String var : varNames){\n varCounter++;\n if(var == null){\n continue;\n }\n nodesForAllCouplingPaths.get(method).get(call_site).put(varCounter,new HashSet<>());\n edgesForAllCouplingPaths.get(method).get(call_site).put(var,new HashSet<>());\n // We perform this process for each varName\n parents.clear();\n parents.add(call_site);\n while(!parents.isEmpty()){\n // get the candidate node\n BytecodeInstruction currentNode = parents.remove(0);\n if(currentNode.getMethodName().equals(method)){\n nodesForAllCouplingPaths.get(method).get(call_site).get(varCounter).add(currentNode.getBasicBlock());\n\n if(currentNode.isDefinition() && currentNode.getVariableName().equals(var)){\n // This node is a last_definition for the current variable\n LOG.info(\"Node {} is the last definition for variable {} which is parameter #{} for call_site {}\",currentNode,var,varCounter,call_site);\n continue;\n }\n }\n\n for (BytecodeInstruction parent: caller.getMethodCFG(method).getParents(currentNode)){\n if(nodesForAllCouplingPaths.get(method).get(call_site).get(varCounter).contains(parent)){\n continue;\n }\n if(!parent.getMethodName().equals(method)){\n parents.add(parent);\n continue;\n }\n ControlFlowEdge edgeToParent = caller.getMethodCFG(method).getEdge(parent,currentNode);\n edgesForAllCouplingPaths.get(method).get(call_site).get(var).add(edgeToParent);\n parents.add(parent);\n }\n }\n }\n }\n }\n\n\n IntegrationDefUsePool.getInstance().registerCallSitesLastDef(caller.getClassName(),nodesForAllCouplingPaths);\n }", "protected void generateInner(boolean verbose, SourceBuilder builder) {\n for (int i = 0; i < m_inners.size(); i++) {\n ((ClassHolder)m_inners.get(i)).generate(verbose, builder);\n }\n }", "@Override \n\t\tprotected void setup(Mapper<Object, Text, Text, NullWritable>.Context context)\n\t\t\t\tthrows IOException, InterruptedException {\n\t\t\ttypeSet.add('1');typeSet.add('2');typeSet.add('3');\n\t\t\ttypeSet.add('4');typeSet.add('8');typeSet.add('9');\n\t\t}", "protected final void emitLowLevel() {\n preAllocationStage();\n allocationStage();\n postAllocationStage();\n }", "private void level4() {\n }", "private void spawn()\n\t{\n\t\t// get the path index and set the stage for the next path to be different\n\t\tint currentPathIndex = 0; //currentWave.getPathIndex();\n\t\t//currentWave.cyclePathList();\n\t\t\n\t\t// get the actual path using the index\n\t\tPath currentPath = pathList.get(currentPathIndex);\n\t\t\n\t\t// create the new Walker with that path\n\t\tWalker walker;\n\t\t\n\t\tswitch(currentWave.dequeueWalker())\n\t\t{\n\t\t\tcase QUICK:\t\twalker = new WalkerQuick(currentPath);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\tdefault:\t\twalker = new WalkerBasic(currentPath);\n\t\t}\n\t\t\n\t\t// put Walker on specific DrawingLayer if necessary\n\t\tif(spawnDrawingLayer != null)\n\t\t{\n\t\t\twalker.moveToDrawingLayer(spawnDrawingLayer);\n\t\t}\n\t}" ]
[ "0.60959756", "0.58797693", "0.5556454", "0.55005836", "0.53808", "0.5222075", "0.51869136", "0.512589", "0.50544494", "0.5052647", "0.5049017", "0.5046192", "0.49900085", "0.49687603", "0.49580973", "0.49412686", "0.49237165", "0.49236664", "0.4921934", "0.48864883", "0.4874249", "0.487417", "0.4866751", "0.4860325", "0.485185", "0.48468408", "0.481573", "0.48098055", "0.48087448", "0.47928628", "0.47921118", "0.47788382", "0.47728032", "0.47664776", "0.47628734", "0.47582966", "0.47571322", "0.4755801", "0.47481158", "0.47444078", "0.4738895", "0.47130325", "0.47097418", "0.47092983", "0.46970564", "0.46940094", "0.46918726", "0.467878", "0.46743047", "0.46734554", "0.46639767", "0.46619737", "0.4659896", "0.465416", "0.46446174", "0.46437144", "0.4642438", "0.46375343", "0.46364948", "0.463277", "0.46324322", "0.46271884", "0.4621343", "0.46172237", "0.4608973", "0.46070698", "0.46063757", "0.46018308", "0.45951745", "0.45926192", "0.459233", "0.4581443", "0.45788345", "0.45744368", "0.45715255", "0.45712885", "0.45598814", "0.45543358", "0.45519707", "0.45448643", "0.45414886", "0.45402685", "0.45378095", "0.45335945", "0.4522395", "0.45178828", "0.45176014", "0.45174015", "0.45071542", "0.4506173", "0.45037284", "0.4501253", "0.4499474", "0.44994205", "0.44992444", "0.4497384", "0.44970164", "0.44964692", "0.44960004", "0.44941574" ]
0.70537406
0
write you code here
@Override public void componentResized(ComponentEvent e) { isOpen = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void generateCode()\n {\n \n }", "public void logic(){\r\n\r\n\t}", "public void genCode(CodeFile code) {\n\t\t\n\t}", "private static void cajas() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "CD withCode();", "public void ganar() {\n // TODO implement here\n }", "public void mo38117a() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "public void furyo ()\t{\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "public void mo4359a() {\n }", "void pramitiTechTutorials() {\n\t\n}", "public void gored() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "private void strin() {\n\n\t}", "public void gen(CodeSeq code, ICodeEnv env) {\n\r\n\t}", "private void yy() {\n\n\t}", "public static void main(String[] args) {\n // write your code here - this is called comment and it always starts with double slash\n // and comlier will ignore this because of the // sign.\n // I am gonna say hello\n // JAVA IS CASE SENSITIVE LANGUAGE\n // System and system are very different things in java\n //Hello AND hello are different for java\n // System.out.println(\"Hello Batch 15!\");\n // System.out.println(\"I am still here.\");\n // System.out.println(\"I love Java.\");\n\n // Write a program to display your information.\n // When you run it, it should have this outcome.\n // I am your name here\n // I am from batch 15\n // I am from your city here\n // I love Java\n\n System.out.println(\"I am Sevim.\");\n System.out.println(\"I am from Batch 15.\");\n System.out.println(\"I'm from New Jersey.\");\n System.out.println(\"I love Java.\");\n\n\n\n }", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n public void perish() {\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\r\n\tpublic void code() {\n\t\tus.code();\r\n\t\tSystem.out.println(\"我会java...\");\r\n\t}", "public void baocun() {\n\t\t\n\t}", "public void hello(){\n\t\t\r\n \t\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "Programming(){\n\t}", "private void kk12() {\n\n\t}", "public void smell() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "void rajib () {\n\t\t \n\t\t System.out.println(\"Rajib is IT Eng\");\n\t }", "@Override\r\n\tpublic void code() {\n\t\tSystem.out.println(\"我会C语言....\");\r\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "public void mo55254a() {\n }", "@Override\r\n\tpublic void runn() {\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 edit() {\n\t\tSystem.out.println(\"编写java笔记\");\r\n\t}", "public void mo9848a() {\n }", "@Override\n\tvoid output() {\n\t\t\n\t}", "protected void mo6255a() {\n }", "@Override\n\tpublic void orgasm() {\n\t\t\n\t}", "private void sout() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "public void mo5382o() {\n }", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "public void mo3376r() {\n }", "public void skystonePos5() {\n }", "@Override\r\n\t\tpublic void doDomething() {\r\n\t\t\tSystem.out.println(\"I am here\");\r\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void function() {\n\t\t\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "public void perder() {\n // TODO implement here\n }", "public void themesa()\n {\n \n \n \n \n }", "public void mo97908d() {\n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void stg() {\n\n\t}", "@Override\n protected void codeGenMain(DecacCompiler compiler, Registres regs, Pile p) {\n }", "public void Tyre() {\n\t\t\r\n\t}", "void kiemTraThangHopLi() {\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "public void Data(){\n\t\t\t\t\t\t\n\t\t\t\t\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "public void mo3749d() {\n }", "public static void main(String[] args) {\n\t// write your code here\n }", "private void sub() {\n\n\t}", "public void mo21793R() {\n }", "void mo67924c();", "public void cocinar(){\n\n }", "@Override\n\tprotected void interr() {\n\t}", "public void sinyal();", "public void miseAJour();", "@Override\n\tpublic void dosomething() {\n\t\t\n\t}", "void berechneFlaeche() {\n\t}", "public void nhapdltextlh(){\n\n }", "protected void display() {\n\r\n\t}", "private static void ThridUmpireReview() {\n\t\tSystem.out.println(\" Umpier Reviews the Score Board\");\n\t\t \n\t\t\n\t}", "public void mo21791P() {\n }", "static void feladat5() {\n\t}", "@Override\n public void memoria() {\n \n }", "public final void cpp() {\n }", "public void mo12930a() {\n }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "public void mo21785J() {\n }", "public void skystonePos6() {\n }", "@Override\r\n\tpublic void engine() {\r\n\t\t// TODO Auto-generated method stub\t\t\r\n\t}", "public void working()\n {\n \n \n }", "public void mo6081a() {\n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "public void createCode(){\n\t\tsc = animationScript.newSourceCode(new Coordinates(10, 60), \"sourceCode\",\r\n\t\t\t\t\t\t null, AnimProps.SC_PROPS);\r\n\t\t \r\n\t\t// Add the lines to the SourceCode object.\r\n\t\t// Line, name, indentation, display dealy\r\n\t\tsc.addCodeLine(\"1. Berechne für jede (aktive) Zeile und Spalte der Kostenmatrix\", null, 0, null); // 0\r\n\t\tsc.addCodeLine(\" die Differenz aus dem kleinsten (blau) und zweit-kleinsten (lila)\", null, 0, null);\r\n\t\tsc.addCodeLine(\" Element der entsprechenden Zeile/ Spalte.\", null, 0, null);\r\n\t\tsc.addCodeLine(\"2. Wähle die Zeile oder Spalte (grün) aus bei der sich die größte\", null, 0, null); \r\n\t\tsc.addCodeLine(\" Differenz (blau) ergab.\", null, 0, null);\r\n\t\tsc.addCodeLine(\"3. Das kleinste Element der entsprechenden Spalte\", null, 0, null); \r\n\t\tsc.addCodeLine(\" (bzw. Zeile) gibt nun die Stelle an, welche im\", null, 0, null);\r\n\t\tsc.addCodeLine(\" Transporttableau berechnet wird (blau).\", null, 0, null);\r\n\t\tsc.addCodeLine(\"4. Nun wird der kleinere Wert von Angebots- und\", null, 0, null); // 4\r\n\t\tsc.addCodeLine(\" Nachfragevektor im Tableau eingetragen.\", null, 0, null);\r\n\t\tsc.addCodeLine(\"5. Anschließend wird der eingetragene Wert von den Rändern\", null, 0, null); // 5\r\n\t\tsc.addCodeLine(\" abgezogen (mindestens einer muss 0 werden). \", null, 0, null);\r\n\t\tsc.addCodeLine(\"6. Ist nun der Wert im Nachfragevektor Null so markiere\", null, 0, null); // 6\r\n\t\tsc.addCodeLine(\" die entsprechende Spalte in der Kostenmatrix. Diese\", null, 0, null);\r\n\t\tsc.addCodeLine(\" wird nun nicht mehr beachtet (rot). Ist der Wert des\", null, 0, null);\r\n\t\tsc.addCodeLine(\" Angebotsvektors Null markiere die Zeile der Kostenmatrix.\", null, 0, null);\r\n\t\tsc.addCodeLine(\"7. Der Algorithmus wird beendet, falls lediglich eine Zeile oder\", null, 0, null); // 8\r\n\t\tsc.addCodeLine(\" Spalte der Kostenmatrix unmarkiert ist (eines reicht aus).\", null, 0, null);\r\n\t\tsc.addCodeLine(\"8 . Der entsprechenden Zeile bzw. Spalte im Transporttableau werden\", null, 0, null); // 9\t\t \r\n\t\tsc.addCodeLine(\" die restlichen Angebots- und Nachfragemengen zugeordnet.\", null, 0, null);\r\n\t\t\r\n\t}", "public void skystonePos4() {\n }" ]
[ "0.64156544", "0.61896", "0.6031118", "0.60109067", "0.59593844", "0.59297514", "0.5832755", "0.5828144", "0.5822204", "0.58167315", "0.58164877", "0.580399", "0.57964724", "0.57910484", "0.5786943", "0.5770641", "0.5762687", "0.5758873", "0.57435006", "0.57415676", "0.5728427", "0.56904536", "0.56867146", "0.56867146", "0.56817937", "0.5679819", "0.56633675", "0.5650307", "0.56460536", "0.56402415", "0.5639297", "0.5632651", "0.56292176", "0.56249684", "0.5618238", "0.5618238", "0.56102234", "0.5607641", "0.5607025", "0.5573995", "0.5571502", "0.5571502", "0.5571502", "0.5571502", "0.5571502", "0.5571502", "0.5571502", "0.55630815", "0.553465", "0.55314654", "0.5524571", "0.55241406", "0.55146307", "0.55077744", "0.5506228", "0.5496698", "0.5485106", "0.5484823", "0.54828864", "0.54827815", "0.5482327", "0.5481552", "0.54785824", "0.5477283", "0.547035", "0.5456949", "0.5448003", "0.5447223", "0.544004", "0.5438417", "0.54323626", "0.543108", "0.54277134", "0.54220784", "0.54219276", "0.5421637", "0.54169583", "0.5414514", "0.5409134", "0.5408748", "0.54061097", "0.5396929", "0.5392183", "0.5388449", "0.538756", "0.5383524", "0.5383452", "0.53825194", "0.5380098", "0.5378767", "0.53756064", "0.5367919", "0.5367076", "0.5358668", "0.53570014", "0.53444", "0.5343041", "0.5340957", "0.53394145", "0.5335735", "0.5334807" ]
0.0
-1
TODO Autogenerated method stub
private void setExtendedState(int maximizedBoth) { }
{ "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
Default empty Stay constructor
public Stay() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Bishop()\n {\n super();\n }", "defaultConstructor(){}", "private NoOpCompactor(SegmentStorageSystem storage) {\n super(storage);\n }", "private Default()\n {}", "private StoneContract() {\n }", "void DefaultConstructor(){}", "private StickFactory() {\n\t}", "public State(){}", "Reproducible newInstance();", "@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }", "public AllDifferent()\n {\n this(0);\n }", "protected Betaling()\r\n\t{\r\n\t\t\r\n\t}", "protected Depot() {\n\t\tthis(null);\n\t}", "public State()\n {\n this(\"\");\n }", "@SuppressWarnings(\"unused\")\n private Flight() {\n this(null, null, null, null, null, null, null, null, null, null, null);\n }", "public Stack() {}", "public MovingGuest() \n {\n // Deferred to subclasses.\n }", "public backCard() {\n\t\tsuper(null,null);\n\t}", "public Boop() {\n\t\tsuper();\n\t}", "private FanState() {\n\t\tinstance = this;\n\t}", "private DishContract() {\n }", "public MountainBike() {\n super();\n }", "public lo() {}", "public StackImpl() {\r\n\t\t\r\n\t}", "public InitialState() {\r\n\t\t}", "StateClass() {\r\n restored = restore();\r\n }", "public SimpleSateMachine(final @NotNull S initialState)\n {\n super(initialState);\n }", "private SyncState() {}", "public BrokerAlgo() {}", "public Basic() {}", "public SgaexpedbultoImpl()\n {\n }", "public Patch56State()\n {\n this( null, 0 );\n }", "public Waschbecken() {\n this(0, 0);\n }", "protected abstract S createDefault();", "public God() {}", "public BasicStack()\n\t{\n\t\tlist = new LinkedList<T>();\n\t}", "public DefaultStabilizeClimb() {\n\t\trequires(Robot.climb);\n\t}", "private SingleTon() {\n\t}", "private SingleObject()\r\n {\r\n }", "private TopM() {}", "private FavouriteContract() {\n }", "private TweetRiver() { }", "public Bike(){\n\t}", "public LateDeliverableProcessorImpl() {\r\n // Empty\r\n }", "public Workflow() {\n\t\tsuper();\n\t}", "public MyStack() {\r\n\t\tthis(DEFAULT_CAPACITY);\r\n\t}", "public BicycleStation() {\n super();\n }", "public Sad() {\n }", "public MouseCrosstabShuttleVO()\n {\n // Documented empty block - avoid compiler warning - no super constructor\n }", "protected Gateway(boolean noInit) {\n genClient = null;\n }", "private SingletonSigar(){}", "public StandardPipeline() {\n this(null);\n }", "public Bond() {\n this(null, null, null, CDKConstants.STEREO_BOND_NONE);\n }", "private Supervisor() {\r\n\t}", "public FruitStand() {}", "public Lanceur() {\n\t}", "public AugmentedfsmFactoryImpl() {\n\t\tsuper();\n\t}", "public Stack() {\r\n this(20);\r\n }", "private CommandBrocker() {}", "private SingleObject(){}", "public void showStay();", "private SingleObject(){\n }", "private Rekenhulp()\n\t{\n\t}", "public EWorkflowFactoryImpl() {\n\t\tsuper();\n\t}", "public Box() {}", "private stendhal() {\n\t}", "public Stack() {\n /*\n * Constructor\n * This function is an initializer for this class.\n */\n top = null;\n sz = 0;\n }", "public Sandwich()\n\t{super();\n \n\t\t\n\t}", "private Server()\n\t{\n\t}", "@SuppressWarnings(\"unused\")\n private SharedReminderMount() {\n this((String) null, (Boolean) null);\n }", "protected AuctionServer()\n\t{\n\t}", "public ShearY() {\n this(0);\n }", "public Gate(){\n\n }", "public NEATTranscriberBain() {\n\t}", "public CampLease( ) {}", "private State5() {\n\t}", "public Light() {\n\t\tthis(false);\n\t}", "public DefaultNashRequestImpl() {\n\t\t\n\t}", "private Smart()\n {\n this.references = new ArrayList<>();\n this.next = new Component[0];\n this.peek = Distributor.UNKNOWN;\n }", "public Orbiter() {\n }", "private DarthSidious(){\n }", "public MyStack() {\n\n }", "public Mouse() {\n\t\tthis(null);\n\t}", "private Store() {\n\t}", "protected Settlement() {\n // empty constructor\n }", "public MyStack() {\n\n }", "private History() {}", "public Trade() {\n\t}", "public Eleve() {\r\n\t\tsuper();\r\n\t}", "public Ship(){\n\t}", "public Open() {\n //creates a new open instance\n }", "@SuppressWarnings(\"unused\")\n private GranteeChooser() {\n this(null, null, null);\n }", "public Stack()\n\t{\n\t\tlist = new LinkedList<T>();\n\t}", "public Gasto() {\r\n\t}", "public ArbolSplay() {\n super();\n }", "private MarketSnapshot() {\n\n }", "public Flip() {\n super(\"!flip\", true);\n }", "Stock()\n {\n super();\n }", "private EagerlySinleton()\n\t{\n\t}", "public Fish() {\r\n\t}" ]
[ "0.6210719", "0.616539", "0.6116942", "0.60644615", "0.60187846", "0.60141", "0.60086554", "0.59491134", "0.5921354", "0.5888839", "0.5862844", "0.5841257", "0.5793347", "0.57575387", "0.57460797", "0.57369936", "0.5695514", "0.569452", "0.56919926", "0.569163", "0.5691314", "0.5686507", "0.5684446", "0.56842566", "0.56627655", "0.5656681", "0.5647258", "0.56414396", "0.5618898", "0.5602195", "0.5596673", "0.5595176", "0.5591844", "0.5588494", "0.55857253", "0.55834466", "0.55814075", "0.555333", "0.55487114", "0.55432916", "0.55393434", "0.55353385", "0.5532345", "0.5528076", "0.5525416", "0.55233973", "0.55201125", "0.55192643", "0.55175865", "0.55131567", "0.5511578", "0.5508527", "0.55034643", "0.5502686", "0.5497173", "0.54965353", "0.5484866", "0.5483798", "0.54764324", "0.5475645", "0.5464408", "0.54581237", "0.54573506", "0.54562175", "0.5449417", "0.54479", "0.5438919", "0.54377425", "0.54369223", "0.543507", "0.5433618", "0.542937", "0.54261935", "0.5424525", "0.5423072", "0.5422574", "0.54143137", "0.541202", "0.5409297", "0.54079", "0.5402133", "0.540032", "0.5399633", "0.5398795", "0.5388147", "0.5383585", "0.5382484", "0.5381607", "0.5379496", "0.53754884", "0.5369406", "0.53660625", "0.53628284", "0.53625935", "0.53584737", "0.53528714", "0.5349943", "0.5347066", "0.5346755", "0.5345713" ]
0.76833284
0
Create an opened stay with a pet in a home
public Stay(Date startedAt, Pet pet, Home home) { if(home.accept(pet)) { this.startedAt = startedAt; this.finishedAt = null; this.pet = pet; this.home = home; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void stayDoor() {\n if (stage != Stage.DOOR_CHOSEN) {\n throw new RuntimeException(\"Invalid Stage\");\n }\n\n stage = Stage.END;\n for (Door door : doors) {\n if (door.getState() == State.CLOSED) {\n door.open();\n }\n continue;\n }\n total_stayed++;\n if (chosen_door.getContains() == Contains.CAR) {\n won_stayed++;\n }\n }", "public abstract LivingObject createLife(Cell locat);", "void newGame() {\n\t\tstate = new model.State () ; \n\t\tif(host != null ) host.show(state) ; \n\t}", "static public void petMenu() {\n while (true) {\n Presenter.showMenu(new String[] {\"See Pet\", \"Send Message\", \"Set Reminder\", \"Edit Pet\", \"Back\"},\n \"You can do these with your pet:\");\n int userChoice = GameController.getUserNum(5);\n if (userChoice == 1) {\n viewPet(LocalUserManager.getCurrentUser().getPetId());\n }\n else if (userChoice == 2) {\n MessageController.createMessage();\n }\n else if (userChoice == 3) {\n ReminderController.reminderMenu();\n }\n else if (userChoice == 4) {\n editPet();\n }\n else {\n return;\n }\n }\n }", "public void spawnNew() {\n\t\tif (tier> 1) {\n\t\t\ttier--;\n\t\t\thealth = tier;\n\t\t\tdamage = tier;\n\t\t\tspeed = 5;\n\t\t\timg = getImage(updateImage(tier)); // converted getImage to protected b/c it wasn't accessible by Balloon class (child class)\n\t\t}\n\t\telse {\n\t\t\tisAlive = false;\n\t\t\tdeletePath();\t\t\t\n\t\t}\n\t}", "public static void createNPC() {\n //create the good npc\n BSChristiansen.setName(\"BS_Christiansen\");\n BSChristiansen.setCurrentRoom(jungle);\n BSChristiansen.setDescription(\"The survivor of the plane crash look to be some kind of veteran soldier, \"\n + \"\\nbut he is heavly injured on his right leg so he cant move \");\n BSChristiansen.addDialog(\"If you want to survive on this GOD forsaken island, you \\nmust first find food and shelter.\"\n + \"\\nYou can craft items to help you survive, if you \\nhave the right components.\");\n BSChristiansen.addDialog(\"To escape the island you need a raft, \\nsome berries and fish so you can survive on the sea,\\nand a spear so you can hunt for more food\");\n\n //create the bad npc\n josephSchnitzel.setName(\"Joseph_Schnitzel\");\n josephSchnitzel.setCurrentRoom(mountain);\n josephSchnitzel.setDescription(\"A lonely surviver with very filthy hair, and a wierd smell of weinerschnitzel.\");\n josephSchnitzel.addDialog(\"Heeelloooo there my freshlooking friend, I am Joseph\\nSchnitzel, if you scratch my back I might scratch your's.\" + \"\\n\" + \"Go fetch me some eggs, or I'll kill you\");\n josephSchnitzel.addDialog(\"Talks to himself\\nis that muppet still alive\");\n josephSchnitzel.addDialog(\"Talks to himself\\nHow long is he going to last\");\n josephSchnitzel.addDialog(\"Talks to himself\\nI wonder what those noises were ing the cave\");\n josephSchnitzel.addDialog(\"GET THE HELL OUT OF MY WAY!!!\");\n josephSchnitzel.setDamageValue(100);\n\n //create another npc\n mysteriousCrab.setName(\"Mysterious_Crab\");\n mysteriousCrab.setCurrentRoom(cave);\n mysteriousCrab.setDescription(\"A mysterious crab that you dont really get why can talk\");\n mysteriousCrab.addDialog(\"MUHAHAHA i'm the finest and most knowledgeable \\ncrab of them all mr.Crab and know this island\\nlike the back of my hand! oh i mean claw...\"\n + \"\\nA Random fact: \"\n + \"to escape this island you need a raft, \\nsome berries and fish so you can survive on the sea,\\nand a spear so you can hunt for more food\");\n }", "public void createItem()\n {\n \n necklace_red = new Item (\"Red Necklace\",\"This is a strange red necklace\");\n poolroom.addItem(necklace_red);\n \n // items in dancing room // \n gramophone = new Item (\"Gramophone\",\"This is a nice gramophone but without disk\");\n candelar = new Item(\"Candelar\",\"This candelar gives light and is really beautiful\");\n dancingroom.addItem(gramophone);\n dancingroom.addItem(candelar);\n \n //items in hall //\n potion2HP = new Potion(\"Potion 2 HP\",\"This potion gives 2 HP to the player\",2);\n hall.addItem(potion2HP);\n \n //items in corridor //\n halberd = new Weapon(\"Halberd\",\"This the statut halberd. It was not a really good idea to take it\",4,60);\n corridor.addItem(halberd);\n \n // items in bathroom //\n potion6HP = new Potion(\"Potion6HP\",\"This potions gives 6 HP to the player\",6);\n bathroom.addItem(potion6HP);\n \n // items in guestbedroom //\n Exit exit_from_corridor_to_bedroom = new Exit(\"south\",corridor,false, null);\n bedroomkey = new Keys(\"Bedroom key\",\"This key opens the master bedroom door\",exit_from_corridor_to_bedroom);\n guestbedroom.addItem(bedroomkey);\n \n // items in kitchen // \n set_of_forks_and_knives = new Weapon(\"Set of forks and knives\",\"This weapon is a set of silver forks and silver knives\",2,40);\n kitchen.addItem(set_of_forks_and_knives);\n \n // items in bedroom //\n Item disk = new Item(\"Disk\",\"This disk can be used with the gramophone\");\n bedroom.addItem(disk);\n \n Potion potion3HP = new Potion (\"Potion3HP\",\"This potions gives 3 HP to the player\",3);\n bedroom.addItem(potion3HP);\n \n Item money = new Item(\"Money\",\"You find 60 pounds\");\n bedroom.addItem(money);\n \n // items in the library //\n Item book = new Item(\"Book\",\"The title book is 'The best human friend : the cat'\");\n library.addItem(book);\n \n // items in laboratory //\n Exit exit_from_corridor_to_attic = new Exit(\"up\",corridor,false, null);\n Keys attickey = new Keys(\"Attic key\",\"This key is a shaped bone from a squeletor\", exit_from_corridor_to_attic); \n laboratory.addItem(attickey);\n \n Item construction_drawing = new Item(\"Construction drawing\",\"You find construction drawings. Mr Taylor planed to dig really deeply to the east of the gardener hut\");\n laboratory.addItem(construction_drawing);\n \n //items in garden //\n Weapon fork = new Weapon(\"Fork\",\"This fork is green and brown\",3,50);\n garden.addItem(fork);\n \n Potion apple = new Potion(\"Apple\",\"This apples gives you 2 HP\",2);\n garden.addItem(apple);\n \n // items in gardenerhut //\n \n Item pliers = new Item(\"Pliers\",\"You can cut a chain with this object\");\n gardenerhut.addItem(pliers);\n \n Item ritual_cape = new Item(\"Ritual cape\",\"You find a black ritual cape. It is very strange !\");\n gardenerhut.addItem(ritual_cape);\n \n Item necklace_black_1 = new Item(\"Necklace\",\"You find a very strange necklace ! It is a black rond necklace with the same symbol than in the ritual cape\");\n gardenerhut.addItem(necklace_black_1);\n \n //items in anteroom //\n \n Potion potion4HP = new Potion(\"Potion4HP\",\"This potion gives 4 HP to the player\",4);\n anteroom.addItem(potion4HP);\n \n Weapon sword = new Weapon(\"Sword\",\"A really sharp sword\",6,70);\n anteroom.addItem(sword);\n // items in ritual room //\n \n Item red_ritual_cape = new Item(\"Red ritual cape\", \"This is a ritual cape such as in the gardener hut but this one is red. There are some blond curly hairs\");\n ritualroom.addItem(red_ritual_cape);\n \n Item black_ritual_cape_1 = new Item(\"Black ritual cape\",\"This is a black ritual cape\");\n ritualroom.addItem(black_ritual_cape_1);\n \n Item black_ritual_cape_2 = new Item (\"Black ritual cape\",\"Another black ritual cape\");\n ritualroom.addItem(black_ritual_cape_2);\n \n }", "private void makeMeal() {\n\t\teating = true;\n\t\ttama.setLayoutX(200);\n\t\t\n\t\tmeal = new Sprite(3, 3, 27, 24, new Image(\"file:./res/images/meal.png\"), 1, 2100);\n\t\tmeal.setLayoutX(150);\n\t\tmeal.setLayoutY(150);\n\t\tmeal.setScaleX(0.5);\n\t\tmeal.setScaleY(0.5);\n\t\tgrid.getChildren().addAll(meal);\n\t\tPauseTransition pause = new PauseTransition(Duration.millis(2100));\n\t\tpause.setOnFinished(e -> {\n\t\t\tgrid.getChildren().remove(meal);\n\t\t\ttama.setLayoutX(190);\n\t\t\teating = false;\n\t\t\tmodel.getController().eatMeal();\n//\t\t\tif(!model.isHealthy()){\n//\t\t\t\tsetSickImg();\n//\t\t\t}\n\t\t});\n\t\tpause.play();\n\t}", "public void makeNew() {\n\t\towner.switchMode(WindowMode.ITEMCREATE);\n\t}", "private void onNew() {\r\n\t\tnewPark.setOnAction(e -> {\r\n\t\t\tif (inAction.booleanValue() == false) {\r\n\t\t\t\tinAction = true;\r\n\t\t\t\tVBox vbox = new VBox();\r\n\t\t\t\tLabel popLabel = new Label(\"This will delete your current work. Do you want to save?\");\r\n\t\t\t\tdoIt = new Button(\"Proceed\");\r\n\t\t\t\tpopLabel.setFont(Font.font(\"Calibri\",20));\r\n\t\t\t\t\r\n\t\t\t\tvbox.getChildren().addAll(popLabel, doIt);\r\n\t\t\t\tvbox.setAlignment(Pos.CENTER);\r\n\t\t\t\tvbox.setSpacing(20);\r\n\t\r\n\t\t\t\tStage popStage = new Stage();\r\n\t\t\t\tpopStage.setAlwaysOnTop(true);\r\n\t\t\t\tpopStage.setTitle(\"WARNING\");\r\n\t\t\t\tScene popScene = new Scene(vbox, 500, 100);\r\n\t\t\t\tpopStage.setScene(popScene);\r\n\t\t\t\tpopStage.showAndWait();\r\n\t\t\t\tinAction = false;\r\n\t\t\t}\r\n\t\t});\r\n\t}", "public static Activity pestControl() {\n Position veteranBoat = new Position(2638, 2653);\n BooleanSupplier isOnIsland = Game.getClient()::isInInstancedScene;\n\n Function<Position, Activity> moveTo = position -> Activity.newBuilder()\n .withName(\"Moving to position: \" + position)\n .addPreReq(() -> Movement.isWalkable(position))\n .addPreReq(() -> position.distance(Players.getLocal()) > 5)\n .addSubActivity(Activities.toggleRun())\n .addSubActivity(() -> Movement.walkTo(position))\n .thenPauseFor(Duration.ofSeconds(4))\n .maximumDuration(Duration.ofSeconds(20))\n .untilPreconditionsFail()\n .build();\n\n Activity boardShip = Activity.newBuilder()\n .withName(\"Boarding ship to start game\")\n .addPreReq(() -> SceneObjects.getNearest(\"Gangplank\") != null)\n .addPreReq(() -> !isOnIsland.getAsBoolean())\n .addPreReq(() -> Players.getLocal().getX() >= 2638)\n .tick()\n .addSubActivity(Activities.moveTo(veteranBoat))\n .addSubActivity(() -> SceneObjects.getNearest(\"Gangplank\").interact(\"Cross\"))\n .thenPauseFor(Duration.ofSeconds(3))\n .build();\n\n Activity waitForGameToStart = Activity.newBuilder()\n .withName(\"Waiting for game to start\")\n .addPreReq(() -> !isOnIsland.getAsBoolean())\n .addPreReq(() -> Players.getLocal().getX() < 2638)\n .addSubActivity(() -> Time.sleepUntil(isOnIsland, 1000 * 60 * 10))\n .build();\n\n Activity goToSpawnSpot = Activity.newBuilder()\n .withName(\"Going to my fav spot\")\n .addPreReq(isOnIsland)\n .addSubActivity(() -> moveTo.apply(Players.getLocal().getPosition().translate(0, -31)).run())\n .build();\n\n Activity killStuff = Activity.newBuilder()\n .withName(\"killing stuff\")\n .addPreReq(isOnIsland)\n .addPreReq(() -> Npcs.getNearest(npc -> true) != null)\n .addPreReq(() -> Npcs.getNearest(npc -> true).containsAction(\"Attack\"))\n .addSubActivity(() -> Npcs.getNearest(npc -> true).interact(\"Attack\"))\n .thenSleepUntil(() -> Players.getLocal().getTarget() == null)\n .build();\n\n return Activity.newBuilder()\n // TODO(dmattia): Check for world 344\n .withName(\"Pest Control\")\n .addSubActivity(boardShip)\n .addSubActivity(waitForGameToStart)\n .addSubActivity(goToSpawnSpot)\n .addSubActivity(killStuff)\n .build();\n }", "static public void editPet() {\n User user = LocalUserManager.getCurrentUser();\n Pet pet = LocalPetManager.findPet(user.getPetId());\n while (true) {\n Presenter.showMenu(new String[]{\"Edit pet name\", \"Set pet public/private\", \"Re-create pet\", \"Back\"},\n \"\\nThis is the pet editor menu, you can:\");\n int userChoice = GameController.getUserNum(4);\n if (userChoice == 1) {\n assert pet != null;\n String newPetName = GameController.getUserString(\"Your previous pet name is \"+\n pet.getPetName()+\". Please enter a new name...\");\n if (newPetName.equals(pet.getPetName())){\n Presenter.showNotice(\"That's the same name from before!\");\n }\n else {\n LocalPetManager.changePetName(user.getPetId(), newPetName);\n Presenter.showNotice(\"You have changed your pet name to \"+pet.getPetName()+\" successfully!\");\n }\n }\n else if (userChoice == 2) {\n boolean petPublic = GameController.getUserYesOrNo(\n \"Your pet is \"+LocalPetManager.checkPublicity(user.getPetId())+\" to others now.\\n\" +\n \"Enter 'y' to make it public or 'n' to make it private\");\n assert pet != null;\n pet.setPublicity(petPublic);\n Presenter.showNotice(\"You have change your pet to \"+\n LocalPetManager.checkPublicity(user.getPetId())+\" successfully!\");\n }\n else if (userChoice == 3){\n boolean reCreatePet = GameController.getUserYesOrNo(\n \"Are you sure you want to create a new pet? You will lose \" + pet.getPetName()+\" in the process.\\n\" +\n \"Enter 'y' to create a new pet or 'n' to go back\"\n );\n if (reCreatePet){\n UserController.createUserPet();\n Presenter.showNotice(\"\\nYou have successfully created a new pet!\\n\");\n }\n return;\n }\n else {\n return;\n }\n }\n }", "public void newGame() {\n // this.dungeonGenerator = new TowerDungeonGenerator();\n this.dungeonGenerator = cfg.getGenerator();\n\n Dungeon d = dungeonGenerator.generateDungeon(cfg.getDepth());\n Room[] rooms = d.getRooms();\n\n String playername = JOptionPane.showInputDialog(null, \"What's your name ?\");\n if (playername == null) playername = \"anon\";\n System.out.println(playername);\n\n this.player = new Player(playername, rooms[0], 0, 0);\n player.getCurrentCell().setVisible(true);\n rooms[0].getCell(0, 0).setEntity(player);\n\n frame.showGame();\n frame.refresh(player.getCurrentRoom().toString());\n frame.setHUD(player.getGold(), player.getStrength(), player.getCurrentRoom().getLevel());\n }", "public PetLove create(PetLove newPetLove) throws ErrorInProcessPetLove {\r\n\t\ttry {\r\n\t\t\t// access to DB\r\n\t\t\tEntityManager em = AccessToDb.createFactory();\r\n\r\n\t\t\tem.persist(newPetLove);\r\n\r\n\t\t\t// Save and close\r\n\t\t\tAccessToDb.commitFactory();\r\n\t\t\treturn newPetLove;\r\n\t\t} catch (Exception e) {\r\n\t\t\tthrow new ErrorInProcessPetLove(\"Error in process pet love data\");\r\n\t\t} finally {\r\n\t\t\tAccessToDb.closeFactory();\r\n\t\t}\r\n\t}", "private void createObstacole()\n {\n //Create Obstacole\n Obstacole topObstacole = new Obstacole(\"top\");\n Obstacole botObstacole = new Obstacole(\"bottom\");\n Obstacole midObstacole = new Obstacole(\"mid\");\n //amount of space between obstacole\n int ObstacoleSpacing = 150;\n \n //get object image\n GreenfootImage image = botObstacole.getImage();\n \n //random number to vary\n int numOfObstacoles = Greenfoot.getRandomNumber(40) + 15;\n \n //counter increment to 50\n ObstacoleCounter++;\n if (ObstacoleCounter == 50)\n {\n if (getObjects(Obstacole.class).size() < numOfObstacoles)\n {\n addObject(botObstacole, getWidth(), getHeight() / 2 + image.getHeight() - Greenfoot.getRandomNumber(100) - 10);\n addObject(topObstacole, getWidth(), botObstacole.getY() - image.getHeight() - ObstacoleSpacing);\n addObject(midObstacole, getWidth(), botObstacole.getY() + image.getHeight() / 3 + ObstacoleSpacing);\n }\n ObstacoleCounter = 0;\n }\n }", "public static void createItem() {\n //Initializing an item and putting it in a room airport\n itemLocation.addItem(airport, new PickableItem(\"Bottle\", \"This is a bottle that have been left behind by someone\", 2, false));\n itemLocation.addItem(airport, new PickableItem(\"Boardingpass\", \"This is a boardingpass to get on the plane to Hawaii: 126AB\", 1, false));\n\n //Initializing an item and putting it in a room beach\n itemLocation.addItem(beach, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(beach, new PickableItem(\"Fish\", \"Why are you inspecting this item, its GOD damn fish\", 1, true));\n itemLocation.addItem(beach, new PickableItem(\"Fish\", \"Why are you inspecting this item, its GOD damn fish\", 1, true));\n itemLocation.addItem(beach, new PickableItem(\"Flint\", \"This a flint, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(beach, new PickableItem(\"Rope\", \"This is some rope that has been washed up on the beach shore from the plane crash \", 2, false));\n itemLocation.addItem(beach, new PickableItem(\"Stick\", \"This is a small stick, maybe it can be used to create something more usefull\", 1, false));\n itemLocation.addItem(beach, new PickableItem(\"Stick\", \"This is a small stick, maybe it can be used to create something more usefull\", 1, false));\n //non pickable item\n itemLocation.addItem(beach, new Item(\"GiantRock\", \"The giant rock dont look like it can be moved\", 100));\n itemLocation.addItem(beach, new Item(\"GiantLog\", \"The giant log dont look like it can be moved\", 100));\n\n //Initializing an item and putting it in a room jungle\n itemLocation.addItem(jungle, new PickableItem(\"Berry\", \"this is berries, maybe its poisonous try ur luck!! \", 1, true));\n itemLocation.addItem(jungle, new PickableItem(\"Berry\", \"this is berries, maybe its poisonous try ur luck!! \", 1, true));\n itemLocation.addItem(jungle, new PickableItem(\"Lumber\", \"This is a log of tree, maybe it can be used to craft something to get away from this island \", 3, false));\n itemLocation.addItem(jungle, new PickableItem(\"Lian\", \"This is a lian from the jungle, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(jungle, new PickableItem(\"Lian\", \"This is a lian from the jungle, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(jungle, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(jungle, new PickableItem(\"Stick\", \"This is a small stick, maybe it can be used to create something more usefull\", 1, false));\n //non pickable item\n itemLocation.addItem(jungle, new Item(\"GiantLog\", \"The giant log dont look like it can be moved\", 100));\n\n //Initializing an item and putting it in a room mountain\n itemLocation.addItem(mountain, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(mountain, new PickableItem(\"Egg\", \"This is some wild eggs, maybe it can be used for food\", 1, true));\n itemLocation.addItem(mountain, new PickableItem(\"Lumber\", \"This is a log of tree, maybe it can be used to craft something to get away from this island \", 3, false));\n\n //Initializing an item and putting it in a room cave\n itemLocation.addItem(cave, new PickableItem(\"Shroom\", \"these shrooms look suspecius, but maybe the can be\", 1, true));\n itemLocation.addItem(cave, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(cave, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(cave, new PickableItem(\"Waterbottle\", \"This is freshwater found in the jungle, maybe you can drink it\", 2, true));\n itemLocation.addItem(cave, new PickableItem(\"Flint\", \"This a flint, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(cave, new Item(\"GiantRock\", \"The giant rock dont look like it can be moved\", 100));\n\n //Initializing an item and putting it in a room camp\n itemLocation.addItem(camp, new PickableItem(\"Stone\", \"This is a stone, maybe it can be used to create something more usefull\", 2, false));\n itemLocation.addItem(camp, new PickableItem(\"Stick\", \"This is a small stick, maybe it can be used to create something more usefull\", 1, false));\n itemLocation.addItem(camp, new PickableItem(\"Egg\", \"This is some wild eggs, maybe it can be used for food\", 1, true));\n\n //Initializing an item and putting it in a room seaBottom\n itemLocation.addItem(seaBottom, new PickableItem(\"Backpack\", \"This is a backpack from the plane crash maybe you can use it to carry more items \", 0, false));\n itemLocation.addItem(seaBottom, new PickableItem(\"WaterBottle\", \"This is a water bottle from the plan crash \", 1, true));\n itemLocation.addItem(seaBottom, new PickableItem(\"Rope\", \"This is some rope that has been washed up on the beach shore from the plane crash\", 2, false));\n }", "public void createRooms()\n {\n Room outside,bedroom, bathroom, hallway1, hallway2, spareroom, kitchen, fridge;\n\n // create the rooms\n bedroom = new Room(\"Bedroom\", \"your bedroom. A simple room with a little bit too much lego\");\n bathroom = new Room(\"Bathroom\", \"the bathroom where you take your business calls. Also plenty of toilet paper\");\n hallway1 = new Room(\"Hallway1\", \"the hallway outside your room, there is a dog here blocking your path. Youll need to USE something to distract him\");\n hallway2 = new Room(\"Hallway2\", \"the same hallway? This part leads to the spare room and kitchen\");\n spareroom = new Room(\"Spare room\", \"the spare room. This is for guests\");\n kitchen = new Room(\"Kitchen\", \"your kitchen. There is a bowl with cereal in it waiting for you,But its still missing some things\");\n fridge = new Room (\"Walk in Fridge\", \"a walkin fridge. Have you ever seen Ratatouille? Its like that\");\n outside = new Room(\"Outside\", \"the outside world, breathe it in\");\n \n \n Item toiletPaper, milk, spoon, poison;// creates the items and sets their room\n \n toiletPaper = new Item(\"Toilet-Paper\", hallway1);\n toiletPaper.setDescription(\"Just your standard bog roll. Dont let your dog get a hold of it\");\n bathroom.setItems(\"Toilet-Paper\",toiletPaper);\n \n milk = new Item(\"Milk\", kitchen);\n milk.setDescription(\"white and creamy, just like mama used to make\");\n fridge.setItems(\"Milk\", milk);\n \n spoon = new Item(\"Spoon\", kitchen);\n spoon.setDescription(\"Like a fork but for liquids\");\n spareroom.setItems(\"Spoon\", spoon);\n \n poison = new Item(\"Poison\", outside);\n poison.setDescription(\"This will probably drain all of your energy, dont USE it\");\n outside.setItems(\"Poison\", poison);\n \n // initialise room exits\n bedroom.setExit(\"east\", bathroom);\n bedroom.setExit(\"north\", hallway1);\n \n bathroom.setExit(\"west\", bedroom);\n \n hallway1.setExit(\"south\", bedroom);\n hallway1.setExit(\"north\", hallway2);\n \n hallway2.setExit(\"south\", hallway1);\n hallway2.setExit(\"west\", spareroom);\n hallway2.setExit(\"north\", kitchen);\n \n spareroom.setExit(\"east\", hallway2);\n \n kitchen.setExit(\"east\", outside);\n kitchen.setExit(\"west\", fridge);\n \n fridge.setExit(\"east\", kitchen);\n \n \n outside.setExit(\"west\", kitchen);\n \n\n this.currentRoom = bedroom; // start game in bedroom\n \n }", "public void createBike(){\n createFrame();\n addWheels();\n addPedals();\n getPrice();\n }", "@Override\n\tpublic void onAdd() {\n\t\tsuper.onAdd();\n\n\t\tsetIdleAnimation(4527);\n\t\tsetNeverRandomWalks(true);\n\t\tsetWalkingHomeDisabled(true);\n\n\t\tthis.region = Stream.of(AbyssalSireRegion.values()).filter(r -> r.getSire().getX() == getSpawnPositionX()\n\t\t && r.getSire().getY() == getSpawnPositionY()).findAny().orElse(null);\n\n\t\tRegion region = Region.getRegion(getSpawnPositionX(), getSpawnPositionY());\n\n\t\tif (region != null) {\n\t\t\tregion.forEachNpc(npc -> {\n\t\t\t\tif (npc instanceof AbyssalSireTentacle) {\n\t\t\t\t\tif (!npc.isDead()) {\n\t\t\t\t\t\tnpc.setDead(true);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\tList<Position> tentaclePositions = Arrays.asList(\n\t\t\t\tthis.region.getTentacleEast(),\n\t\t\t\tthis.region.getTentacleWest(),\n\t\t\t\tthis.region.getTentacleNorthEast(),\n\t\t\t\tthis.region.getTentacleNorthWest(),\n\t\t\t\tthis.region.getTentacleSouthEast(),\n\t\t\t\tthis.region.getTentacleSouthWest()\n\t\t );\n\n\t\ttentaclePositions.forEach(position -> {\n\t\t\ttentacles.add(NpcHandler.spawnNpc(5909, position.getX(), position.getY(), position.getZ()));\n\t\t});\n\n\t\tList<Position> respiratoryPositions = Arrays.asList(\n\t\t\t\tthis.region.getRespiratorySystemNorthEast(),\n\t\t\t\tthis.region.getRespiratorySystemNorthWest(),\n\t\t\t\tthis.region.getRespiratorySystemSouthEast(),\n\t\t\t\tthis.region.getRespiratorySystemSouthWest()\n\t\t );\n\n\t\trespiratoryPositions.forEach(position -> respiratorySystems.add(\n\t\t\t\tNpcHandler.spawnNpc(5914, position.getX(), position.getY(), position.getZ())));\n\t}", "static void house(int xcor, int ycor, Turtle turtle)\r\n {\r\n turtle.penUp();\r\n turtle.moveTo(xcor, ycor);\r\n turtle.penDown();\r\n equilateral(100, turtle);\r\n rectangle(100, 50, turtle);\r\n // Moves to make first window\r\n turtle.penUp();\r\n turtle.turnRight();\r\n turtle.forward(25);\r\n turtle.turnRight();\r\n turtle.forward(30);\r\n turtle.penDown();\r\n window(20, turtle); \r\n // Moves to make second window\r\n turtle.penUp();\r\n turtle.turn(180);\r\n turtle.forward(20);\r\n turtle.turnRight();\r\n turtle.forward(60);\r\n turtle.penDown();\r\n window(20, turtle); \r\n // Moves to make the door\r\n turtle.penUp();\r\n turtle.turnRight();\r\n turtle.forward(40);\r\n turtle.turnRight();\r\n turtle.forward(50);\r\n turtle.penDown();\r\n window(15, turtle);\r\n }", "public void spawn(boolean type)\n\t{\n\t\tif (type)\n\t\t{\n\t\t\triver[findEmpty()] = new Bear();\n\t\t}\n\t\telse\n\t\t{\n\t\t\triver[findEmpty()] = new Fish();\n\t\t}\n\t}", "public void createRooms()//Method was given\n { \n \n // create the rooms, format is name = new Room(\"description of the situation\"); ex. desc = 'in a small house' would print 'you are in a small house.'\n outside = new Room(\"outside\", \"outside of a small building with a door straight ahead. There is a welcome mat, a mailbox, and a man standing in front of the door.\", false);\n kitchen = new Room(\"kitchen\", \"in what appears to be a kitchen. There is a sink and some counters with an easter egg on top of the counter. There is a locked door straight ahead, and a man standing next to a potted plant. There is also a delicious looking chocolate bar sitting on the counter... how tempting\", true);\n poolRoom = new Room(\"pool room\", \"in a new room that appears much larger than the first room.You see a table with a flashlight, towel, and scissors on it. There is also a large swimming pool with what looks like a snorkel deep in the bottom of the pool. Straight ahead of you stands the same man as before.\", true);\n library = new Room(\"library\", \"facing east in a new, much smaller room than before. There are endless rows of bookshelves filling the room. All of the books have a black cover excpet for two: one red book and one blue book. The man stands in front of you, next to the first row of bookshelves\", true);\n exitRoom = new Room(\"exit\", \"outside of the building again. You have successfully escaped, congratulations! Celebrate with a non-poisonous chocolate bar\",true);\n \n // initialise room exits, goes (north, east, south, west)\n outside.setExits(kitchen, null, null, null);\n kitchen.setExits(poolRoom, null, outside, null);\n poolRoom.setExits(null, library, kitchen, null);\n library.setExits(null, null, exitRoom, poolRoom);\n exitRoom.setExits(null, null, null, null); \n \n currentRoom = outside; // start game outside\n }", "public void act() \n {\n EggFactory eggFactory = new EggFactory();\n \n move(4);\n int random = Greenfoot.getRandomNumber(5000);\n if((random>200 & random<300) || ((Farm)getWorld()).atWorldEdge(this))\n {\n turn(180);\n getImage().mirrorVertically();\n move(4);\n \n }\n\n if( Greenfoot.getRandomNumber(100) ==0)\n {\n\n Farm farm = (Farm)getWorld();\n Egg egg = null; \n int eggPicker = Greenfoot.getRandomNumber(80);\n //DropEggStrategy dropEgg = new DropEggStrategy(); //Strategy pattern\n\n IEggStrategy whiteStrategy = new WhiteEggStrategy(eggFactory);\n IEggStrategy blackStrategy = new BlackEggStrategy(eggFactory);\n IEggStrategy goldenStrategy = new GoldenEggStrategy(eggFactory);\n \n DropEggContext context = new DropEggContext();\n \n if(eggPicker >= 50 && eggPicker <= 60){\n \n context.setIEggStrategy(goldenStrategy);\n egg = context.dropEgg();\n getWorld().addObject(egg, this.getX(), this.getY()+45);\n }\n else if(eggPicker >= 60 && eggPicker <= 70){\n\n context.setIEggStrategy(blackStrategy);\n egg = context.dropEgg();\n getWorld().addObject(egg, this.getX(), this.getY()+45);\n }\n else{\n context.setIEggStrategy(whiteStrategy);\n egg = context.dropEgg();\n getWorld().addObject(egg, this.getX(), this.getY()+45);\n }\n \n egg.register(farm.getLifeObserver());//register life creator observer into egg subject \n\n \n\n }\n\n }", "private static void createParty() {\n\n\n JFrame fenetre = new JFrame(\"Little Thief Auto\");\n\n Route route = new Route();\n User user = new User();\n\n Affichage affichage = new Affichage(fenetre, user, route);\n Controleur ctrl = new Controleur(affichage, user, route);\n //ctrl.setAffichage(affichage);\n //ctrl.setCmds();\n //Deplace deplace = new Deplace(user, route, affichage);\n\n //deplace.start();//Voir qui le lance, en fonction de si il y a une fenetre de demarage ou pas\n Data.initGame();\n\n //fenetre.add(affichage);\n //fenetre.add(affichage.outScreen);\n affichage.switchInteface(false);\n\n //ctrl.startPartie(); //Pas d ecran dacceuil\n /*\n\n Voler fly = new Voler();\n Etat modele = new Etat(fly);\n Controleur ctrl = new Controleur(modele);\n Affichage affichage = new Affichage(ctrl, modele);\n VueBird bird = new VueBird(affichage);\n\n Instant start = Instant.now();\n affichage.setTimer(start);\n\n ctrl.setVue(affichage);\n Avancer avance = new Avancer(affichage, modele.getParcours());\n\n ctrl.enableKeyPad();\n enableReload(fenetre, affichage);\n\n modele.getParcours().setTime(start);\n fly.start();\n avance.start();\n\n\n\n fenetre.add(affichage);\n*/\n\n\n\n\n fenetre.pack();\n fenetre.setVisible(true);\n fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n }", "public void newGame()\n\t{\n\t\tmap = new World(3, viewSize, playerFactions);\n\t\tview = new WorldView(map, viewSize, this);\n\t\tbar = new Sidebar(map, barSize);\n\t}", "public void newGame()\n\t{\n\t\tplanet.setLevel(0);\n\t\tship.resetScore();\n\t\tstopThreads();\n\t\tplanet = new Planet(750,600);\n\t\tship = new Ship(20.0,750,600,planet);\n\t\tbuttonPanel.update(ship,planet);\n\t\tgamePanel.update(ship,planet);\n\n\t\trestartThreads();\n\t}", "@Test\n\tpublic void testAllowIntakeOfAHomelessPet() {\n\t\tVirtualPetShelter testPetShelter = new VirtualPetShelter(); //eclipse ask me to create addPet in VPS\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\ttestPetShelter.addPet(new String(), new VirtualPet(\"Rusty\", \"He doesn't get hungry, he's Dead!\", 0, 0, 0));\n\t\tAssert.assertEquals(1, testPetShelter.getVirtualPets().size()); // I test # of values (pets) in collection\n\t}", "public void createFood() {\n }", "public WaiterAgent(String name, RestaurantGui gui, AStarTraversal aStar,\n\t\t Restaurant restaurant, Table[] tables) {\n\tsuper();\n\tthis.gui = gui;//main gui\n\tthis.name = name;\n\tthis.aStar = aStar;\n\tthis.restaurant = restaurant;//the layout for astar\n\twaiter = new Waiter(name.substring(0,2), new Color(255, 0, 0), restaurant);\n\t//currentPosition = new Position(3,13);\n\tcurrentPosition = new Position(waiter.getX(), waiter.getY());\n\tcurrentPosition.moveInto(aStar.getGrid());\n\toriginalPosition = currentPosition;//save this for moving into\n\tthis.tables = tables;\n\n\tString query =\n \"1 (?person)(and (person ?person)(hasname ?person \\\"\" + name+\"\\\"))\";\n loomInstance = PowerloomHelper.retrieve1(query);\n if (loomInstance!=null){\n PowerloomHelper.getloomMap().put(loomInstance, this);\n System.out.println(\"Found person in knowledge base: \" + loomInstance);\n }\n else {\n System.out.println(\"No waiter found. Instantiating...\");\n loomInstance = PowerloomHelper.instantiate(\"person\",this);//puts it in map\n\n String h = PowerloomHelper.instantiate(\"home\",null);\n query = \"(and (workingWaiter \" + loomInstance + \")\"\n +\"(haslocation \" +h+\" \"+gui.getneighborhoodInstance()\n +\") (lives \"+ loomInstance+\" \"+h+\")(hasname \"\n + loomInstance+\" \\\"\"+name+\"\\\"))\";\n print(\"asserting facts about new instance:\"+query);\n PLI.sAssertProposition(query, PowerloomHelper.getWorkingModule(), null);\n }\n\n }", "public void createBike() {\n createFrame();\n addWheels();\n addPedals();\n getPrice();\n }", "public Location spread()\n {\n // plant needs to be alive, ready to reproduce (# of turns) \n // square needs to have fewer than 10 plants, BUT a tree can kill \n // a grass plant\n }", "Habit createHabit(Habit habit);", "Elevage createElevage();", "private void createInstances()\n {\n Room EnchantedForest, IdyllicGlade, GumdropHill, DenseWoods, VolcanoHell, SecretHotSpring, MagmaChamber, MysteriousCloud, SkyParadise, Cirrostratus, Nimbostratus, Stratocumulus, WaterTemple, Whirlpool, EyeoftheStorm, BossQuarters, Portal;\n \n random = new Random();\n allrooms = new ArrayList<Room>();\n \n // create the rooms providing an ID to be passed into the room constructor\n EnchantedForest = new EnchantedForestRoom();\n allrooms.add(EnchantedForest);\n IdyllicGlade = new IdyllicGladeRoom();\n allrooms.add(IdyllicGlade);\n GumdropHill = new GumdropHillRoom();\n allrooms.add(GumdropHill);\n DenseWoods = new DenseWoodsRoom();\n allrooms.add(DenseWoods);\n VolcanoHell = new VolcanoHellRoom();\n allrooms.add(VolcanoHell);\n SecretHotSpring = new SecretHotSpringRoom();\n allrooms.add(SecretHotSpring);\n MagmaChamber = new MagmaChamberRoom();\n allrooms.add(MagmaChamber);\n MysteriousCloud = new MysteriousCloudRoom();\n allrooms.add(MysteriousCloud);\n SkyParadise = new SkyParadiseRoom();\n allrooms.add(SkyParadise);\n Cirrostratus = new CirrostratusRoom();\n allrooms.add(Cirrostratus);\n Nimbostratus = new NimbostratusRoom();\n allrooms.add(Nimbostratus);\n Stratocumulus = new StratocumulusRoom();\n allrooms.add(Stratocumulus);\n WaterTemple = new WaterTempleRoom();\n allrooms.add(WaterTemple);\n Whirlpool = new WhirlpoolRoom();\n allrooms.add(Whirlpool);\n EyeoftheStorm = new EyeoftheStormRoom();\n allrooms.add(EyeoftheStorm);\n BossQuarters = new BossQuartersRoom(); \n allrooms.add(BossQuarters);\n Portal = new PortalRoom();\n \n \n // initialise room exits, items and creatures\n EnchantedForest.setExit(\"east\", IdyllicGlade);\n EnchantedForest.setExit(\"west\", GumdropHill);\n EnchantedForest.setExit(\"south\", DenseWoods);\n \n IdyllicGlade.setExit(\"west\", EnchantedForest);\n \n GumdropHill.setExit(\"down\", EnchantedForest);\n GumdropHill.setExit(\"up\", MysteriousCloud);\n\n DenseWoods.setExit(\"north\", EnchantedForest);\n DenseWoods.setExit(\"south\", VolcanoHell);\n \n MagmaChamber.setExit(\"north\",VolcanoHell);\n \n VolcanoHell.setExit(\"east\", SecretHotSpring);\n VolcanoHell.setExit(\"north\", DenseWoods);\n VolcanoHell.setExit(\"west\", MysteriousCloud);\n VolcanoHell.setExit(\"south\", MagmaChamber);\n \n SecretHotSpring.setExit(\"west\", VolcanoHell);\n \n MysteriousCloud.setExit(\"west\", VolcanoHell);\n MysteriousCloud.setExit(\"in\", Portal);\n MysteriousCloud.setExit(\"up\", SkyParadise);\n \n SkyParadise.setExit(\"down\", MysteriousCloud);\n SkyParadise.setExit(\"up\", Cirrostratus);\n SkyParadise.setExit(\"east\", Nimbostratus);\n \n Cirrostratus.setExit(\"north\", SkyParadise);\n Cirrostratus.setExit(\"down\", WaterTemple);\n \n Nimbostratus.setExit(\"west\", SkyParadise);\n Nimbostratus.setExit(\"east\", Stratocumulus);\n \n Stratocumulus.setExit(\"west\", Nimbostratus);\n Stratocumulus.setExit(\"down\", WaterTemple);\n \n WaterTemple.setExit(\"up\",Stratocumulus);\n WaterTemple.setExit(\"high\", Cirrostratus);\n WaterTemple.setExit(\"down\", Whirlpool);\n WaterTemple.setExit(\"in\", BossQuarters);\n \n Whirlpool.setExit(\"up\", WaterTemple);\n Whirlpool.setExit(\"down\", EyeoftheStorm);\n \n EyeoftheStorm.setExit(\"up\", Whirlpool);\n EyeoftheStorm.setExit(\"in\", BossQuarters);\n \n BossQuarters.setExit(\"out\", WaterTemple);\n \n currentRoom = EnchantedForest; \n }", "@Override\r\n public Food createFood(List<Coordinate> obstacles) {\r\n Random random = new Random();\r\n double num = random.nextDouble();\r\n\r\n if (num <= MushroomPowerUp.rarity) {\r\n return new MushroomPowerUp(randomCoordinates(obstacles));\r\n }\r\n if (num <= DoubleScorePowerUp.rarity + MushroomPowerUp.rarity) {\r\n return new DoubleScorePowerUp(randomCoordinates(obstacles));\r\n }\r\n return new AppleFactory().createFood();\r\n }", "@FXML\n public void addGym() {\n \tnew eMenuHandler().hideMenu();\n \tDisplayBuildingInstructions.showBuildingInstr();\n \tAddEntityOnMouseClick.setBuildMode(Boolean.TRUE);\n \tAddEntityOnMouseClick.entityList(new BuildingGym(0, 0));\n \t/*\n int xpos = (int) (Math.random() * 600) + 100;\n World.getInstance().addEntityToWorld(new BuildingGym(xpos, 30));\n */\n }", "private void newGame()\r\n {\r\n //close the current screen\r\n screen.dispose();\r\n //start back at the set up menu\r\n SetupView screen = new SetupView();\r\n SetupController controller = new SetupController(screen);\r\n screen.registerObserver(controller);\r\n }", "public static Room surface() {\r\n Room outside = new Room(\"Surface\", \"surface\", Room.roomSize.SMALL, Room.roomType.EXTERIOR, \"The outdoors\", null, null, null);\r\n \r\n Trait result = new Trait(\"Ant Hill\", 1, TraitBuilder.room_change());\r\n result.setDesc(\"antHill\");\r\n Task embiggen = new Task(\"Dig a new entrance\", 2, \"Digging\",\r\n null,\r\n new Trait[]{new Trait(\"Ant\", 0, TraitBuilder.reqGreaterThanCreationLink())},\r\n new Trait[]{result},\r\n \"Start an ant hill\");\r\n outside.getTasks().add(embiggen);\r\n\r\n return outside;\r\n }", "public void saveNew() {\r\n String name, compName;\r\n double price;\r\n int id, inv, max, min, machId;\r\n //Gets the ID of the last part in the inventory and adds 1 to it \r\n id = Inventory.getAllParts().get(Inventory.getAllParts().size() - 1).getId() + 1;\r\n name = nameField.getText();\r\n inv = Integer.parseInt(invField.getText());\r\n price = Double.parseDouble(priceField.getText());\r\n max = Integer.parseInt(maxField.getText());\r\n min = Integer.parseInt(minField.getText());\r\n\r\n if (inHouseSelected) {\r\n machId = Integer.parseInt(machineOrCompanyField.getText());\r\n Part newPart = new InHouse(id, name, price, inv, min, max, machId);\r\n Inventory.addPart(newPart);\r\n } else {\r\n compName = machineOrCompanyField.getText();\r\n Part newPart = new Outsourced(id, name, price, inv, min, max, compName);\r\n Inventory.addPart(newPart);\r\n }\r\n\r\n }", "public void createGame()\n {\n //call Client Controller's setState method with\n //a parameter of new ClientLobbyState()\n clientController.startMultiPlayerGame(\"GameLobby\");\n }", "public void win()\r\n {\n Actor win;\r\n win=getOneObjectAtOffset(0,0,Goal.class);\r\n if (win !=null)\r\n {\r\n World myWorld=getWorld();\r\n Congrats cong=new Congrats();\r\n myWorld.addObject(cong,myWorld.getWidth()/2,myWorld.getHeight()/2); //(Greenfoot,2013) \r\n \r\n Greenfoot.stop();\r\n Greenfoot.playSound(\"finish.wav\"); //(Sound-Ideas,2014)\r\n \r\n }\r\n }", "@Override\n\tpublic void createNewGame() \n\t{\n\t\t//Create new game\n\t\tboolean randomhexes = getNewGameView().getRandomlyPlaceHexes();\n\t\tboolean randomnumbers = getNewGameView().getRandomlyPlaceNumbers();\n\t\tboolean randomports = getNewGameView().getUseRandomPorts();\n\t\tString title = getNewGameView().getTitle();\n\t\t\n\t\ttry \n\t\t{\n\t\t\tReference.GET_SINGLETON().proxy.createGame(title, randomhexes, randomnumbers, randomports);\n\t\t} \n\t\tcatch (JoinExceptions e) \n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t//Refresh game list\n\t\tList<Game> gamelist = Reference.GET_SINGLETON().proxy.getGameList();\n\t\tGameInfo[] games = new GameInfo[gamelist.size()];\n\t\tint counter = 0;\n\t\tfor(Game game: gamelist)\n\t\t{\n\t\t\tGameInfo thisgame = new GameInfo();\n\t\t\tthisgame.setId(game.getId());\n\t\t\tthisgame.setTitle(game.getTitle());\n\t\t\tfor(Player player : game.getPlayers())\n\t\t\t{\n\t\t\t\tPlayerInfo player_info = new PlayerInfo(player);\n\t\t\t\tplayer_info.setColor(player.getColor());\n\t\t\t\tif(!(player.color == null))thisgame.addPlayer(player_info);\n\t\t\t}\n\t\t\tgames[counter] = thisgame;\n\t\t\tcounter++;\n\t\t}\n\t\t\n\t\tReference ref = Reference.GET_SINGLETON();\n\t\t\n\t\tPlayerInfo ourguy = new PlayerInfo();\n\t\t\n\t\tourguy.setId(ref.player_id);\n\t\tourguy.setName(ref.name);\n\t\tif(getNewGameView().isModalShowing())\n\t\t{\n\t\t\tgetNewGameView().closeModal();\n\t\t}\n\t\tif (getNewGameView().isModalShowing())\n\t\t{\n\t\t\tgetNewGameView().closeModal();\n\t\t}\n\n\t\tgetJoinGameView().setGames(games, ourguy);\n\t\t\n\t}", "private Townhall(int id, Position pos, int amountWood, int amountGold){\n\t\tthis.id = id;\n\t\tthis.pos = pos;\n\t}", "private void createWizard(String persoName, String persoImage, int persoLife, int attack) {\n\t\tpersoList.add(new Wizard(persoName, persoImage, persoLife, attack));\n\t}", "private void addWalk(List<Pet> pets, String name, String description, DateTime startDateTime,\n DateTime endDateTime) {\n trAddWalk.setUser(user);\n trAddWalk.setPets(pets);\n trAddWalk.setName(name);\n trAddWalk.setDescription(description);\n trAddWalk.setStartDateTime(startDateTime);\n trAddWalk.setEndDateTime(endDateTime);\n trAddWalk.setCoordinates(getCoordinates());\n\n try {\n trAddWalk.execute();\n } catch (NotPetOwnerException | InvalidPeriodException e) {\n e.printStackTrace();\n }\n\n updateMedalProgress(UserAchievement.WALKER);\n }", "public void triggerInteraction(Player p, Tile newTile) {\n\t\tTile playerTil = p.getTile();\n\t\tGameObject object = newTile.getGameObject();\n\t\tif (object instanceof Item) {\n\t\t\tif (!p.inventoryIsFull()) {\n\t\t\t\tif (object instanceof Key) {\n\t\t\t\t\tint keyCount = 0;\n\t\t\t\t\tfor (Item i : p.getInventory()) {\n\t\t\t\t\t\tif (i instanceof Key) {\n\t\t\t\t\t\t\tkeyCount++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (keyCount >= PLAYER_KEY_LIMIT) {\n\t\t\t\t\t\tserverController.broadcastPlayerMessage(\n\t\t\t\t\t\t\t\t\"You already have 3 keys, Harambe does not appreciate your greed, sharpen up soldier!\",\n\t\t\t\t\t\t\t\tp);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tplayerTil.setGameObject(null);\n\t\t\t\tp.pickUpItem((Item) object);\n\t\t\t\tnewTile.setGameObject(p);\n\t\t\t\tp.setTile(newTile);\n\t\t\t\tp.setLocation(board.getLocationById(newTile.getLocationID()));\n\t\t\t}\n\t\t} else if (object instanceof Chest) {\n\t\t\tChest c = (Chest) object;\n\t\t\tfor (Item i : p.getInventory()) {\n\t\t\t\tif (i instanceof Key) {\n\t\t\t\t\tKey k = ((Key) i);\n\t\t\t\t\tif (k.getCode() == c.getCode()) {\n\t\t\t\t\t\tif (c.getContents() != null) {\n\t\t\t\t\t\t\tp.getInventory().remove(i);\n\t\t\t\t\t\t\tp.pickUpItem(c.getContents());\n\t\t\t\t\t\t\tc.setContents(null);\n\t\t\t\t\t\t\tserverController.broadcastPlayerMessage(\n\t\t\t\t\t\t\t\t\t\"With the chest you recognise a distinct glow, a Banana!\", p);\n\t\t\t\t\t\t\treturn;\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\tserverController.broadcastPlayerMessage(\n\t\t\t\t\t\"You don't have a key with the correct code to open this chest soldier!\", p);\n\n\t\t} else if (object instanceof Door) {\n\t\t\tDoor door = (Door) object;\n\t\t\tp.getTile().setGameObject(null);\n\t\t\tp.setLocation(door.getLocationID());\n\t\t\tp.setTile(p.getLocation().getTileAtPosition(door.getDoorPosition()));\n\t\t\tp.getTile().setGameObject(p);\n\n\t\t} else if (object instanceof NPC) {\n\t\t\tif (!nightTime) {\n\t\t\t\tfor (Item i : p.getInventory()) {\n\t\t\t\t\tif (i instanceof Fish) {\n\t\t\t\t\t\tp.getInventory().remove(i);\n\t\t\t\t\t\tp.pickUpItem(new Banana(\"Banana\"));\n\t\t\t\t\t\tserverController.broadcastPlayerMessage(\n\t\t\t\t\t\t\t\t\"The Pretty Penguin was overwhelmed as you handed her the fish, in response she gave you a golden reward!\",\n\t\t\t\t\t\t\t\tp);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tserverController.broadcastPlayerMessage(\n\t\t\t\t\t\t\"The Pretty Penguin did not offer a response, consider offering her a present\", p);\n\t\t\t}else{\n\t\t\t\tserverController.broadcastPlayerMessage(\n\t\t\t\t\t\t\"Ssssh!, Harambe does not approve of your intentions to wake a sleeping woman\", p);\n\t\t\t}\n\t\t}\n\t}", "public void getNewPentomino()\t{\n\t\tRan = (int) (Math.random() * Pentominos.length);\n\t\tPentominoName = Pentominos[Ran];\n\t\tSetShape(Ran);\n\t\t\n\t}", "@Test\n\tpublic void testAdoptionOfAShelterPet() {\n\t\tVirtualPetShelter testPetShelter = new VirtualPetShelter(); \n\t\ttestPetShelter.addPet(\"Rusty\", new VirtualPet(\"Rusty\", \"He doesn't get hungry, he's Dead!\", 0, 0, 0));\n\t\ttestPetShelter.addPet(\"Grazer\", new VirtualPet(\"Grazer\", \"She cant leave.. she's dead too!\", 0, 0, 0));\n\t\ttestPetShelter.adoptPet(\"Grazer\"); // I created adoptPet, eclipse erred and asked me to create adoptPet in VPS \n\t\tAssert.assertEquals(1, testPetShelter.getVirtualPets().size()); // Pet is now removed from VP's collection\n\t}", "Rental createRental();", "@Override\n \t\t\t\tpublic void doCreateSpotLight() {\n \n \t\t\t\t}", "static void feedPet() {\r\n\t\tJOptionPane.showMessageDialog(null, \"Your \" + pet + \" is happy and full.\");\r\n\t\thappinessLevel+=3;\r\n\t}", "public void openNewProject() {\n\n\t\t// Dispose of all the sound objects in the project that is currently open\n\t\tCollection<SoundInfo> sounds = soundList.values();\n for(SoundInfo sound: sounds){\n sound.close();\n }\n \n // Set the newly opened project variables\n\t\tsoundList = new HashMap<Integer, SoundInfo>();\n\t\tprojectModified = false;\n\t\tprojectFileIO = null;\n\t}", "private PetsFound mapAdseDbPetsToPortal(String parentStyleORIN,\n String orinNumber, String entryType, String vendorColor,String vendorColorDesc, \n String imageState,\n String completionDate,String vendorStyle, PetsFound pet,String supplierId,String returnCarsFlag) {\n try{\n pet = new PetsFound();\n pet.setParentStyleOrin(parentStyleORIN); \n pet.setOrinNumber(orinNumber);\n pet.setEntryType(entryType);\n pet.setVendorColorCode(vendorColor);\n pet.setVendorColorDesc(vendorColorDesc); \n pet.setVendorStyle(vendorStyle);\n pet.setImageState(imageState); \n pet.setCompletionDate(completionDate); \n pet.setSupplierID(supplierId);\n if(returnCarsFlag.equalsIgnoreCase(\"true\"))\n {\n \tpet.setReturnCarsFlag(\"Yes\");\n }\n else\n {\n \tpet.setReturnCarsFlag(\"No\");\n }\n \n \n \n \n }catch(Exception e){\n \te.printStackTrace();\n }\n return pet; \n }", "public void createMainInventor() {\n String name = _plugin.getConfigManager().getGeneralSettingsMap().get(\"Name\");\r\n String colorizedName = _plugin.getUtilsManager().colorizeString(name);\r\n //Size of the Inventory;\r\n int inventorySize = Integer.valueOf(_plugin.getConfigManager().getGeneralSettingsMap().get(\"InventorySize\"));\r\n //Initialize Inventory;\r\n mainInventory = _plugin.getServer().createInventory(null, inventorySize, colorizedName);\r\n //Retrieve the HashMaps for the plugin;\r\n HashMap<Integer, CategoryItem> categoryInformationMap = _plugin.getConfigManager().getCategoryInformationMap();\r\n HashMap<String, String> languageInformation = _plugin.getConfigManager().getLanguageInformationMap();\r\n //Add items to Inventory;\r\n for (Integer i : categoryInformationMap.keySet()) {\r\n CategoryItem categoryItem = categoryInformationMap.get(i);\r\n ItemStack item = categoryItem.getItem();\r\n ItemMeta itemMeta = item.getItemMeta();\r\n itemMeta.setDisplayName(_plugin.getUtilsManager().colorizeString(languageInformation.get(\"CategoryName\").replace(\"%cat%\", categoryItem.getName())));\r\n List<String> lore = new ArrayList<>();\r\n lore.add(_plugin.getUtilsManager().colorizeString(categoryItem.getDescription()));\r\n item.setItemMeta(itemMeta);\r\n mainInventory.addItem(item);\r\n }\r\n }", "private void createRooms()\n {\n Room outside, theatre, pub, lab, office , hallway, backyard,chickenshop;\n \n // create the rooms\n outside = new Room(\"outside the main entrance of the university\");\n theatre = new Room(\"in a lecture theatre\");\n pub = new Room(\"in the campus pub\");\n lab = new Room(\"in a computing lab\");\n office = new Room(\"in the computing admin office\");\n hallway=new Room (\"in the hallway of the university\");\n backyard= new Room( \"in the backyard of the university\");\n chickenshop= new Room(\"in the chicken shop\");\n \n \n \n // initialise room exits\n outside.setExit(\"east\", theatre);\n outside.setExit(\"south\", lab);\n outside.setExit(\"west\", pub);\n\n theatre.setExit(\"west\", outside);\n theatre.setExit(\"north\", backyard);\n\n pub.setExit(\"east\", outside);\n\n lab.setExit(\"north\", outside);\n lab.setExit(\"east\", office);\n \n office.setExit(\"south\", hallway);\n office.setExit(\"west\", lab);\n \n chickenshop.setExit(\"west\", lab);\n\n currentRoom = outside; // start game outside\n \n }", "private void createRooms()\n {\n Room outside, garden, kitchen, frontyard, garage, livingroom,\n upperhallway, downhallway, bedroom1, bedroom2, toilet,teleporter;\n\n // create the rooms\n outside = new Room(\"outside the house\",\"Outside\");\n garden = new Room(\"in the Garden\", \"Garden\");\n kitchen = new Room(\"in the Kitchen\",\"Kitchen\");\n frontyard = new Room(\"in the Frontyard of the house\", \"Frontyard\");\n garage = new Room(\"in the Garage\", \"Garage\");\n livingroom = new Room(\"in the Living room\", \"Living Room\");\n upperhallway = new Room(\"in the Upstairs Hallway\",\"Upstairs Hallway\");\n downhallway = new Room(\"in the Downstairs Hallway\", \"Downstairs Hallway\");\n bedroom1 = new Room(\"in one of the Bedrooms\", \"Bedroom\");\n bedroom2 = new Room(\"in the other Bedroom\", \"Bedroom\");\n toilet = new Room(\"in the Toilet upstairs\",\"Toilet\");\n teleporter = new Room(\"in the Warp Pipe\", \"Warp Pipe\");\n\n // initialise room exits\n outside.setExit(\"north\", garden);\n outside.setExit(\"east\", frontyard);\n\n garden.setExit(\"south\", outside);\n garden.setExit(\"east\", kitchen);\n\n kitchen.setExit(\"west\", garden);\n kitchen.setExit(\"north\", livingroom);\n kitchen.setExit(\"south\", downhallway);\n\n frontyard.setExit(\"west\", outside);\n frontyard.setExit(\"north\", downhallway);\n frontyard.setExit(\"east\", garage);\n\n garage.setExit(\"west\", frontyard);\n garage.setExit(\"north\", downhallway);\n\n livingroom.setExit(\"west\", kitchen);\n\n downhallway.setExit(\"north\",kitchen);\n downhallway.setExit(\"west\",frontyard);\n downhallway.setExit(\"south\",garage);\n downhallway.setExit(\"east\",upperhallway);\n\n upperhallway.setExit(\"north\", bedroom2);\n upperhallway.setExit(\"east\", bedroom1);\n upperhallway.setExit(\"south\", toilet);\n upperhallway.setExit(\"west\", downhallway);\n\n toilet.setExit(\"north\", upperhallway);\n\n bedroom1.setExit(\"west\",upperhallway);\n\n bedroom2.setExit(\"south\", upperhallway);\n\n rooms.add(outside);\n rooms.add(garden);\n rooms.add(kitchen);\n rooms.add(frontyard);\n rooms.add(garage);\n rooms.add(livingroom);\n rooms.add(upperhallway);\n rooms.add(downhallway);\n rooms.add(bedroom1);\n rooms.add(bedroom2);\n rooms.add(toilet);\n }", "Parking createParking();", "private Room createCastle(){\n Room hallway = new Room(\"the hallway\");\n\n Room theStairs = new Room(\"the staircase\");\n Medic medic = new Medic(20, 3);\n theStairs.medic = medic;\n\n Room livingRoom = new Room(\"the living room\");\n Monster monster = new Monster(\"Grimeteeth\", 10, 100);\n livingRoom.monster = monster;\n\n Room firstFloor = new Room(\"first floor\");\n Room secondFloor = new Room(\"second floor\");\n Room thirdFloor = new Room(\"third floor\");\n monster = new Monster(\"Voodoobug\", 30, 100);\n thirdFloor.monster = monster;\n\n Room balcony = new Room(\"balcony\");\n balcony.endOfGameText = \"You fall out of the balcony, and die\";\n Room chamber = new Room(\"Chamber\");\n monster = new Monster (\"Smogstrike\", 50, 100);\n chamber.monster = monster;\n chamber.hasTreasure = true;\n chamber.endOfGameText = \"YEEES! You won the game, and found the treasure!\";\n\n Room bedchamber = new Room(\"bedchamber\");\n bedchamber.endOfGameText = \"You fall in a deep sleep, and will never wake up!\";\n\n\n /**\n * Options connecting to the rooms hallway,theStairs,sale,livingRoom variable\n */\n Connections[] hallwayConnections = new Connections[2];\n hallwayConnections[0] = new Connections(\"go left\",\"l\", theStairs);\n hallwayConnections[1] = new Connections(\"go right\",\"r\", livingRoom);\n hallway.connections = hallwayConnections;\n\n Connections[] stairsConnections = new Connections[3];\n stairsConnections[0] = new Connections(\"first floor\",\"1\", firstFloor);\n stairsConnections[1] = new Connections(\"second floor\",\"2\", secondFloor);\n stairsConnections[2] = new Connections(\"third floor\",\"3\", thirdFloor);\n theStairs.connections = stairsConnections;\n\n Connections[] firstFloorConnections = new Connections[3];\n firstFloorConnections[0] = new Connections(\"blue door\",\"b\",hallway);\n firstFloorConnections[1] = new Connections(\"red door\",\"r\",balcony);\n firstFloorConnections[2] = new Connections(\"yellow door\",\"y\",chamber);\n firstFloor.connections = firstFloorConnections;\n\n Connections[] secondFloorConnections = new Connections[1];\n secondFloorConnections[0] = new Connections(\"small door\",\"s\",chamber);\n secondFloor.connections = secondFloorConnections;\n\n Connections[] thridConnections = new Connections[2];\n thridConnections[0] = new Connections(\"big door\",\"bd\",balcony);\n thridConnections[1] = new Connections(\"elevator\",\"e\",firstFloor);\n thirdFloor.connections = thridConnections;\n\n Connections[] livingRoomConnections = new Connections[2];\n livingRoomConnections[0] = new Connections(\"iron door\",\"i\",hallway);\n livingRoomConnections[1] = new Connections(\"tree door\",\"t\",bedchamber);\n livingRoom.connections = livingRoomConnections;\n\n return hallway;\n }", "public void requestOpenPose()\r\n {\r\n // WE MAY HAVE TO SAVE CURRENT WORK\r\n boolean continueToOpen = true;\r\n if (!saved)\r\n {\r\n // THE USER CAN OPT OUT HERE WITH A CANCEL\r\n continueToOpen = promptToSave();\r\n }\r\n \r\n // IF THE USER REALLY WANTS TO OPEN A POSE\r\n if (continueToOpen)\r\n {\r\n // GO AHEAD AND PROCEED MAKING A NEW POSE\r\n promptToOpen();\r\n }\r\n }", "Strobo createStrobo();", "@Override\n public void openInventory() {\n PacketPlayOutOpenWindow packetPlayOutOpenWindow = new PacketPlayOutOpenWindow(this.fakeAnvil.getContainerId(), Containers.ANVIL, new ChatMessage(this.title));\n ((CraftPlayer) player).getHandle().playerConnection.sendPacket(packetPlayOutOpenWindow);\n ((CraftPlayer) player).getHandle().activeContainer = this.fakeAnvil;\n this.fakeAnvil.addSlotListener(((CraftPlayer) player).getHandle());\n }", "public void openGamePane() {\n\t\tParent root;\n\t\ttry {\n\t\t\tFXMLLoader loader = new FXMLLoader(getClass().getResource(GAMEPANELOCATION));\n\t\t\tloader.setController(this);\n\t\t\troot = loader.load();\n\t\t\tScene scene = new Scene(root);\n\t\t\tStage stage = new Stage();\n\t\t\tstage.setScene(scene);\n\t\t\tstage.show();\n\t\t} catch (IOException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tgamePane.setBackground(new Background(new BackgroundFill(new Color(195/256.0,222/256.0,250/256.0,1),CornerRadii.EMPTY, Insets.EMPTY)));\n\t\tgameObjects=new HashMap<Integer,GameObjectVisualComponent>();\n\t\tpodium=new ArrayList<Text>();\n\t\tpodium.add(new Text(gamePane.getWidth()-100,15,\"TOP\"));\n\t\tgamePane.getChildren().add(podium.get(0));\n\t}", "public void newQuest() {\n\t\tList <String> quests;\n\t\tif (activeQuest == null) {\n\t\t\tquests = QuestCfg.getStringList(\"quests.names\");\n\t\t} else {\n\t\t\tquests = activeQuest.getSuccessors();\n\t\t\tif (quests == null) {\n\t\t\t\tquests = QuestCfg.getStringList(\"quests.names\");\n\t\t\t}\n\t\t}\n\t\tbakeInstance.getLogger().info(\"[BAKE] Choosing new quest. Quests available: \" + quests.toString());\n\t\tint questID = (int) Math.round(Math.random()*(quests.size()-1));\n\t\tactiveQuest = new Quest(QuestCfg, quests.get(questID));\n\t}", "public Bike createCityBike() {\n Wheels cityWheels = new Wheels(559,50f,10000); //Räder des Stadtrads erstellen\n Gears cityGears = new Gears(3,1,5000); //Gangschaltung des Stadtrads erstellen\n Bike newCityBike = new Bike(cityGears, cityWheels, \"Stahl\", \"CB105\", true, true, 30000); //Stadtrad erstellen\n return newCityBike; //Stadtrad zurückgeben\n}", "private void launchCreateGame() {\n\t\tString name = nameText.getText().toString();\n\t\tString cycle = cycleText.getText().toString();\n\t\tString scent = scentText.getText().toString();\n\t\tString kill = killText.getText().toString();\n\t\t\n\t\tif (name.equals(\"\")){\n\t\t\tname = defaultName;\n\t\t} \n\t\tif (cycle.equals(\"\")) {\n\t\t\tcycle = \"720\";\n\t\t} \n\t\tif (scent.equals(\"\")) {\n\t\t\tscent = \"1.0\";\n\t\t}\n\t\tif (kill.equals(\"\")) {\n\t\t\tkill = \".5\";\n\t\t}\n\t\t\n\t\t\t\n\t\tAsyncJSONParser pewpew = new AsyncJSONParser(this);\n\t\tpewpew.addParameter(\"name\", name);\n\t\tpewpew.addParameter(\"cycle_length\", cycle);\n\t\tpewpew.addParameter(\"scent_range\", scent);\n\t\tpewpew.addParameter(\"kill_range\", kill);\n\t\tpewpew.execute(WerewolfUrls.CREATE_GAME);\n\t\t\n\t\tsetProgressBarEnabled(true);\n\t\tsetErrorMessage(\"\");\n\t}", "void openLeftDoor()\n {\n openingLeft = true;\n leftDoorTimeline.play();\n }", "public HousePet()\n\t{\n\t\tthis.setChipId(0);\n\t\tthis.setName(\"**No Name**\");\n\t\tthis.setPetType(\"**no type**\");\n\t\tthis.setAge(0.0);\n\t}", "private void makeMonster(int lvl)\r\n {\r\n maxHealth = lvl*12;\r\n health = maxHealth;\r\n \r\n Equip tempWeapon = null;\r\n Equip tempArmor = null;\r\n if (type == GOLEM)\r\n {\r\n tempWeapon = new Equip(\"roll smash\", Equip.WEAPON, lvl*7);\r\n tempArmor = new Equip(\"rock body\", Equip.ARMOR, lvl);\r\n }\r\n else if (type == GHOST)\r\n {\r\n tempWeapon = new Equip(\"scythe\", Equip.WEAPON, lvl*7);\r\n tempArmor = new Equip(\"magic armor\", Equip.ARMOR, lvl);\r\n }\r\n else if (type == SLIME)\r\n {\r\n tempWeapon = new Equip(\"liquid attack\", Equip.WEAPON, lvl*7);\r\n tempArmor = new Equip(\"shock absorb\", Equip.ARMOR, lvl);\r\n }\r\n else\r\n {\r\n tempWeapon = new Equip(\"teeth\", Equip.WEAPON, lvl*7);\r\n tempArmor = new Equip(\"hardskin\", Equip.ARMOR, lvl);\r\n }\r\n tempWeapon.changeOwner(this);\r\n tempArmor.changeOwner(this);\r\n tempWeapon.equipTo(this);\r\n tempArmor.equipTo(this);\r\n }", "public void createRooms()\n { \n // create the rooms\n //RDC//\n hall = new Room(\"Hall\", \"..\\\\pictures\\\\Rooms\\\\hall.png\");\n banquetinghall = new Room (\"Banqueting hall\", \"..\\\\pictures\\\\Rooms\\\\banquet.png\");\n poolroom = new Room (\"PoolRoom\", \"..\\\\pictures\\\\Rooms\\\\billard.png\");\n dancingroom = new Room (\"Dancing Room\", \"..\\\\pictures\\\\Rooms\\\\bal.png\");\n kitchen = new Room(\"Kitchen\", null);\n garden = new Room(\"Garden\", null);\n well = new Room(\"Well\", null);\n gardenerhut = new Room(\"Gardener hut\", null);\n //Fin RDN //\n \n //-1//\n anteroom = new Room(\"Anteroom\", null);\n ritualroom = new Room(\"Ritual Room\", null);\n cellar = new Room(\"Cellar\", null);\n // FIN -1//\n // +1 //\n livingroom = new Room(\"Living Room\", null); \n library = new Room (\"Library\", null);\n laboratory = new Room(\"Laboratory\", null);\n corridor= new Room(\"Corridor\", null);\n bathroom = new Room(\"Bathroom\", null);\n bedroom = new Room(\"Bedroom\", null);\n guestbedroom = new Room(\"Guest Bedroom\", null); \n //FIN +1 //\n //+2//\n attic = new Room(\"Attic\", null);\n //Fin +2//\n //Fin create room // \n \n // initialise room exits\n //RDC\n hall.setExits(\"north\",garden, false, \"> You must explore the mansion before\");\n hall.setExits(\"south\",banquetinghall, true, null); \n banquetinghall.setExits(\"north\",hall, true, null);\n banquetinghall.setExits(\"south\",dancingroom, false, \"> The door is blocked by Bob's toys\");\n banquetinghall.setExits(\"east\",kitchen, true, null);\n banquetinghall.setExits(\"west\",poolroom, true, null);\n //poolroom.setExits(\"east\",banquetinghall, false, \"> You have not finished examining the crime scene\");\n poolroom.setExits(\"east\",banquetinghall, true, \"> You have not finished examining the crime scene\");\n dancingroom.setExits(\"north\",banquetinghall, true, null);\n dancingroom.setExits(\"up\",livingroom, true, null);\n kitchen.setExits(\"west\",banquetinghall, true, null);\n kitchen.setExits(\"down\",cellar, true, null);\n garden.setExits(\"south\",hall, true, null);\n garden.setExits(\"north\",well, true, null);\n garden.setExits(\"east\",gardenerhut, true, null);\n well.setExits(\"south\",garden, true, null);\n gardenerhut.setExits(\"west\",garden, true, null);\n //gardenerhut.setExits(\"down\",anteroom, false, null);\n //-1// \n anteroom.setExits(\"south\",ritualroom, true, null);\n anteroom.setExits(\"up\",gardenerhut, false, \"> The door is locked. You cannot go backward\");\n anteroom.setExits(\"west\",cellar, true, null);\n ritualroom.setExits(\"north\",anteroom, true, null);\n cellar.setExits(\"up\",kitchen, true, null);\n //cellar.setExits(\"east\", anteroom, false); To unlock\n //+1//\n livingroom.setExits(\"down\",dancingroom, true, null);\n livingroom.setExits(\"north\",library, true, null);\n livingroom.setExits(\"west\",corridor, true, null);\n library.setExits(\"south\",livingroom, true, null);\n //library.setExits(\"north\",laboratory, false); To unlock\n laboratory.setExits(\"south\",library, true, null);\n corridor.setExits(\"north\",bathroom, true, null);\n corridor.setExits(\"south\",bedroom, false, \"> The door is locked. A key may be mandatory\");\n corridor.setExits(\"east\",livingroom, true, null);\n corridor.setExits(\"west\",guestbedroom, true, null);\n corridor.setExits(\"up\",attic, false, \"> You see a weird lock in the ceiling\");\n bathroom.setExits(\"south\",corridor, true, null);\n bedroom.setExits(\"north\",corridor, true, null);\n guestbedroom.setExits(\"east\",corridor, true, null);\n attic.setExits(\"down\",corridor, true, null);\n \n //currentRoom = poolroom; // start game outside\n currentRoom = poolroom;\n }", "static void neighborhood()\r\n { \r\n // Puts the earth in a world and the three different color turtles in that world\r\n earth = new World();\r\n turtle1 = new Turtle(earth);\r\n turtle1.setColor(Color.BLUE);\r\n turtle2 = new Turtle(earth);\r\n turtle2.setColor(Color.RED);\r\n turtle3 = new Turtle(earth);\r\n turtle3.setColor(Color.GREEN);\r\n house(100, 100, turtle1);\r\n house(250, 100, turtle2);\r\n house(400, 100, turtle3);\r\n\r\n }", "public void createNewFarm(){\n this.mFarm = new Farm();\n this.loaded = false;\n }", "public void newFood(Food food) {\n\t\t\n\t\tfoodDao.newFood(food);\n\t\t\n\t}", "public synchronized void spawnMe()\n\t{\n\t\t_itemInstance = ItemTable.getInstance().createItem(\"Combat\", _itemId, 1, null, null);\n\t\t_itemInstance.dropMe(null, _location.getX(), _location.getY(), _location.getZ());\n\t}", "private void makeRobot(int lvl)\r\n {\r\n maxHealth = lvl*10;\r\n health = maxHealth;\r\n \r\n Equip tempWeapon = null;\r\n Equip tempArmor = null;\r\n if (type == SOLDIER)\r\n {\r\n tempWeapon = new Equip(\"rifle\", Equip.WEAPON, lvl*5);\r\n tempArmor = new Equip(\"leather armor\", Equip.ARMOR, lvl*2);\r\n }\r\n else if (type == ELF)\r\n {\r\n tempWeapon = new Equip(\"bow\", Equip.WEAPON, lvl*5);\r\n tempArmor = new Equip(\"magic armor\", Equip.ARMOR, lvl*2);\r\n }\r\n else if (type == KNIGHT)\r\n {\r\n tempWeapon = new Equip(\"sword\", Equip.WEAPON, lvl*5);\r\n tempArmor = new Equip(\"splendid shield\", Equip.ARMOR, lvl*2);\r\n }\r\n else if (type == MAGICIAN)\r\n {\r\n tempWeapon = new Equip(\"magic\", Equip.WEAPON, lvl*5);\r\n tempArmor = new Equip(\"magic armor\", Equip.ARMOR, lvl*2);\r\n }\r\n else\r\n {\r\n tempWeapon = new Equip(\"broom stick\", Equip.WEAPON, lvl*5);\r\n tempArmor = new Equip(\"straw\", Equip.ARMOR, lvl*2);\r\n }\r\n tempWeapon.changeOwner(this);\r\n tempArmor.changeOwner(this);\r\n tempWeapon.equipTo(this);\r\n tempArmor.equipTo(this);\r\n }", "void create(Team team);", "private void createRock() {\n\n // generate x,y coordinates\n\n RockView newRock = new RockView(getWidth(), currentSpeed, gameLevel-1);\n newRock.setCenter(getRandCoordinate());\n\n // assign city target deending on what third of the screen the rock was created in\n\n float maxWidth = getWidth() / density;\n float boundry1 = maxWidth / 3;\n float boundry2 = (maxWidth * 2) / 3;\n\n int target;\n if (newRock.getCenter().x > 0 && newRock.getCenter().x < boundry1) {\n target = 0;\n } else if (newRock.getCenter().x > boundry1 && newRock.getCenter().x < boundry2) {\n target = 1;\n } else {\n target = 2;\n }\n\n newRock.setTarget(cityLocations[target]);\n\n // add rock to array of rocks\n rockList.add(newRock);\n\n }", "public Dungeon2Open() {\n\t\tsuper(objects, transitions, enemies, MapScreen.DUNGEON2, \"assets/bossRoomOpen.png\", spawn);\n\t\tobjects.add(new GameObject(new Point(0, 0)));\n\t\tobjects.add(new GameObject(new Point(0, 1)));\n\t\tobjects.add(new GameObject(new Point(0, 2)));\n\t\tobjects.add(new GameObject(new Point(0, 3)));\n\t\tobjects.add(new GameObject(new Point(0, 4)));\n\t\tobjects.add(new GameObject(new Point(0, 5)));\n\t\tobjects.add(new GameObject(new Point(0, 6)));\n\t\tobjects.add(new GameObject(new Point(0, 7)));\n\t\tobjects.add(new GameObject(new Point(0, 8)));\n\t\tobjects.add(new GameObject(new Point(0, 9)));\n\t\tobjects.add(new GameObject(new Point(0, 10)));\n\t\tobjects.add(new GameObject(new Point(0, 11)));\n\t\tobjects.add(new GameObject(new Point(0, 12)));\n\t\tobjects.add(new GameObject(new Point(0, 13)));\n\t\tobjects.add(new GameObject(new Point(17, 0)));\n\t\tobjects.add(new GameObject(new Point(17, 1)));\n\t\tobjects.add(new GameObject(new Point(17, 2)));\n\t\tobjects.add(new GameObject(new Point(17, 3)));\n\t\tobjects.add(new GameObject(new Point(17, 4)));\n\t\tobjects.add(new GameObject(new Point(17, 5)));\n\t\tobjects.add(new GameObject(new Point(17, 6)));\n\t\tobjects.add(new GameObject(new Point(17, 7)));\n\t\tobjects.add(new GameObject(new Point(17, 8)));\n\t\tobjects.add(new GameObject(new Point(17, 9)));\n\t\tobjects.add(new GameObject(new Point(17, 10)));\n\t\tobjects.add(new GameObject(new Point(17, 11)));\n\t\tobjects.add(new GameObject(new Point(17, 12)));\n\t\tobjects.add(new GameObject(new Point(17, 13)));\n\t\tobjects.add(new GameObject(new Point(1, 0)));\n\t\tobjects.add(new GameObject(new Point(2, 0)));\n\t\tobjects.add(new GameObject(new Point(3, 0)));\n\t\tobjects.add(new GameObject(new Point(4, 0)));\n\t\tobjects.add(new GameObject(new Point(5, 0)));\n\t\tobjects.add(new GameObject(new Point(6, 0)));\n\t\tobjects.add(new GameObject(new Point(7, 0)));\n\t\tobjects.add(new GameObject(new Point(8, 0)));\n\t\tobjects.add(new GameObject(new Point(9, 0)));\n\t\tobjects.add(new GameObject(new Point(10, 0)));\n\t\tobjects.add(new GameObject(new Point(11, 0)));\n\t\tobjects.add(new GameObject(new Point(12, 0)));\n\t\tobjects.add(new GameObject(new Point(13, 0)));\n\t\tobjects.add(new GameObject(new Point(14, 0)));\n\t\tobjects.add(new GameObject(new Point(15, 0)));\n\t\tobjects.add(new GameObject(new Point(16, 0)));\n\t\tobjects.add(new GameObject(new Point(1, 1)));\n\t\tobjects.add(new GameObject(new Point(3, 1)));\n\t\tobjects.add(new GameObject(new Point(4, 1)));\n\t\tobjects.add(new GameObject(new Point(5, 1)));\n\t\tobjects.add(new GameObject(new Point(6, 1)));\n\t\tobjects.add(new GameObject(new Point(7, 1)));\n\t\tobjects.add(new GameObject(new Point(8, 1)));\n\t\tobjects.add(new GameObject(new Point(9, 1)));\n\t\tobjects.add(new GameObject(new Point(10, 1)));\n\t\tobjects.add(new GameObject(new Point(11, 1)));\n\t\tobjects.add(new GameObject(new Point(12, 1)));\n\t\tobjects.add(new GameObject(new Point(13, 1)));\n\t\tobjects.add(new GameObject(new Point(14, 1)));\n\t\tobjects.add(new GameObject(new Point(15, 1)));\n\t\tobjects.add(new GameObject(new Point(16, 1)));\n\t\tobjects.add(new GameObject(new Point(1, 2)));\n\t\tobjects.add(new GameObject(new Point(3, 2)));\n\t\tobjects.add(new GameObject(new Point(4, 2)));\n\t\tobjects.add(new GameObject(new Point(5, 2)));\n\t\tobjects.add(new GameObject(new Point(6, 2)));\n\t\tobjects.add(new GameObject(new Point(7, 2)));\n\t\tobjects.add(new GameObject(new Point(8, 2)));\n\t\tobjects.add(new GameObject(new Point(9, 2)));\n\t\tobjects.add(new GameObject(new Point(10, 2)));\n\t\tobjects.add(new GameObject(new Point(11, 2)));\n\t\tobjects.add(new GameObject(new Point(12, 2)));\n\t\tobjects.add(new GameObject(new Point(13, 2)));\n\t\tobjects.add(new GameObject(new Point(14, 2)));\n\t\tobjects.add(new GameObject(new Point(15, 2)));\n\t\tobjects.add(new GameObject(new Point(16, 2)));\n\t\tobjects.add(new GameObject(new Point(1, 13)));\n\t\tobjects.add(new GameObject(new Point(2, 13)));\n\t\tobjects.add(new GameObject(new Point(3, 13)));\n\t\tobjects.add(new GameObject(new Point(4, 13)));\n\t\tobjects.add(new GameObject(new Point(5, 13)));\n\t\tobjects.add(new GameObject(new Point(6, 13)));\n\t\tobjects.add(new GameObject(new Point(7, 13)));\n\t\tobjects.add(new GameObject(new Point(8, 13)));\n\t\tobjects.add(new GameObject(new Point(9, 13)));\n\t\tobjects.add(new GameObject(new Point(10, 13)));\n\t\tobjects.add(new GameObject(new Point(11, 13)));\n\t\tobjects.add(new GameObject(new Point(12, 13)));\n\t\tobjects.add(new GameObject(new Point(13, 13)));\n\t\tobjects.add(new GameObject(new Point(15, 13)));\n\t\tobjects.add(new GameObject(new Point(16, 13)));\n\t\tobjects.add(new GameObject(new Point(1, 12)));\n\t\tobjects.add(new GameObject(new Point(2, 12)));\n\t\tobjects.add(new GameObject(new Point(3, 12)));\n\t\tobjects.add(new GameObject(new Point(4, 12)));\n\t\tobjects.add(new GameObject(new Point(5, 12)));\n\t\tobjects.add(new GameObject(new Point(6, 12)));\n\t\tobjects.add(new GameObject(new Point(7, 12)));\n\t\tobjects.add(new GameObject(new Point(8, 12)));\n\t\tobjects.add(new GameObject(new Point(9, 12)));\n\t\tobjects.add(new GameObject(new Point(10, 12)));\n\t\tobjects.add(new GameObject(new Point(11, 12)));\n\t\tobjects.add(new GameObject(new Point(12, 12)));\n\t\tobjects.add(new GameObject(new Point(13, 12)));\n\t\tobjects.add(new GameObject(new Point(16, 12)));\n\t\tobjects.add(new GameObject(new Point(4, 3)));\n\t\tobjects.add(new GameObject(new Point(6, 3)));\n\t\tobjects.add(new GameObject(new Point(6, 4)));\n\t\tobjects.add(new GameObject(new Point(10, 3)));\n\t\tobjects.add(new GameObject(new Point(10, 4)));\n\t\tobjects.add(new GameObject(new Point(12, 4)));\n\t\tobjects.add(new GameObject(new Point(14, 4)));\n\t\tobjects.add(new GameObject(new Point(15, 4)));\n\t\tobjects.add(new GameObject(new Point(14, 5)));\n\t\tobjects.add(new GameObject(new Point(15, 5)));\n\t\tobjects.add(new GameObject(new Point(13, 6)));\n\t\tobjects.add(new GameObject(new Point(15, 7)));\n\t\tobjects.add(new GameObject(new Point(14, 9)));\n\t\tobjects.add(new GameObject(new Point(12, 9)));\n\t\tobjects.add(new GameObject(new Point(1, 7)));\n\t\tobjects.add(new GameObject(new Point(1, 9)));\n\t\tobjects.add(new GameObject(new Point(1, 10)));\n\t\tobjects.add(new GameObject(new Point(2, 9)));\n\t\tobjects.add(new GameObject(new Point(2, 10)));\n\t\tobjects.add(new GameObject(new Point(3, 8)));\n\t\tobjects.add(new GameObject(new Point(4, 11)));\n\t\tobjects.add(new GameObject(new Point(6, 6)));\n\t\tobjects.add(new GameObject(new Point(6, 7)));\n\t\tobjects.add(new GameObject(new Point(6, 9)));\n\t\tobjects.add(new GameObject(new Point(6, 10)));\n\t\tobjects.add(new GameObject(new Point(10, 6)));\n\t\tobjects.add(new GameObject(new Point(10, 7)));\n\t\tobjects.add(new GameObject(new Point(10, 9)));\n\t\tobjects.add(new GameObject(new Point(10, 10)));\n\t\tenemies.add(new FinalBoss(new Point(8, 4), 4));\n\t\ttransitions.add(new Transition(new Point(14, 14), MapScreen.DUNGEON1, new Point(14, 2)));\n\t\ttransitions.add(new Transition(new Point(2, 0), MapScreen.DUNGEON3, new Point(2, 13)));\n\t\tsetCloneObjects((ArrayList<GameObject>) objects.clone());\n\t}", "public void win() {\n\n\t\t// exist next level?\n\t\tif (Project.project.getMaps().get(maptyp).size() > id + 1) {\n\t\t\tProject.project.startLevel(maptyp, id + 1);\n\n\t\t\t// save it\n\t\t\tif (Project.project.getMapLevel(maptyp) < id + 1) {\n\t\t\t\tProject.project.setMapLevel(maptyp, id + 1);\n\t\t\t}\n\t\t} else {\n\t\t\tPWindow.window.setActScene(new MessageScene(\"Gewonnen\", \"\", new MenuMainScene()));\n\t\t}\n\t}", "@Spawns(\"potHole\")\n public Entity spawnPotHole(SpawnData data) {\n return entityBuilder()\n .from(data)\n .type(POTHOLE)\n .viewWithBBox(texture(\"pothole.png\", 40, 58))\n .with(new CollidableComponent(true))\n .with(new OffscreenCleanComponent())\n .build();\n }", "public void open(){\n \ttriggerTimer.reset();\n \tisClosed = false;\n \tClawAct.set(false);\n\t\tRobot.oi.armRumble(RUMBLE_DURATION);\n }", "public Sage(Area area, Orientation orientation, DiscreteCoordinates position, String wisdom) {\n\t\tsuper(area, orientation, position);\n\t\tanimation = new Animation(this, new Vector(0.13f, 0.13f), 1.5f, 1, \"old.man.1\");\n\t\tthis.wisdom = new Dialog(wisdom, \"dialog.1\", area);\n\t\tthis.dialog = new Dialog(\"Hold the S key to obtain the Sage's wisdom\", \"dialog.1\", area);\n\t\tanimation.updateAnimationCounter();\n\t}", "@Test\n public void createVisitForToday_createsANewVisit_forTheCorrectPet() {\n\n // given:\n pikachu = dataManager.load(Pet.class)\n .query(\"e.name = ?1\", \"Pikachu\")\n .view(\"pet-with-owner-and-type\")\n .one();\n\n // given:\n assertThat(dataManager.loadValue(\n \"select count(e) from petclinic_Visit e where e.pet = :pet\", Long.class)\n .parameter(\"pet\", pikachu)\n .one())\n .isEqualTo(0);\n\n // when:\n visit = visitService.createVisitForToday(pikachu.getIdentificationNumber());\n\n // then:\n assertThat(dataManager.loadValue(\n \"select count(e) from petclinic_Visit e where e.pet = :pet\", Long.class)\n .parameter(\"pet\", pikachu)\n .one())\n .isEqualTo(1);\n\n testContainer.deleteRecord(visit);\n }", "@Override\r\n public void onClick(View view) {\n Intent goCreateHabitIntent = new Intent(MainActivity.this, CreateHabit.class);\r\n startActivity(goCreateHabitIntent);\r\n }", "public void setBasicNewGameWorld()\r\n\t{\r\n\t\tlistCharacter = new ArrayList<Character>();\r\n\t\tlistRelationship = new ArrayList<Relationship>();\r\n\t\tlistLocation = new ArrayList<Location>();\r\n\t\t\r\n\t\t//Location;\r\n\t\t\r\n\t\tLocation newLocationCity = new Location();\r\n\t\tnewLocationCity.setToGenericCity();\r\n\t\tLocation newLocationDungeon = new Location();\r\n\t\tnewLocationDungeon.setToGenericDungeon();\r\n\t\tLocation newLocationForest = new Location();\r\n\t\tnewLocationForest.setToGenericForest();\r\n\t\tLocation newLocationJail = new Location();\r\n\t\tnewLocationJail.setToGenericJail();\r\n\t\tLocation newLocationPalace = new Location();\r\n\t\tnewLocationPalace.setToGenericPalace();\r\n\t\t\r\n\t\tlistLocation.add(newLocationCity);\r\n\t\tlistLocation.add(newLocationDungeon);\r\n\t\tlistLocation.add(newLocationForest);\r\n\t\tlistLocation.add(newLocationJail);\r\n\t\tlistLocation.add(newLocationPalace);\r\n\t\t\r\n\t\t\r\n\t\t//Item\r\n\t\tItem newItem = new Item();\r\n\t\t\r\n\t\tString[] type =\t\tnew String[]\t{\"luxury\"};\r\n\t\tString[] function = new String[]\t{\"object\"};\t\r\n\t\tString[] property = new String[]\t{\"\"};\r\n\t\tnewItem.setNewItem(900101,\"diamond\", type, function, \"null\", property, 2, true);\r\n\t\tnewLocationPalace.addOrUpdateItem(newItem);\r\n\t\t\r\n\t\ttype =\t \tnew String[]\t{\"weapon\"};\r\n\t\tfunction = new String[]\t{\"equipment\"};\t\r\n\t\tproperty = new String[]\t{\"weapon\"};\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(500101,\"dagger\", type, function, \"null\", property, 1, false);\t\t\r\n\t\tnewLocationJail.addOrUpdateItem(newItem);\r\n\t\t\r\n\t\t\r\n\t\ttype =\t\tnew String[]\t{\"quest\"};\r\n\t\tfunction = new String[]\t{\"object\"};\t\r\n\t\tproperty = new String[]\t{\"\"};\r\n\t\tnewItem.setNewItem(900201,\"treasure_map\", type, function, \"null\", property, 2, true);\r\n\t\tnewLocationDungeon.addOrUpdateItem(newItem);\r\n\r\n\t\t\r\n\t\t////// Add very generic item (10+ items of same name)\r\n\t\t////// These item start ID at 100000\r\n\t\t\r\n\t\t//Add 1 berry\r\n\t\t//100000\r\n\t\tnewItem = new Item();\r\n\t\ttype =\t \tnew String[]\t{\"supply\"};\r\n\t\tfunction = new String[]\t{\"consumable\"};\t\r\n\t\tproperty = new String[]\t{\"berry\"};\r\n\t\tnewItem.setNewItem(100101,\"berry\", type, function, \"null\", property, 0, false);\r\n\t\tnewLocationForest.addOrUpdateItem(newItem);\r\n\t\t\r\n\t\t/* REMOVE 19-2-2019 to increase performance\r\n\t\t\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(100102,\"berry\", type, function, \"null\", property, 0, false);\r\n\t\tnewLocationForest.addOrUpdateItem(newItem);\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(100102,\"berry\", type, function, \"null\", property, 0, false);\r\n\t\tnewLocationForest.addOrUpdateItem(newItem);\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(100103,\"berry\", type, function, \"null\", property, 0, false);\r\n\t\tnewLocationForest.addOrUpdateItem(newItem);\r\n\t\t\r\n\t\t*/\r\n\r\n\t\t\r\n\t\t//Add 2 poison_plant\r\n\t\t//101000\r\n\t\tnewItem = new Item();\r\n\t\ttype =\t \tnew String[]\t{\"supply\"};\r\n\t\tfunction = new String[]\t{\"consumable\"};\t\r\n\t\tproperty = new String[]\t{\"poison\"};\r\n\t\tnewItem.setNewItem(100201,\"poison_plant\", type, function, \"null\", property, 0, false);\r\n\t\tnewLocationForest.addOrUpdateItem(newItem);\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(100202,\"poison_plant\", type, function, \"null\", property, 0, false);\r\n\t\tnewLocationForest.addOrUpdateItem(newItem);\r\n\t\tnewItem = new Item();\r\n\r\n\t\t//player\r\n\t\tCharacter newChar = new Character(\"player\", 1, true,\"city\", 0, false);\r\n\t\tnewChar.setIsPlayer(true);\r\n\t\tlistCharacter.add(newChar);\r\n\t\t\r\n\t\t//UNIQUE NPC\r\n\t\tnewChar = new Character(\"mob_NPC_1\", 15, true,\"city\", 0, false);\r\n\t\tlistCharacter.add(newChar);\r\n\r\n\t\t\r\n\t\tnewChar = new Character(\"king\", 20, true,\"palace\", 3, true);\r\n\t\tnewChar.addOccupation(\"king\");\r\n\t\tnewChar.addOccupation(\"noble\");\r\n\t\tnewChar.addStatus(\"rich\");\r\n\t\t\r\n\t\tlistCharacter.add(newChar);\r\n\r\n\r\n\t\t//Mob character\r\n\t\tnewChar = new Character(\"soldier1\", 20, true,\"city\", 2, true);\r\n\t\tnewChar.addOccupation(\"soldier\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\t\r\n\t\t// REMOVE to improve performance\r\n\t\t/*\r\n\t\tnewChar = new Character(\"soldier2\", 20, true,\"jail\", 2, true);\r\n\t\tnewChar.addOccupation(\"soldier\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\t*/\r\n\t\t\r\n\t\t\r\n\t\tnewChar = new Character(\"soldier3\", 20, true,\"palace\", 2, true);\r\n\t\tnewChar.addOccupation(\"soldier\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\t\r\n\t\t//listLocation.add(newLocationCity);\r\n\t\t//listLocation.add(newLocationDungeon);\r\n\t\t//listLocation.add(newLocationForest);\r\n\t\t//listLocation.add(newLocationJail);\r\n\t\t//listLocation.add(newLocationPalace);\r\n\t\t\r\n\t\tnewChar = new Character(\"doctor1\", 20, true,\"city\", 3, true);\r\n\t\tnewChar.addSkill(\"heal\");\r\n\t\tnewChar.addOccupation(\"doctor\");\r\n\t\tlistCharacter.add(newChar);\t\r\n\t\tnewChar = new Character(\"blacksmith1\", 20, true,\"city\", 2, true);\r\n\t\tnewChar.addOccupation(\"blacksmith\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\t\r\n\t\t\r\n\t\tnewChar = new Character(\"thief1\", 20, true,\"jail\", 2, true);\r\n\t\tnewChar.addOccupation(\"thief\");\r\n\t\ttype =\t \tnew String[]\t{\"supply\"};\r\n\t\tfunction = new String[]\t{\"consumable\"};\t\r\n\t\tproperty = new String[]\t{\"unlock\"};\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(300101,\"lockpick\", type, function, \"thief1\", property, 1, false);\r\n\t\tnewChar.addOrUpdateItem(newItem);\r\n\t\tlistCharacter.add(newChar);\r\n\t\t\r\n\t\t// Remove to improve performance\r\n\t\t/*\r\n\t\tnewChar = new Character(\"messenger1\", 20, true,\"city\", 2, true);\r\n\t\tnewChar.addOccupation(\"messenger\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\t*/\r\n\t\t\r\n\t\tnewChar = new Character(\"miner1\", 20, true,\"dungeon\", 1, true);\r\n\t\tnewChar.addOccupation(\"miner\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\tnewChar = new Character(\"lumberjack1\", 20, true,\"forest\", 1, true);\r\n\t\tnewChar.addOccupation(\"lumberjack\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\t\r\n\t\t/* REMOVE 19-2-2019 to increase performance\r\n\t\t\r\n\t\tnewChar = new Character(\"scout1\", 20, true,\"forest\", 2, true);\r\n\t\tnewChar.addOccupation(\"scout\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\tnewChar = new Character(\"farmer1\", 20, true,\"forest\", 1, true);\r\n\t\tnewChar.addOccupation(\"farmer\");\r\n\t\tlistCharacter.add(newChar);\r\n\t\t\r\n\t\t*/\r\n\t\t\r\n\t\t\r\n\t\tnewChar = new Character(\"merchant1\", 20, true,\"city\", 3, true);\r\n\t\tnewChar.addOccupation(\"merchant\");\r\n\t\tnewChar.addStatus(\"rich\");\r\n\t\t\r\n\t\t// Merchant Item\r\n\t\t//NPC item start at 50000\r\n\t\ttype =\t \tnew String[]\t{\"supply\"};\r\n\t\tfunction = new String[]\t{\"consumable\"};\t\r\n\t\tproperty = new String[]\t{\"poison\"};\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(200101,\"potion_poison\", type, function, \"merchant1\", property, 1, false);\r\n\t\tnewChar.addOrUpdateItem(newItem);\r\n\t\t\r\n\t\ttype =\t \tnew String[]\t{\"supply\"};\r\n\t\tfunction = new String[]\t{\"consumable\"};\t\r\n\t\tproperty = new String[]\t{\"healing\"};\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(200201,\"potion_heal\", type, function, \"merchant1\", property, 1, false);\r\n\t\tnewChar.addOrUpdateItem(newItem);\r\n\t\t\r\n\t\ttype =\t \tnew String[]\t{\"supply\"};\r\n\t\tfunction = new String[]\t{\"consumable\"};\t\r\n\t\tproperty = new String[]\t{\"cure_poison\"};\r\n\t\tnewItem = new Item();\r\n\t\tnewItem.setNewItem(200301,\"antidote\", type, function, \"merchant1\", property, 1, false);\t\r\n\t\tnewChar.addOrUpdateItem(newItem);\r\n\t\t\r\n\t\t\r\n\t\t//add merchant to List\r\n\t\tlistCharacter.add(newChar);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//Relation\r\n\t\tRelationship newRelation = new Relationship();\r\n\t\tnewRelation.setRelationship(\"merchant1\", \"soldier1\", \"friend\");\r\n\t\tlistRelationship.add(newRelation);\r\n\t\t\r\n\t\t//\r\n\t\r\n\t}", "public void expLocation() {\n\t\tif (!death) {\t// Geht nicht wenn Tod!\n\t\t\t\n\t\t\t// Beschreibungen anzeigen und boolean explored auf wahr setzen, außer der Raum wurde bereits untersucht\n\t\t\tif (location[this.currentLocation].isExplored()) { Tuna.setMessage(\"Dieser Raum wurde bereits untersucht!\");\n\t\t\t} else {\n\t\t\t\tTuna.addText(location[this.currentLocation].getDescriptions().getExploreDescription());\n\t\t\t\tlocation[this.currentLocation].setExplored(true);\n\t\t\t}\n\t\t\t\n\t\t\t// Items an Stelle null im Item-Array des Standortes sichtbar machen\n\t\t\tif ((currentLocation > 0 && currentLocation < 7 && currentLocation != 2) || currentLocation == 20) {\n\t\t\t\tlocation[this.currentLocation].getItem(0).setVisible(true);\n\t\t\t\t/* Im Korridor (1) der Kaffeelöscherkasten\n\t\t\t\t * Im Konferenzraum (3) der Ventilationsschacht\n\t\t\t\t * In der Kammer der Leere (4) die Notiz\n\t\t\t\t * Im Ventilationsraum (5) die Notiz\n\t\t\t\t * In der Damentoilette (6) das Skillboook\n\t\t\t\t * Im Fahrstuhlschacht (20) die Kaffeetasse\n\t\t\t\t */\n\t\t\t}\n\t\t\t\n\t\t\t// Items an Stelle eins im Item-Array des Standortes sichtbar machen\n\t\t\tif (currentLocation == 9) {\n\t\t\t\tlocation[this.currentLocation].getItem(1).setVisible(true);\n\t\t\t}\n\t\t} else if (death) {\n\t\t\tTuna.setMessage(\"Du bist tot!\");\n\t\t}\n\t}", "@BeforeEach\n public void createRestaurant() {\n LocalTime openingTime = LocalTime.parse(\"10:30:00\");\n LocalTime closingTime = LocalTime.parse(\"22:00:00\");\n restaurant = new Restaurant(\"Amelie's cafe\", \"Chennai\", openingTime, closingTime);\n restaurant.addToMenu(\"Sweet corn soup\", 119);\n restaurant.addToMenu(\"Vegetable lasagne\", 269);\n }", "public TowerDisplayEntity createNewTower() {\n\t\treturn (TowerDisplayEntity) tabBar.getTowersPanel().getEditor().edit(new TowerDisplayEntity());\n\t}", "abstract public Hamburger creatHamburger(String type);", "FuelingStation createFuelingStation();", "public Equipment openChest( int floorLvl, Hero h )\n {\n Equipment equip = super.openChest( floorLvl + 3, h );\n // make sure hero can get usable item (ex: mage can't get shield)\n boolean equipUsable = h.equipUsable( equip );\n while( equipUsable == false )\n {\n setIsOpen( false );\n equip = super.openChest( floorLvl + 3, h );\n equipUsable = h.equipUsable( equip );\n } // end while\n \n equip.setStats();\n equip.setName( \"Shiny \" + equip.getName() );\n return equip;\n }", "public List<Home> createHome(Person p) {\n \tList<Home> lesresidences = new ArrayList<Home>();\n\t\tint numOfHome = manager.createQuery(\"Select p From Home p\", Home.class).getResultList().size();\n\n if (numOfHome == 0) {\n \tHome h1 = new Home(12, 120, \"5 rue des roses, Rennes\", \"10.10.10.10\");\n \tHome h2 = new Home(5, 120, \"3 rue des camélias, Rennes\", \"10.0.0.0\");\n \tp.getResidences().add(h1);\n \th1.setPerson(p);\n \tp.getResidences().add(h2);\n \th2.setPerson(p);\n manager.persist(h1);\n manager.persist(h2);\n lesresidences.add(h1);\n lesresidences.add(h2);\n }\n\t\treturn lesresidences;\n\t}", "public void requestNewPose()\r\n {\r\n // WE MAY HAVE TO SAVE CURRENT WORK\r\n boolean continueToMakeNew = true;\r\n if (!saved)\r\n {\r\n // THE USER CAN OPT OUT HERE WITH A CANCEL\r\n continueToMakeNew = promptToSave();\r\n }\r\n \r\n // IF THE USER REALLY WANTS TO MAKE A NEW POSE\r\n if (continueToMakeNew)\r\n {\r\n // GO AHEAD AND PROCEED MAKING A NEW POSE\r\n continueToMakeNew = promptForNew();\r\n\r\n if (continueToMakeNew)\r\n {\r\n // NOW THAT WE'VE SAVED, LET'S MAKE SURE WE'RE IN THE RIGHT MODE\r\n \tAnimatedSpriteEditor singleton = AnimatedSpriteEditor.getEditor();\r\n \t\r\n PoseurStateManager poseurStateManager = singleton.getStateManager().getPoseurStateManager();\r\n \r\n PoseList pl = singleton.getSpriteType().getAnimations().get(singleton.getAnimationState());\r\n pl.addPose(poseID, poseDuration);\r\n poseurStateManager.setState(PoseurState.SELECT_SHAPE_STATE);\r\n \t\tsingleton.getStateManager().setState(EditorState.POSEUR_STATE);\r\n }\r\n }\r\n }", "public boolean openCreateGoal(){\n Intent intent = new Intent(this, GoalNewActivity.class);\n startActivity(intent);\n return true;\n }", "private void createRooms()//refactored\n {\n currentRoom = RoomCreator.buildCurrentRooms();//new\n }", "public static void main(String[] ar){\n Room living = new Room(\"Living\");\n Room kitchen = new Room(\"Kitchen\");\n Room bathroom = new Room(\"Bathroom\");\n Room garage = new Room(\"Garage\");\n \n Room bedroom1 = new Room(\"Bedroom1\");\n Room bedroom2 = new Room(\"Bedroom2\");\n Room bathroom1stf=new Room(\"Bathroom\");\n \n \n //Living\n living.addDevice(new Device(\"Aire acondicionado\", \"LG\", \"pm07sp\", true));\n living.addDevice(new Device(\"Luces\", \"Philips\", \"Hue\", true));\n //Kitchen\n kitchen.addDevice(new Device(\"luces\",\"Ahorradoras\",\"34234\", true));\n //Bathroom\n bathroom.addDevice(new Device(\"luce\",\"simple\",\"354676\", true));\n //Garage\n garage.addDevice(new Device(\"lightbulb\",\"the best\",\"X3000\",true));\n \n //Bedroom 1\n bedroom1.addDevice(new Device(\"Aire acondicionado\", \"Mabe\" , \"Mmt12cdbs3\", true));\n bedroom1.addDevice(new Device(\"Luces\",\"Philips\",\"EcoVantage\",true));\n \n //Bedroom 2\n bedroom2.addDevice(new Device(\"Aire acondicionado\", \"Hisense\" , \"AS-12CR5FVETD/1TR\", true));\n bedroom2.addDevice(new Device(\"Luces\",\"Ho Iluminacion\",\"A19 60W Claro\",true));\n \n //baño primer piso\n bathroom1stf.addDevice(new Device(\"Luces\",\"Alefco\",\"lw100\",true));\n \n \n \n Level groundFloor = new Level(\"Ground Floor\");\n Level firstFloor = new Level(\"First Floor\");\n \n \n groundFloor.addRoom(living);\n groundFloor.addRoom(kitchen);\n groundFloor.addRoom(bathroom);\n groundFloor.addRoom(garage);\n \n firstFloor.addRoom(bedroom1);\n firstFloor.addRoom(bedroom2);\n firstFloor.addRoom(bathroom1stf);\n \n\n House myhouse = new House(\"MyHome\");\n \n myhouse.addLevel(groundFloor);\n myhouse.addLevel(firstFloor);\n \n System.out.println(myhouse);\n \n \n /*\n room.addDevice(new Device(\"Reynaldo\", \"LG\", \"123456\", true));\n room.addDevice(new Device(\"Andrea\", \"Nokia\", \"Lumia-520\", true));\n room.addDevice(new Device(\"Karina\",\"Panasonic\",\"465464\", true));\n room.addDevice(new Device(\"Martin\", \"ZTE\", \"V7\",true));\n room.addDevice(new Device(\"Antonio\",\"Samsung\",\"J5\",true));\n room.addDevice(new Device(\"Roberto\",\"HP\",\"SpectreX360\",true));\n room.addDevice(new Device(\"Gabriel\",\"Linu\",\"Ilium_S106\",true));\n room.addDevice(new Device (\"Limberth\",\"LG\", \"lg-206\",true));\n room.addDevice(new Device(\"jesus\", \"hp\",\"2997\", true));\n room.addDevice(new Device(\"Rich\", \"Asus\",\"Zenfone_4_Max\",true));\n room.addDevice(new Device(\"Adrian\",\"Apple\",\"SE\",true));\n room.addDevice(new Device (\"Jonatan\",\"samsung\",\"J5\",true));\n room.addDevice(new Device(\"Jessica\", \"Huaweii\", \"P9LITE\", true));\n */\n \n \n \n \n \n }", "public void pickSandwhich() {\n includedIngredients.clear();\n if(selectSandwhich.getValue().equals(\"Chicken\")){\n includedIngredients.appendText(\"Fried Chicken\\nSpicy Sauce\\nPickles\");\n sandwhich = new Chicken();\n\n }\n\n if(selectSandwhich.getValue().equals(\"Fish\")){\n includedIngredients.appendText(\"Grilled Snapper\\nCilantro\\nLime\");\n sandwhich = new Fish();\n }\n\n if(selectSandwhich.getValue().equals(\"Beef\")){\n includedIngredients.appendText(\"Roast Beef\\nProvolone Cheese\\nMustard\");\n sandwhich = new Beef();\n }\n orderPrice.clear();\n String price = new DecimalFormat(\"#.##\").format(sandwhich.price());\n orderPrice.appendText(\"$\"+price);\n }", "void createSportItem (String name, String description, double price, String sportType);", "private void createWarrior(String persoName, String persoImage, int persoLife, int attack) {\n\t\tpersoList.add(new Warrior(persoName, persoImage, persoLife, attack));\n\t}", "@Override\n public void onClick(View view) {\n if (habits.get(position).getCurrentState() == State.DEAD) {\n if (databaseHandler.delete(habits.get(position))) {\n removeHabit(habits.get(position));\n }\n // Water\n } else {\n habits.get(position).setCurrentState(State.WATERED);\n habits.get(position).setTimestamp(new DateTime().toString());\n databaseHandler.update(habits.get(position));\n updateHabit(habits.get(position));\n }\n }", "Obligacion createObligacion();" ]
[ "0.56825244", "0.5545181", "0.5489284", "0.54843456", "0.5466283", "0.5459752", "0.54453087", "0.5438273", "0.5424132", "0.54189974", "0.5406597", "0.53759754", "0.5362037", "0.5342596", "0.5342392", "0.5336867", "0.5311904", "0.52914864", "0.5272548", "0.52591616", "0.5253331", "0.52504414", "0.5234578", "0.52330166", "0.5232067", "0.52146405", "0.5200735", "0.51859444", "0.51839703", "0.51760215", "0.5174863", "0.5164694", "0.5157546", "0.5154619", "0.5134224", "0.51211077", "0.51205844", "0.51058304", "0.5097108", "0.50928676", "0.50905097", "0.5090477", "0.5087306", "0.50838983", "0.50827366", "0.5072625", "0.506837", "0.5061753", "0.5056288", "0.50544536", "0.5045656", "0.5037673", "0.5027231", "0.5027186", "0.50210106", "0.50206065", "0.5020012", "0.50199634", "0.50148773", "0.50061655", "0.5001215", "0.49946716", "0.49937275", "0.4993112", "0.4983341", "0.49821112", "0.4973463", "0.49625647", "0.49571136", "0.4952189", "0.495123", "0.49480903", "0.49316213", "0.4926959", "0.49260765", "0.49250105", "0.49240524", "0.4917521", "0.4901061", "0.48960474", "0.4892623", "0.48919162", "0.48849222", "0.48829627", "0.48809955", "0.487957", "0.48750988", "0.487413", "0.48711845", "0.48707542", "0.48654044", "0.48600495", "0.48571566", "0.4854957", "0.48526335", "0.48516634", "0.48507032", "0.48499343", "0.4845384", "0.48438755" ]
0.6160024
0
Returns value of startedAt
public Date getStartedAt() { return startedAt; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Long getStartAt();", "public double getStart();", "public int getStart() {\r\n return start;\r\n }", "public double getStart() {\n return start;\n }", "public int getStart() {\n return start;\n }", "public int getStart() {\n return this.start;\n }", "public int getStart()\n {\n return start;\n }", "public int getStart() {\n return start;\n }", "public int getStart() {\r\n\t\treturn start;\r\n\t}", "public int getStart ()\n {\n\n return this.start;\n\n }", "OffsetDateTime startDateTime();", "public long getStart() {\n return start;\n }", "public int getStart() {\n\t\treturn start;\n\t}", "public Point start() {\r\n return this.start;\r\n }", "public int getStart() {\n\t\t\treturn start;\n\t\t}", "org.hl7.fhir.Integer getStart();", "public Position getStart() {\r\n return start;\r\n }", "public Date getStart() {\n return start;\n }", "public int getStart() {\r\n\t\treturn this.offset;\r\n\t}", "public String getStart() {\n return start;\n }", "public int getTimeStart() {\r\n return timeStart;\r\n }", "public Long getTimestampStart();", "public Timestamp getDateStart();", "public String getStart() {\r\n\t\treturn this.start;\r\n\t}", "public final int startOffset() {\n return startOffset;\n }", "public long getStartTimestamp();", "public int getStartOffset() {\n return startOffset;\n }", "OffsetDateTime usageStart();", "long getStartTimestamp();", "public long getExpectedStart() {\n return this.expectedStart;\n }", "public Date getStartedDate() {\n return this.startedDate;\n }", "@Override\n\tpublic float getStartTime()\n\t{\n\t\treturn _tbeg;\n\t}", "int getStart();", "public String getStart(){\n\t\treturn start;\n\t}", "public Point getStart() {\n return mStart;\n }", "public long getStartTimestamp() {\n return startTimestamp;\n }", "public int startOffset();", "public String getStart(){\n\t\treturn mStart;\n\t}", "public Point getStart() {\n\t\treturn _start;\n\t}", "public OffsetDateTime startTime() {\n return this.startTime;\n }", "public OffsetDateTime startTime() {\n return this.startTime;\n }", "public Date getActualStart()\r\n {\r\n return (m_actualStart);\r\n }", "public int start() { return _start; }", "public int start() {\n return start;\n }", "public abstract long getStartTimestamp();", "Time started() {\n return started;\n }", "public DateTime getStartDateTime() {\r\n\t\treturn start;\r\n\t}", "public int getStartOffset() {\n return startPosition.getOffset();\n }", "Date getStartedOn();", "public Point getStartPoint() {\n\t\treturn startPoint;\n\t}", "public long getStartTimestamp() {\n\t\treturn this.startTimestamp;\n\t}", "public long getTimeStart()\n {\n return this.timeStart;\n }", "public long getStartOffset() {\n return mStartOffset;\n }", "public Timestamp getDateStart() {\n\t\treturn (Timestamp) get_Value(\"DateStart\");\n\t}", "public boolean getStartInclusive() {\n return startInclusive;\n }", "public Coordinate getStart( )\n\t{\n\t\treturn startLocation;\n\t}", "public long getStarted () {\n\treturn started;\n }", "abstract Long getStartTimestamp();", "public Date getStartTime() {\n\t\treturn getOriginatingTime();\n\t}", "public double getDistanceToStart() {\r\n return startDistance;\r\n }", "ActualStartType getActualStart();", "public abstract long startTimestamp();", "public OffsetDateTime usageStart() {\n return this.usageStart;\n }", "public Date getDtStart() {\r\n return dtStart;\r\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getStartTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(STARTTIME_PROP.get());\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getStartTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(STARTTIME_PROP.get());\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getStartTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(STARTTIME_PROP.get());\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.util.Date getStartTime() {\n return (java.util.Date)__getInternalInterface().getFieldValue(STARTTIME_PROP.get());\n }", "public String get_start() {\n\t\treturn start;\n\t}", "public BigInteger getStartValue()\r\n {\r\n return this.startValue;\r\n }", "public java.lang.Integer getStartResult()\n {\n return this.startResult;\n }", "public int getStartTime()\n {\n if (isRepeated()) return start;\n else return time;\n }", "public double getStartTime();", "public long getTimeStarted() {\n\t\treturn _timeStarted;\n\t}", "@Schema(description = \"The datetime on which the worklog effort was started. Required when creating a worklog. Optional when updating a worklog.\")\n public OffsetDateTime getStarted() {\n return started;\n }", "public int getStartIdx() {\n return this.startIdx;\n }", "void setStartAt(final Long startAt);", "@Override\n public LocalTime getStart() {\n return start;\n }", "public RefLimit getStartFrom() {\n\t\t\treturn startFrom;\n\t\t}", "public OptionalInt getStartOffset() {\n return startOffset >= 0 ? OptionalInt.of(startOffset) : OptionalInt.empty();\n }", "public RefLimit getStartFrom() {\n\t\treturn startFrom;\n\t}", "public int getStartTime()\n\t{\n\t\treturn startTime;\n\t}", "Instant getStart();", "public int getStartx(){\n\t\treturn startx;\n\t}", "public Date getStartTime() {\r\n return this.startTime;\r\n }", "@NotNull\r\n public DateWithOffset getStartDate() {\r\n checkStartDate();\r\n return startDate;\r\n }", "public Date getStartTime() {\n return this.startTime;\n }", "public void setStartedAt(Date startedAt) {\n\t\tthis.startedAt = startedAt;\n\t}", "public long getStartDate() {\n return startDate_;\n }", "@Override\n\tpublic int getStartTime() {\n\t\treturn 0;\n\t}", "public TimeDateComponents getEventStartDate() {\n return getEventDates().getStartDate();\n }", "ButEnd getStart();", "public String getStartTime() {\n\t\treturn (new Parser(value)).getString();\n\t}", "public Date getStarttime() {\n return starttime;\n }", "public Date getStarttime() {\n return starttime;\n }", "public java.util.Date startSnap()\n\t{\n\t\treturn _dtBegin;\n\t}", "public double getStartX() {\n\treturn v1.getX();\n }", "public float getDistanceToStart() {\n\t\treturn distanceToStart;\n\t}", "public Integer getStartTime() {\n return startTime;\n }", "public double getStartX() {\r\n return startx;\r\n }" ]
[ "0.7841568", "0.7151616", "0.70923656", "0.7091503", "0.70574176", "0.7055173", "0.70472944", "0.7000059", "0.6977222", "0.69772124", "0.6914047", "0.6910077", "0.6903171", "0.6839724", "0.6822647", "0.679698", "0.67717344", "0.67412674", "0.67386794", "0.67294", "0.6709834", "0.6705978", "0.67019576", "0.67006624", "0.6686274", "0.66824657", "0.6671906", "0.66693497", "0.6650885", "0.6635588", "0.6623793", "0.65902406", "0.6589388", "0.65649587", "0.6547852", "0.65417284", "0.65317625", "0.6518493", "0.6511433", "0.65050524", "0.65050524", "0.6502952", "0.6501832", "0.6501734", "0.6493539", "0.64889616", "0.64860135", "0.6485044", "0.64838666", "0.6481207", "0.64309204", "0.64206976", "0.640468", "0.6404337", "0.63880384", "0.6377865", "0.63705283", "0.63536614", "0.6339472", "0.6324261", "0.6317985", "0.63176435", "0.63124204", "0.6293676", "0.6293457", "0.6293457", "0.6284575", "0.6284575", "0.62764907", "0.62669915", "0.62637615", "0.62463397", "0.62311316", "0.6230659", "0.6219008", "0.6216752", "0.6215613", "0.6208025", "0.62058896", "0.61943173", "0.6193289", "0.6191027", "0.6185484", "0.6161908", "0.6155043", "0.6154691", "0.61492157", "0.6143747", "0.61426765", "0.6142431", "0.613461", "0.6132092", "0.61306316", "0.6123601", "0.6123601", "0.6109959", "0.6105491", "0.61047035", "0.6103686", "0.60995764" ]
0.7270494
1
Sets new value of startedAt
public void setStartedAt(Date startedAt) { this.startedAt = startedAt; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setStartAt(final Long startAt);", "public void setStartedDate(Date value) {\n this.startedDate = value;\n }", "public void setStart(long start) { this.start = start; }", "public void setDateStart (Timestamp DateStart);", "public void setStartTime(java.util.Date value) {\n __getInternalInterface().setFieldValue(STARTTIME_PROP.get(), value);\n }", "public void setStartTime(java.util.Date value) {\n __getInternalInterface().setFieldValue(STARTTIME_PROP.get(), value);\n }", "public void changeStartDate(DateToken startToken) {\r\n\t\tDateTime now = new DateTime();\r\n\t\tif (Interval.nowStub != null) now = Interval.nowStub;\r\n\t\t\r\n\t\tstartDateExplicitlySet = true;\r\n\t\t\r\n\t\tif (this.start == null) {\r\n\t\t\tDateTime start = startToken.mergeInto(now).withTime(0, 0, 0, 0);\r\n\r\n\t\t\t// not leaping forward a year here; date should be taken as is\r\n\t\t\t\r\n\t\t\tthis.start = start;\r\n\t\t\tend = start.withTime(23, 59, 0, 0);\r\n\t\t}\r\n\t\telse {\r\n\t\t\t// a time has already been set\r\n\t\t\tDateTime start = startToken.mergeInto(this.start);\r\n\t\t\tthis.start = start;\r\n\t\t\tif (end.isBefore(this.start)) {\r\n\t\t\t\tend = this.start.plusHours(1);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tend = startToken.mergeInto(end);\r\n\t\t\t\tif (end.isBefore(start)) {\r\n\t\t\t\t\tend = start.plusHours(1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void setStart(int start) {\r\n this.start = start;\r\n }", "public void setStart(int start) {\n this.start=start;\n }", "public void setStartTime(java.util.Date value) {\n __getInternalInterface().setFieldValue(STARTTIME_PROP.get(), value);\n }", "public void setStartTime(java.util.Date value) {\n __getInternalInterface().setFieldValue(STARTTIME_PROP.get(), value);\n }", "public void setStart( Calendar start );", "public void setStart(int startId) throws IllegalArgumentException, IllegalStateException;", "void setStart(Instant instant);", "public void setStart(int start) {\n\t\tthis.start = start;\n\t}", "public Builder setStartDate(long value) {\n \n startDate_ = value;\n onChanged();\n return this;\n }", "public abstract void setStartTime(Date startTime);", "public com.twc.bigdata.views.avro.viewing_info.Builder setStartTime(java.lang.Long value) {\n validate(fields()[0], value);\n this.start_time = value;\n fieldSetFlags()[0] = true;\n return this; \n }", "public void markRunStart(){\r\n runStart = stepCount;\r\n }", "public void setStartTimestamp(long value) {\n this.startTimestamp = value;\n }", "void changeStart(int newStart) {\n if (newStart < 0 || newStart >= endBeat) {\n throw new IllegalArgumentException(\"Invalid startBeat\");\n }\n this.startBeat = newStart;\n }", "void setStartDate(Date startDate);", "@Override\n @IcalProperties({\n @IcalProperty(pindex = PropertyInfoIndex.DTSTART,\n presenceField = \"dtval\",\n required = true,\n reschedule = true,\n eventProperty = true,\n todoProperty = true,\n journalProperty = true,\n freeBusyProperty = true,\n timezoneProperty = true),\n @IcalProperty(pindex = PropertyInfoIndex.INDEX_START,\n jname = \"indexStart\",\n presenceField = \"dtval\",\n required = true,\n reschedule = true,\n eventProperty = true,\n todoProperty = true,\n journalProperty = true,\n freeBusyProperty = true,\n timezoneProperty = true)}\n )\n @NoProxy\n public void setDtstart(final BwDateTime val) {\n dtstart = val;\n }", "public void setStarted(boolean started){\n \tthis.started = started;\n }", "@Override\n\tpublic void setStartTime(float t) \n\t{\n\t\t_tbeg = t;\n\t}", "public void setStartTime() {\r\n startTime = System.currentTimeMillis();\r\n }", "public void setStartDate(Date start)\r\n {\r\n this.startDate = start;\r\n }", "public void setStart(int start)\n {\n if(start >= 0)\n {\n this.start = start;\n }\n else\n {\n System.out.println(\"Cannot be negative.\");\n }\n }", "public void setStarted(boolean started){\n\t\tthis.started = started;\n\t}", "public void setStarted(Boolean started) {\n\t\tthis.started = started;\n\t}", "public void setStartDate(java.util.Date value);", "public void setStartTime(long value) {\r\n this.startTime = value;\r\n }", "@Override\n\tpublic void setStartDate(Date startDate) {\n\t\tmodel.setStartDate(startDate);\n\t}", "@Override\n\tpublic void setStartDate(java.util.Date startDate) {\n\t\t_esfTournament.setStartDate(startDate);\n\t}", "void setStartTime(java.util.Calendar startTime);", "public void setStartTime (long x)\r\n {\r\n startTime = x;\r\n }", "void setBegin(net.opengis.gml.x32.TimeInstantPropertyType begin);", "void setBeginPosition(net.opengis.gml.x32.TimePositionType beginPosition);", "public void setStartTime(Date startTime) {\r\n this.startTime = startTime;\r\n }", "public void setStarttime(Date starttime) {\n this.starttime = starttime;\n }", "public void setStarttime(Date starttime) {\n this.starttime = starttime;\n }", "protected void setStartDate(final AbsoluteDate startDate) {\n this.startDate = startDate;\n }", "public void setStart(Date newStart) {\n if (!newStart.before(_end)) {\n throw new IllegalArgumentException(ERR_START_AFTER_END);\n }\n _start = (Date) newStart.clone();\n }", "public void setStartDate(Date value)\n {\n validateStartDate(value);\n setAttributeInternal(STARTDATE, value);\n \n }", "public void setStartDate(Date s);", "public void setStart(Point point) {\n mStart = point;\n }", "void setStarted(boolean started) {\n hasStarted = started;\n }", "@Override\n\tpublic void setStartTime(int t) {\n\t\t\n\t}", "@Test\n\tpublic void testSetStartDate() {\n\t\tassertNotEquals(calTest, initialJob.getStartDate());\n\t\tinitialJob.setStartDate(calTest.get(Calendar.YEAR), calTest.get(Calendar.MONTH), \n\t\t\t\tcalTest.get(Calendar.DATE), calTest.get(Calendar.HOUR), \n\t\t\t\tcalTest.get(Calendar.MINUTE));\n\t\tassertEquals(calTest, initialJob.getStartDate());\n\t\t\n\t\t// check different dates are not equivalent\n\t\tinitialJob.setStartDate(calTest.get(Calendar.YEAR) + 1, calTest.get(Calendar.MONTH), \n\t\t\t\tcalTest.get(Calendar.DATE), calTest.get(Calendar.HOUR), \n\t\t\t\tcalTest.get(Calendar.MINUTE));\n\t\tassertNotEquals(calTest, initialJob.getStartDate());\n\t}", "DbQuery setStartAtFilter(String value) {\n filter = Filter.START;\n filterType = FilterType.STRING;\n this.startAt = value;\n return this;\n }", "public void setStartDate(@NotNull DateWithOffset startDate) {\r\n if (startDate == null) { // NOSONAR\r\n throw new NullPointerException(\"startDate\");\r\n }\r\n this.startDate = startDate;\r\n }", "public void setStartTime(Date startTime) {\n this.startTime = startTime;\n }", "public void setStartTime(Date startTime) {\n this.startTime = startTime;\n }", "public void setStartTime(Date startTime) {\n this.startTime = startTime;\n }", "public void setStartTime(Date startTime) {\n this.startTime = startTime;\n }", "protected void setStartTimestamp(long timestamp) {\n\t\tthis.startTimestamp = timestamp;\n\t\tsetDirty(true);\n\t}", "public void setStartOffset(int offset) {\n this.startOffset = offset;\n }", "public void setDtStart(Date dtStart) {\r\n this.dtStart = dtStart;\r\n }", "void setStaStart(double staStart);", "public Date getStartedAt() {\n\t\treturn startedAt;\n\t}", "@Override\n\tpublic void setStartPoint(Point startPoint) {\n\t\tthis.startPoint=startPoint;\n\t}", "public void setStartTime( Date startTime ) {\n this.startTime = startTime;\n }", "@Test\n public void testSetStartDate() {\n System.out.println(\"setStartDate\");\n Calendar newStart = new GregorianCalendar(2000, 01, 01);\n String startDate = newStart.toString();\n DTO_Ride instance = dtoRide;\n instance.setStartDate(startDate);\n \n String result = instance.getStartDate();\n assertEquals(newStart, newStart);\n }", "public void setStart(final String start) {\n\tthis.start = LocalTime.parse(start, DateTimeFormatter.ofPattern(\"hh:mma\", Locale.US));\n }", "@Modified(author=\"Phil Brown\", summary=\"Added Method\")\n public void setupStartValues() {\n }", "public void setStartDate(Date startDate)\r\n {\r\n m_startDate = startDate;\r\n }", "public void setStartDate(Date startDate) {\r\n this.startDate = startDate;\r\n }", "public void setStartDate(Date startDate) {\r\n this.startDate = startDate;\r\n }", "void setStartSegment(int startSegment);", "public void setDistanceToStart(double val) {\r\n startDistance = val;\r\n }", "void xsetStartTime(org.apache.xmlbeans.XmlDateTime startTime);", "public void setStartTime(Date startTime) {\n\t\tthis.startTime = startTime;\n\t}", "public void setStartTime(Date startTime) {\n\t\tthis.startTime = startTime;\n\t}", "public void setStartTime(Date startTime) {\n\t\tthis.startTime = startTime;\n\t}", "public void setStartTime(Date startTime) {\n\t\tthis.startTime = startTime;\n\t}", "public void setStartDateTime(String s) {\n this.setStartDateTime(AppUtility.getUTCTimestamp(s));\n }", "public Builder setVisitStarttime(long value) {\n bitField0_ |= 0x00000040;\n visitStarttime_ = value;\n onChanged();\n return this;\n }", "public Builder setVisitStarttime(long value) {\n bitField0_ |= 0x00000040;\n visitStarttime_ = value;\n onChanged();\n return this;\n }", "public Builder setBeginDate(long value) {\n bitField0_ |= 0x00000040;\n beginDate_ = value;\n\n return this;\n }", "public void setScriptStartedAt() {\n scriptHistory.setStartedAt(DateTime.now());\n scriptHistory.setRan(true);\n }", "public void setExpectedStart(long expectedStart) {\n this.expectedStart = expectedStart;\n }", "public void setStartDate(Date startDate) {\n this.startDate = startDate;\n }", "public void setStartDate(Date startDate) {\n this.startDate = startDate;\n }", "public void setStartDate(Date startDate) {\n this.startDate = startDate;\n }", "public Builder setStartTime(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n startTime_ = value;\n onChanged();\n return this;\n }", "void setBeginInclusive( boolean beginInclusive );", "public void setStart_time(long start_time) {\n this.start_time = start_time;\n }", "public void setStartTime(java.util.Date startTime) {\n this.startTime = startTime;\n }", "public void setStartTime(java.util.Date startTime) {\n this.startTime = startTime;\n }", "public void setStartTime(java.util.Date startTime) {\n this.startTime = startTime;\n }", "public void setStartTime(java.util.Date startTime) {\n this.startTime = startTime;\n }", "OffsetDateTime startDateTime();", "public void setStartTime(java.lang.Long value) {\n this.start_time = value;\n }", "DbQuery setStartAtFilter(double value) {\n filter = Filter.START;\n filterType = FilterType.DOUBLE;\n this.startAt = value;\n return this;\n }", "public void testSetStartLocation() {\n assertEquals(test, maze1.getStartLocation());\n test = new Location(0, 1);\n maze1.setStartLocation(test);\n assertEquals(test, maze1.getStartLocation());\n test = new Location(2, 2);\n maze1.setCell(test, MazeCell.WALL);\n maze1.setStartLocation(test);\n assertEquals(test, maze1.getStartLocation());\n \n }", "public Builder setStartHour(int value) {\n \n startHour_ = value;\n onChanged();\n return this;\n }", "public void setActualStart(Date actualStartDate)\r\n {\r\n m_actualStart = actualStartDate;\r\n }", "void setStart(Object[] newStart);", "public void setStart(){\n\t\tthis.isStart=true;\n\t}", "public void setStartLine(final int startLine) {\n this.startLine = startLine;\n }" ]
[ "0.77643394", "0.6899126", "0.6889762", "0.68855727", "0.6741887", "0.6741887", "0.67394537", "0.6718965", "0.6697431", "0.667827", "0.667827", "0.6609055", "0.6597824", "0.6508624", "0.64522463", "0.64476615", "0.6438307", "0.6420486", "0.6413129", "0.6381769", "0.63526654", "0.63408047", "0.6321047", "0.6316226", "0.6271708", "0.6208388", "0.6205143", "0.61945826", "0.61849153", "0.61845326", "0.6156805", "0.61289406", "0.6124171", "0.611137", "0.6107242", "0.6106598", "0.6090304", "0.6089359", "0.6082074", "0.6077638", "0.6077638", "0.6070365", "0.60676885", "0.60666406", "0.6065999", "0.6043886", "0.60430425", "0.60382164", "0.6036123", "0.6034379", "0.6031684", "0.6022212", "0.6022212", "0.6022212", "0.6022212", "0.60141635", "0.60057646", "0.600433", "0.60041463", "0.6000827", "0.5981845", "0.5976887", "0.5975126", "0.5973207", "0.59689265", "0.5966655", "0.59531057", "0.59531057", "0.5948468", "0.5947727", "0.5938659", "0.59333193", "0.59333193", "0.59333193", "0.59333193", "0.5926454", "0.592485", "0.592485", "0.5923094", "0.5915414", "0.58903974", "0.58830684", "0.58830684", "0.58830684", "0.58596903", "0.58500016", "0.5847365", "0.58349633", "0.58349633", "0.58349633", "0.58349633", "0.5830448", "0.5823736", "0.5819568", "0.5796527", "0.57924044", "0.5789688", "0.5782696", "0.5777183", "0.57759607" ]
0.7457686
1
Returns value of finishedAt
public Date getFinishedAt() { return finishedAt; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public E finishedState() {\r\n\t\treturn this.values[this.values.length - 1];\r\n\t}", "Instant getEnd();", "public synchronized boolean getFinished(){\n return finished;\n }", "public boolean getFinished() {\n return finished;\n }", "public boolean getFinished() {\n\t\treturn finished;\n\t}", "public boolean getFinished() {\n return finished_;\n }", "boolean getFinished();", "public int completed() {\n return this.completed;\n }", "public boolean getFinished() {\n return finished_;\n }", "public long getCompleted() { return completed; }", "public java.util.Date getFinishedTime () {\r\n\t\treturn finishedTime;\r\n\t}", "public double getFinishTime(){return finishTime;}", "public long logicallyCompletedAt() {\n return logicallyCompletedAt;\n }", "public double getEnd();", "public int getDone() {\n\t\treturn done;\n\t}", "public void finished();", "public Instant getLastCompletion() {\n\t\treturn Last;\n\t}", "public OffsetDateTime finishTime() {\n return this.finishTime;\n }", "public boolean wasFinished()\n {\n return this.isFinished;\n }", "public boolean finished();", "int getEnd();", "public boolean finished() {\n \t\treturn isFinished;\n \t}", "public LastJSONFinishElements getLastJSONFinishAccess() {\r\n\t\treturn pLastJSONFinish;\r\n\t}", "private int getCurrentValue()\n {\n return\n // Overall wait time...\n _countdownValue -\n // ...minus the time we waited so far.\n (int)(_clock.currentTime() - _startWait);\n }", "public Date getActualFinish()\r\n {\r\n return (m_actualFinish);\r\n }", "public boolean isFinished(){\n return this.finished;\n }", "public Integer getIsfinish() {\n return isfinish;\n }", "public String getDone() {\n return (isDone ? \"1\" : \"0\");\n }", "org.mojolang.mojo.lang.Position getEndPosition();", "public boolean isFinished() {\n return finished;\n }", "public boolean getFinish(){\n\t\treturn finish;\n\t}", "@Override\n public boolean isFinished() \n {\n int curCount = mPath.kNumPoints - mCount;\n if(curCount<1)\n {\n System.out.println(mPath.kNumPoints);\n }\n \n return curCount<1;\n }", "public int getEndTime()\n {\n if (isRepeated()) return end;\n else return time;\n }", "String getEnd();", "public int getThroughPut() {\n\t\treturn completed;\n\t}", "public T getLast(){\n\treturn _end.getCargo();\n }", "public boolean isFinished() {\n\t\treturn finished;\n\t}", "public boolean isFinished() {\n\t\treturn finished;\n\t}", "int getCompletedTutorialsValue(int index);", "public boolean isFinished() {\n return isFinished;\n }", "int getEndPosition();", "public boolean isDone()\n {\n return (this.elapsed >= this.duration);\n }", "public double getEnd() {\n return end;\n }", "public int getEnd()\n {\n return end;\n }", "public boolean isFinished() {\r\n\t\treturn this.finished;\r\n\t}", "public synchronized boolean hasFinished ()\n {\n return this.finished;\n }", "public ResponseTime finish(){\n return finish(Instant.now());\n }", "public boolean reachedEnd() {\n return reachedEnd;\n }", "public boolean isFinished(){\n return animation.isAnimationFinished(stateTime);\n }", "public int getEnd() {\r\n return end;\r\n }", "ActualFinishType getActualFinish();", "protected boolean isFinished() {\n\treturn this.isDone;\n }", "@Override\n\t\tpublic long getEndMillis() {\n\t\t\treturn 0;\n\t\t}", "public boolean isfinished() {\n\t\treturn isFinished;\n\t}", "@Override\n\tpublic boolean isFinished() {\n\t\treturn finished;\n\t}", "public abstract void finished();", "public long getScriptCompletedAt() {\n return (scriptHistory != null) ? scriptHistory.getCompletedAt() : DateTime.ERROR_TIME;\n }", "public boolean hasFinished() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }", "protected boolean isFinished() {\r\n\t\t \tboolean ans = false;\r\n\t\t \treturn ans;\r\n\t\t }", "public boolean isFinished() {\n\t\treturn (finished);\n\t}", "public int getQueryFinish()\n\t{\n\t\treturn myQueryFinish;\n\t}", "public String getEndAt() {\n return endAt;\n }", "public java.util.Date finishSnap()\n\t{\n\t\treturn _dtFinish;\n\t}", "@java.lang.Override\n public int getFinishHour() {\n return finishHour_;\n }", "public boolean getDone(){\r\n\t\treturn done;\r\n\t}", "protected boolean isFinished() {\n\t\tif (!hasPathStarted) {\n\t\t\treturn false;\n\t\t}\n\t\tboolean leftComplete = status.activePointValid && status.isLast;\n\t\tboolean trajectoryComplete = leftComplete;\n\t\tif (trajectoryComplete) {\n\t\t\tSystem.out.println(\"Finished trajectory\");\n\t\t}\n\t\treturn trajectoryComplete || isFinished;\n\t}", "@Override\n protected boolean isFinished() {\n return finished;\n }", "@Override\n \tpublic void finished()\n \t{\n \t}", "public int getTurnaround (){\n return finishingTime-arrival_time;\n }", "public int end() { return _end; }", "@java.lang.Override\n public int getFinishHour() {\n return finishHour_;\n }", "public int getFinishHour() {\n return finishHour;\n }", "public int getFin() {\r\n return fin;\r\n }", "public boolean hasFinished() {\n return ((bitField0_ & 0x00000001) == 0x00000001);\n }", "public boolean isFinished() {\r\n\t\t\treturn tIsFinished;\r\n\t\t}", "public int getTimeEnd() {\r\n return timeEnd;\r\n }", "protected boolean isFinished() {\n \t\n \tif(current_time >= goal) {\n \t\t\n \t\treturn true;\n \t}else {\n \t\t\n \t\treturn false;\n \t}\n }", "@Override\n public boolean isFinished() {\n return isDone;\n }", "@Override\n public boolean isFinished() {\n return isDone;\n }", "public void done(PointValueTime last) throws IOException{\n \tthis.generator.done(last);\n }", "protected boolean isFinished() {\n return finished;\n }", "public boolean isFinished(){\n return true;\n }", "protected boolean isFinished() {\n\t\treturn false;\n\t\t//return timeOnTarget >= finishTime;\n }", "public int getCompletionTime() {\n return this.completeTime;\n }", "public boolean getDone() {\n return isDone;\n }", "public Integer getAfterResult() {\r\n return afterResult;\r\n }", "int getEndBeat() {\n return this.endBeat;\n }", "public Long getProgressDone();", "void animationFinished();", "@Override\n public boolean isCompleted() {\n return time.secondsPassed==finishLevel;\n }", "public int getEnd() {\n return end;\n }", "Double getCompletion();", "Double getFinishFloat();", "boolean isFinished() {\n return includedInLastStep() && (end == elementList.size() - 1);\n }", "public boolean isFinished();", "@Override\n\tpublic String getFinishTime() {\n\t\treturn finishTime;\n\t}", "public int getNumCompleted()\n\t{\n\t\treturn numCompleted;\n\t}", "protected boolean isFinished() {\r\n if (Math.abs(motorWithEncoder.getSetpoint() - motorWithEncoder.getPosition()) < 0.5) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }", "public final int endOffset() {\n return endOffset;\n }", "Boolean isFinished();" ]
[ "0.6418939", "0.63735145", "0.62687", "0.6266087", "0.62532854", "0.6174909", "0.61634463", "0.61142665", "0.6112528", "0.60810846", "0.60781825", "0.6064793", "0.6059655", "0.60299176", "0.5996933", "0.5987348", "0.59469277", "0.59224594", "0.5892451", "0.58855766", "0.5884212", "0.587992", "0.58630383", "0.58528894", "0.5834091", "0.5744408", "0.5710259", "0.5695658", "0.5689209", "0.5685069", "0.5684426", "0.56483585", "0.5645117", "0.5640193", "0.5639123", "0.56370085", "0.56370044", "0.56370044", "0.5632944", "0.56223345", "0.56223315", "0.5611855", "0.56118387", "0.5608994", "0.5608557", "0.5605912", "0.5595121", "0.5588678", "0.558347", "0.55744886", "0.5572986", "0.5572146", "0.5571119", "0.55623823", "0.55530095", "0.5550295", "0.5543205", "0.5539868", "0.55355227", "0.5533224", "0.5532293", "0.552082", "0.55097836", "0.55082774", "0.55068403", "0.55042565", "0.5499979", "0.5497503", "0.5487213", "0.548697", "0.548589", "0.5484791", "0.5481304", "0.5479582", "0.5472041", "0.54568917", "0.5450402", "0.5445601", "0.5445601", "0.5445104", "0.54424024", "0.5441607", "0.54413795", "0.5436443", "0.54358125", "0.543454", "0.5428719", "0.5420423", "0.54156315", "0.54148877", "0.5405005", "0.5402986", "0.53984576", "0.53969383", "0.5393907", "0.5393354", "0.53932965", "0.53923833", "0.53907126", "0.53864485" ]
0.7086253
0
Sets new value of finishedAt
public void setFinisheddAt(Date finishedAt) { this.finishedAt = finishedAt; //this.home.removeStay(this); //this.pet.removeStay(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void setFinished(boolean finished) {\n this.finished = finished;\n }", "public void setFinished(Boolean finished) {\n this.finished = finished;\n }", "public void markAsDone() {\n this.isDone = true;\n this.completed = \"1\";\n }", "public void markFinished(int currIdx) {\n\t\tmy_DB = helper.getWritableDatabase();\n\t\tContentValues values = new ContentValues();\n\t\tvalues.put(\"finished\", 1);\n\t\tmy_DB.update(\"todo\", values, \"_id=\" + currIdx, null);\n\t\t\n\t\t\n\t}", "public void SetDone(){\n this.isDone = true;\n }", "public void setComplete()\n\t{\n\t\texisting.set(0, pieces.length);\n\t}", "public void setFinished(boolean fin) {\n finished = fin;\n }", "public void markAsDone() {\r\n this.isDone = true;\r\n }", "public void setDone() {\n this.isDone = true;\n }", "public void setDone() {\n this.isDone = true;\n }", "public void setDone() {\n this.isDone = true;\n }", "public void markDone() {\n isDone = true;\n }", "public void markAsDone() {\n this.isDone = true;\n\n }", "public void markComplete()\n {\n setCount(getGoal());\n }", "String setDone(int index);", "public void markAsDone() {\n this.isDone = true;\n }", "public void markAsDone() {\n this.isDone = true;\n }", "public void markAsDone() {\n this.isDone = true;\n }", "public synchronized void setFinished(boolean f){\n finished = f;\n }", "public Builder setFinished(boolean value) {\n bitField0_ |= 0x00000004;\n finished_ = value;\n onChanged();\n return this;\n }", "public void set_completed();", "public void done(PointValueTime last) throws IOException{\n \tthis.generator.done(last);\n }", "void setEnd(Instant instant);", "public void setCompleted(){\r\n\t\tisCompleted = true;\r\n\t}", "public void markAsDone() {\n isDone = true;\n }", "public void markAsDone() {\n isDone = true;\n }", "public void markAsDone() {\n isDone = true;\n }", "public void markAsDone(){\n isDone = true;\n }", "public void setDone() {\n isDone = true;\n }", "public void setCompleted() {\n this.completed = true;\n }", "public Date getFinishedAt() {\n\t\treturn finishedAt;\n\t}", "public void markAsDone() {\n this.done = true;\n }", "protected void markAsDone() {\n isDone = true;\n }", "public void setReached(boolean reached);", "public final void setOnFinished(EventHandler<ActionEvent> value) {\n this.timeline.setOnFinished(value);\n }", "public void CompleteTask() {\n\t\tCompletionDate = new Date();\n\t}", "public void setFinishedTime (java.util.Date finishedTime) {\r\n\t\tthis.finishedTime = finishedTime;\r\n\t}", "public void setFinished(boolean fin) {\n\t\tfinished = fin;\n\t}", "@Override\n protected void onAnimationEnd() {\n super.onAnimationEnd();\n animating = false;\n\n if (moveAtEnd) {\n moveAtEnd = false;\n clearAnimation();\n setX(destX);\n setY(destY);\n }\n }", "public void markAsDone() {\n // TODO consider adding assertion here\n isDone = true;\n }", "public void finished();", "public void complete()\n {\n isComplete = true;\n }", "synchronized public void markDone() {\n this.done = true;\n }", "public void setCompleted(boolean flag) {\r\n completed = flag;\r\n }", "private void setTOStateFinished(TCSObjectReference<TransportOrder> ref) {\n requireNonNull(ref, \"ref\");\n\n // Set the transport order's state.\n kernel.setTransportOrderState(ref, TransportOrder.State.FINISHED);\n TransportOrder order = kernel.getTCSObject(TransportOrder.class, ref);\n // If it is part of an order sequence, we should proceed to its next order.\n if (order.getWrappingSequence() != null) {\n OrderSequence seq = kernel.getTCSObject(OrderSequence.class,\n order.getWrappingSequence());\n // Sanity check: The finished order must be the next one in the sequence;\n // if it is not, something has already gone wrong.\n checkState(ref.equals(seq.getNextUnfinishedOrder()),\n \"Finished TO %s != next unfinished TO %s in sequence %s\",\n ref,\n seq.getNextUnfinishedOrder(),\n seq);\n kernel.setOrderSequenceFinishedIndex(seq.getReference(),\n seq.getFinishedIndex() + 1);\n // Get an up-to-date copy of the order sequence\n seq = kernel.getTCSObject(OrderSequence.class, seq.getReference());\n // If the sequence is complete and this was its last order, the sequence\n // is also finished.\n if (seq.isComplete() && seq.getNextUnfinishedOrder() == null) {\n kernel.setOrderSequenceFinished(seq.getReference());\n // Reset the processing vehicle's back reference on the sequence.\n kernel.setVehicleOrderSequence(seq.getProcessingVehicle(), null);\n }\n }\n }", "public void setDone(boolean doneIt)\n {\n notDone = doneIt;\n }", "protected void execute() {\n finished = true;\n }", "public void done() {\n isDone = true;\n }", "public void setComplete(boolean value) {\n\t\tif (value) {\n\t\t\tcountdown = EXIT_COUNT;\n\t\t}\n\t\tcomplete = value;\n\t\t//\t\tif (value) waitSeconds(3);\n\t}", "@Override\n \tpublic void finished()\n \t{\n \t}", "public void setDone(int done) {\n\t\tthis.done = done;\n\t}", "@Override\n public void setFinished() {\n finishedBanking = true;\n }", "public synchronized void setComplete() {\n status = Status.COMPLETE;\n }", "public void done() {\n done = true;\n }", "public void setEnd(){\n\t\tthis.isEnd=true;\n\t}", "void animationFinished();", "public void setDone(boolean done) {\n \tthis.done = done;\n }", "public void finish() {\n\t\tPositionVo v = new PositionVo(1d, 0d, 0d, 0d, 0d, 0d, 0d);\n\t\tmanager.canvas.setJoneDoe(v, new Point(0, 0), Direction.NONE);\n\t\tstopTimer();\n\t\tfree();\n\t\tmanager.iWait();\n\t}", "public void complete()\n {\n\n CalendarDate tmpKey = this.firstKey();\n V tmpVal = null;\n\n V tmpPatch = this.firstValue();\n\n //BasicLogger.logDebug(\"First key={}, value={}\", ((Calendar) tmpKey).getTime(), tmpPatch);\n\n final CalendarDate tmpLastKey = this.lastKey();\n while (tmpKey.compareTo(tmpLastKey) <= 0)\n {\n\n tmpVal = this.get(tmpKey);\n\n if (tmpVal != null)\n {\n tmpPatch = tmpVal;\n //BasicLogger.logDebug(\"Existing key={}, value={}\", ((Calendar) tmpKey).getTime(), tmpVal);\n } else\n {\n this.put(tmpKey, tmpPatch);\n //BasicLogger.logDebug(\"Patching key={}, value={}\", ((Calendar) tmpKey).getTime(), tmpPatch);\n }\n\n tmpKey = this.step(tmpKey);\n }\n }", "public abstract void finished();", "private LastCheckResult(V result, long completedAt) {\n this.result = result;\n this.exception = null;\n this.completedAt = completedAt;\n }", "public void finish(){\n\t\tnotfinish = false;\n\t}", "public void update() {\n\t\tmLast = mNow;\n\t\tmNow = get();\n\t}", "public Builder setFinishHour(int value) {\n \n finishHour_ = value;\n onChanged();\n return this;\n }", "public void reset() {\n finished = false;\n }", "public void setFinished(int order) {\n if(!board.isFinished()){\n disconnected = order;\n }\n finished = true;\n }", "public void setTimeOfLastValuesChanged(long millis);", "public void notifyMoveAnimationFinished();", "public void setDone(boolean done) {\n this.done = done;\n }", "public void markAndResetTimer(){\n value += getTime();\n resetTimer();\n }", "public void setDone(boolean done) {\n\t\tthis.done = done;\n\t\t\n\t}", "@Override\n public final void setCountdown(int newCountdown) {\n }", "public void setDone(boolean done) {\n this.done = done;\n }", "public void setDone(boolean done) {\n this.done = done;\n }", "private void setViewOnFinish() {\n if (mediaPlayer.isPlaying()) {\n mediaPlayer.stop();\n seekBar.setProgress(100);\n songCurrentDurationLabel.setText(songTotalDurationLabel.getText().toString());\n }\n // Don't need seek bar so stop seek handler\n stopSeekHandler();\n }", "public void setDone(boolean value) {\n this.done = value;\n }", "public void updateWaitingTime(){\n waitingTime = waitingTime - 1;\n }", "public abstract void animationReelFinished();", "public void setTimeouted() {\n this.timeouted = true;\n }", "public ResponseTime finish(){\n return finish(Instant.now());\n }", "public abstract Task markAsDone();", "public void setScriptCompletedAt(long timeCompleted) {\n scriptHistory.setCompletedAt(timeCompleted);\n }", "public void complete() {\n\t}", "public void finish() {\n System.out.println();\n System.out.println(\"Line processed\");\n System.out.println(\"Reseting line...\");\n try{ Thread.sleep(5000); } catch(Exception e) { System.out.println(\"Thread exception\"); }\n this.buffer.clear();\n this.buffer.add(new ArrayList<Integer>());\n this.lineT = 0;\n this.columnT = 0;\n this.inputMode = false;\n }", "public synchronized void tellAt(){\n\t\tnotifyAll();\n\t}", "private void setLast() { this._last = true; }", "public void setFinishTime() {\r\n\t\t\tthis.finishTime = RNG.MAXINT;\r\n\t\t}", "public void completeTask() {\n completed = true;\n }", "@Override\n public void onComplete(long dt) {\n }", "public void setEnded(){\n\t\tended=true;\n\t}", "@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 }", "@Override\n protected boolean isFinished() {\n return finished;\n }", "public void changeIsDone(boolean isDone) {\r\n this.isDone = isDone;\r\n }", "public void setDoneDate(Date doneDate) {\n this.doneDate = doneDate;\n }", "public void setDoneDate(Date doneDate) {\n this.doneDate = doneDate;\n }", "public void setDoneDate(Date doneDate) {\n this.doneDate = doneDate;\n }", "public void setDoneDate(Date doneDate) {\n this.doneDate = doneDate;\n }", "public void setCompletedDate(Date value) {\n this.completedDate = value;\n }", "public void setEndedAt(java.util.Date endedAt) {\n this.endedAt = endedAt;\n }", "public void resetTimerComplete() {\n\t\tsetStartingTime(0);\n\t}" ]
[ "0.6415622", "0.63148814", "0.60674125", "0.5971303", "0.59541655", "0.5942098", "0.5935741", "0.59104145", "0.5907117", "0.5907117", "0.5907117", "0.58926624", "0.5890464", "0.58722126", "0.58587736", "0.5853909", "0.5853909", "0.5853909", "0.5836777", "0.5835374", "0.58329874", "0.58055747", "0.5797119", "0.5774891", "0.57692397", "0.57692397", "0.57692397", "0.57508", "0.5748142", "0.5744277", "0.57391685", "0.5737786", "0.57344484", "0.57092106", "0.5696774", "0.56494635", "0.5641788", "0.5626792", "0.5551733", "0.5526974", "0.5525016", "0.55177146", "0.55037457", "0.5483839", "0.5478205", "0.54526764", "0.54472774", "0.5440577", "0.54036736", "0.5400588", "0.53732574", "0.5365644", "0.5360227", "0.5333568", "0.53156936", "0.53096926", "0.5300392", "0.5297085", "0.5276346", "0.5261447", "0.5236962", "0.5228307", "0.5227337", "0.5217835", "0.5214966", "0.5202744", "0.5201901", "0.51911384", "0.5190538", "0.5190212", "0.5174962", "0.5172421", "0.5171636", "0.5171636", "0.51697874", "0.5167757", "0.51608056", "0.51576674", "0.5149201", "0.51442516", "0.51402515", "0.51356465", "0.51321507", "0.51195973", "0.51190764", "0.5111368", "0.51106423", "0.51091176", "0.51022637", "0.5068502", "0.5063662", "0.5054326", "0.5051436", "0.504533", "0.504533", "0.504533", "0.504533", "0.5043661", "0.5041542", "0.5011831" ]
0.66737354
0
Created by CHE01006 on 4/8/2017.
public interface Car { String draw(); void noOfSeats(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "public final void mo51373a() {\n }", "private stendhal() {\n\t}", "@Override\n public void func_104112_b() {\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\n public int describeContents() { return 0; }", "public void mo38117a() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tprotected void interr() {\n\t}", "private void m50366E() {\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\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "protected boolean func_70814_o() { return true; }", "public void mo4359a() {\n }", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n public void init() {\n }", "protected MetadataUGWD() {/* intentionally empty block */}", "@Override\n public void init() {}", "private static void cajas() {\n\t\t\n\t}", "@Override\n void init() {\n }", "@Override\r\n\tpublic void init() {}", "@Override\n protected void getExras() {\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 rozmnozovat() {\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tpublic void one() {\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}", "private void poetries() {\n\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "private void init() {\n\n\t}", "@Override public int describeContents() { return 0; }", "@Override\n protected 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}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n protected void initialize() {\n\n \n }", "@Override\n protected void initialize() \n {\n \n }", "public void mo6081a() {\n }", "private MetallicityUtils() {\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}", "public void gored() {\n\t\t\n\t}", "public final void mo91715d() {\n }", "@Override\n\tprotected void initialize() {\n\n\t}", "public Pitonyak_09_02() {\r\n }", "@Override\n public void memoria() {\n \n }", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "private TMCourse() {\n\t}", "public void mo12628c() {\n }", "@Override\n\tpublic void init() {\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n public int retroceder() {\n return 0;\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\t\tpublic void init() {\n\t\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "public void m23075a() {\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n public int getSize() {\n return 1;\n }", "@Override\n\tpublic void nghe() {\n\n\t}", "public void mo12930a() {\n }", "public void mo21779D() {\n }", "Consumable() {\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}" ]
[ "0.5918289", "0.5873483", "0.58441687", "0.57418877", "0.57140785", "0.57124895", "0.5673042", "0.5673042", "0.55937004", "0.5555667", "0.5552431", "0.5547081", "0.55143404", "0.5514124", "0.5512775", "0.55072165", "0.54997647", "0.5479961", "0.54748636", "0.54670507", "0.54562145", "0.5445867", "0.54409987", "0.54409987", "0.54409987", "0.54409987", "0.54409987", "0.5431963", "0.5427921", "0.54193604", "0.54058355", "0.54038626", "0.5392931", "0.5390662", "0.539019", "0.5389682", "0.5384114", "0.5384114", "0.5384114", "0.5384114", "0.5384114", "0.5384114", "0.53822577", "0.53820705", "0.5367073", "0.5366357", "0.5359582", "0.53537655", "0.53537655", "0.5347823", "0.5344286", "0.5344286", "0.53398454", "0.53286076", "0.5327359", "0.53257406", "0.53248876", "0.53140205", "0.53140205", "0.53140205", "0.53119034", "0.53119034", "0.53119034", "0.53119034", "0.53119034", "0.53119034", "0.53119034", "0.529957", "0.5297785", "0.5295219", "0.5294271", "0.5291262", "0.5291262", "0.5291262", "0.5291158", "0.52900237", "0.5281403", "0.5277301", "0.5276865", "0.5272876", "0.5272876", "0.5271424", "0.5258994", "0.52552116", "0.5253433", "0.52523494", "0.5251828", "0.5251828", "0.5251828", "0.52473927", "0.52417123", "0.5239309", "0.5238909", "0.5234622", "0.5232044", "0.5222966", "0.52203757", "0.52158123", "0.52145207", "0.5213246", "0.5213105" ]
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { List list = new List(); list.addEl(1); list.addEl(2); // list.addEl(3); list.printList(); list.delEl(2); list.printList(); }
{ "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
Deserializes ESRI shape as described in into JTS Geometry object.
public static Geometry deserialize(Slice shape) { if (shape == null) { return null; } BasicSliceInput input = shape.getInput(); int geometryType = input.readByte(); if (geometryType != GeometryUtils.GeometryTypeName.GEOMETRY_COLLECTION.code()) { return readGeometry(input); } if (input.available() == 0) { return GEOMETRY_FACTORY.createGeometryCollection(); } // GeometryCollection: geometry-type|len-of-shape1|bytes-of-shape1|len-of-shape2|bytes-of-shape2... List<Geometry> geometries = new ArrayList<>(); while (input.available() > 0) { int length = input.readInt(); geometries.add(readGeometry(input.readSlice(length).getInput())); } return GEOMETRY_FACTORY.createGeometryCollection(geometries.toArray(new Geometry[0])); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract Geometry decode(Object o);", "Shape newShape(GraphicalObject g) throws RemoteException;", "@Override\n public Geometry deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context)\n throws JsonParseException {\n JsonObject jsonObject = (JsonObject) json;\n String geometryType = jsonObject.get(\"type\").getAsString();\n if (geometryType.equals(\"Point\")) {\n JsonArray coordinates = jsonObject.getAsJsonArray(\"coordinates\");\n return Point.fromCoordinates(Position.fromCoordinates(\n coordinates.get(0).getAsDouble(),\n coordinates.get(1).getAsDouble()));\n } else {\n throw new JsonParseException(\"Unexpected geometry found: \" + geometryType);\n }\n }", "public abstract com.jme.scene.Geometry getJMEGeometry();", "public void export( Geometry geometry )\n throws XMLStreamException, UnknownCRSException, TransformationException;", "Geometry getGeometry();", "public interface FlatGeometry {\r\n}", "public Mesh(String shape) {\n\t\tthis(primitiveFromStr(shape)); // Call the other constructor for primitive geometries\n\t}", "IShape getShape(String name);", "public static CustomGeometry convertCustomGeometry(XMLStreamReader staxReader) {\n try {\n JAXBContext jaxbContext = JAXBContext.newInstance(BINDING_PACKAGE);\n Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();\n JAXBElement<CTCustomGeometry2D> el = unmarshaller.unmarshal(staxReader, CTCustomGeometry2D.class);\n return new CustomGeometry(el.getValue());\n } catch (JAXBException e) {\n LOG.log(POILogger.ERROR, \"Unable to parse single custom geometry\", e);\n return null;\n }\n }", "private GM_Object createGeometry(ByteArrayOutputStream bos,\r\n CS_CoordinateSystem srs) throws Exception {\r\n Debug.debugMethodBegin( this, \"createGeometry\" ); \r\n \r\n byte[] wkb = bos.toByteArray();\r\n bos.close(); \r\n \r\n String crs = srs.getName();\r\n crs = crs.replace(' ',':');\r\n crs = StringExtend.replace(crs, \":\", \".xml#\", true ); \r\n \r\n StringBuffer sb = null;\r\n GM_Object geo = null; \r\n \r\n // create geometries from the wkb considering the geomerty typ\r\n switch ( getGeometryType( wkb ) ) {\r\n case 1: geo = factory.createGM_Point( wkb, srs ); break;\r\n case 2: geo = factory.createGM_Curve( wkb, srs); break;\r\n case 3: geo = factory.createGM_Surface( wkb, srs, \r\n new GM_SurfaceInterpolation_Impl(1)); break;\r\n case 4: geo = factory.createGM_MultiPoint( wkb, srs ); break;\r\n case 5: geo = factory.createGM_MultiCurve( wkb, srs ); break;\r\n case 6: geo = factory.createGM_MultiSurface( wkb, srs, \r\n new GM_SurfaceInterpolation_Impl(1) ); break;\r\n default: geo = null;\r\n }\r\n \r\n ((GM_Object_Impl)geo).setCoordinateSystem( srs );\r\n \r\n updateBoundingBox(geo);\r\n \r\n Debug.debugMethodEnd();\r\n return geo;\r\n }", "public abstract Geometry computeGeometry();", "public KmlGeometryFeature(){\r\n }", "private GvgPolygon readPolygon(XmlPullParser parser) throws XmlPullParserException, IOException {\n\t\tparser.require(XmlPullParser.START_TAG, ns, \"polygon\");\n\n\t\tHashMap<String, String> attrs = getAttributesAsHashMap(parser);\n\t\tString points = attrs.get(\"points\");\n\t\tif(points == null) {\n\t\t\tmissingAttributeError(\"polygon\", \"points\");\n\t\t}\n\n\t\treturn new GvgPolygon(points, new GvgPaintStyle(attrs.get(\"style\")));\n\t}", "private void setGeometry() {\n GeometryDescriptor geomDesc = featureSource.getSchema().getGeometryDescriptor();\n geometryAttributeName = geomDesc.getLocalName();\n\n Class<?> clazz = geomDesc.getType().getBinding();\n\n if (Polygon.class.isAssignableFrom(clazz) || MultiPolygon.class.isAssignableFrom(clazz)) {\n geometryType = GeomType.POLYGON;\n\n } else if (LineString.class.isAssignableFrom(clazz)\n || MultiLineString.class.isAssignableFrom(clazz)) {\n\n geometryType = GeomType.LINE;\n\n } else {\n geometryType = GeomType.POINT;\n }\n}", "ShapeType getShapeType();", "public String getType() {\n return getGeometryType();\n }", "private MeshPolygons readMeshPolygon() throws IOException\n {\n final int material = this.reader.readByte();\n final byte flags = (byte) this.reader.readByte();\n final boolean hasNormals = (flags & 1) != 0;\n final boolean hasTexCoords = (flags & 2) != 0;\n final byte mode = (byte) this.reader.readByte();\n final int vertexCount = this.reader.readInt();\n log.trace(\" Loading vertices (\" + vertexCount * 3 * 4 +\" bytes)\");\n final FloatBuffer vertices = BufferUtils\n .convertToNativeEndian(this.reader\n .readFloatBuffer(vertexCount * 3));\n FloatBuffer normals = null, texCoords = null;\n if (hasNormals)\n {\n log.trace(\" Loading normals (\" + vertexCount * 3 * 4+ \" bytes)\");\n normals = BufferUtils.convertToNativeEndian(this.reader\n .readFloatBuffer(vertexCount * 3));\n }\n if (hasTexCoords)\n {\n log.trace(\" Loading tex coords (\" + vertexCount * 2 * 4+ \" bytes)\");\n texCoords = BufferUtils.convertToNativeEndian(this.reader\n .readFloatBuffer(vertexCount * 2));\n }\n final int indexCount = this.reader.readInt();\n log.trace(\" Loading indices (\" + indexCount * 2 + \" bytes)\");\n final ShortBuffer indices = BufferUtils\n .convertToNativeEndian(this.reader\n .readShortBuffer(indexCount));\n log.trace(\" Creating mesh polygons object\");\n return new MeshPolygons(material, mode, indices, vertices, texCoords,\n normals);\n }", "Shape getShape();", "public Geominas getGeominas(String geoCod) throws Exception;", "public boolean parseGeoJSON(File file, String target_epsg) {\n OGRDataStoreFactory factory = new BridjOGRDataStoreFactory();\n Map<String, String> connectionParams = new HashMap<String, String>();\n connectionParams.put(\"DriverName\", \"GPX\");\n connectionParams.put(\"DatasourceName\", file.getAbsolutePath());\n DataStore store = null;\n SimpleFeatureSource source;\n SimpleFeatureCollection collection;\n SimpleFeatureIterator it;\n SimpleFeature feature;\n SimpleFeatureType featureType = null;\n CoordinateReferenceSystem sourceCrs;\n CoordinateReferenceSystem targetCrs;\n MathTransform transform = null;\n JSONArray features = new JSONArray();\n\n try {\n // Transform\n // Gpx epsg:4326 and longitude 1st\n sourceCrs = CRS.decode(\"EPSG:4326\",true);\n // Oskari crs\n //(oskari OL map crs)\n targetCrs = CRS.decode(target_epsg, true);\n if (!targetCrs.getName().equals(sourceCrs.getName())) {\n transform = CRS.findMathTransform(sourceCrs, targetCrs, true);\n }\n store = factory.createDataStore(connectionParams);\n String[] typeNames = store.getTypeNames();\n for (String typeName : typeNames) {\n // Skip track points\n if (typeName.equals(\"track_points\")) {\n continue;\n }\n source = store.getFeatureSource(typeName);\n collection = source.getFeatures();\n it = collection.features();\n while (it.hasNext()) {\n feature = it.next();\n featureType = feature.getFeatureType();\n if (transform != null) {\n Geometry geometry = (Geometry) feature.getDefaultGeometry();\n feature.setDefaultGeometry(JTS.transform(geometry, transform));\n }\n JSONObject geojs = JSONHelper.createJSONObject(io.toString(feature));\n if (geojs != null) {\n features.put(geojs);\n }\n }\n it.close();\n }\n if (features.length() > 0) {\n setGeoJson(JSONHelper.createJSONObject(\"features\", features));\n setFeatureType((FeatureType)featureType);\n setTypeName(\"GPX_\");\n }\n } catch (Exception e) {\n log.error(\"Couldn't create geoJSON from the GPX file \", file.getName(), e);\n return false;\n }\n finally {\n store.dispose();\n }\n return true;\n }", "private void setShape(){\n // 0 - index of the vertex at the top of the polygon\n shapex[0] = x + MathUtils.cos(radians) * 8;\n shapey[0] = y + MathUtils.sin(radians) * 8;\n\n // 1 - index of the vertex at the bottom left of the polygon\n shapex[1] = x + MathUtils.cos(radians - 4 * 3.1415f / 5) * 8;\n shapey[1] = y + MathUtils.sin(radians - 4 * 3.1415f / 5) * 8;\n\n // 2 - index of the vertex at the bottom right of the polygon\n shapex[2] = x + MathUtils.cos(radians + 4 * 3.1415f / 5) * 8;\n shapey[2] = y + MathUtils.sin(radians + 4 * 3.1415f / 5) * 8;\n }", "@Override\n\tpublic void setGeometry(String geometry) {\n\t\t\n\t}", "private void readObject(ObjectInputStream _stream)\n/* 435: */ throws IOException, ClassNotFoundException\n/* 436: */ {\n/* 437:508 */ _stream.defaultReadObject();\n/* 438:509 */ this._origin_VA.restoreOwner(this);\n/* 439:510 */ //finishReadObject_xjal(_stream, TileGIS.class);\n/* 440: */ }", "@DISPID(1610940422) //= 0x60050006. The runtime will prefer the VTID if present\n @VTID(28)\n Factory shapeFactory();", "protected MapShapeAdapter getShapeAdapter() {\r\n return shapeAdapter;\r\n }", "public T caseGeometry(Geometry object) {\r\n\t\treturn null;\r\n\t}", "public static String getGeometryType(EsriShapefile.EsriFeature feature,\r\n int numParts) {\r\n String tag = null;\r\n if (numParts == 0) {\r\n return tag;\r\n }\r\n if ((feature instanceof EsriShapefile.EsriPoint)\r\n || (feature instanceof EsriShapefile.EsriPointZ)) {\r\n if (numParts == 1) {\r\n tag = Geometry.TYPE_POINT;\r\n } else {\r\n tag = Geometry.TYPE_MULTIPOINT;\r\n }\r\n } else if ((feature instanceof EsriShapefile.EsriPolyline)\r\n || (feature instanceof EsriShapefile.EsriPolylineZ)) {\r\n if (numParts == 1) {\r\n tag = Geometry.TYPE_LINESTRING;\r\n } else {\r\n tag = Geometry.TYPE_MULTILINESTRING;\r\n }\r\n } else if ((feature instanceof EsriShapefile.EsriPolygon)\r\n || (feature instanceof EsriShapefile.EsriPolygonZ)) {\r\n if (numParts == 1) {\r\n tag = Geometry.TYPE_POLYGON;\r\n } else {\r\n tag = Geometry.TYPE_MULTIPOLYGON;\r\n }\r\n }\r\n\r\n return tag;\r\n }", "public Shape getShape();", "public static void main(String[] args) {\n JSONParser jsonParser = new JSONParser();\n\n try (FileReader reader = new FileReader(\"countries.geojson\")) {\n // lecture du fichier\n Object obj = jsonParser.parse(reader);\n JSONObject feature = (JSONObject) obj;\n\n JSONArray jsonArray = (JSONArray) feature.get(\"features\");\n\n final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n final DocumentBuilder builder = factory.newDocumentBuilder();\n\n final Document document = builder.newDocument();\n\n final Element kmlTag = document.createElement(\"kml\");\n kmlTag.setAttribute(\"xmlns\", \"http://www.opengis.net/kml/2.2\");\n document.appendChild(kmlTag);\n\n final Element documentTag = document.createElement(\"Document\");\n kmlTag.appendChild(documentTag);\n\n for (Object feat : jsonArray) {\n final Element placeMark = document.createElement(\"Placemark\");\n documentTag.appendChild(placeMark);\n\n JSONObject featJ = (JSONObject) feat;\n\n JSONObject featJSON = (JSONObject) featJ.get(\"properties\");\n Properties properties = new Properties((String) featJSON.get(\"ADMIN\"), (String) featJSON.get(\"ISO_A3\"));\n JSONObject coordJSON = (JSONObject) featJ.get(\"geometry\");\n String type = (String) coordJSON.get(\"type\");\n String titre = \"(\" + properties.getIsoA3() + \") \" + properties.getAdmin();\n\n Element extData = document.createElement(\"ExtendedData\");\n placeMark.appendChild(extData);\n\n Element dataAdmin = document.createElement(\"Data\");\n dataAdmin.setAttribute(\"name\", \"ADMIN\");\n extData.appendChild(dataAdmin);\n\n Element dataISO = document.createElement(\"Data\");\n dataISO.setAttribute(\"name\", \"ISO_A3\");\n extData.appendChild(dataISO);\n\n Element valueAdmin = document.createElement(\"value\");\n valueAdmin.appendChild(document.createTextNode(properties.getAdmin()));\n dataAdmin.appendChild(valueAdmin);\n\n Element valueISO = document.createElement(\"value\");\n valueISO.appendChild(document.createTextNode(properties.getIsoA3()));\n dataISO.appendChild(valueISO);\n\n System.out.println(titre);\n if (type.equals(\"Polygon\")){\n Element polygon = document.createElement(\"Polygon\");\n placeMark.appendChild(polygon);\n\n Element outerBoundaryIs = document.createElement(\"outerBoundaryIs\");\n polygon.appendChild(outerBoundaryIs);\n\n Element linearRing = document.createElement(\"LinearRing\");\n outerBoundaryIs.appendChild(linearRing);\n\n Element coordinates = document.createElement(\"coordinates\");\n\n JSONArray coords = (JSONArray) coordJSON.get(\"coordinates\");\n for (Object coord: coords){\n JSONArray coordJ = (JSONArray) coord;\n for (Object o : coordJ) {\n StringBuilder sb = new StringBuilder(o.toString());\n sb.deleteCharAt(0);\n sb.deleteCharAt(sb.length() - 1);\n sb.append(\" \");\n coordinates.appendChild(document.createTextNode(sb.toString()));\n }\n linearRing.appendChild(coordinates);\n\n String nbCoord = \"\\t - \" + coordJ.size() + \" coordinates\";\n System.out.println(nbCoord);\n\n }\n } else if (type.equals(\"MultiPolygon\")){\n Element multiGeometry = document.createElement(\"MultiGeometry\");\n placeMark.appendChild(multiGeometry);\n\n Element polygon = document.createElement(\"Polygon\");\n multiGeometry.appendChild(polygon);\n\n Element outerBoundaryIs = document.createElement(\"outerBoundaryIs\");\n polygon.appendChild(outerBoundaryIs);\n\n Element linearRing = document.createElement(\"LinearRing\");\n outerBoundaryIs.appendChild(linearRing);\n\n Element coordinates = document.createElement(\"coordinates\");\n\n JSONArray coords = (JSONArray) coordJSON.get(\"coordinates\");\n for (Object coord : coords) {\n JSONArray coordJ = (JSONArray) coord;\n for (Object c : coordJ){\n JSONArray c1 = (JSONArray) c;\n for (Object o : c1){\n StringBuilder sb = new StringBuilder(o.toString());\n sb.deleteCharAt(0);\n sb.deleteCharAt(sb.length() - 1);\n sb.append(\" \");\n coordinates.appendChild(document.createTextNode(sb.toString()));\n }\n linearRing.appendChild(coordinates);\n\n String nbCoord = \"\\t - \" + c1.size() + \" coordinates\";\n System.out.println(nbCoord);\n }\n }\n } else {\n throw new Error(\"Type mal forme !\");\n }\n }\n\n // Etape 7 : finalisation\n final TransformerFactory transformerFactory = TransformerFactory.newInstance();\n final Transformer transformer = transformerFactory.newTransformer();\n final DOMSource source = new DOMSource(document);\n final StreamResult sortie = new StreamResult(new File(\"src/output.kml\"));\n\n //prologue\n document.setXmlStandalone(true);\n document.setXmlVersion(\"1.0\");\n transformer.setOutputProperty(OutputKeys.ENCODING, \"UTF-8\");\n\n //formatage\n transformer.setOutputProperty(OutputKeys.INDENT, \"yes\");\n transformer.setOutputProperty(\"{http://xml.apache.org/xslt}indent-amount\", \"2\");\n\n //sortie\n transformer.transform(source, sortie);\n\n } catch (IOException | ParseException | ParserConfigurationException | TransformerException e) {\n e.printStackTrace();\n }\n }", "private RShape loadNewShape() {\n // Get a list of all SVG files in the BUFFER_ACC_PATH folder\n File dir = new File(BUFFER_ACC_PATH);\n String[] listing = dir.list(new FilenameFilter() {\n public boolean accept(File file, String filename) {\n return filename.endsWith(\"svg\");\n }\n });\n \n availableFiles = listing.length;\n\n // Load the first SVG file from the list\n if (listing != null && listing.length > 0) {\n currentFileName = listing[currentFileIndex];\n System.out.println(\"loading \" + currentFileName);\n RShape shape = RG.loadShape(BUFFER_ACC_PATH + currentFileName);\n shape.scale(svgScale, shape.getCenter());\n print(shape, \"loaded: \");\n return shape;\n }\n\n return null;\n }", "void storeObject(Polygon polygon, String id);", "@Test\n public void testSerializeDeserialize() throws GeometryException, AlgebraException, IOException, ClassNotFoundException {\n final UniformRandomizer randomizer = new UniformRandomizer(new Random());\n final double alphaEuler1 = 0.0;\n final double betaEuler1 = 0.0;\n final double gammaEuler1 = 0.0;\n final double alphaEuler2 = randomizer.nextDouble(MIN_ANGLE_DEGREES,\n MAX_ANGLE_DEGREES) * Math.PI / 180.0;\n final double betaEuler2 = randomizer.nextDouble(MIN_ANGLE_DEGREES,\n MAX_ANGLE_DEGREES) * Math.PI / 180.0;\n final double gammaEuler2 = randomizer.nextDouble(MIN_ANGLE_DEGREES,\n MAX_ANGLE_DEGREES) * Math.PI / 180.0;\n\n final double horizontalFocalLength1 = randomizer.nextDouble(MIN_FOCAL_LENGTH,\n MAX_FOCAL_LENGTH);\n final double verticalFocalLength1 = randomizer.nextDouble(MIN_FOCAL_LENGTH,\n MAX_FOCAL_LENGTH);\n final double horizontalFocalLength2 = randomizer.nextDouble(MIN_FOCAL_LENGTH,\n MAX_FOCAL_LENGTH);\n final double verticalFocalLength2 = randomizer.nextDouble(MIN_FOCAL_LENGTH,\n MAX_FOCAL_LENGTH);\n\n final double skewness1 = randomizer.nextDouble(MIN_SKEWNESS, MAX_SKEWNESS);\n final double skewness2 = randomizer.nextDouble(MIN_SKEWNESS, MAX_SKEWNESS);\n\n final double horizontalPrincipalPoint1 = randomizer.nextDouble(\n MIN_PRINCIPAL_POINT, MAX_PRINCIPAL_POINT);\n final double verticalPrincipalPoint1 = randomizer.nextDouble(\n MIN_PRINCIPAL_POINT, MAX_PRINCIPAL_POINT);\n final double horizontalPrincipalPoint2 = randomizer.nextDouble(\n MIN_PRINCIPAL_POINT, MAX_PRINCIPAL_POINT);\n final double verticalPrincipalPoint2 = randomizer.nextDouble(\n MIN_PRINCIPAL_POINT, MAX_PRINCIPAL_POINT);\n\n final double cameraSeparation = randomizer.nextDouble(MIN_CAMERA_SEPARATION,\n MAX_CAMERA_SEPARATION);\n\n final Point3D center1 = new InhomogeneousPoint3D(\n randomizer.nextDouble(MIN_RANDOM_VALUE, MAX_RANDOM_VALUE),\n randomizer.nextDouble(MIN_RANDOM_VALUE, MAX_RANDOM_VALUE),\n randomizer.nextDouble(MIN_RANDOM_VALUE, MAX_RANDOM_VALUE));\n final Point3D center2 = new InhomogeneousPoint3D(\n center1.getInhomX() + cameraSeparation,\n center1.getInhomY() + cameraSeparation,\n center1.getInhomZ() + cameraSeparation);\n\n final Rotation3D rotation1 = new MatrixRotation3D(alphaEuler1, betaEuler1,\n gammaEuler1);\n final Rotation3D rotation2 = new MatrixRotation3D(alphaEuler2, betaEuler2,\n gammaEuler2);\n\n final PinholeCameraIntrinsicParameters intrinsic1 =\n new PinholeCameraIntrinsicParameters(horizontalFocalLength1,\n verticalFocalLength1, horizontalPrincipalPoint1,\n verticalPrincipalPoint1, skewness1);\n final PinholeCameraIntrinsicParameters intrinsic2 =\n new PinholeCameraIntrinsicParameters(horizontalFocalLength2,\n verticalFocalLength2, horizontalPrincipalPoint2,\n verticalPrincipalPoint2, skewness2);\n\n final PinholeCamera camera1 = new PinholeCamera(intrinsic1, rotation1,\n center1);\n final PinholeCamera camera2 = new PinholeCamera(intrinsic2, rotation2,\n center2);\n\n final FundamentalMatrix fundMatrix1 = new FundamentalMatrix(camera1, camera2);\n\n // serialize and deserialize\n final byte[] bytes = SerializationHelper.serialize(fundMatrix1);\n final FundamentalMatrix fundMatrix2 = SerializationHelper.deserialize(bytes);\n\n // check\n assertEquals(fundMatrix1.getInternalMatrix(), fundMatrix2.getInternalMatrix());\n }", "public LiteShape(Geometry geom, AffineTransform at, boolean generalize) {\n if( geom!=null)\n this.geometry =getGeometryFactory().createGeometry(geom);\n this.affineTransform = at;\n this.generalize = generalize;\n if (at==null){\n \tyScale=xScale=1;\n \treturn;\n }\n xScale = (float) Math.sqrt(\n (at.getScaleX() * at.getScaleX())\n + (at.getShearX() * at.getShearX()));\n yScale = (float) Math.sqrt(\n (at.getScaleY() * at.getScaleY())\n + (at.getShearY() * at.getShearY()));\n }", "@Override\n\tpublic void renderGeometry(SvgRenderContext state) {\n\t\t\n\t}", "public GeoJson extractDataForGeoJsonFromIo(String xml_og){\r\n\t\t\r\n\t\tGeoJson geoJson = new GeoJson();\r\n\t\t\r\n\t\tDocumentBuilder dbuilder = null;\r\n\t\tDocument doc = null;\r\n\t\tString xml_final;\r\n\t\t\r\n\t\ttry {\t\t\t\r\n\t\t\tXPath xPath = XPathFactory.newInstance().newXPath();\r\n\t\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\r\n\t\t\tdbFactory.setNamespaceAware(true);\r\n\t DocumentBuilder builder = dbFactory.newDocumentBuilder();\r\n\t doc = builder.parse(new InputSource(new StringReader(xml_og)));\r\n\t \t \r\n\t \txPath.setNamespaceContext(new NamespaceContext() {\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic Iterator getPrefixes(String namespaceURI) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic String getPrefix(String namespaceURI) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\t\t\t\t\t\r\n\t\t\t\t\t @Override\r\n\t\t\t public String getNamespaceURI(String args) {\r\n\t\t\t if(\"swe\".equals(args)) {\r\n\t\t\t return \"http://www.opengis.net/swe/1.0.1\";\r\n\t\t\t }else if(\"env\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/2003/05/soap-envelope\";\r\n\t\t\t }else if(\"sos\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/sos/2.0\";\r\n\t\t\t }else if(\"ows\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/ows/1.1\";\r\n\t\t\t }else if(\"soap\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/2003/05/soap-envelope\"; \t\r\n\t\t\t }else if(\"om\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/om/2.0\";\r\n\t\t\t }else if(\"xlink\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/1999/xlink\";\r\n\t\t\t }else if(\"gml\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/gml/3.2\";\r\n\t\t\t }else if(\"sams\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/samplingSpatial/2.0\";\r\n\t\t\t }else{\r\n\t\t\t return null;}\r\n\t\t\t }\r\n\t\t\t\t});\t\t\t\t\r\n\t\t\t\t/*\r\n\t\t\t\tString path_offering = \"/soap:Envelope/soap:Body/sos:Capabilities/@version\";\r\n\t\t\t\tNode node_offering = (Node)xPath.compile(path_offering).evaluate(doc, XPathConstants.NODE);\r\n\t\t\t\tSystem.out.println(\"offering: \"+node_offering.getTextContent());\r\n\t\t\t\t\r\n\t\t\t\tString path_procedures = \"//om:OM_Observation[@name='GetObservation']/ows:Parameter[@name='procedure']/ows:AllowedValues/ows:Value\"; */\r\n\t\t\t\t//String path_loading = \"//om:OM_Observation[om:observedProperty[@xlink:href='http://ispace.researchstudio.at/ont/swe/property/Loading']]/om:result\";\r\n\t \t\r\n\t \t//The path to the time is only for the first observation block valid; other blocks have another path\r\n\t \t//book[title/@lang = 'it'] [@uom='abc']\r\n\t\t\t\t//myNodeList.item(0).setNodeValue(\"Hi mom!\");\r\n\t \t\r\n\t \t\r\n\t\t\t\t\r\n\t\t\t\tString path_SamplingFOIIdentifier = \"//sams:SF_SpatialSamplingFeature/gml:identifier\";\r\n\t\t\t\tNodeList nodes_path_SamplingFOIIdentifier = (NodeList)xPath.compile(path_SamplingFOIIdentifier).evaluate(doc, XPathConstants.NODESET);\r\n\t\t\t\t\r\n\t\t\t\tString path_y_lat_x_long = \"//gml:pos\";\r\n\t\t\t\tNodeList nodes_path_y_lat_x_long = (NodeList)xPath.compile(path_y_lat_x_long).evaluate(doc, XPathConstants.NODESET);\t\t\t\t\t\t\r\n\t \t\r\n\t\t\t\t\r\n\t\t\t\tString messwert = \"\";\t\r\n\t\t\t\t\r\n\t\t\t\t//for(int n = 0; n<nodes_procedure.getLength(); n++){\r\n\t\t\t\t//we need the data from only the first observation block\r\n\t\t\t\tfor(int n = 0; n<1; n++){\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tString path_time = \"//gml:timePosition\";\r\n\t\t\t\t\tNodeList nodes_path_time = (NodeList)xPath.compile(path_time).evaluate(doc, XPathConstants.NODESET);\t\t\t\t\r\n\t\t\t\t\tString path_SamplingFOIName = \"//sams:SF_SpatialSamplingFeature/gml:name\";\r\n\t\t\t\t\tNodeList nodes_path_SamplingFOIName = (NodeList)xPath.compile(path_SamplingFOIName).evaluate(doc, XPathConstants.NODESET);\r\n\t\t\t\t\tString path_procedure = \"//om:OM_Observation/om:procedure/@xlink:href\";\r\n\t\t\t\t\tNodeList nodes_procedure = (NodeList)xPath.compile(path_procedure).evaluate(doc, XPathConstants.NODESET);\r\n\t\t\t\t\t\r\n\t\t\t\t\ttry{\r\n\t\t\t\t\t\tGeoJson gjson = new GeoJson();\r\n\t\t\t\t\t\tgeoJson.list_geoJson.add(gjson);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tgjson.observationPhenomenonTime = nodes_path_time.item(0).getTextContent();\t\t\t\t\t\t\r\n\t\t\t\t\t\tgjson.samplingFOIName = nodes_path_SamplingFOIName.item(n).getTextContent();\t\t\t\t\t\t\r\n\t\t\t\t\t\tgjson.samplingFOIIdentifier = nodes_path_SamplingFOIIdentifier.item(n).getTextContent();\r\n\t\t\t\t\t\tgjson.procedure = nodes_procedure.item(n).getTextContent();\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tString coords = nodes_path_y_lat_x_long.item(n).getTextContent();\r\n\t\t\t\t\t\tString [] stray = coords.split(\" \");\r\n\t\t\t\t\t\tgjson.y_lat = Double.parseDouble(coords.split(\" \")[0]);\r\n\t\t\t\t\t\tgjson.x_long = Double.parseDouble(coords.split(\" \")[1]);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif(stray.length==3){\r\n\t\t\t\t\t\t\tgjson.z_alt = Double.parseDouble(coords.split(\" \")[2]); \r\n\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}catch(Exception ex){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tlogger.error(\"some error\", ex);\t\t\t\t\t\t\r\n\t\t\t\t\t}\t\t\t\t\t\t\r\n\t\t\t\t}\t\t\r\n\t\t\t\tGeoJson gj = geoJson.list_geoJson.get(0);\r\n\t\t\t\tfor (Field field : gj.getClass().getDeclaredFields()) {\r\n\t\t\t\t\tlogger.debug(field.getName()+ \": \"+field.get(gj));\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t//\tSystem.out.println(TextFiles.xmlDocument2StringWithPrettyPrint(doc, 2));\r\n\t\t}catch(Exception ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t}\t\t\r\n\t\t//xml_final = TextFiles.xmlDocument2StringWithPrettyPrint(doc, 2);\r\n\t\treturn geoJson.list_geoJson.get(0);\r\n\t}", "public interface GMLGeometryWriter {\n\n /**\n * Exports a general geometry. This is the method to call when there is no information about the geometry (the case\n * switching is done here).\n * \n * @param geometry\n * @throws XMLStreamException\n * @throws UnknownCRSException\n * @throws TransformationException\n */\n public void export( Geometry geometry )\n throws XMLStreamException, UnknownCRSException, TransformationException;\n\n /**\n * @param compositeCurve\n * @throws XMLStreamException\n * @throws UnknownCRSException\n * @throws TransformationException\n */\n public void exportCompositeCurve( CompositeCurve compositeCurve )\n throws XMLStreamException, UnknownCRSException, TransformationException;\n\n /**\n * @param geometryComplex\n * @throws XMLStreamException\n * @throws UnknownCRSException\n * @throws TransformationException\n */\n public void exportCompositeGeometry( CompositeGeometry<GeometricPrimitive> geometryComplex )\n throws XMLStreamException, UnknownCRSException, TransformationException;\n\n /**\n * @param compositeSolid\n * @throws XMLStreamException\n * @throws UnknownCRSException\n * @throws TransformationException\n */\n public void exportCompositeSolid( CompositeSolid compositeSolid )\n throws XMLStreamException, UnknownCRSException, TransformationException;\n\n /**\n * @param compositeSurface\n * @throws XMLStreamException\n * @throws UnknownCRSException\n * @throws TransformationException\n */\n public void exportCompositeSurface( CompositeSurface compositeSurface )\n throws XMLStreamException, UnknownCRSException, TransformationException;\n\n /**\n * @param curve\n * @throws XMLStreamException\n * @throws UnknownCRSException\n * @throws TransformationException\n */\n public void exportCurve( Curve curve )\n throws XMLStreamException, UnknownCRSException, TransformationException;\n\n /**\n * @param envelope\n * @throws XMLStreamException\n * @throws UnknownCRSException\n * @throws TransformationException\n */\n public void exportEnvelope( Envelope envelope )\n throws XMLStreamException, UnknownCRSException, TransformationException;\n\n /**\n * @param geometry\n * @throws XMLStreamException\n * @throws UnknownCRSException\n * @throws TransformationException\n */\n public void exportMultiGeometry( MultiGeometry<? extends Geometry> geometry )\n throws XMLStreamException, UnknownCRSException, TransformationException;\n\n /**\n * @param point\n * @throws XMLStreamException\n * @throws UnknownCRSException\n * @throws TransformationException\n */\n public void exportPoint( Point point )\n throws XMLStreamException, UnknownCRSException, TransformationException;\n\n /**\n * @param geometryRef\n * @throws XMLStreamException\n * @throws UnknownCRSException\n * @throws TransformationException\n */\n public void exportReference( GeometryReference<Geometry> geometryRef )\n throws XMLStreamException, UnknownCRSException, TransformationException;\n\n /**\n * @param ring\n * @throws XMLStreamException\n * @throws UnknownCRSException\n * @throws TransformationException\n */\n public void exportRing( Ring ring )\n throws XMLStreamException, UnknownCRSException, TransformationException;\n\n /**\n * @param solid\n * @throws XMLStreamException\n * @throws UnknownCRSException\n * @throws TransformationException\n */\n public void exportSolid( Solid solid )\n throws XMLStreamException, UnknownCRSException, TransformationException;\n\n /**\n * @param surface\n * @throws XMLStreamException\n * @throws UnknownCRSException\n * @throws TransformationException\n */\n public void exportSurface( Surface surface )\n throws XMLStreamException, UnknownCRSException, TransformationException;\n\n /**\n * @param tin\n * @throws XMLStreamException\n * @throws UnknownCRSException\n * @throws TransformationException\n */\n public void exportTin( Tin tin )\n throws XMLStreamException, UnknownCRSException, TransformationException;\n\n /**\n * @param triangSurface\n * @throws XMLStreamException\n * @throws UnknownCRSException\n * @throws TransformationException\n */\n public void exportTriangulatedSurface( TriangulatedSurface triangSurface )\n throws XMLStreamException, UnknownCRSException, TransformationException;\n}", "public interface ShapeTemplate { #\n\t//Show/hide when rendering\n\tpublic void show();\n\tpublic void hide();\n\tpublic boolean getVisible();\n\t\n\t//Storage/retreival of shape mesh\n\tpublic char[][] regenCharTable();\n\tpublic char[][] getCharTable();\n\tpublic String[] getStringTable();\n\t\n\t//Internal storage of current rendered position\n\tpublic Position getPosition();\n\tpublic void setPosition(int x, int y);\n\t\n\t//Width/height accessor properties\n\tpublic int getWidth();\n\tpublic int getHeight();\n\t\n\t//Fill\n\tpublic char getFillChar();\n\tpublic void setFillChar(char newChar);\n\tpublic boolean getFilled();\n\tpublic void setFilled(boolean isFilled);\n\t\n\t//ToString\n\tpublic String toString();\n}", "public Shape getShape() { return shape; }", "public Geometry getJTSGeometry() {\r\n if (jtsPeer == null) {\r\n jtsPeer = calculateJTSPeer();\r\n }\r\n return jtsPeer;\r\n }", "@Override\n public Shape getShape(String shapeType){\n\t\treturn null;\n }", "public String getShapeType(){\n\t\treturn shapeType;\n\t}", "public void setShape(Shape shape) {\n\tthis.shape = shape;\n\n\tPathIterator p = shape.getPathIterator(new AffineTransform());\n\t\t\n\tFlatteningPathIterator fp = new FlatteningPathIterator(p, flatness);\n\t\t\n\tpath.clear();\n\twhile(!fp.isDone()) {\n\t double[] farr = new double[6];\n\t int type = fp.currentSegment(farr);\n\t\t \n\t if (type == PathIterator.SEG_MOVETO || type == PathIterator.SEG_LINETO) {\n\t\tpath.add(new Point2D.Double(farr[0],farr[1]));\n\t }\n\t if (type == PathIterator.SEG_QUADTO) {\n\t\tfor(int i=0; i<2; i++) {\n\t\t path.add(new Point2D.Double(farr[0],farr[1]));\n\t\t}\n\t }\n\t if (type == PathIterator.SEG_CUBICTO) {\n\t\tfor(int i=0; i<3; i++) {\n\t\t path.add(new Point2D.Double(farr[2*i],farr[2*i+1]));\n\t\t}\n\t }\n\t fp.next();\n\t}\n }", "LinkedHashMap<String, IAnimatableShapeReadOnly> getShapeMap();", "public static Geometry noOp(Geometry g) {\n com.esri.core.geometry.Geometry egeom = fromJTS(g);\n return toJTS(egeom);\n }", "public interface GeometricShape {\n double area();\n\n double perimeter();\n\n void drawShape();\n}", "public native Object parse( Object json, String texturePath );", "@Override\n public Geometry getGeometry() {\n return null;\n }", "public Shape getShape() {\n\t\treturn shape;\n\t}", "public Shape getShape() {\r\n\t\t\treturn shape;\r\n\t\t}", "public Iterator<Geometry> getGeometries() throws Exception {\n return new ShapeIterator(new FileInputStream(shp));\n }", "public ShapeType getShape() {\n\t\treturn this.shape;\n\t}", "public Shape getShape() {\n return shape;\n }", "private void readObject(java.io.ObjectInputStream s)\n throws java.lang.ClassNotFoundException,\n\t java.io.IOException\n {\n s.defaultReadObject();\n if (pointSize == 0) {\n\t\tpointSize = (float)size;\n \t }\n width = 1f; // init transient field\n initializeFont(fRequestedAttributes);\n }", "public interface SVGMutableShapeDef<W, F> extends SVGShapeDef<W, F>,\n MutableShapeDef<W> {\n\n /**\n * The width of the SVG view's bounding box.\n * The way shape views are being updated to achieve new width\n * is up to each implementations.\n * @param element The model instance.\n * @return The shape's width.\n */\n double getWidth(final W element);\n\n /**\n * The height of the SVG view's bounding box.\n * The way shape views are being updated to achieve new height\n * is up to each implementations.\n * @param element The model instance.\n * @return The shape's height.\n */\n double getHeight(final W element);\n\n /**\n * If the SVGShape is composed by some\n * SVGShapeView instances, this method allows\n * to display or make not visible each of\n * the inner views as from the <code>element</code>\n * instance's state at runtime.\n * @param viewName The name of the inner SVGSHapeVie.\n * @param element The definition instance.\n * @return Whether the <code>viewName</code> inner SVGShapeView, which\n * the shape is composed by, has to be displayed.\n */\n boolean isSVGViewVisible(final String viewName,\n final W element);\n}", "public interface IPolygon {\n // Returns the text telling what shape it is\n public String whatShape();\n\n // Returns the numbers of sides\n public int noOfSides();\n\n // Returns the array of lengths of all sides\n public double[] getSides();\n\n // Returns the area of the shape\n public double area();\n\n // Returns the perimeter of the shape\n public double perimeter();\n}", "abstract Shape nodeShape(String node, Graphics2D g2d);", "public abstract Polygon4D project();", "IShape getCurrentShape();", "public Mesh(Primitive shape) {\n\t\tswitch (shape) {\n\t\t\tcase CUBE:\n\t\t\t\tgenerateCube();\n\t\t\t\tbreak;\n\t\t\tcase CUBOID:\n\t\t\t\tgenerateCube();\n\t\t\t\tscale(2, 1, 1); // Stretch the cube along the x-axis to give a cuboid\n\t\t\t\tbreak;\n\t\t\tcase TRIANGULAR_PRISM:\n\t\t\t\tgeneratePrism();\n\t\t\t\tbreak;\n\t\t\tcase SPHERE:\n\t\t\t\tgenerateSphere();\n\t\t\t\tbreak;\n\t\t\tcase CONVEX_LENS:\n\t\t\t\tgenerateSphere();\n\t\t\t\tscale(0.6, 2, 2); // Increase the size (to allow a better demonstration of how the lens works) and then squash the sphere along the x-axis\n\t\t\t\tbreak;\n\t\t\tcase CONCAVE_LENS:\n\t\t\t\tgenerateSphere();\n\t\t\t\tscale(0.6, 2, 2); // Increase the size and squash along the x-axis\n\t\t\t\t\n\t\t\t\tfor (int i = 0; i < verts.length; i++) {\n\t\t\t\t\tif (verts[i].getElement(0) < -0.0001) { // Don't move points in the middle of the x-axis\n\t\t\t\t\t\tverts[i].setElement(0, verts[i].getElement(0) + 0.8); // Move points on the left to the right. This part still bulges out to the left, but when it is on the right it is concave\n\t\t\t\t\t} else if (verts[i].getElement(0) > 0.0001) {\n\t\t\t\t\t\tverts[i].setElement(0, verts[i].getElement(0) - 0.8); // Move points on the right to the left.\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// The faces are 'inside out', so the ordering of the vertices must be reversed in order to make the normals point the correct way\n\t\t\t\tfor (int i = 0; i < faces.length; i++) {\n\t\t\t\t\t// Swap the first and last vertices (0 and 2)\n\t\t\t\t\tint temp = faces[i][0];\n\t\t\t\t\tfaces[i][0] = faces[i][2];\n\t\t\t\t\tfaces[i][2] = temp;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase HALF_CYLINDER:\n\t\t\t\tgenerateHalfCylinder();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthrow new IllegalArgumentException(\"Mesh constructor cannot take a null primitive\");\n\t\t}\n\t\tnormals = new Vector[faces.length];\n\t\tds = new double[faces.length];\n\t\tfor (int i = 0; i < faces.length; i++) {\n\t\t\tnormals[i] = normal(faces[i]); // Calculate the normal for the face\n\t\t\tds[i] = verts[faces[i][0]].dotProduct(normals[i]); // Calculate the value of d for the face\n\t\t}\n\t\tcalcBoxVerts(); // Calculate and store the vertices of the AOBB\n\t}", "protected abstract NativeSQLStatement createNativeGeometryTypeStatement();", "public EpsShape(Shape shape) {\n\t\tthis(shape,false);\n\t}", "public void setShape(ShapeType shape) {\n\t\tthis.shape = shape;\n\t}", "public JSONObject getGeoJson() {\n try {\n return new JSONObject(getGeoJsonString());\n } catch (JSONException e) {\n Timber.d(\"Invalid GeoJSON in feature %s\", getId());\n return new JSONObject();\n }\n }", "private static IGeoPoint parseFromJSON(String iGPJSON) {\n\t\treturn null;\n\t}", "private void loadShapesModel(String modelPath) {\n\t\t// Initialize the model\n\t\tShapesPackage.eINSTANCE.eClass();\n\n\t\t// Register the XMI resource factory for the .shapes extension\n\t\tResource.Factory.Registry reg = Resource.Factory.Registry.INSTANCE;\n\t\tMap<String, Object> m = reg.getExtensionToFactoryMap();\n\t\tm.put(\"shapes\", new XMIResourceFactoryImpl());\n\n\t\t// Obtain a new resource set\n\t\tResourceSet resSet = new ResourceSetImpl();\n\n\t\t// Get the resource\n\t\tResource resource = resSet.getResource(URI.createURI(modelPath), true);\n\n\t\t// Get the first model element and cast it to the right type\n\t\tEObject obj = resource.getContents().get(0);\n\t\tif (obj instanceof RootBlock) {\n\t\t\tsourceRootBlock = (RootBlock) obj;\n\t\t} else {\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"RootBlock has to be first element in \" + modelPath);\n\t\t}\n\n\t\tif (LOGGER.isInfoEnabled()) {\n\t\t\tLOGGER.info(\"Loaded Shapes model from \" + modelPath);\n\t\t}\n\t}", "IShape getStartShape();", "public Map<Integer, String> getGeometryType() throws SQLException {\n return retrieveExpected(createNativeGeometryTypeStatement(), STRING);\n }", "public interface ShapeV1 {\n public double area();\n public double perimeter();\n}", "String getShapeName();", "public Shape getShape() {\n\treturn shape;\n }", "public final synchronized void clearGeometry() {\n synchronized (this) {\n this.f718B8WBXPBCF2jGfUDZZU2zV5EYdqbUBu0lAZ0THCEqYyuE8VACR9dY7rDnwBIqh64T = null;\n this.f719hxYOFxFjLpN1maJuWNxUV40nExCGxsxkDPOTgtzMu4zlZCQb3bPlKsXo1SYJg6ME = null;\n }\n }", "public interface ShapeFactory{\n Line createLine();\n Rectangle createRectangle();\n Circle createCircle();\n Polygon createPolygon();\n}", "public MasonGeometry getGeometry() {return agentLocation;}", "@Override\n\tpublic void geometry(Geometry geometry) {\n\t\t\n\t}", "public static com.vividsolutions.jts.geom.MultiPolygon multisurface2JTS(IomObject obj,double strokeP,int srid) //SurfaceOrAreaType type)\n\tthrows Iox2jtsException\n\t{\n\t\tcom.vividsolutions.jts.geom.Polygon[] jtsPolygons=null;\n\t\tcom.vividsolutions.jts.geom.Polygon jtsPolygon=null;\n\t\tint surfaceCount=obj.getattrvaluecount(Iom_jObject.MULTISURFACE_SURFACE);\n\t\tjtsPolygons=new com.vividsolutions.jts.geom.Polygon[surfaceCount];\n\t\tfor(int surfacei=0;surfacei<surfaceCount;surfacei++){\n\t\t\tIomObject surface=obj.getattrobj(Iom_jObject.MULTISURFACE_SURFACE,surfacei);\n\t\t\tcom.vividsolutions.jts.geom.LinearRing jtsShell=null;\n\t\t\tcom.vividsolutions.jts.geom.LinearRing jtsHoles[]=null;\n\t\t\tint boundarycount=surface.getattrvaluecount(Iom_jObject.SURFACE_BOUNDARY);\n\t\t\tif(boundarycount>1){\n\t\t\t\tjtsHoles=new com.vividsolutions.jts.geom.LinearRing[boundarycount-1];\t\t\t\t\n\t\t\t}\n\t\t\tfor(int boundaryi=0;boundaryi<boundarycount;boundaryi++){\n\t\t\t\tIomObject boundary=surface.getattrobj(Iom_jObject.SURFACE_BOUNDARY,boundaryi);\n\t\t\t\tcom.vividsolutions.jts.geom.CoordinateList jtsLine=new com.vividsolutions.jts.geom.CoordinateList();\n\t\t\t\tfor(int polylinei=0;polylinei<boundary.getattrvaluecount(Iom_jObject.BOUNDARY_POLYLINE);polylinei++){\n\t\t\t\t\tIomObject polyline=boundary.getattrobj(Iom_jObject.BOUNDARY_POLYLINE,polylinei);\n\t\t\t\t\tjtsLine.addAll(polyline2JTS(polyline,true,strokeP));\n\t\t\t\t}\n\t\t\t\tjtsLine.closeRing();\n\t\t\t\tif(boundaryi==0){\n\t\t\t\t\tjtsShell=new com.vividsolutions.jts.geom.GeometryFactory().createLinearRing(jtsLine.toCoordinateArray());\n\t\t\t\t}else{\n\t\t\t\t\tjtsHoles[boundaryi-1]=new com.vividsolutions.jts.geom.GeometryFactory().createLinearRing(jtsLine.toCoordinateArray());\n\t\t\t\t}\n\t\t\t}\n\t\t\tjtsPolygon=new com.vividsolutions.jts.geom.GeometryFactory().createPolygon(jtsShell,jtsHoles);\n\t\t\tjtsPolygons[surfacei]=jtsPolygon;\n\t\t}\n\t\tcom.vividsolutions.jts.geom.MultiPolygon ret=new com.vividsolutions.jts.geom.MultiPolygon(jtsPolygons, new PrecisionModel(), srid);\n\t\treturn ret;\n\t}", "public interface Shape {\n\n String getDescription();\n}", "private Primitive(String shape) {\n\t\t\tthis.shape = shape;\n\t\t}", "public PointPolygon extractPointFromIO(String xml_og) {\r\n\t\tPointPolygon point = new PointPolygon();\r\n\t\t\r\n\t\tDocumentBuilder dbuilder = null;\r\n\t\ttry {\t\t\t\r\n\t\t\tXPath xPath = XPathFactory.newInstance().newXPath();\r\n\t\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\r\n\t\t\tdbFactory.setNamespaceAware(true);\r\n\t DocumentBuilder builder = dbFactory.newDocumentBuilder();\r\n\t Document doc = builder.parse(new InputSource(new StringReader(xml_og)));\r\n\t \t \r\n\t \txPath.setNamespaceContext(new NamespaceContext() {\r\n\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic Iterator getPrefixes(String namespaceURI) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic String getPrefix(String namespaceURI) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t @Override\r\n\t\t\t public String getNamespaceURI(String args) {\r\n\t\t\t if(\"swe\".equals(args)) {\r\n\t\t\t return \"http://www.opengis.net/swe/1.0.1\";\r\n\t\t\t }else if(\"env\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/2003/05/soap-envelope\";\r\n\t\t\t }else if(\"sos\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/sos/2.0\";\r\n\t\t\t }else if(\"ows\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/ows/1.1\";\r\n\t\t\t }else if(\"soap\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/2003/05/soap-envelope\"; \t\r\n\t\t\t }else if(\"om\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/om/2.0\";\r\n\t\t\t }else if(\"xlink\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/1999/xlink\";\r\n\t\t\t }else if(\"gml\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/gml/3.2\";\r\n\t\t\t }else{\r\n\t\t\t return null;}\r\n\t\t\t }\r\n\t\t\t\t});\t\t\t\t\r\n\t\t\t\t/*\r\n\t\t\t\tString path_offering = \"/soap:Envelope/soap:Body/sos:Capabilities/@version\";\r\n\t\t\t\tNode node_offering = (Node)xPath.compile(path_offering).evaluate(doc, XPathConstants.NODE);\r\n\t\t\t\tSystem.out.println(\"offering: \"+node_offering.getTextContent());\r\n\t\t\t\t\r\n\t\t\t\tString path_procedures = \"//om:OM_Observation[@name='GetObservation']/ows:Parameter[@name='procedure']/ows:AllowedValues/ows:Value\"; */\r\n\t\t\t\t//String pathToLoading = \"//om:OM_Observation[om:observedProperty[@xlink:href='http://ispace.researchstudio.at/ont/swe/property/Loading']]/om:result\";\r\n\t\t\t\t\r\n\t\t\t\t//jetzt werden hier aber alle X Y Koordinaten,die sich in InsertObservation.xml wiederholen, ausgelesen werden\r\n\t\t\t\t\r\n\t\t\t\t//String pathToCoordinates =\"//gml:LinearRing/gml:posList\";\r\n\t \t\r\n\t\t\t\t//book[title/@lang = 'it'] [@uom='abc']\r\n\t\t\t\t//myNodeList.item(0).setNodeValue(\"Hi test!\");\r\n\t\t\t\t\r\n\t \tString pathToCoordinates =\"//gml:Point/gml:pos\";\r\n\t\t\t\tNodeList nodes_position = (NodeList)xPath.compile(pathToCoordinates).evaluate(doc, XPathConstants.NODESET);\r\n\t \t\r\n\t\t\t\tArrayList<String> list_xy = new ArrayList<String>();\r\n\t\t\t\t\r\n\t\t\t\tfor(int n = 0; n<nodes_position.getLength(); n++){\t\t\r\n\t\t\t\t\tlist_xy.add(nodes_position.item(n).getTextContent());\r\n\t\t\t\t}\t\t\t\r\n\r\n\t\t\t\ttry{\t\t\t\t\r\n\t\t\t\t\tpoint.y_latitude = Double.parseDouble(list_xy.get(0).split(\" \")[0]);\r\n\t\t\t\t\tpoint.x_longitude = Double.parseDouble(list_xy.get(0).split(\" \")[1]);\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\tpoint.point2D.setLocation(point.y_latitude, point.x_longitude);\r\n\t\t\t\t\r\n\t\t\t\t}catch(Exception e){\t\t\t\t\t\r\n\t\t\t\t\te.printStackTrace();\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}catch(Exception ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t}\t\t\t\r\n\t\treturn point;\t\t\t\t\r\n\t}", "public PointPolygon extractPointFromIO(String xml_og) {\r\n\t\tPointPolygon point = new PointPolygon();\r\n\t\t\r\n\t\tDocumentBuilder dbuilder = null;\r\n\t\ttry {\t\t\t\r\n\t\t\tXPath xPath = XPathFactory.newInstance().newXPath();\r\n\t\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\r\n\t\t\tdbFactory.setNamespaceAware(true);\r\n\t DocumentBuilder builder = dbFactory.newDocumentBuilder();\r\n\t Document doc = builder.parse(new InputSource(new StringReader(xml_og)));\r\n\t \t \r\n\t \txPath.setNamespaceContext(new NamespaceContext() {\r\n\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic Iterator getPrefixes(String namespaceURI) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic String getPrefix(String namespaceURI) {\r\n\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t @Override\r\n\t\t\t public String getNamespaceURI(String args) {\r\n\t\t\t if(\"swe\".equals(args)) {\r\n\t\t\t return \"http://www.opengis.net/swe/1.0.1\";\r\n\t\t\t }else if(\"env\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/2003/05/soap-envelope\";\r\n\t\t\t }else if(\"sos\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/sos/2.0\";\r\n\t\t\t }else if(\"ows\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/ows/1.1\";\r\n\t\t\t }else if(\"soap\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/2003/05/soap-envelope\"; \t\r\n\t\t\t }else if(\"om\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/om/2.0\";\r\n\t\t\t }else if(\"xlink\".equals(args)){\r\n\t\t\t \treturn \"http://www.w3.org/1999/xlink\";\r\n\t\t\t }else if(\"gml\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/gml/3.2\";\r\n\t\t\t }else{\r\n\t\t\t return null;}\r\n\t\t\t }\r\n\t\t\t\t});\t\t\t\t\r\n\t\t\t\t/*\r\n\t\t\t\tString path_offering = \"/soap:Envelope/soap:Body/sos:Capabilities/@version\";\r\n\t\t\t\tNode node_offering = (Node)xPath.compile(path_offering).evaluate(doc, XPathConstants.NODE);\r\n\t\t\t\tSystem.out.println(\"offering: \"+node_offering.getTextContent());\r\n\t\t\t\t\r\n\t\t\t\tString path_procedures = \"//om:OM_Observation[@name='GetObservation']/ows:Parameter[@name='procedure']/ows:AllowedValues/ows:Value\"; */\r\n\t\t\t\t//String pathToLoading = \"//om:OM_Observation[om:observedProperty[@xlink:href='http://ispace.researchstudio.at/ont/swe/property/Loading']]/om:result\";\r\n\t\t\t\t\r\n\t\t\t\t//jetzt werden hier aber alle X Y Koordinaten,die sich in InsertObservation.xml wiederholen, ausgelesen werden\r\n\t\t\t\tString pathToCoordinates =\"//gml:Point/gml:pos\";\r\n\t\t\t\t//String pathToCoordinates =\"//gml:LinearRing/gml:posList\";\r\n\t\t\t\tNodeList nodes_position = (NodeList)xPath.compile(pathToCoordinates).evaluate(doc, XPathConstants.NODESET);\r\n\t\t\t\t//book[title/@lang = 'it'] [@uom='abc']\r\n\t\t\t\t//myNodeList.item(0).setNodeValue(\"Hi mom!\");\r\n\t\t\t\tString xy= \"\";\r\n\t\t\t\tArrayList<String> list_xy = new ArrayList<String>();\r\n\t\t\t\t\r\n\t\t\t\tfor(int n = 0; n<nodes_position.getLength(); n++){\r\n\t\t\t\t\tSystem.out.println(\"ParserXmlJson.extractPointFromIO: \"+nodes_position.item(n).getTextContent());\t\t\r\n\t\t\t\t\tlist_xy.add(nodes_position.item(n).getTextContent());\r\n\t\t\t\t\t//node_procedures.item(n).setTextContent(\"4444\");\r\n\t\t\t\t\t//System.out.println(\"ParserXmlJson.parseInsertObservation:parser EDITED:\"+node_procedures.item(n).getTextContent());\r\n\t\t\t\t}\t\t\t\r\n\t\t\t//\tSystem.out.println(TextFiles.xmlDocument2StringWithPrettyPrint(doc, 2));\r\n\t\t\t\ttry{\r\n\t\t\t\t\r\n\t\t\t\t\tpoint.y_latitude = Double.parseDouble(list_xy.get(0).split(\" \")[0]);\r\n\t\t\t\t\tpoint.x_longitude = Double.parseDouble(list_xy.get(0).split(\" \")[1]);\r\n\t\t\t\t\t\r\n\t\t\t\t\tpoint.point2D.setLocation(point.x_longitude, point.y_latitude);\r\n\t\t\t\t\r\n\t\t\t\t}catch(Exception e){\r\n\t\t\t\t\tSystem.out.println(\"Error: maybe no coordinates!\");\r\n\t\t\t\t\te.printStackTrace();\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t}catch(Exception ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t}\t\t\t\r\n\t\treturn point;\t\t\t\t\r\n\t}", "AbstractShape(String name, double x, double y, double w, double h, int r, int g, int b) {\n this.name = name;\n this.x = x;\n this.y = y;\n this.w = w;\n this.h = h;\n this.r = r;\n this.g = g;\n this.b = b;\n }", "public Shape getShape() {\n\t\treturn null;\n\t}", "public NewShape() {\r\n\t\tsuper();\r\n\t}", "private static void storePolygon(PolygonRoi roi, MetadataStore store,\n int roiNum, int shape)\n {\n Rectangle bounds = roi.getBounds();\n int[] xCoordinates = roi.getXCoordinates();\n int[] yCoordinates = roi.getYCoordinates();\n StringBuffer points = new StringBuffer();\n for (int i=0; i<xCoordinates.length; i++) {\n points.append(xCoordinates[i] + bounds.x);\n points.append(\",\");\n points.append(yCoordinates[i] + bounds.y);\n if (i < xCoordinates.length - 1) points.append(\" \");\n }\n store.setPolylinePoints(points.toString(), roiNum, shape);\n store.setPolylineClosed(Boolean.TRUE, roiNum, shape);\n }", "@Override\r\n\t@JsonIgnore\r\n\tpublic Geometry getEnvelope() {\n\t\treturn null;\r\n\t}", "public GeometryType getCMUGeometry() {\n return geometry;\n }", "private void removeShape(Shape shapeToRemove) {\n\t\t// Find all Edges which come to this Shape\n\t\tVector<Edge> sources = getEdgeSource(shapeToRemove, shapes);\n\t\t\n\t\t// Find all Edges which come from this Shape\n\t\tVector<Edge> dests = getEdgeDest(shapeToRemove, shapes);\n\t\tshapes.remove(shapeToRemove);\n\t\t\n\t\t// Remove all Edge and JointPoint\n\t\tremoveEdgeJointPointSource(sources);\n\t\tremoveEdgeJointPointDest(dests);\n\t}", "public void setGeometry(Geometry g) {\n this.geometry = (Geometry) g.clone();\n }", "public PlaceGeometry getGeometry() {\n return geometry;\n }", "public ArrayList<ArrayList<String>> extractCoordsFromWfsXml(String xml_og) {\r\n\t\tSystem.out.println(\"ParserXmlJson.extractBoundingBoxFromWfsXml: \"+ xml_og);\r\n\t\tPointPolygon point = new PointPolygon();\r\n\t\tArrayList<String> list_objectid = new ArrayList<String>();\r\n\t\tArrayList<String> list_coords = new ArrayList<String>();\r\n\t\tArrayList<ArrayList<String>> list_coords_objectid = new ArrayList<ArrayList<String>>();\r\n\t\t\r\n\t\t\r\n\t\tDocumentBuilder dbuilder = null;\r\n\t\ttry {\t\t\t\r\n\t\t\tXPath xPath = XPathFactory.newInstance().newXPath();\r\n\t\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\r\n\t\t\tdbFactory.setNamespaceAware(true);\r\n\t DocumentBuilder builder = dbFactory.newDocumentBuilder();\r\n\t Document doc = builder.parse(new InputSource(new StringReader(xml_og)));\r\n\t \t \r\n\t \txPath.setNamespaceContext(new NamespaceContext() {\r\n\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic Iterator getPrefixes(String namespaceURI) {\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic String getPrefix(String namespaceURI) {\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t @Override\r\n\t\t\t public String getNamespaceURI(String args) {\r\n\t\t\t if(LoadOnStartAppConfiguration.arbeitsbereichXmlTagPolygon.equals(args)){\r\n\t\t\t \treturn LoadOnStartAppConfiguration.arbeitsbereichXmlTagPolygon;\r\n\t\t\t }else if(\"gml\".equals(args)){\r\n\t\t\t \treturn \"http://www.opengis.net/gml/3.2\"; \t\r\n\t\t\t }else{\r\n\t\t\t \treturn null;\r\n\t\t\t }\r\n\t\t\t }\r\n\t\t\t\t});\t\t\r\n//\t \tString path_offering = \"/wfs:FeatureCollection/wfs:member/geofence_sbg:geofence_sbg_bbox/@gml:id\";\r\n//\t\t\t\tNode node_offering = (Node)xPath.compile(path_offering).evaluate(doc, XPathConstants.NODE);\r\n//\t\t\t\tSystem.out.println(\"offering: \"+node_offering.getNodeValue());\r\n\t\t\t\t/*\r\n\t\t\t\tString path_offering = \"/soap:Envelope/soap:Body/sos:Capabilities/@version\";\r\n\t\t\t\tNode node_offering = (Node)xPath.compile(path_offering).evaluate(doc, XPathConstants.NODE);\r\n\t\t\t\tSystem.out.println(\"offering: \"+node_offering.getTextContent());\r\n\t\t\t\t\r\n\t\t\t\tString path_procedures = \"//om:OM_Observation[@name='GetObservation']/ows:Parameter[@name='procedure']/ows:AllowedValues/ows:Value\"; */\r\n//\t\t\t\tString pathToLoading = \"//om:OM_Observation[om:observedProperty[@xlink:href='http://ispace.researchstudio.at/ont/swe/property/Loading']]/om:result\";\r\n\t\t\t\t\r\n\t\t\t\t//jetzt werden hier aber alle X Y Koordinaten,die sich in InsertObservation.xml wiederholen, ausgelesen werden\r\n\t \tString pathToObjectid = \"//geofence_sbg:objectid\";\r\n\t \tNodeList nodes_Objectid = (NodeList)xPath.compile(pathToObjectid).evaluate(doc, XPathConstants.NODESET);\r\n\t \t\r\n\t\t\t\tString pathToCoordinates =\"//gml:LinearRing/gml:posList\";\r\n\t\t\t\tNodeList nodes_position = (NodeList)xPath.compile(pathToCoordinates).evaluate(doc, XPathConstants.NODESET);\r\n\t\t\t\t//book[title/@lang = 'it'] [@uom='abc']\r\n\t\t\t\t//myNodeList.item(0).setNodeValue(\"Hi mom!\");\r\n\t\t\t\tString xy= \"\";\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"vor for loop ParserXmlJson.extractPointFromIO:\"+ nodes_position.getLength());\t\r\n\t\t\t\tfor(int n = 0; n<nodes_position.getLength(); n++){\r\n\t\t\t\t\tSystem.out.println(\"ParserXmlJson.extractPointFromIO: \"+nodes_position.item(n).getTextContent());\r\n\t\t\t\t\tpoint.list_ofStrConsistingOf5CoordinatesForBoundingBox.add(nodes_position.item(n).getTextContent());\r\n\t\t\t\t\tlist_coords.add(nodes_position.item(n).getTextContent());\r\n\t\t\t\t\tSystem.out.println(\"ParserXmlJson.extractPointFromIO objectid: \"+nodes_Objectid.item(n).getTextContent());\r\n\t\t\t\t\tlist_objectid.add(nodes_Objectid.item(n).getTextContent());\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t//node_procedures.item(n).setTextContent(\"4444\");\r\n\t\t\t\t\t//System.out.println(\"ParserXmlJson.parseInsertObservation:parser EDITED:\"+node_procedures.item(n).getTextContent());\r\n\t\t\t\t}\t\t\t\r\n\t\t\t//\tSystem.out.println(TextFiles.xmlDocument2StringWithPrettyPrint(doc, 2));\r\n\t\t\t\ttry{\r\n\t\t\t\t\t\r\n\t\t\t\t}catch(Exception e){\r\n\t\t\t\t\tSystem.out.println(\"Error: maybe no coordinates!\");\r\n\t\t\t\t\te.printStackTrace();\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t}catch(Exception ex){\r\n\t\t\tex.printStackTrace();\r\n\t\t}\t\t\t\r\n\t\tlist_coords_objectid.add(list_coords);\r\n\t\tlist_coords_objectid.add(list_objectid);\r\n\t\treturn list_coords_objectid;//point.list_ofStrConsistingOf5CoordinatesForBoundingBox;\t\t\t\t\r\n\t}", "protected Shape getShape()\n {\n return null;\n }", "public Shape getMyShape() {\n\t\treturn myShape;\n\t}", "public ShapeTriMesh() {\n\t\tsuper();\n\t\tthis.setName(UUID.randomUUID().toString());\n\t}", "public void setShape(Info shape) {\n \n }", "@DISPID(1610940423) //= 0x60050007. The runtime will prefer the VTID if present\n @VTID(29)\n Factory hybridShapeFactory();", "private Shape createPath(final Geometry geom) {\n return new LiteShape(geom, true, maxDistance);\n }", "public Geometry transformGeometry(Geometry originalGeometry)\r\n\t\t\tthrows TransformException {\r\n\t\treturn coordinateTransformer.transform(originalGeometry);\r\n\t}", "Map<IShape, List<IEvent>> getShapeMap();", "public static com.vividsolutions.jts.geom.CoordinateList polyline2JTS(IomObject polylineObj,boolean isSurfaceOrArea,double p)\n\tthrows Iox2jtsException\n\t{\n\t\tif(polylineObj==null){\n\t\t\treturn null;\n\t\t}\n\t\tcom.vividsolutions.jts.geom.CoordinateList ret=new com.vividsolutions.jts.geom.CoordinateList();\n\t\t// is POLYLINE?\n\t\tif(isSurfaceOrArea){\n\t\t\tIomObject lineattr=polylineObj.getattrobj(Iom_jObject.POLYLINE_LINEATTR,0);\n\t\t\tif(lineattr!=null){\n\t\t\t\t//writeAttrs(out,lineattr);\n\t\t\t\tthrow new Iox2jtsException(\"Lineattributes not supported\");\t\t\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tboolean clipped=polylineObj.getobjectconsistency()==IomConstants.IOM_INCOMPLETE;\n\t\tif(clipped){\n\t\t\tthrow new Iox2jtsException(\"clipped polyline not supported\");\n\t\t}\n\t\tfor(int sequencei=0;sequencei<polylineObj.getattrvaluecount(Iom_jObject.POLYLINE_SEQUENCE);sequencei++){\n\t\t\tif(clipped){\n\t\t\t\t//out.startElement(tags::get_CLIPPED(),0,0);\n\t\t\t}else{\n\t\t\t\t// an unclipped polyline should have only one sequence element\n\t\t\t\tif(sequencei>0){\n\t\t\t\t\tthrow new Iox2jtsException(\"unclipped polyline with multi 'sequence' elements\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tIomObject sequence=polylineObj.getattrobj(Iom_jObject.POLYLINE_SEQUENCE,sequencei);\n\t\t\tfor(int segmenti=0;segmenti<sequence.getattrvaluecount(Iom_jObject.SEGMENTS_SEGMENT);segmenti++){\n\t\t\t\tIomObject segment=sequence.getattrobj(Iom_jObject.SEGMENTS_SEGMENT,segmenti);\n\t\t\t\t//EhiLogger.debug(\"segmenttag \"+segment.getobjecttag());\n\t\t\t\tif(segment.getobjecttag().equals(Iom_jObject.COORD)){\n\t\t\t\t\t// COORD\n\t\t\t\t\tret.add(coord2JTS(segment));\n\t\t\t\t}else if(segment.getobjecttag().equals(Iom_jObject.ARC)){\n\t\t\t\t\t// ARC\n\t\t\t\t\tarc2JTS(ret,segment,p);\n\t\t\t\t}else{\n\t\t\t\t\t// custum line form\n\t\t\t\t\tthrow new Iox2jtsException(\"custom line form not supported\");\n\t\t\t\t\t//out.startElement(segment->getTag(),0,0);\n\t\t\t\t\t//writeAttrs(out,segment);\n\t\t\t\t\t//out.endElement(/*segment*/);\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tif(clipped){\n\t\t\t\t//out.endElement(/*CLIPPED*/);\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}", "public Shape getShape() {\n if (model == null) {\n return null;\n }\n\n // check to see if we already made this one.\n Object retval = shapeCache.get(model);\n\n // if not, make it and store a copy in the cache..\n if (retval == null) {\n retval = makeBarb();\n if (retval instanceof GeneralPath) {\n shapeCache.put(model.clone(), ((GeneralPath) retval).clone());\n } else {\n shapeCache.put(model.clone(), ((Area) retval).clone());\n }\n }\n\n return (Shape) retval;\n }" ]
[ "0.6529173", "0.5709379", "0.5597154", "0.5557569", "0.54365504", "0.52818376", "0.5229007", "0.5202383", "0.5199678", "0.51525277", "0.5073859", "0.50387204", "0.5010875", "0.4975205", "0.49716747", "0.48982108", "0.48732677", "0.48657238", "0.48643473", "0.48570195", "0.48512936", "0.48325968", "0.47845992", "0.4745773", "0.47343665", "0.4687711", "0.468265", "0.46735853", "0.46547353", "0.4644668", "0.463224", "0.46025255", "0.45970967", "0.45878917", "0.45843226", "0.4576804", "0.45669574", "0.45666975", "0.45475417", "0.45337707", "0.4530438", "0.45294467", "0.4527963", "0.45250803", "0.4500846", "0.44981098", "0.44965237", "0.44444194", "0.4435434", "0.44348454", "0.4434104", "0.44327074", "0.44248858", "0.44077015", "0.4393985", "0.4373856", "0.43646953", "0.4351262", "0.4347393", "0.4345866", "0.43413132", "0.43318978", "0.43242195", "0.43191126", "0.43180394", "0.43127152", "0.43112975", "0.43061697", "0.429346", "0.42910153", "0.42906946", "0.42897275", "0.42885563", "0.4287157", "0.42828557", "0.42764136", "0.4255566", "0.42328405", "0.42306018", "0.42306018", "0.4230408", "0.42234668", "0.42199945", "0.42125484", "0.4209185", "0.4205704", "0.42033714", "0.41987857", "0.41958153", "0.41905186", "0.41900638", "0.41845658", "0.41822052", "0.41755953", "0.41726923", "0.4172632", "0.41725945", "0.4161456", "0.41577676", "0.4154917" ]
0.6235713
1
CREATE AN INTERACTIVE PROGRAM TO ASK USER STARTING CHARACTER AND ENDING CHARACTER THEN PRINT EVERYTHING IN BETWEEN IT COULD BE STARTING CHARACTER IS AFTER ENDING CHARACTER FOR EXAMPLE USER CAN ENTER Z A , or A K Can we ask user character ? NO!!!! Ask user for String and pick first character by charAt(0)
public static void main(String[] args) { Scanner scan = new Scanner(System.in); System.out.println("Please write a word: "); String word = scan.next(); char firstLetter = word.charAt(0); char lastLetter = word.charAt(word.length()-1); System.out.print("The letters between the first and last character that you entered are: \n"); if (firstLetter<lastLetter) for (char x = firstLetter; x <= lastLetter ; ++x) { System.out.print(x + "," ); } else if (firstLetter>lastLetter) for (char i = firstLetter ; i >= lastLetter ; --i) { System.out.print(i + ","); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\t\t\r\n\t\tScanner scan = new Scanner(System.in);\r\n\t String word = scan.nextLine();\r\n\t\tint a = word.length();\r\n\t\tint lastCar= a-1; // last index number\r\n\t\t\r\n\t\tchar FirstLetter = word.charAt(0); // first character 0\r\n\t\t\r\n\t\tchar LastLetter = word.charAt(a-1);\r\n\t\t\r\n\t\tString Concat = LastLetter+word.substring(1,lastCar)+FirstLetter;\r\n\t\t\r\n\t\tSystem.out.println(Concat);\r\n\t}", "public static void printAlphabetInRange(char beginning, char ending ){\n\n if(beginning<ending){\n System.out.println(\"we need to increment from \" + beginning+\" till \"+ending);\n for (char i = beginning; i <=ending ; i++) {\n System.out.print(i+\" \");\n }\n System.out.println();\n }else if (beginning>ending){\n System.out.println(\"we need to decrement from \" + beginning+\" till \"+ending);\n for (char i = beginning; i >=ending ; i--) {\n System.out.print(i+\" \");\n }\n System.out.println();\n }else{\n System.out.println(\"They are same character\");\n }\n\n }", "public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n String s1 = scan.nextLine();\n int begin = scan.nextInt();\n int end = scan.nextInt();\n System.out.println(s1.substring(begin,end + 1));\n }", "public char askForLetter() {\n\t\tchar guessLetter;\n\t\tboolean validInput = false;\n\t\twhile (validInput == false) {\n\t\t\tSystem.out.println(\"Enter a letter: \");\n\t\t\tString guessLine = keyboard.nextLine();\n\t\t\tif (guessLine.length() == 0 || guessLine.length() >= 2) {\n\t\t\t\tSystem.out.println(\"Please insert a valid input\");\n\t\t\t\tSystem.out.println(\"\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tguessLine = guessLine.toLowerCase();\n\t\t\t\tguessLetter = guessLine.charAt(0);\n\t\t\t\tif(guessLetter >= 'a' && guessLetter <= 'z') {\n\t\t\t\t\tSystem.out.println(\"You entered: \" + guessLetter);\n\t\t\t\t\tvalidInput = true;\n\t\t\t\t\treturn(guessLetter);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"Please insert a valid input\");\n\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn(' ');\n\t\t\n\t\t\n\t}", "public static int Main()\n\t{\n\t\tString t;\n\t\tString cha = new String(new char[500]);\n\t\tint i; //???????\n\t\tcha = new Scanner(System.in).nextLine(); //???????\n\t\tt = cha;\n\t\tfor (i = 0; * (t.Substring(i)) != '\\0';i++)\n\t\t{\n\t\t\tif ((*(t.Substring(i)) == ' ') && (*(t.Substring(i) + 1) == ' '))\n\t\t\t{\n\t\t\tcontinue;\n\t\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.print((t.Substring(i)));\n\t\t}\n\t\t}\n\t\tSystem.out.print(\"\\n\");\n\t\treturn 0; //????\n\t}", "public static void main(String args[]) \n {\n Scanner in=new Scanner(System.in);\n String text=in.nextLine();\n StringBuilder str=new StringBuilder(text);\n int str_len=str.length();\n int key=in.nextInt();\n for(int i=0;i<str_len;i++)\n {\n if(str.charAt(i)!=' ')\n {\n int ch=str.charAt(i)-key;\n if(str.charAt(i)>'A' && str.charAt(i)<'Z')\n {\n if(ch<'A')\n {\n ch=ch+26;\n }\n }\n else if(str.charAt(i)>'a' && str.charAt(i)<'z')\n {\n if(ch<'a')\n {\n ch=ch+26;\n }\n }\n str.setCharAt(i,(char)ch);\n }\n }\n System.out.print(str);\n }", "public static void main(String args[]) {\n Scanner s=new Scanner(System.in);\n char c=s.next().charAt(0);\n int k=s.nextInt();\n if(c=='c')\n {\n //char m='z';\n System.out.print(\"z \");\n return;\n }\n else if (c>='a' && c<='z')\n {\n int o=c+'a';\n o=(o-k)%26;\n c=(char)(o+'a');\n }\n else if(c>='A' && c<='Z')\n {\n int o=c+'A';\n o=(o-k)%26;\n c=(char)(o+'A');\n }\n System.out.print(c);\n }", "public static void main(String[] args) {\n\t\t\n\t\tint lengthOfCurrent = 0;\n\t\tSystem.out.println(\"Enter the string.\");\n\t\tString input = IO.readString();\n\t\tSystem.out.println(input);\n\t\tchar[] cArray = input.toCharArray();\n\t\tint uniqueCharacters = getNumUniqueCharacters(cArray);\n\t\tint index = 0;\n\t\tString[] letters = new String[uniqueCharacters];\n\t\t\n\t\tif(input.length() > 1){\n\t\t\tfor(int i = 0; i < input.length(); i++){\n\t\t\t\tif(i == 0){\n\t\t\t\t\tletters[index] = Character.toString(cArray[i]);\n\t\t\t\t\tindex++;\n\t\t\t\t\t//System.out.println(letters[index]);\n\t\t\t\t}\n\t\t\t\telse if(cArray[i] != cArray[i-1]){\n\t\t\t\t\tletters[index] = Character.toString(cArray[i]);\n\t\t\t\t\tindex++;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor(int i = 0; i < letters.length; i++){\n\t\t\tSystem.out.println(letters[i]);\n\t\t}\n\t\t\n\t}", "char startChar();", "public static void main(String[] args) {\nScanner scan = new Scanner(System.in);\n\nString name = \"Batyr\";\n\n\n// 1. length();\n\n\nSystem.out.println(name.length());\n\n// 2. toUpperCase();\n\n\nSystem.out.println(name.toUpperCase());\n\n// 3. toLoweCase();\n\n\nSystem.out.println(name.toLowerCase());\n\n// 4. charAt(index);\n\nSystem.out.println(name.charAt(0));\nSystem.out.println(name.charAt(1));\nSystem.out.println(name.charAt(2));\nSystem.out.println(name.charAt(3));\nSystem.out.println(name.charAt(4));\n\n// 4. ******OR*****\n\nchar c1= name.charAt(0);\nchar c2= name.charAt(1);\nchar c3= name.charAt(2);\nchar c4= name.charAt(3);\nchar c5= name.charAt(4);\n\nSystem.out.println(c1);\nSystem.out.println(c2);\nSystem.out.println(c3);\nSystem.out.println(c4);\nSystem.out.println(c5);\n\n// 5. str.equal(\"value\")\n\nSystem.out.println(name.equals(\"Batyr\"));\nSystem.out.println(name.equalsIgnoreCase(\"Batyr\"));\n\n// 6. contains\n\nSystem.out.println(name.contains(\"at\"));\n\n// 6. ******OR******\n\nboolean containsOrNot = name.contains(\"at\");\n\nSystem.out.println(containsOrNot);\n\n// 7. indexOf\n\nSystem.out.println(name.indexOf(\"a\"));\n\n// will show you the first letter's index only\n\nSystem.out.println(name.indexOf(\"ty\"));\n\n//will show -1 when the char which entered is abcent\n\nSystem.out.println(name.indexOf(\"wty\"));\n\nString uName=name.toUpperCase();\n\nSystem.out.println(uName.indexOf(\"BATYR\"));\n\nSystem.out.println(name.toUpperCase().indexOf(\"BA\"));\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nscan.close();\n\t}", "public static void main(String[] args) {\n Scanner input = new Scanner(System.in);//creating a Scanner called input\n\n System.out.println(\"Enter the name of an animal: \");\n String animal = input.nextLine();\n\n System.out.println(\"How would you describe a \" + animal + \"? \");\n String description = input.nextLine();\n\n input.close(); //close scanner\n\n char letter = animal.charAt(0);//takes the first character from String animal\n System.out.println(\"A \" + animal + \" is \" + description);\n\n System.out.println(\"You will find it under \" + letter + \" in the dictionary\");\n }", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String str = sc.nextLine();\n char temp;\n for(int i=0; i < str.length(); i++) {\n temp = str.charAt(i);\n \n if(temp>=65 && temp <= 96) {\n // 대문자를 소문자로 변형\n System.out.println((char)(temp+32) +\"\");\n } else if(temp >= 97 && temp <= 122) {\n // 소문자를 대문자로 변형\n System.out.println((char)(temp-32) + \"\");\n } else {\n // 숫자가 들어갔을 때는 그냥 출력\n System.out.println(temp +\"\");\n }\n }\n // 아스키 코드 65 = 'A' ~ 90 = 'Z'\n // 97 = 'a' ~ 122 = 'z'\n }", "public static char inputChar(String p) {\n String c;\n while (true) {\n System.out.print(p);\n c = in.nextLine();\n if (c.length() == 1) {\n return c.charAt(0);\n } else {\n System.err.print(\"Must enter character, enter again! \");\n }\n }\n }", "public static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\r\n\t\t\r\n\t\tSystem.out.println(\"Enter a string: \");\r\n\t\t\r\n\t\tString s = input.nextLine();\r\n\t\tchar firstLetter = firstLetter(s);\r\n\t\t\r\n\t\t// checks if the string has any letters in it and prints the length and first letter of a string\r\n\t\tif(Character.isLetter(firstLetter)){\r\n\t\tSystem.out.println(\"The lenght of the string you entered is \" + s.length() + \" and its first letter is \" + firstLetter);\r\n\t\t}\r\n\t\telse{\r\n\t\t\tSystem.out.println(\"The lenght of the string you entered is \" + s.length() + \" and there is no letters in it \");\r\n\t\t}\r\n\t\tinput.close();\r\n\t}", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n System.out.println(\"Type your name: \");\n String name = scanner.nextLine();\n int i = 0;\n while((i<3)&& name.length()>3){\n\n System.out.println((i+1)+\". \"+\"character: \" + name.charAt(i));\n i++;\n }\n\n }", "public static void main(String args[]) {\n Scanner sc=new Scanner(System.in);\n String s =sc.nextLine();\n int key =sc.nextInt();\n int len =s.length();\n for(int i=0;i<len;i++)\n {\n char ch =s.charAt(i);\n if(ch == ' ')\n System.out.print(\" \");\n else{\n\t\t if(ch >= 65 && ch<= 90){\n\t\t ch = (char)(ch -65);\n\t\t\t ch = (char)((26+ch-key)%26);\n\t\t\t ch =(char)(ch +65);\n\t\t\t System.out.print(ch);\n\t\t }\n\t\t else{\n\t\t ch = (char)(ch -97);\n\t\t\t ch = (char)((26+ch-key)%26);\n\t\t\t ch =(char)(ch +97);\n\t\t\t System.out.print(ch);\n\t\t }\n\t\t \n }\n \n }\n }", "public static void main(String[]args) {\n\t\t\n\t\tScanner scan = new Scanner(System.in);\n System.out.println(\"Enter a character\");\n \n char chr = scan.next().charAt(0);\n \n if((chr>='a' && chr<='z')||(chr>='A' && chr<='Z')) {\n System.out.println(\"The character is in alphabet\");\n }else{\n System.out.println(\"The character is not in alphabet\");\n }\n\t\t scan.close();\n\t\t\n\t}", "public abstract char getStarterChar();", "public static void main(String args[]) {\n\t String str; \r\n\t Scanner sc = new Scanner(System.in);\r\n\t System.out.println(\"Enter the String\");\r\n\t str = sc.nextLine();\r\n\t\t StringBuffer alphabets = new StringBuffer(), \r\n\t\t numbers = new StringBuffer(), \r\n\t\t specialChars = new StringBuffer(); \r\n\t\t \r\n\t\t for (int i=0; i<str.length(); i++) { \r\n\t\t \t\r\n\t\t \tif(Character.isAlphabetic(str.charAt(i))) \r\n\t\t alphabets.append(str.charAt(i)); \r\n\t\t \t \r\n\t\t else if(Character.isDigit(str.charAt(i))) \r\n\t\t \t\tnumbers.append(str.charAt(i));\r\n\t\t \r\n\t\t else\r\n\t\t specialChars.append(str.charAt(i)); \r\n\t\t } \r\n\t\t \r\n\t\t System.out.println(alphabets); \r\n\t\t System.out.println(numbers); \r\n\t\t System.out.println(specialChars);\r\n\t}", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n\n String word = scanner.next();\n\n boolean start = word.contains(\"J\")|word.contains(\"j\");\n\n System.out.print(start);\n\n }", "public static void main(String args[]){\n Scanner sc=new Scanner(System.in);\n String str=sc.nextLine();\n int len=str.length();\n int stat[]=new int[26];\n for(int i=0;i<len;i++)\n {\n if((str.charAt(i)>='a') && ( str.charAt(i)<='z'))\n {\n int offset=str.charAt(i) - 'a';\n stat[offset]++; \n }\n if((str.charAt(i)>='A') && ( str.charAt(i)<='Z'))\n {\n int offset=str.charAt(i) - 'A';\n stat[offset]++; \n }\n }\n for(int i=0;i<26;i++)\n {\n \n if( stat[i]==0)\n {\n char ch=(char)('a'+i);\n System.out.print(ch+\" \");\n \n \n \n }\n }\n}", "private char readChar() \n {\n \n String uInput = null;//user input\n do//do while loop to wait for a charater\n {\n try//collect user input\n {\n uInput = br.readLine();\n }\n catch(IOException ioe)//catch IOE\n {\n System.out.println(\"IO error trying to read number. Exiting now\");\n System.exit(1);\n }\n if(uInput.charAt(0)=='?')//special case for ? symbol\n {\n return uInput.charAt(0);\n }\n if(!Character.isLetter(uInput.charAt(0)))//check for charater\n {\n System.out.println(\"Invalid input, use ? for a list of commands\");\n System.out.printf(\"=> \");\n }\n }\n while(!Character.isLetter(uInput.charAt(0)));\n\n return uInput.charAt(0);//return character input\n \n }", "public static void main(String args[]) {\n\t\tScanner in = new Scanner(System.in);\n\t\tString str = in.nextLine();\n\t\tboolean flag = false;\n\t\tstr = str.toLowerCase();\n\t\tfor (char ch = 'a'; ch <= 'z'; ch++) {\n\t\t\tflag = false;\n\t\t\tfor (int i = 0; i < str.length(); i++) {\n\t\t\t\tif (str.charAt(i) == ch) {\n\t\t\t\t\tflag = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (false == flag) {\n\t\t\t\tSystem.out.print(ch+\" \");\n\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t}", "char getContactLetter();", "public static void main(String[] args) {\n Scanner key=new Scanner(System.in);\r\n while(key.hasNext())\r\n {\r\n String s=key.next();\r\n String c=\"\";\r\n for (int i = 0; i <s.length(); i++) {\r\n if((Character)s.charAt(i)=='1'|| (Character)s.charAt(i)=='0'|| (Character)s.charAt(i)=='-')\r\n {\r\n // c=c+c.concat(String.valueOf((Character)s.charAt(i)));\r\n System.out.print((Character)s.charAt(i));\r\n }\r\n else if((Character)s.charAt(i)=='A' || (Character)s.charAt(i)=='B' || (Character)s.charAt(i)=='C')\r\n {\r\n System.out.print(2);\r\n }\r\n else if((Character)s.charAt(i)=='D' || (Character)s.charAt(i)=='E' || (Character)s.charAt(i)=='F')\r\n {\r\n System.out.print(3);\r\n }\r\n else if((Character)s.charAt(i)=='G' || (Character)s.charAt(i)=='H' || (Character)s.charAt(i)=='I')\r\n {\r\n System.out.print(4);\r\n }\r\n else if((Character)s.charAt(i)=='J' || (Character)s.charAt(i)=='K' || (Character)s.charAt(i)=='L')\r\n {\r\n System.out.print(5);\r\n }\r\n else if((Character)s.charAt(i)=='M' || (Character)s.charAt(i)=='N' || (Character)s.charAt(i)=='O')\r\n {\r\n System.out.print(6);\r\n }\r\n else if((Character)s.charAt(i)=='P' || (Character)s.charAt(i)=='Q' || (Character)s.charAt(i)=='R' || (Character)s.charAt(i)=='S')\r\n {\r\n System.out.print(7);\r\n }\r\n else if((Character)s.charAt(i)=='T' || (Character)s.charAt(i)=='U' || (Character)s.charAt(i)=='V')\r\n {\r\n System.out.print(8);\r\n }\r\n else if((Character)s.charAt(i)=='W' || (Character)s.charAt(i)=='X' || (Character)s.charAt(i)=='Y'|| (Character)s.charAt(i)=='Z')\r\n {\r\n System.out.print(9);\r\n }\r\n }\r\n System.out.println();\r\n }\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}", "public static int Main()\n\t{\n\t\tint n;\n\t\tString a = new String(new char[81]); //?????a??\n//C++ TO JAVA CONVERTER TODO TASK: Pointer arithmetic is detected on this variable, so pointers on this variable are left unchanged:\n\t\tchar * p;\n\t\tn = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));\n\t\tSystem.in.read(); //?????\n\t\twhile (n-- != 0) //??n???\n\t\t{\n\t\t\ta = new Scanner(System.in).nextLine(); //??????\n\t\t\tp = a; //??????\n\t\t\tif (*p != '_' && (*p > 'z' || *p < 'a') && (*p>'Z' || *p < 'A')) //???????????\n\t\t\t{\n\t\t\t\tSystem.out.print('0');\n\t\t\t\tSystem.out.print(\"\\n\");\n\t\t\t\tcontinue; //????\n\t\t\t}\n\t\t\tfor (p = a.Substring(1); * p != '\\0';p++) //??'\\0'??\n\t\t\t{\n\t\t\t\tif (*p != '_' && (*p > 'z' || *p < 'a') && (*p>'9' || *p < '0') && (*p>'Z' || *p < 'A')) //??????????????\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print('0');\n\t\t\t\t\tSystem.out.print(\"\\n\");\n\t\t\t\t\tbreak; //????\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (*p == '\\0') //?????????\n\t\t\t{\n\t\t\t\tSystem.out.print('1');\n\t\t\t\tSystem.out.print(\"\\n\");\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}", "public static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tchar n=sc.next().charAt(0);\n\t\tchar v='a';\n\t\tdo {\n\t\t\tSystem.out.print(v+++\" \");\n\t\t\t\n\t\t}while(v<=n);\n\t\t\n\t\t\n\t\t\n\t}", "public static void main (String[] args) {\n\t\t\n\t\tScanner a=new Scanner(System.in);\n\t String str=a.nextLine();\n\t System.out.println(\"the first 3 letters of \"+str+ \" is \"+ str.substring(0,3));\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n Scanner scan=new Scanner(System.in);\n System.out.println(\"Enter the word:\");\n String word= scan.next();\n\n char lastChar=word.charAt(word.length()-1);\n System.out.println(lastChar);\n\n\n }", "public static char getKeyCharacter()\n {\n \n //Prompts and reads the key character in String\n final int MINIMUM_LENGTH = 0, MAXIMUM_LENGTH = 1;\n Scanner key = new Scanner(System.in);\n System.out.print(\"Please enter a single character to act as a key: \");\n String fh = key.nextLine();\n \n //Checks for key character length and loops for proper input\n while (fh.length() == MINIMUM_LENGTH|| fh.length() > MAXIMUM_LENGTH)\n {\t\n System.out.print(\"Please enter a single character to act as a key: \");\n fh = key.nextLine();\n }\n \n //Converts String to char\n char gKC = fh.charAt(0);\n return gKC;\n }", "public static void main(String[] args) {\n\n Scanner keyboard = new Scanner(System.in);\n\n System.out.println(\"Enter the name of your favorite city\");\n System.out.println(\"I will display the number of characters in the city name\");\n System.out.println(\"I will also diplay the city name in both uppercase and lowercase and give you the first character in the name of the city\");\n\n String city = keyboard.nextLine();\n\n int characters = city.length();\n\n\n System.out.println(\"Number of characters: \" + characters);\n System.out.println(\"City name in Uppercase characters: \" + city.toUpperCase());\n System.out.println(\"City name in Lowercase characters: \" + city.toLowerCase());\n System.out.println(\"First character in the name of the city: \" + city.charAt(0));\n\n }", "public static void main(String[] args) {\n\t\tScanner input = new Scanner (System.in);\n\t\tSystem.out.print(\"Enter t a string:\");\n\t\tString s = input.nextLine();\n int\tlengthOfs=s.length();\n char ch =s.charAt(0);\n System.out.printf(\"The length of this sting is : %d\\n\",lengthOfs);\n System.out.printf(\"The first character of this sting is : %s\\n\",ch);\n\t}", "public static void main(String[] args) {\n Scanner console = new Scanner(System.in);\n String input = console.nextLine();\n Pattern wordPattern = Pattern.compile(\n \"[A-Za-z]+\");\n Matcher matcher = wordPattern.matcher(input);\n while (matcher.find()) {\n System.out.print(matcher.group()+\" \");\n }\n\n }", "public static void main(String[] args) {\n String word = \"Computer\";\r\n System.out.println(word.length());\r\nSystem.out.println(word.charAt(0));\r\nSystem.out.println(word.charAt(1));\r\nSystem.out.println(word.charAt(2));\r\nSystem.out.println(word.charAt(3));\r\nSystem.out.println(word.charAt(4));\r\nSystem.out.println(word.charAt(5));\r\nSystem.out.println(word.charAt(6));\r\nSystem.out.println(word.charAt(7));\r\n\r\n//\r\n\r\nString word2 = \"Java\";\r\n if(word2.charAt(0) == 'J');{\r\nSystem.out.println(\"J is first character\");\r\n} \r\n \r\n String word3 = \"civic\";\r\n char first = word3.charAt(0); // index always zero\r\n char last = word.charAt(4); \r\n\r\nif (first == last) {\r\n\tSystem.out.println(\"FIrst and last match\");\r\n} else {\r\n\tSystem.out.println(\" not match\");\r\n}\r\n// always print the last character no matter the length\r\n\r\nString word4 = \"abcdefghijklmnopqrstuvwxyz\";\r\n\r\nchar lastChar = word4.charAt(word4.length()-1);\r\n\r\nSystem.out.println(\"last character of the word \" + word4 + \" is \" + lastChar);\r\n\r\n\r\n\r\n\r\n\r\n\r\n\t}", "public static void main(String[] args) {\n String name = \"Georgesa\";\n int charCount = name.length();\n int lastCharIndex = charCount - 1;\n\n\n // System.out.println( name.substring (0,2));\n // System.out.println( name.substring (2,4));\n // System.out.println( name.substring (4,6));\n //System.out.println( name.substring (6,8));\n\n\n }", "public static int Main()\n\t{\n\t\tint i;\n\t\tint len;\n\t\tString s = new String(new char[100001]); // s?????\n\t\ts = new Scanner(System.in).nextLine(); // ??\n\t\tlen = s.length(); // ??\n\t\tfor (i = 0;i < len;i++)\n\t\t{\n\t\t\tif (!((s.charAt(i) == ' ') && (i == 0 || i == len - 1 || s.charAt(i - 1) == ' ')))\n\t\t\t{\n\t\t\t// ???????????????????\n\t\t\t\tSystem.out.print(s.charAt(i));\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}", "public static void oneLetter () {\n System.out.println(\"Type in a letter\");\n Scanner input = new Scanner(System.in);\n String userInput = input.nextLine();\n if ((userInput.equals( \"a\")) || (userInput.equals(\"e\")) || (userInput.equals(\"i\")) || (userInput.equals(\"o\")) || (userInput.equals(\"u\"))) {\n System.out.println(\"That is a vowel!\");\n\n }\n else {\n System.out.println(\"That is a consonant\");\n\n }\n }", "public static void main(String[] args) {\r\n\t\tScanner input = new Scanner(System.in);\r\n\r\n\t\tSystem.out.println(\"Enter a letter: \");\r\n\t\tString s = input.nextLine();\r\n\t\tchar ch = s.charAt(0);\r\n\t\tch = Character.toUpperCase(ch);\r\n\r\n\t\tif (s.length() != 1) {\r\n\t\t\tSystem.out.println(\"Invalid input\");\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t\t\r\n\t\tint number = 0;\r\n\t\tif (Character.isLetter(ch)) {\r\n\t\t\tif ('W' <= ch)\r\n\t\t\t\tnumber = 9;\r\n\t\t\telse if ('T' <= ch)\r\n\t\t\t\tnumber = 8;\r\n\t\t\telse if ('P' <= ch)\r\n\t\t\t\tnumber = 7;\r\n\t\t\telse if ('M' <= ch)\r\n\t\t\t\tnumber = 6;\r\n\t\t\telse if ('J' <= ch)\r\n\t\t\t\tnumber = 5;\r\n\t\t\telse if ('G' <= ch)\r\n\t\t\t\tnumber = 4;\r\n\t\t\telse if ('D' <= ch)\r\n\t\t\t\tnumber = 3;\r\n\t\t\telse if ('A' <= ch)\r\n\t\t\t\tnumber = 2;\r\n\t\t\tSystem.out.println(\"The corresponding number is \" + number);\r\n\t\t} else {\r\n\t\t\tSystem.out.println(ch + \" invalid input!\");\r\n\t\t}\r\n\t}", "public static void main(String...args){\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tString s = scan.nextLine();\r\n//\t\tString str = s.replaceAll(\"\\\\s\", \"\"); // removing white space from string\r\n//\t\tSystem.out.println(str);\r\n\t\tchar[] ch = s.toCharArray();\r\n\t\tSet<Character> charSet = new HashSet<>();\r\n\t\tfor(char c: ch){\r\n\t\t\t\r\n\t\t\tcharSet.add(c);\t\r\n\t\t}\r\n\t\t\r\n//\t\tStringBuffer sb = new StringBuffer();\r\n\t\tfor(Character character : charSet){\r\n//\t\t\tsb.append(character);\r\n\t\t\tSystem.out.print(character);\r\n\t\t}\r\n//\t\tSystem.out.println(sb.toString());\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\r\n\t\tString text = \"My name is Buzz Lightyear!\";\r\n\t\tSystem.out.println(\"Please enter your name to see something cool.\");\r\n\t\ttext = input.nextLine();\r\n\t\tfor (int i = 0; i < text.length(); i++)\r\n\t\t{\r\n\t\t\tSystem.out.println(text.substring(i));\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tString s = \"123.5MA1C2034\";\n\t\tfor(int i = 0; i < s.length(); i++)\n\t\t\tif(((int) s.charAt(i)>= 65 && (int)s.charAt(i)<= 91)||(int) s.charAt(i)>= 97 && (int)s.charAt(i)<= 122)\n\t\t\t\tSystem.out.println(s.charAt(i));\n\t\t\t\n\t}", "public static char promptForChar(String prompt, char min, char max) {\n\n char charmander = '-';\n boolean invalidInput = false;\n String input = null;\n int minChar = (int) min, maxChar = (int) max, inputChar = 0;\n\n if(minChar > maxChar) throw new IllegalArgumentException(\"min cannot be greater than max.\");\n if(prompt == null) throw new IllegalArgumentException(\"prompt cannot be null.\");\n do{\n input = receiveInput(prompt + String.format(\"(%s-%s)\", min, max));\n invalidInput = input.length() != 1;\n if (invalidInput) {\n System.out.println(\"Please Enter only one character\");\n } else {\n charmander = input.charAt(0);\n inputChar = charmander;\n invalidInput = inputChar < minChar || inputChar > maxChar;\n if (invalidInput) {\n System.out.println(\"Please Enter a Character that value is between \" + min + \" and \" + max);\n }\n }\n }while (invalidInput);\n return charmander;\n }", "public static void Print02(){\n Scanner input = new Scanner(System.in);\n\n System.out.println(\"2. MASUKKAN KALIMAT/KATA : \");\n String inputString = input.nextLine();\n\n String[] inputArray = inputString.split( \" \");\n for(String text : inputArray)\n {\n char[] charArray = text.toCharArray();\n\n for (int i = 0; i < charArray.length; i++) {\n if(i == 0 || i == text.length() - 1 ) {\n System.out.print(charArray[i]);\n }\n else if (i == text.length() / 2) {\n System.out.print(\"***\");\n }\n else {\n System.out.print(\"\");\n }\n }\n System.out.print(\" \");\n }\n System.out.println();\n }", "public static void main(String[] args) {\n\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\t\r\n\t\tStringBuffer stb = new StringBuffer(\"abcdefghigklmnopqrstuvwxyz\");\r\n\t\tStringBuffer result = new StringBuffer(\"\");\r\n\t\t\r\n\t\tString stP = sc.nextLine();\r\n\t\tString stK = sc.nextLine();\r\n\t\tint numP;\r\n\t\tint numK;\r\n\t\tint index;\r\n\t\t\r\n\t\tint j=0;\r\n\t\tfor(int i=0;i<stP.length();i++){\r\n\t\t\t\r\n\t\t\tif(j!=stK.length()){\r\n\t\t\t\t\r\n\t\t\t\tif((int)stP.charAt(i)==32){\r\n\t\t\t\t\tresult.append(\" \");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tnumP=((int)stP.charAt(i)-96);\r\n\t\t\t\t\tnumK=((int)stK.charAt(j)-96);\r\n\t\t\t\t\tindex = numP-numK;\r\n\t\t\t\t\r\n\t\t\t\t\tif(index<=0) index += 26;\r\n\t\t\t\t\r\n\t\t\t\t\tresult.append(stb.charAt(index-1));\r\n\t\t\t\t}\r\n\t\t\t\tj++;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tj=0; i--;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(result.toString());\r\n\t\r\n\t}", "public void composeAlphabet() {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tSystem.out.println(\"Please enter a name for this alphabet: \");\n\t\tString alphabetName = scanner.nextLine();\n\t\tSystem.out.println(\"Please enter the location of the window dumps \" + \"(relative to the current folder): \");\n\t\tString alphabetLoc = scanner.nextLine();\n\t\tscanner.close();\n\t\tcomposeAlphabet(alphabetName, alphabetLoc);\n\t}", "public static void main(String[] args) {\n\t\tScanner input= new Scanner(System.in);\n\t\tSystem.out.print(\"\tEnter a letter :\");\n\t\t\n\t\tString letter = input.nextLine();\n\t\t\n\t\t\n\t\tfor (int i=0;i<=letter.length()-1;i++) {\n\t\t\tchar le = Character.toUpperCase(letter.charAt(i));\n\t\t\t\n\t\tSystem.out.print(getNumber(le));\n\t\t}\n\t\t\n\n\t}", "public static void main(String[] args) {\nString str=\"subbu\";\nSystem.out.println(str.charAt(9));\n\t}", "public void firstCharacter() {\n\t\tString name = \"martin\";\n\t\tchar letter = name.charAt(5);\n\t\tSystem.out.println(letter);\n\t}", "public static void main(String[] args) {\n Scanner input= new Scanner(System.in);\n System.out.println(\" Enter a string value: \");\n String word=input.nextLine();\n String newWord=word.charAt(0)+\"\";\n for (int i = 1; i <word.length() ; i++) {\n if(word.charAt(i)>=65 && word.charAt(i)<=90){\n newWord+=\" \"+word.charAt(i);\n }else{\n newWord+=word.charAt(i);\n }\n\n }\n System.out.println(newWord);\n }", "public static void main(String[] args) {\n Scanner input = new Scanner (System.in);\n System.out.println(\"Enter your word here please\");\n String str = input.nextLine();\n int length = str.length();\n\n System.out.println(str.substring(length-1)+ str + ( str.substring(length-1)));\n\n }", "public static void main(String[] args) throws Numberexceeds{\n String s=\"htderabad\";\r\n Scanner sc=new Scanner(System.in);\r\n System.out.println(\"enter index\");\r\n try {\r\n int index=sc.nextInt();\r\n \r\n char []ch=s.toCharArray();\r\n if(index<0||index>ch.length)\r\n \t throw new Numberexceeds(\"pls enter range number\");\r\n System.out.println(ch[index]);\r\n }\r\n catch(Exception e) {System.out.println(e);}\r\n\t}", "public static void main(String[] args) {\n\t\tScanner in=new Scanner(System.in);\n\t\tSystem.out.print(\"Please enter a string: \");\n\t\tString s=in.nextLine();\n\t\tSystem.out.print(\"Please enter the character to find: \");\n\t\tchar c=in.nextLine().charAt(0);\n\t\tSystem.out.print(countChar(s,c));\n\t\tin.close();\n\t}", "public static void main(String[] args) {\n\n Scanner vowelconsonent =new Scanner(System.in);\n char ch;\n System.out.print(\"Enter your word = \");\n\n ch = vowelconsonent.next().charAt(0);\n\n\n if(ch=='A'||ch=='E'||ch=='I'||ch=='O'||ch=='U'||ch=='a'||ch=='e'||ch=='i'||ch=='o'||ch=='u'){\n\n System.out.print(\"vowel \"+ch);\n\n }else {\n\n System.out.print(\"consonent \");\n\n }\n\n }", "public static void main(String[] args) {\n CharacterTypeFinder characterTypeFinder = new CharacterTypeFinder();\n Scanner scanner = new Scanner(System.in);\n System.out.println(\"Enter a alphabet\");\n String character = scanner.next();\n if (character.length() == 1 && characterTypeFinder.isAlphabet(character)) {\n if(characterTypeFinder.isVowel(character)){\n System.out.println(\"Entered string is a vowel!\");\n }else{\n System.out.println(\"Entered String is a consonant\");\n }\n }else{\n scanner.nextLine();\n System.out.println(\"invalid string\");\n }\n }", "public static void main(String[] args) {\n\t\tString s=\"Aman\";\n\t\tSystem.out.println(\"String value=\"+s);\n\t\tSystem.out.println(\"String starting with A= \"+s.startsWith(\"A\"));\n\t\tSystem.out.println(\"Ending with n = \"+s.endsWith(\"n\"));\n\n\t}", "public static void main(String[] args) {\r\n\r\n\t\t String str = \"boopity bop\";\r\n\t\t int i = 10;\r\n\t\tSystem.out.print(str.charAt(5));\r\n\t\tSystem.out.print(str.charAt(8));\r\n\t\tSystem.out.print(str.charAt(1));\r\n\t\tSystem.out.print(str.charAt(10));\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public abstract boolean isStarterChar(char c);", "public static void main(String[] args) {\n\n\t\tScanner input = new Scanner(System.in);\n\t\tchar alphabet;\n\t\tSystem.out.print(\"Input Character:\");\n\t\talphabet = input.next().charAt(0);//문자 입력받기\n\t\t\n\t\t\n\t\tif(alphabet >= 'A' && alphabet<='Z') {\n\t\t\tSystem.out.println(\"result: \" + (char)(alphabet+32));\t\t\t\n\t\t}//대문자일 경우 32를 더해 소문자로 변경한다.\n\t\t\n\t\telse if(alphabet>='a' && alphabet<='z') {\n\t\t\tSystem.out.println(\"result: \" + (char)(alphabet-32));\n\t\t}//소문자일 경우에는 32를 빼 대문자로 변경해준다. \n\t\t\n\t\telse {\n\t\t\tSystem.out.println(\"입력오류!\");\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\n\t\tSystem.out.println(\"Please type in a letter :\");\n\t\t\n\t\tString x = input.nextLine();\n\t\t\n\t\tSystem.out.println(\" The numerical value of \" + x + \" is \" + alphabet(x));\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tString str = in.nextLine();\n\t\tString temp[] =str.split(\"-\");\n\t\t\n\t\tfor(int i=0; i<temp.length; i++)\n\t\t\tSystem.out.print(temp[i].charAt(0));\n\t}", "public static void main(String args[]) {\n \nScanner sc = new Scanner(System.in);\n\nint n = sc.nextInt();\n\nint i=1; int j=0;\nchar p;\nwhile (i<=n) {\n j=1;\n p = (char) ('A' + i - 1);\n while (j<=n) {\n \n System.out.print(p);\n p=(char)(p+1);\n j=j+1;\n\n }\nSystem.out.println();\ni=i+1;\n}\nsc.close();\n}", "public static void main(String[] args) {\n\n Scanner scan = new Scanner(System.in);\n System.out.println(\"Enter your first word: \");\n String word1 = scan.next();\n System.out.println(\"Enter your second word: \");\n String word2 = scan.next();\n\n char lastLetter = word1.charAt(word1.length()-1);\n char firstLetter = word2.charAt(0);\n if (lastLetter == firstLetter) {\n System.out.println(word1+word2.substring(1));\n }else {\n System.out.println(word1 + word2);\n\n }\n\n\n }", "public static void main(String[] args) {\n\t\tString text=\"James\";\n\t\tchar cl=text.charAt(0);\n\t\tSystem.out.println(cl+ \"\"+text.charAt(1));\n\t}", "public static void upperCaseFirstOfWord() {\n\t\tString isExit = \"\";\n\t\twhile (!isExit.equals(\"N\")) {\n\t\t\tStringBuffer bf = readInput();\n\t\t\tStringBuffer result = new StringBuffer();\n\t\t\tString str = bf.toString();\n\t\t\tString char_prev = \"\";\n\t\t\tString char_current = \"\";\n\t\t\tString key = \" ,.!?:\\\"\";\n\t\t\tresult.append(String.valueOf(str.charAt(0)).toUpperCase());\n\t\t\tfor (int i = 1; i < str.length(); i++) {\n\t\t\t\tchar_prev = String.valueOf(str.charAt(i - 1));\n\t\t\t\tchar_current = String.valueOf(str.charAt(i));\n\t\t\t\tif (key.contains(char_prev)) {\n\t\t\t\t\tchar_current = char_current.toUpperCase();//uppercase first letter each word\n\t\t\t\t}\n\t\t\t\tresult.append(char_current);\n\t\t\t}\n\t\t\tSystem.out.println(\"Chuỗi có chữ cái đầu viết hoa: \\n\" + result);\n\t\t\tSystem.out.println(\"Bạn có muốn nhập tiếp không(0/1):\");\n\t\t\tisExit= scan.next().toString();\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tString s=\"teeter\";\r\n\t\tfor(char ch:s.toCharArray())\r\n\t\t{\r\n\t\t\tif(s.indexOf(ch)==s.lastIndexOf(ch))\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(ch);\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\r\n\t}", "public static void main(String args[])\n {\n Scanner sc = new Scanner(System.in);\n String str = sc.nextLine();\n StringBuilder sb = new StringBuilder(str);\n int len = sb.length();\n StringBuilder temp = new StringBuilder(\"\");\n for(int id = 0;id<=len-1;id++)\n {\n if((str.charAt(id)!='a')&&(str.charAt(id)!='e')&&(str.charAt(id)!='i')&&(str.charAt(id)!='o')&&(str.charAt(id)!='u')||(str.charAt(id)==' '))\n {\n temp.append(str.charAt(id));\n }\n }\n System.out.println(temp);\n \n\n }", "public static void main(String[] args) {\n\t\tScanner scan=new Scanner(System.in);\n\t\tString word=scan.nextLine();\n\t\tif(!(word.isEmpty())) {\n\t\t\tif(word.length()%2==1 && word.length()>=3) {\n\t\t\t\tSystem.out.println(word.charAt(word.length()/2));\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\nchar c1=\"James\".charAt(0);\n\tSystem.out.println(c1);\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t\n\t}", "public static char instructions()\n\t{\n\t\tScanner kbAlpha = new Scanner(System.in);\t//gets alphabetic keyboard input\n\t\tScanner kbNum = new Scanner(System.in);\t\t//gets numeric keyboard input\n\t\t\n\t\tString strInput;\t\t\t\t\t//user-input before char is determined\n\t\tchar cStartOption;\t\t\t\t\t//determined choice based on strInput\n\t\t\n\t\tSystem.out.print(\"____________________________________________________________\"\n\t\t\t+ \"______________\\n\\n\");\n\t\tSystem.out.print(\"\\t\\t\\t INSTRUCTIONS\\nA pandemic has spread throughout the world, \"\n\t\t\t+ \"threatening the survival\\nof humanity. A non-advanced alien species has \"\n\t\t\t+ \"made contact with\\nEarth, and they display an immunity to the virus. \" \n\t\t\t+ \"The aliens want to\\noccupy Earth, using our current infrastructure, so \"\n\t\t\t+ \"they are waiting for\\nhumanity to go extinct. However, the CDC has not \"\n\t\t\t+ \"given up. They have\\nlocated a mineral, obsidite, at the base of a \"\n\t\t\t+ \"volcano that can be used to\\nmake a vaccine to fight the virus. The CDC \"\n\t\t\t+ \"has contacted you to travel\\ninto the volcano and extract the obsidite. \"\n\t\t\t+ \"Unfortunately, the aliens are\\nguarding the obsidite in the volcano. \"\n\t\t\t+ \"You will have to fight your way\\nthrough the cave in the volcano to \"\n\t\t\t+ \"save humanity.\\n\\n[R] Return to menu\");\n\t\tSystem.out.print(\"\\n\\n________________________________________________________\"\n\t\t\t+ \"__________________\\n\\n\");\n\t\t\n\t\tSystem.out.print(\"Action: \");\n\t\tstrInput = kbAlpha.nextLine();\n\t\tcStartOption = strInput.charAt(0);\n\t\twhile (cStartOption != 'r' && cStartOption != 'R')\n\t\t{\n\t\t\tSystem.out.print(\"\\nInvalid choice.\");\n\t\t\tSystem.out.print(\"\\n____________________________________________________________\"\n\t\t\t\t+ \"______________\\n\\n\");\n\t\t\tSystem.out.print(\"\\t\\t\\t INSTRUCTIONS\\nA pandemic has spread throughout the world, \"\n\t\t\t\t+ \"threatening the survival\\nof humanity. A non-advanced alien species has \"\n\t\t\t\t+ \"made contact with\\nEarth, and they display an immunity to the virus. \" \n\t\t\t\t+ \"The aliens want to\\noccupy Earth, using our current infrastructure, so \"\n\t\t\t\t+ \"they are waiting for\\nhumanity to go extinct. However, the CDC has not \"\n\t\t\t\t+ \"given up. They have\\nlocated a mineral, obsidite, at the base of a \"\n\t\t\t\t+ \"volcano that can be used to\\nmake a vaccine to fight the virus. The CDC \"\n\t\t\t\t+ \"has contacted you to travel\\ninto the volcano and extract the obsidite. \"\n\t\t\t\t+ \"Unfortunately, the aliens are\\nguarding the obsidite in the volcano. \"\n\t\t\t\t+ \"You will have to fight your way\\nthrough the cave in the volcano to \"\n\t\t\t\t+ \"save humanity.\\n\\n[R] Return to menu\");\n\t\t\tSystem.out.print(\"\\n\\n________________________________________________________\"\n\t\t\t\t+ \"__________________\\n\\n\");\n\t\t\tSystem.out.print(\"Action: \");\n\t\t\tstrInput = kbAlpha.nextLine();\n\t\t\tcStartOption = strInput.charAt(0);\n\t\t}\n\t\t\n\t\treturn cStartOption;\n\t\t\n\t}", "private String insert(String input_from_user) {\n\t\tSystem.out.println(\"Enter the position you want to insert a character in the string\"+input_from_user);\n\t\tint position = in.nextInt();\n\t\tchar get_char = in.next().charAt(0);\n\t\tString result = insertCharAt(input_from_user,get_char,position);\n\t\treturn result;\n\t}", "public static void main(String[] args) {\n\n\t\t\n\t\tString s =\"Soni Shirwani\";\n\t\t\n\t\tSystem.out.println(s.charAt(3));\n\t\t\n\t\tString s1=\"Soni\",s2=\"Soni\";\n\t\t\n\t\tSystem.out.println(s1.equals(s2));\n\t\t\n\t\tString empty=\"\";\n\t\t\n\t\tSystem.out.println(empty.isEmpty());\n\t\t\n\t\tSystem.out.println(s.length());\n\t\t\n\t\tSystem.out.println(s.replace(\"i\", \"y\"));\n\t\t\n\t\tSystem.out.println(s.substring(5));\n\t\tSystem.out.println(s.substring(3,8));\n\t\t\n\t\tSystem.out.println(s.indexOf('n'));\n\t\t\n\t\tSystem.out.println(s.lastIndexOf('n'));\n\t\t\n\t\tSystem.out.println(s.toUpperCase());\n\t\t\n\t\tSystem.out.println(s.toLowerCase());\n\t\t\n\t\tScanner ss= new Scanner(System.in);\n\t\tString input=ss.nextLine();\n\t\t\n\t\tSystem.out.println(input.trim());\n\t\t\n\t\tfinal String s1f=\"final\";\n\t\tfinal StringBuffer sb1= new StringBuffer(\"asd0\");\n\t\tsb1.append(\"tets\");\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tString str = \"Hello\";\n\t\t//str.endsWith(\"\"); // startwith와의 반대방향 /boolean ?\n\t\tchar[] charArray =str.toCharArray();\n\t\tSystem.out.println(charArray[4]);\n\t\tSystem.out.println(charArray[2]);\n\t}", "String consoleInput();", "public static void main(String[] args) {\n Scanner scan=new Scanner(System.in);\n System.out.println(\"Enter your word\");\n String word=scan.nextLine();\n //index num=01234\n String result=\"\"; // all below characters will be concatenated one by one- knalB\n if (word.length()>5){\n result=\"Too long\";\n }else if (word.length()<5){\n result=\"Too short\";\n }else {\n /* result+=word.charAt(4);\n result+=word.charAt(3);\n result+=word.charAt(2);\n result+=word.charAt(1);\n result+=word.charAt(0);\n\n */\n result=\"\" + word.charAt(4) + word.charAt(3) + word.charAt(2) + word.charAt(1) + word.charAt(0);\n } // e l c n u\n System.out.println(\"result = \" + result);\n\n\n\n }", "private char readChar() {\r\n\t\tInputStream in = System.in;\r\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(in));\r\n\t\tString line = null;\r\n\r\n\t\ttry {\r\n\t\t\tline = br.readLine();\r\n\t\t} catch (Exception e) {\r\n\r\n\t\t}\r\n\t\treturn line.toLowerCase().charAt(0);\r\n\t}", "public static int Main()\n\t\t{\n\t\t\tint n;\n\t\t\tint i;\n\t\t\tint wl;\n\t\t\tint len = 0;\n\t\t\tint line = 0;\n\t\t\tString w = new String(new char[64]);\n\t\t\tString tempVar = ConsoleInput.scanfRead();\n\t\t\tif (tempVar != null)\n\t\t\t{\n\t\t\t\tn = Integer.parseInt(tempVar);\n\t\t\t}\n\t\t\tfor (int i = 1; i <= n; i++)\n\t\t\t{\n\t\t\t\tString tempVar2 = ConsoleInput.scanfRead();\n\t\t\t\tif (tempVar2 != null)\n\t\t\t\t{\n\t\t\t\t\tw = tempVar2.charAt(0);\n\t\t\t\t}\n\t\t\t\twl = w.length();\n\t\t\t\tif (line == 0)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.printf(\"%s\",w);\n\t\t\t\t\tlen = wl;\n\t\t\t\t\tline++;\n\t\t\t\t}\n\t\t\t\telse if (len + wl + 1 <= 80)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.printf(\" %s\",w);\n\t\t\t\t\tlen += wl + 1;\n\t\t\t\t}\n\t\t\t\telse if (len + wl + 1 > 80)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.printf(\"\\n%s\",w);\n\t\t\t\t\tlen = wl;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn 0;\n\t\t}", "public static void main(String[] args) {\n\n for ( char ch = 'A', ch1 = 'b'; ch <= 'Z' && ch1 <= 'z' ; ch+=2 , ch1+=2 ){\n\n System.out.print(ch +\"-\");\n System.out.print(ch1+ \"-\");\n }\n\n }", "public static void main(String[] args) {\n\tScanner scan=new Scanner(System.in);\n\t String str;\n\t\n\t System.out.println(\"Please enter the String\");\n\tstr=scan.nextLine();\n\t\n\tif( !str.isEmpty()) {\n\t\tif(str.length()%2!=0 && str.length()>=3) {\n\t\t\tSystem.out.println(str.charAt(str.length()/2));\n\t\t\t\n\t\t}else {\n\t\t\tSystem.out.println(\"The string has an even number of characters\");\n\t\t}\n\t} else {\n\t\tSystem.out.println(\"The String is empty\");\n\t}\n\t\n\t\n\t\n\t\n\t\n\t}", "public static void main(String[] args)\r\n\t{\n\t\tScanner s = new Scanner(System.in);\r\n\t\tString str = s.next();\r\n\t for(int i=0;i<str.length()-1;i++)\r\n\t {\r\n\t if(str.charAt(i)!=str.charAt(i+1))\r\n\t System.out.print(str.charAt(i));\r\n\t }\r\n\t \r\n\t\t\r\n\t System.out.print(str.charAt(str.length()-1));\r\n\t}", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n //Ask\n System.out.print(\"Enter a word:\");\n //assign\n String word = scanner.next();\n\n int l = word.length();\n System.out.println(\"Length:\" + l);\n int i = 0;\n boolean shouldContinue = true;\n\n while (shouldContinue == true) {\n\n if (word.charAt(i) == 'a') {\n System.out.println(\"The First vowel was:\" + \"a\");\n shouldContinue = false;\n }\n if (word.charAt(i) == 'e') {\n System.out.println(\"The First vowel was:\" + \"e\");\n shouldContinue = false;\n }\n if (word.charAt(i) == 'i') {\n System.out.println(\"The First vowel was:\" + \"i\");\n shouldContinue = false;\n }\n if (word.charAt(i) == 'o') {\n System.out.println(\"The First vowel was:\" + \"o\");\n shouldContinue = false;\n }\n if (word.charAt(i) == 'u') {\n System.out.println(\"The First vowel was:\" + \"u\");\n shouldContinue = false;\n }\n i++;\n\n }\n\n System.out.println(\"Your word was:\" + word);\n }", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tString str = sc.nextLine();\n\t\tString result = \"\";\n\t\tfor(int i=0; i<str.length(); i++) {\n\t\t\tchar ch = str.charAt(i);\n\t\t\tif(ch>='a' && ch <='z') {\n\t\t\t\tch+=13;\n\t\t\t\tif(ch>'z') {\n\t\t\t\t\tch-=26;\n\t\t\t\t}\n\t\t\t}else if(ch>='A' && ch <='Z') {\n\t\t\t\tch+=13;\n\t\t\t\tif(ch>'Z') {\n\t\t\t\t\tch-=26;\n\t\t\t\t}\n\t\t\t}\n\t\t\tresult+=ch;\n\t\t}\n\t\tSystem.out.println(result);\n\t}", "public void guessLetter()\n\t{\n\t\tSystem.out.println(\"The name is \" + length + \" letters long.\");\n\t\tSystem.out.println(\"Ok, now guess what letters are in the name.\");\n\t\t\n\t\t//This will guess the first letter.\n\t\tguessLetter1 = scan.nextLine();\n\t\tif(name.indexOf(guessLetter1) == -1)\n\t\t{\n\t\t\tSystem.out.println(\"Sorry, that letter is not in the name, try again!\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tposition1 = name.indexOf(guessLetter1);\n\t\t\tSystem.out.println(\"You're correct, letter \" + guessLetter1 + \" is in position \" + position1);\n\t\t}\n\t\t\n\t\t//This will guess the second letter.\n\t\tguessLetter2 = scan.nextLine();\n\t\tif(name.indexOf(guessLetter2) == -1)\n\t\t{\n\t\t\tSystem.out.println(\"Sorry, that letter is not in the name, try again!\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tposition2 = name.indexOf(guessLetter2);\n\t\t\tSystem.out.println(\"You're correct, letter \" + guessLetter2 + \" is in position \" + position2);\n\t\t}\n\t\t\n\t\t//This will guess the third letter.\n\t\tguessLetter3 = scan.nextLine();\n\t\tif(name.indexOf(guessLetter3) == -1)\n\t\t{\n\t\t\tSystem.out.println(\"Sorry, that letter is not in the name.\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tposition3 = name.indexOf(guessLetter3);\n\t\t\tSystem.out.println(\"You're correct, letter \" + guessLetter3 + \" is in position \" + position3);\n\t\t}\n\t}", "public static void main(String[] args) {\n\n\t\tString s = \"P@$$w!rd\";\n\n\t\tString specialCharacters = s.replaceAll(\"[^@#$%^&*()!_+\\\\-=\\\\[\\\\]{};':\\\"\\\\\\\\|,.<>\\\\/? 0-9]\", \"\");\n\t\tString alphabets = s.replaceAll(\"[^a-zA-Z]\", \"\");\n\n\t\tSystem.out.println(specialCharacters);\n\t\tSystem.out.println(alphabets);\n\n\t\tint a = 0, b = alphabets.length() - 1;\n\n\t\tfor (int i = 0; i < s.length(); i++) {\n\n\t\t\tif (Character.isAlphabetic(s.charAt(i))) {\n\t\t\t\tSystem.out.print(alphabets.charAt(b));\n\t\t\t\tb--;\n\t\t\t} else {\n\t\t\t\tSystem.out.print(specialCharacters.charAt(a));\n\t\t\t\ta++;\n\t\t\t}\n\n\t\t}\n\n\t}", "private static void chooseLetter()\n {\n Scanner scanner = new Scanner(System.in);\n System.out.println(\"Choose a letter :: X or O : \");\n userLetter = scanner.next().toUpperCase().charAt(0);\n computerLetter = (userLetter == 'X') ? 'O' : 'X';\n }", "public static char readCharacter(String message){\n Scanner in = new Scanner(System.in);\n System.out.print(message);\n return in.next().charAt(0);\n }", "public static void main(String[] args) {\n\t\tString str = \"Im a Java Developer\";\r\n\t\tSystem.out.println(str);\r\n\t\tScanner s = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter the character for which you want to find occurrance\");\r\n\t\tchar c = s.next().charAt(0);\r\n\t\tint count = 0;\r\n\t\tfor(int i=0;i<str.length();i++){\r\n\t\t\tif (str.charAt(i) == c ){\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"Number of occurrances are : \"+count);\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tScanner s = new Scanner(System.in);\r\n\t String txt = s.next();\r\n\t //your code here\r\n\t System.out.println(txt.substring(0,2));\r\n\r\n\t}", "public static void main(String[] args) {\n\n for(char ch='A'; ch<='Z'; ch++){\n System.out.print(ch+\" \");\n }\n System.out.println();\n\n //backword--descending\n for (char ch='Z'; ch>='A'; ch--){\n System.out.print(ch+\" \");\n }\n System.out.println();\n\n //lower case\n for(char ch ='a'; ch<='z'; ch++){\n System.out.print(ch+ \" \");\n }\n\n\n\n }", "private static void displayString () {\n Scanner userInput = new Scanner(System.in);\n String a = inputString();\n System.out.print(\"Insert string to test: \");\n String b = userInput.nextLine();\n System.out.println(a.endsWith(b));\n }", "public static char promptForChar(String prompt, char min, char max) throws IOException {\r\n\t\tif (min > max) {\r\n\t\t\tthrow new IllegalArgumentException(\"Min cannot be greater than max\");\r\n\t\t}\r\n\t\tif (prompt == null) {\r\n\t\t\tthrow new IllegalArgumentException(\"Prompt cannot be null\");\r\n\t\t}\r\n\t\tboolean isValid = false;\r\n\t\tchar input = ' ';\r\n\t\tString rawInput;\r\n\r\n\t\twhile (!isValid) {\r\n\t\t\tSystem.out.println(prompt);\r\n\t\t\ttry {\r\n\t\t\t\trawInput = in.readLine();\r\n\r\n\t\t\t\tif (rawInput.length() > 1) {\r\n\t\t\t\t\tSystem.out.println(\"It can not be more than 1 character\");\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tinput = rawInput.charAt(0);\r\n\r\n\t\t\t\tif (input > max) {\r\n\t\t\t\t\tSystem.out.println(\"Needs to be smaller than \" + max);\r\n\t\t\t\t\tisValid = false;\r\n\t\t\t\t\tinput = ' ';\r\n\t\t\t\t} else if (input < min) {\r\n\t\t\t\t\tSystem.out.println(\"Needs to be bigger than \" + min);\r\n\t\t\t\t\tisValid = false;\r\n\t\t\t\t\tinput = ' ';\r\n\t\t\t\t} else {\r\n\t\t\t\t\tisValid = true;\r\n\t\t\t\t}\r\n\r\n\t\t\t} catch (IndexOutOfBoundsException ex) {\r\n\t\t\t\tSystem.out.println(\"\" + input + \" is not a valid option from \" + min + \" and \" + max);\r\n\t\t\t\tisValid = false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn input;\r\n\t}", "public static void main(String[] args) {\n\n\n for(char ch ='A', ch1= 'a'; ch<='Z' && ch1<='z'; ch++ , ch1++){\n System.out.print(ch +\"-\");\n System.out.println(ch1 +\"-\");\n\n }\n }", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n String string = scanner.nextLine();\n char[] chars = string.toCharArray();\n\n String newstring = \"\";\n for (int i = 0; i < chars.length; i++) {\n newstring = newstring + chars[i] + chars[i];\n }\n System.out.println(newstring);\n\n }", "public static void main(String[] args) {\r\n Scanner obj = new Scanner(System.in);\r\n int t=obj.nextInt();\r\n for(int k=0;k<t;k++)\r\n {\r\n String s=obj.next();\r\n int l=s.length();\r\n for(int i=0;i<l;i=i+2)\r\n {\r\n System.out.print(s.charAt(i));\r\n }\r\n System.out.print(\" \");\r\n for(int i=1;i<l;i=i+2)\r\n {\r\n System.out.print(s.charAt(i));\r\n } \r\n System.out.println();\r\n }\r\n }", "public static void main(String[] args) {\n\t\t\n\t\tfinal String letters = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#$%^&*\";\n\n\t\t// b. have a random number generator\n\n\t\tRandom rand = new Random();\n\n\t\t// c. use the random generator to get the charAt a random location based on the\n\t\t// number of characters\n\n\t\tchar char1 = letters.charAt(rand.nextInt(letters.length()));\n\t\tchar char2 = letters.charAt(rand.nextInt(letters.length()));\n\t\tchar char3 = letters.charAt(rand.nextInt(letters.length()));\n\t\tchar char4 = letters.charAt(rand.nextInt(letters.length()));\n\t\tchar char5 = letters.charAt(rand.nextInt(letters.length()));\n\t\tchar char6 = letters.charAt(rand.nextInt(letters.length()));\n\t\tchar char7 = letters.charAt(rand.nextInt(letters.length()));\n\t\tchar char8 = letters.charAt(rand.nextInt(letters.length()));\n\t\t// d. concatenate the characters together to get the word\n\n\t\tSystem.out.println(\"\" + char1 + char2 + char3 + char4 + char5 + char6 + char7 + char8);\n\t\tSystem.out.println(String.valueOf(char1)+String.valueOf(char2)+String.valueOf(char3)+String.valueOf(char4)+String.valueOf(char5)+String.valueOf(char6)+String.valueOf(char7)+String.valueOf(char8));\n\t\t\t\t\n\n\t\t\n\t\t\n\t\t//Build a username generator absed on lastname and firstname inputs from the user\n\t\t//Conditions: \n\t\t//\t\t\tNo more than 1 username can include either the whole first or last name\n\t\t//\t\t\tAt least 1 username should include numbers\n\t\t//\t\t\tThere needs to be a random component in at least 2 name generations\n\t\t//\t\t\tThe usernames should adhere to the characteristics of typical usernames\n\t\t\n\t\tfinal String numbers = \"1234567890.\";\n\t\tScanner scan = new Scanner(System.in);\n\t\tSystem.out.println(\"Type in your first name > \");\n\t\tString fName = scan.nextLine();\n\t\tSystem.out.println(\"Type in your last name > \");\n\t\tString lName = scan.nextLine();\n\t\t\n\t\tString part1 = fName.toLowerCase().substring(0, rand.nextInt(fName.length()));\n\t\tString part2 = lName.toLowerCase().substring(0, rand.nextInt(lName.length()));\n\t\t\n\t\tSystem.out.println(\"A possible username \" + part1+part2);\n\t\t\n\t\tString part3 = String.valueOf(numbers.charAt(rand.nextInt(numbers.length())));\n\t\tString part4 = String.valueOf(numbers.charAt(rand.nextInt(numbers.length())));\n\t\t\n\t\tSystem.out.println(\"A possible username \" + part1+part2+part3+part4);\n\t\t\n\t\t//Take inputs and Build a decision tree that decides whether to issue a loan or not\n\t\t\n\t\t//https://www.brcommunity.com/images/articles/b624-2full.png\n\t\t\t\n\n\t}", "public static void main(String[] args) {\n\t\tScanner scanner =new Scanner(System.in);\n\t\tint x=0;\n\t\tint y=0;\n\t\tchar c=0;\n\t\tint i=0;\n\t\twhile(c != '^') {\n\t\t\tc = (char)scanner.next().charAt(0);\n\t\t\tx++;\n\t\t\ty++;\n\t\t\tCustomCharacter customChar =\tCharacterFactory.getCharacter(c);\n\t\t\tcustomChar.displayCharacter(new TemporaryState(x,y));\n\t\t\ti++;\n\t\t\tif(i>2) {\n\t\t\t\t((CustomFontCharacter)customChar).setFontName(\"Times new Roman\");\n\t\t\t}\n\t\t}\n\t\t\n\t\tscanner.close();\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(name.charAt(3));\n\t\t\n\t\t// .indexOf('h') method will provide the index of the character we need\n\t\tSystem.out.println((name.indexOf('h')));\n\t\t\n\t\t// .substring(3, 7) will have two arguments start and end index\n\t\tSystem.out.println(name.substring(3, 7));\n\t\t\n\t\t// .concat(\" swaminathan\") to concat the string\n\t\tSystem.out.println(name.concat(\" swaminathan\"));\n\t\t\n\t\t\n\t\t\n\t\t\n\n\t}", "public static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\r\n\t\tchar a=sc.next().charAt(0);\r\n\t\t\r\n\t\tif(Character.isLowerCase(a))\r\n\t\t{\r\n\t\t\tSystem.out.println(Character.toUpperCase(a));\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(Character.toLowerCase(a));\r\n\t\t}\r\n\r\n\t}", "public static int Main()\n\t{\n\t\tString a = new String(new char[101]);\n\t\ta = new Scanner(System.in).nextLine();\n\t\tint la;\n\t\tla = a.length();\n\t\tfor (int i = 0;i < la;i++)\n\t\t{\n\t\t\tif (a.charAt(i) == ' ')\n\t\t\t{\n\t\t\t\tif (a.charAt(i + 1) == ' ')\n\t\t\t\t{\n\t\t\t\t\tfor (int j = i;j < la;j++)\n\t\t\t\t\t{\n\t\t\t\t\t\ta = tangible.StringFunctions.changeCharacter(a, j, a.charAt(j + 1));\n\t\t\t\t\t}\n\t\t\t\t\tla--;\n\t\t\t\t\ti--;\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t\tfor (int i = 0;i < la;i++)\n\t\t{\n\t\tSystem.out.print(a.charAt(i));\n\t\t}\n\t\treturn 0;\n\t}", "public static void main(String[] args) {\n\r\n\t\tString str = \"ACCAATGTAGATATCATACTCTCTTGCTATGTTCGTTACATGCCCAA\";\r\n\t\t\r\n\t\tint i = 0;\r\n\t\tint AT = 0;\r\n\t\tint CG = 1;\r\n\t\t\r\n\t\twhile (i < str.length()){\r\n\t\t\tif (str.charAt(i) == 'A' && str.charAt(i) == 'T'){\r\n\t\t//\t\tstr.indexOf(A) == \"0\";\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(str);\r\n\t\t\r\n\t}" ]
[ "0.645773", "0.6442404", "0.64344454", "0.6418629", "0.6395689", "0.63189226", "0.62932944", "0.6291516", "0.6280108", "0.6259152", "0.6252149", "0.61962193", "0.6189778", "0.61726165", "0.61690223", "0.6118238", "0.60922754", "0.6070671", "0.603943", "0.60363865", "0.6028791", "0.60148853", "0.6012292", "0.6008425", "0.594426", "0.5943424", "0.593977", "0.59112006", "0.5910979", "0.5900203", "0.5885611", "0.58854485", "0.58749455", "0.5857063", "0.58557695", "0.584324", "0.5824685", "0.58233184", "0.5818814", "0.58162725", "0.58113885", "0.58110195", "0.57927144", "0.5784597", "0.5783408", "0.5779412", "0.577716", "0.5776635", "0.5770947", "0.5766879", "0.57656026", "0.5765134", "0.5755699", "0.5749272", "0.5748819", "0.5746733", "0.5746298", "0.57399726", "0.5737926", "0.5735186", "0.57305807", "0.5728665", "0.5725241", "0.57157594", "0.5708745", "0.5698464", "0.5673535", "0.56712997", "0.5669647", "0.5669544", "0.5667068", "0.56583536", "0.56553286", "0.5654852", "0.5649234", "0.5647657", "0.56443954", "0.56440526", "0.56388825", "0.56381905", "0.5624188", "0.5624165", "0.56227905", "0.56188273", "0.5618358", "0.56170917", "0.56169176", "0.5612349", "0.56098205", "0.5601327", "0.55999744", "0.5594897", "0.55948544", "0.55899024", "0.5581041", "0.55789155", "0.55774623", "0.5576393", "0.55734575", "0.55678" ]
0.6482683
0
Created by Administrator on 2015/12/14.
public interface HttpCallBackListener { void onFinish(String response); void Error(Exception e); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "@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\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tprotected void getExras() {\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\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "public void mo38117a() {\n }", "public void mo4359a() {\n }", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\n public void settings() {\n // TODO Auto-generated method stub\n \n }", "public void verarbeite() {\n\t\t\r\n\t}", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n public void memoria() {\n \n }", "public void designBasement() {\n\t\t\r\n\t}", "@Override\n protected void initialize() {\n\n \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 }", "Constructor() {\r\n\t\t \r\n\t }", "public void autoDetails() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "private Rekenhulp()\n\t{\n\t}", "public void mo55254a() {\n }", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\tprotected void onCreate() {\n\t}", "@Override\n\tpublic void create () {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n protected void getExras() {\n }", "@Override\n\tpublic void onCreate() {\n\n\t}", "@Override\n\tpublic void afterInit() {\n\t\t\n\t}", "@Override\n\tpublic void afterInit() {\n\t\t\n\t}", "public Pitonyak_09_02() {\r\n }", "@Override\n\tpublic void create() {\n\t\t\n\t}", "Petunia() {\r\n\t\t}", "public void mo12930a() {\n }", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\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\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n\tpublic void verkaufen() {\n\t}", "protected void aktualisieren() {\r\n\r\n\t}", "public void create() {\n\t\t\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tprotected void interr() {\n\t}", "private TMCourse() {\n\t}", "private void init() {\n\n\t}", "public void mo6081a() {\n }", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void create() {\n\r\n\t}", "private void getStatus() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void update() {\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 }", "public static void listing5_14() {\n }", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}" ]
[ "0.6258207", "0.61420584", "0.6096002", "0.60908514", "0.6042792", "0.604081", "0.60046947", "0.59762836", "0.5922772", "0.5908323", "0.5908323", "0.58816123", "0.58726716", "0.58726716", "0.5861334", "0.5854604", "0.58499676", "0.5831551", "0.58261794", "0.58221793", "0.57753885", "0.5772794", "0.57677746", "0.5766223", "0.57368267", "0.57332844", "0.5714178", "0.57002467", "0.569272", "0.5681445", "0.567119", "0.567119", "0.567119", "0.567119", "0.567119", "0.567119", "0.567119", "0.564772", "0.56370527", "0.56249684", "0.562341", "0.5618309", "0.5616549", "0.5608467", "0.558926", "0.5586426", "0.55828345", "0.5575984", "0.5570077", "0.55666476", "0.55656385", "0.5564812", "0.55647534", "0.55628544", "0.55628544", "0.55547094", "0.55508256", "0.55505097", "0.5549066", "0.553792", "0.553792", "0.553792", "0.553792", "0.553792", "0.5536121", "0.5535184", "0.5535184", "0.5534758", "0.5517244", "0.5516018", "0.5516018", "0.5516018", "0.5515445", "0.5498154", "0.54971385", "0.5492575", "0.54886436", "0.5484732", "0.54832387", "0.5472679", "0.54640037", "0.546397", "0.545721", "0.5454005", "0.5450092", "0.5450092", "0.5450092", "0.5443105", "0.54386204", "0.5433288", "0.5433288", "0.54325193", "0.5432263", "0.543192", "0.543192", "0.543192", "0.543192", "0.543192", "0.543192", "0.542867", "0.54276025" ]
0.0
-1
Get e.g: Yesterday, Today, Tomorrow OR date in given format
public static String getDayOnly(Date _DateTime, String _DefaultFormat) { StringBuffer res = new StringBuffer(); if (DateUtils.isToday(_DateTime.getTime())) res.append("Today"); else if (DateUtils.isToday(_DateTime.getTime() - ONE_DAY)) res.append("Tomorrow"); else if (DateUtils.isToday(_DateTime.getTime() + ONE_DAY)) res.append("Yesterday"); else res.append(getFormattedDate(_DateTime, _DefaultFormat)); return res != null ? res.toString() : ""; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getStartDateYYYYMMDD();", "java.lang.String getDatesEmployedText();", "private String getDateString(Calendar cal) {\n Calendar current = Calendar.getInstance();\n String date = \"\";\n if (cal.get(Calendar.DAY_OF_YEAR) == current.get(Calendar.DAY_OF_YEAR)) {\n date = getResources().getString(R.string.content_today) + String.format(\" %02d:%02d\", cal.get(Calendar.HOUR_OF_DAY), cal.get(Calendar.MINUTE));\n } else if ((cal.get(Calendar.DAY_OF_YEAR) - 1) == current.get(Calendar.DAY_OF_YEAR)) {\n date = getResources().getString(R.string.content_yesterday) + String.format(\" %02d:%02d\", cal.get(Calendar.HOUR_OF_DAY), cal.get(Calendar.MINUTE));\n } else if ((cal.get(Calendar.DAY_OF_YEAR) - 2) == current.get(Calendar.DAY_OF_YEAR)\n && getResources().getConfiguration().locale.equals(new Locale(\"vn\"))) {\n date = getResources().getString(R.string.content_before_yesterday) + String.format(\" %02d:%02d\", cal.get(Calendar.HOUR_OF_DAY), cal.get(Calendar.MINUTE));\n } else {\n date = String.format(\"%02d-%02d-%02d %02d:%02d\", mCal.get(Calendar.DAY_OF_MONTH), mCal.get(Calendar.MONTH) + 1, mCal.get(Calendar.YEAR), cal.get(Calendar.HOUR_OF_DAY), cal.get(Calendar.MINUTE));\n }\n\n return date;\n }", "java.lang.String getFoundingDate();", "public static String getDayName(Context context, String dateStr) {\n SimpleDateFormat dbDateFormat = new SimpleDateFormat(Utility.DATE_FORMAT,Locale.ENGLISH);\n try {\n Date inputDate = dbDateFormat.parse(dateStr);\n Date todayDate = new Date();\n\n // If the date is today, return the localized version of \"Today\" instead of the actual\n // day name.\n\n if (WeatherContract.getDbDateString(todayDate).equals(dateStr)) {\n return context.getString(R.string.today);\n } else {\n // If the date is set for tomorrow, the format is \"Tomorrow\".\n Calendar cal = Calendar.getInstance();\n cal.setTime(todayDate);\n cal.add(Calendar.DATE, 1);\n Date tomorrowDate = cal.getTime();\n if (WeatherContract.getDbDateString(tomorrowDate).equals(\n dateStr)) {\n return context.getString(R.string.tomorrow);\n } else {\n // Otherwise, the format is just the day of the week (e.g \"Wednesday\".\n SimpleDateFormat dayFormat = new SimpleDateFormat(\"EEEE\",Locale.ENGLISH);\n return dayFormat.format(inputDate);\n }\n }\n } catch (ParseException e) {\n Log.e(Utility.class.getSimpleName(),\n \"Date invalid exception ! \", e);\n // Couldn't process the date correctly.\n return dateStr;\n }\n }", "java.lang.String getDate();", "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 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 }", "String getDate();", "String getDate();", "java.lang.String getFromDate();", "String formatDateCondition(Date date);", "public static String getFriendlyDayString(Context context, String dateStr) {\n\n // The day string for forecast uses the following logic:\n // For today: \"Today, June 8\"\n // For tomorrow: \"Tomorrow\"\n // For the next 5 days: \"Wednesday\" (just the day name)\n // For all days after that: \"Mon Jun 8\"\n\n Date todayDate = new Date();\n String todayStr = WeatherContract.getDbDateString(todayDate);\n Date inputDate = WeatherContract.getDateFromDb(dateStr);\n\n // If the date we're building the String for is today's date, the format\n // is \"Today, June 24\"\n\n if (todayStr.equals(dateStr)) {\n\n String today = context.getString(R.string.today);\n\n return context.getString(\n R.string.format_full_friendly_date,\n today,\n getFormattedMonthDay(dateStr));\n } else {\n Calendar cal = Calendar.getInstance();\n cal.setTime(todayDate);\n cal.add(Calendar.DATE, 7);\n String weekFutureString = WeatherContract.getDbDateString(cal.getTime());\n\n if (dateStr.compareTo(weekFutureString) < 0) {\n // If the input date is less than a week in the future, just return the day name.\n return getDayName(context, dateStr);\n } else {\n\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH);\n String stringDate = dateFormat.format(inputDate);\n\n if (Locale.getDefault().getLanguage().equals(\"en\")) {\n dateFormat = new SimpleDateFormat(\"MMM dd\", Locale.ENGLISH);\n stringDate = dateFormat.format(inputDate);\n return stringDate;\n }\n\n return currentDate.getdateWithMonthLetters(\n GenerateDates.getyourDate(stringDate));\n\n\n }\n }\n\n }", "java.lang.String getToDate();", "public static String getDisplayDatePrevious(Date val) {\n\t\t\n\t\t\n\n\t\tif (val != null) {\n\t\t\tDate previous = DateUtils.addDays(val, -1);\n\t\t\tSimpleDateFormat format = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\t\treturn format.format(previous);\n\n\t\t} else {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t}", "public static String getTodayDate() {\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"yyyyMMdd\");\n return simpleDateFormat.format(new Date());\n }", "private String getDateText(LocalDateTime currentTime, LocalDateTime dateTime) {\n if (isYesterday(currentTime, dateTime)) {\n return WORD_YESTERDAY;\n } else if (isTonight(currentTime, dateTime)) {\n return WORD_TONIGHT;\n } else if (isToday(currentTime, dateTime)) {\n return WORD_TODAY;\n } else if (isTomorrow(currentTime, dateTime)) {\n return WORD_TOMORROW;\n } else if (isSameYear(currentTime, dateTime)) {\n return dateTime.format(DateTimeFormatter.ofPattern(FORMAT_DATE_NO_YEAR));\n } else {\n return dateTime.format(DateTimeFormatter.ofPattern(FORMAT_DATE_WITH_YEAR));\n }\n }", "public String getCurrentDate(String delimiter)\n {\n try{\n Calendar calendar=Calendar.getInstance();\n int curr_day=calendar.get(calendar.DATE);\n int curr_month=calendar.get(calendar.MONTH)+1;\n int curr_year=calendar.get(calendar.YEAR);\n String current_day=Integer.toString(curr_day);\n String current_month=Integer.toString(curr_month);\n String current_year=Integer.toString(curr_year);\n if(curr_month<10)\n current_month=\"0\"+current_month;\n if(curr_day<10)\n current_day=\"0\"+current_day;\n if(!delimiter.equals(\"\"))\n return current_year+delimiter+current_month+delimiter+current_day;\n else\n return current_year+current_month+current_day;\n }\n catch(Exception ex) { System.out.println(\"Error in Expiry Util\"); }\n return null;\n }", "String getDayofservice();", "private static String getTodaysDate() {\n\n LocalDateStringConverter dateToStringConverter = new LocalDateStringConverter();\n return dateToStringConverter.toString(LocalDate.now());\n }", "protected String getTodaysDateString() { return \"\" + dateFormat.format(this.todaysDate); }", "public String getDate() {\n int keywordIndex = getKeywordIndex();\n if (keywordIndex == -1) {\n return NO_INPUT;\n }\n String dateAsString = NO_INPUT;\n for (int i = keywordIndex + 1; i < words.length; i++) {\n dateAsString += words[i] + \" \";\n }\n return dateAsString.trim();\n }", "static String toPrettyFormat(Date d, Date today) {\n\t\tlong days_diff = toJulianDayNumber(today) - toJulianDayNumber(d);\n\n\t\tif (days_diff == 0) {\n\t\t\t// Today: show just the time (HH:MM)\n\t\t\treturn String.format(\"%tR\", d);\n\t\t}\n\n\t\tif (days_diff == 1) {\n\t\t\t// Yesterday\n\t\t\tString mgsstr = i18n(\"Yesterday at %H:%M\");\n\t\t\treturn new Strftime(mgsstr).format(d);\n\t\t}\n\n\t\tif (days_diff > 1 && days_diff < 7) {\n\t\t\t// Days from last week\n\t\t\treturn String.format(\"%tA\", d);\n\t\t}\n\n\t\t// Any other date\n\t\treturn DateFormat.getDateInstance(DateFormat.SHORT).format(d);\n\t}", "public String getTodayDate() \n\t{\n\t\treturn getMonthInteger() + \"/\" + getDayOfMonth() + \"/\" + getYear();\n\n\t}", "public static void main(String[] args) throws ParseException {\n String pattern = \"yyyy-MM-dd HH:mm:ss\";\n SimpleDateFormat sf = new SimpleDateFormat(pattern);\n Date yesterday = sf.parse(\"2016-12-11 23:59:59\");\n Date todayBegin = sf.parse(\"2016-12-12 00:00:00\");\n Date today1 = sf.parse(\"2016-12-12 00:00:01\");\n Date todayend = sf.parse(\"2016-12-12 23:23:59\");\n\n System.out.println(sf.format(yesterday) + \" is before \" + sf.format(todayBegin) + \":\" + yesterday.before(todayBegin));\n System.out.println(sf.format(todayBegin) + \" is before \" + sf.format(today1) + \":\" + todayBegin.before(today1));\n System.out.println(sf.format(todayBegin) + \" is before \" + sf.format(todayend) + \":\" + todayBegin.before(todayend));\n System.out.println(sf.format(today1) + \" is before \" + sf.format(todayend) + \":\" + today1.before(todayend));\n }", "public static String getToday() {\n return getToday(\"yyyy-MM-dd HH:mm:ss\");\n }", "private String checkIfToday(String day) {\n GregorianCalendar cal = new GregorianCalendar();\n switch(cal.get(Calendar.DAY_OF_WEEK)) {\n case Calendar.MONDAY:\n if (day.equals(\"Mo.\") || day.equals(\"Mon\")) {\n return International.getString(\"heute\");\n }\n case Calendar.TUESDAY:\n if (day.equals(\"Di.\") || day.equals(\"Tue\")) {\n return International.getString(\"heute\");\n }\n case Calendar.WEDNESDAY:\n if (day.equals(\"Mi.\") || day.equals(\"Wed\")) {\n return International.getString(\"heute\");\n }\n case Calendar.THURSDAY:\n if (day.equals(\"Do.\") || day.equals(\"Thu\")) {\n return International.getString(\"heute\");\n }\n case Calendar.FRIDAY:\n if (day.equals(\"Fr.\") || day.equals(\"Fri\")) {\n return International.getString(\"heute\");\n }\n case Calendar.SATURDAY:\n if (day.equals(\"Sa.\") || day.equals(\"Sat\")) {\n return International.getString(\"heute\");\n }\n case Calendar.SUNDAY:\n if (day.equals(\"So.\") || day.equals(\"Sun\")) {\n return International.getString(\"heute\");\n }\n }\n return day;\n }", "public static String getStrDate(Date date) {\n //TODO get date\n SimpleDateFormat formatter;\n if (DateUtils.isToday(date.getTime())) {\n formatter = new SimpleDateFormat(\"HH:mm\");\n return formatter.format(date);\n }\n formatter = new SimpleDateFormat(\"MMM dd\");\n return formatter.format(date);\n }", "public static String generateCurrentDayString() {\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\treturn dateFormat.format(new Date());\n\t}", "private Date parseStringToDate(String date) {\n Date resultDate = null;\n if (date.contains(TODAY) || date.contains(YESTERDAY)) {\n String[] dateStrings = date.split(\",\");\n if (dateStrings[0].equalsIgnoreCase(TODAY)) {\n Calendar today = Calendar.getInstance();\n resultDate = today.getTime();\n } else if (dateStrings[0].equalsIgnoreCase(YESTERDAY)) {\n Calendar yesterday = Calendar.getInstance();\n yesterday.add(Calendar.DATE, MINUS_DAY);\n resultDate = yesterday.getTime();\n }\n } else {\n SimpleDateFormat formatter = new SimpleDateFormat(DATE_FORMAT);\n try {\n resultDate = formatter.parse(date);\n } catch (ParseException e) {\n LOG.error(e.getMessage(), e);\n }\n }\n return resultDate;\n }", "public String getTodayStr() {\n return getTodayDate().toString();\n }", "private static String getDateStr() {\n\t\tDate date = Calendar.getInstance().getTime();\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"MMddyyy\");\n\t\tString dateStr = dateFormat.format(date);\n\t\treturn dateStr;\n\t}", "Date getPriorDate();", "private String getTodayDate(){\n // get current Date and Time for product_info table\n Date date = Calendar.getInstance().getTime();\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd hh:MM\", Locale.getDefault());\n return dateFormat.format(date);\n }", "public String getDate(){\n String d=\"\";\n String m=\"\";\n if(day<10){\n d=0+(String.valueOf(day));\n }\n else{\n d=String.valueOf(day);\n }\n\n if(month<10){\n m=0+(String.valueOf(month));\n }\n else{\n m=String.valueOf(month);\n }\n //returning day/month/year\n return (d+\"/\"+m+\"/\"+String.valueOf(year));\n }", "protected String getDateString() {\n String result = null;\n if (!suppressDate) {\n result = currentDateStr;\n }\n return result;\n }", "public static String getDisplayDateNext(Date val) {\n\n\t\tif (val != null) {\n\t\t\tDate previous = DateUtils.addDays(val, 1);\n\t\t\tSimpleDateFormat format = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\t\treturn format.format(previous);\n\n\t\t} else {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t}", "public static String getTodaysDate() {\t\r\n\t\t\r\n\t\treturn makeDateString(getTodaysDay(), getTodaysMonth(), getTodaysYear());\t\r\n\t\t\r\n\t}", "public static String dateStr(String input ){\n String mm = input.substring(0,2);\n String dd = input.substring(3,5);\n String yyyy = input.substring(6,10);\n return dd + \" - \" + mm + \" - \" + yyyy;\n }", "String getPreviousCloseDate();", "public static String getTodaysDate(String format) {\n DateFormat dateFormat = new SimpleDateFormat();\n return dateFormat.format(new Date());\n }", "public void testFormatDateStringFromTimestamp_yesterday() {\n calendar.add(Calendar.DAY_OF_YEAR, -1);\n assertEquals(getContext().getResources().getString(R.string.yesterday),\n ContactInteractionUtil.formatDateStringFromTimestamp(calendar.getTimeInMillis(),\n getContext()));\n }", "public abstract java.lang.String getFecha_termino();", "String printListDate(String date);", "java.lang.String getStartDate();", "public void produceDateFromDay(String dayInput, int plus) {\n LocalDate date = null;\n \n if (plus == 2) {\n date = LocalDate.now().plusWeeks(1);\n } else if (plus == 3) {\n date = LocalDate.now().plusMonths(1);\n } else if (plus == 4) {\n date = LocalDate.now().plusYears(1);\n } else if (plus == 5) {\n date = LocalDate.now();\n } else if (plus == 6) {\n date = LocalDate.now().plusDays(1);\n } else {\n for (int n = 0; n < Constants.DAYS_LIST.length; n++) {\n if (dayInput.toLowerCase().matches(Constants.DAYS_LIST[n])) {\n int days = (n+1) - LocalDate.now().getDayOfWeek().getValue();\n\n if (days >= 0) {\n if (plus == 1) {\n date = LocalDate.now().plusDays(days+7);\n } else {\n date = LocalDate.now().plusDays(days);\n }\n } else {\n date = LocalDate.now().plusDays(days+7);\n }\n\n break;\n }\n }\n }\n startDate = date.getDayOfMonth() + \"/\" + date.getMonthValue() + \"/\" +date.getYear();\n }", "private static String getDate() {\n Scanner input = new Scanner(System.in);\n\n String monthName = input.next();\n int month = monthNum(monthName);\n int day = input.nextInt();\n String date = \"'2010-\" + month + \"-\" + day + \"'\";\n return date;\n }", "private static String timeHandler(String date) {\n SimpleDateFormat dbFormat = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'\");\n SimpleDateFormat dayFormat = new SimpleDateFormat(\"MM-dd\");\n SimpleDateFormat timeFormat = new SimpleDateFormat(\"HH:mm\");\n dbFormat.setTimeZone(TimeZone.getTimeZone(\"UTC\"));\n String today = dayFormat.format(new Date());\n String day = \"\";\n String time = \"\";\n try {\n time = timeFormat.format(dbFormat.parse(date));\n day = dayFormat.format(dbFormat.parse(date));\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if (day.equals(today)) {\n return \"Today \" + time;\n } else if (day.equals(dayFormat.format(yesterday()))) {\n return \"Yesterday \" + time;\n } else {\n return day + \" \" + time;\n }\n }", "public static void main(String[] args) {\n\t\tLocalDate today = LocalDate.now();\n\t\t\n\t\tLocalDate dayOffDate = today.with(temporal -> {\n\t\t\t//1. temporal로부터 기준이 되는 날짜를 구한다.\n\t\t\tLocalDate theDay = LocalDate.from(temporal);\n\t\t\t\n\t\t\t//2. 둘째, 넷째 일요일을 구한다.\n\t\t\tLocalDate secondSunday = theDay.with(dayOfWeekInMonth(2, DayOfWeek.SUNDAY));\n\t\t\tLocalDate fourthSunday = theDay.with(dayOfWeekInMonth(4, DayOfWeek.SUNDAY));\n\t\t\t\n\t\t\t//3. 기준날짜와 쉬는 날을 비교해준다.\n\t\t\t// 2번째 일요일보다 기준일이 이전이면, 쉬는날을 2번째 일요일로 리턴\n\t\t\t// 4번째 일요일보다 기준일이 이전이면, 쉬는날을 4번째 일요일로 리턴\n\t\t\t// 4번째 일요일보다 기준일이 지났으면, 쉬는날을 다음달 2번째 일요일로 리턴\n\t\t\tif(theDay.isBefore(secondSunday)) {\n\t\t\t\treturn secondSunday;\n\t\t\t}else if(theDay.isBefore(fourthSunday)) {\n\t\t\t\treturn fourthSunday;\n\t\t\t}else {\n\t\t\t\treturn theDay.plusMonths(1).with(dayOfWeekInMonth(2, DayOfWeek.SUNDAY));\n\t\t\t}\n\t\t});\n\t\t\n\t\tSystem.out.println(\"오늘 기준 다음 마트 쉬는 날은 \" + dayOffDate + \"일 입니다.\");\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 }", "public Date getDueDate(String s){\r\n Date today = new Date();\r\n if (dueDate.after(today)){\r\n\r\n System.out.println(s);\r\n }\r\n return dueDate;\r\n }", "String getStartDate();", "public String getUserDateString() {\n\t\tString[] tmpArr = this.getUserDate();\n\t\tString year = tmpArr[0];\n\t\tString month = tmpArr[1];\n\t\tString day = tmpArr[2];\n\t\tString out = year + \"/\" + month + \"/\" + day;\n\t\treturn out;\n\t}", "public static HISDate valueOf(String date, String format) throws HISDateException {\r\n HISDate ret = null;\r\n String datStr = date;\r\n String formatStr = format;\r\n if (datStr != null) {\r\n // Wir haben ein Datum gegeben...\r\n datStr = format(datStr);\r\n if (datStr.toUpperCase().equals(\"TODAY\") || datStr.toUpperCase().equals(\"NOW\") || datStr.toUpperCase().equals(\"CURRENT\")) {\r\n // Schlüsselwort für aktuelles Datum !!\r\n if (formatStr != null) {\r\n logger.debug(\"Unnötige Format-Angabe für TODAY!\");\r\n }\r\n // Hole aktuelles Datum:\r\n ret = HISDate.getToday();\r\n } else {\r\n // Kein Schlüsselwort für Datum...\r\n try {\r\n // Betrachte Formatangabe:\r\n if (formatStr == null) {\r\n // Kein Format gegeben.\r\n // Muss Format aus Datumswert erraten:\r\n formatStr = HISDate.guessFormat(datStr);\r\n } else {\r\n // Schlüsselworte ersetzen oder Format validieren:\r\n formatStr = HISDate.substKeysCheckFormat(formatStr);\r\n } // endif (Formatangabe nicht null)\r\n\r\n // Wenn wir bis hierhin kommen, haben wir eine\r\n // gültige Formatangabe in Grossschrift...\r\n\r\n // Versuche jetzt, die Werte zu holen:\r\n int y = -1;\r\n int m = -1;\r\n int d = -1;\r\n String sep = formatStr.substring(3);\r\n StringTokenizer datTokenizer = new StringTokenizer(datStr, sep);\r\n for (int i = 0; i < 3; i++) {\r\n char component = formatStr.charAt(i);\r\n if (!datTokenizer.hasMoreTokens()) {\r\n if (component == 'Y') {\r\n y = HISDate.getToday().getYear();\r\n break;\r\n }\r\n }\r\n String val = datTokenizer.nextToken();\r\n switch (component) {\r\n case 'D': {\r\n d = Integer.parseInt(val);\r\n break;\r\n }\r\n case 'M': {\r\n m = ArrayUtils.indexOf(MONTH_SHORT, val);\r\n if (m < 0) {\r\n m = Integer.parseInt(val);\r\n }\r\n break;\r\n }\r\n case 'Y': {\r\n int intVal = Integer.parseInt(val);\r\n if (val.length() == 2) {\r\n // Zweistellige Jahresangaben ergänzen:\r\n if (intVal < 50) {\r\n intVal += 2000; // 2000...2049\r\n } else {\r\n intVal += 1900; // 1950...1999\r\n }\r\n }\r\n y = intVal;\r\n break;\r\n }\r\n // Andere können wegen checkFormat() nicht mehr vorkommen...\r\n } // endswitch (aktuelle Datums-Komponente)\r\n } // endfor (drei Datumskomponenten)\r\n if (datTokenizer.hasMoreTokens()) {\r\n // Fehler, es gibt mehr als zwei Separatoren !!\r\n throw new HISException(datStr + \" ist ungültiger Datumswert. Ein Datum besteht nur aus drei Komponenten!\");\r\n }\r\n\r\n // Datums-Objekt erzeugen:\r\n ret = new HISDate(y, m, d);\r\n } catch (Exception ex) {\r\n throw new HISDateException(\"Fehler beim Erzeugen eines Datums-Objekts aus \" + datStr + \": \", ex);\r\n }\r\n }\r\n }\r\n return ret;\r\n }", "private String getDate(String str) {\n String[] arr = str.split(\"T\");\n DateFormat formatter = new SimpleDateFormat(\"yyyy-mm-d\", Locale.US);\n Date date = null;\n try {\n date = formatter.parse(arr[0]);\n } catch (java.text.ParseException e) {\n Log.e(LOG_TAG, \"Could not parse date\", e);\n }\n SimpleDateFormat dateFormatter = new SimpleDateFormat(\"MMM d, yyyy\", Locale.US);\n\n return dateFormatter.format(date);\n }", "public Date getDate(String pPrompt) throws ParseException {\r\n\t\tSystem.out.println(pPrompt + \" \");\r\n\t\treturn new SimpleDateFormat(\"dd/MM/yy\").parse(input.nextLine());\r\n\t}", "java.lang.String getEndDateYYYY();", "private String easyDateFormat(final String format) {\n Date today = new Date();\n SimpleDateFormat formatter = new SimpleDateFormat(format);\n String datenewformat = formatter.format(today);\n return datenewformat;\n }", "public String getTodayText() {\r\n return ValueBindings.get(this, \"todayText\", todayText, \"Today\");\r\n }", "public static String getDateString(){\n\t\t\tCalendar now = Calendar.getInstance();\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd__HH-mm-ss\");\n\t\t\treturn sdf.format(now.getTime());\n\t }", "public static String previousworkingdate() {\n\t\tLocalDate lastbusinessday = getLastWorkingDayOfMonth(LocalDate.now());\n\t\tint x = lastbusinessday.getDayOfMonth();\n\t\tString y = String.valueOf(x);\n\t\tif (y.length() == 1)\n\t\t\ty = \"0\" + y;\n\t\treturn String.valueOf(y);\n\n\t}", "public static String currentdate() {\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"MM/dd/yyyy\");\n\t\tDate date = new Date();\n\t\treturn dateFormat.format(date);\n\n\t}", "private static String getDayName(Context context, long dateInMillis) {\n long dayNumber = getDayNumber(dateInMillis);\n long currentDayNumber = getDayNumber(System.currentTimeMillis());\n if (dayNumber == currentDayNumber) {\n return context.getString(R.string.today);\n } else if (dayNumber == currentDayNumber + 1) {\n return context.getString(R.string.tomorrow);\n } else {\n /*\n * Otherwise, if the day is not today, the format is just the day of the week\n * (e.g \"Wednesday\")\n */\n SimpleDateFormat dayFormat = new SimpleDateFormat(\"EEEE\");\n return dayFormat.format(dateInMillis);\n }\n }", "protected String getSelectedDate()\n {\n String startsOnDate = String.valueOf(selectedYear);\n if(selectedMonth<10)startsOnDate+=\"-0\"+String.valueOf(selectedMonth);\n else startsOnDate+=\"-\"+String.valueOf(selectedMonth);\n if(selectedDay<10)startsOnDate+=\"-0\"+String.valueOf(selectedDay);\n else startsOnDate+=\"-\"+String.valueOf(selectedDay);\n\n return startsOnDate;\n }", "public static String getSQLDatePrevious(Date val) {\n\t\t\n\t\t// Substracts a day from Date and converts date into SQL format, ignores time\n\n\t\tif (val != null) {\n\t\t\tDate previous = DateUtils.addDays(val, -1);\n\t\t\tSimpleDateFormat format = new SimpleDateFormat(\"yyyy/MM/dd\");\n\t\t\treturn \"'\" + format.format(previous) + \"'\";\n\n\t\t} else {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t}", "public static String getDateSuffix(int date)\r\n\t{\r\n\t\tswitch(date)\r\n\t\t{\r\n\t\tcase 1:\r\n\t\tcase 21:\r\n\t\tcase 31:\r\n\t\t\treturn \"st\";\r\n\t\tcase 2:\r\n\t\tcase 22:\r\n\t\t\treturn \"nd\";\r\n\t\tcase 3:\r\n\t\tcase 23:\r\n\t\t\treturn \"rd\";\r\n\t\t}\r\n\t\treturn \"th\"; //if none of the above\r\n\t\t\t\t\t\r\n\t}", "public List<String> getDates() {\n\n List<String> listDate = new ArrayList<>();\n\n Calendar calendarToday = Calendar.getInstance();\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"yyyy-MM-dd\", Locale.ENGLISH);\n String today = simpleDateFormat.format(calendarToday.getTime());\n\n Calendar calendarDayBefore = Calendar.getInstance();\n calendarDayBefore.setTime(calendarDayBefore.getTime());\n\n int daysCounter = 0;\n\n while (daysCounter <= 7) {\n\n if (daysCounter == 0) { // means that its present day\n listDate.add(today);\n } else { // subtracts 1 day after each pass\n calendarDayBefore.add(Calendar.DAY_OF_MONTH, -1);\n Date dateMinusOneDay = calendarDayBefore.getTime();\n String oneDayAgo = simpleDateFormat.format(dateMinusOneDay);\n\n listDate.add(oneDayAgo);\n\n }\n\n daysCounter++;\n }\n\n return listDate;\n\n }", "private String getIndexDate(String criteriaMet, Map<String, List<Info>> criteria, boolean isAny) {\n\t\tSortedSet<String> date = new TreeSet<String>();\n\t\t\n\t\tString[] crit = criteriaMet.split(\":\");\n\t\tfor(int i=0; i<crit.length; i++) {\n\t\t\tList<Info> info = criteria.get(crit[i]);\n\t\t\tif(info==null) {\n\t\t\t\tSystem.out.println(crit[i] + \" has NO Info\");\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t\t//info includes \"all\" related conditions until it satisfies the criteria\n\t\t\t//so the last element will be the earliest date that satisfies the criteria\n\t\t\tdate.add(info.get(info.size()-1).date);\n\t\t}\n\t\t\n\t\t//date is in order of earliest to latest \n\t\tif(isAny)\n\t\t\treturn date.first();\n\t\telse\n\t\t\treturn date.last();\n\t}", "public String getPrevDate() \n\t{\n\t\tm_calendar.set (Calendar.DAY_OF_MONTH, getDayOfMonth() -1);\n\t\treturn getTodayDate();\n\t}", "public static int getCurrentDate(){\r\n \t String worddate = new SimpleDateFormat(\"yy-MM-dd\").format(new Date());\r\n \t String worddate2 = worddate.replaceAll(\"-\", \"\");\r\n \t int currentdate = Integer.parseInt(worddate2);\r\n \t return currentdate;\r\n }", "Date getForDate();", "private String getDate(int year, int month, int day) {\n return new StringBuilder().append(month).append(\"/\")\n .append(day).append(\"/\").append(year).toString();\n }", "@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}", "org.apache.xmlbeans.XmlString xgetFoundingDate();", "public static String currentDate1() throws Exception {\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd\");\n\t\t// get current date time with Date()\n\t\tDate date = new Date();\n\t\t// Now format the date\n\t\tString date1 = dateFormat.format(date);\n\t\t// System.out.println(date1);\n\t\treturn date1;\n\t}", "private String getDayFromUTCTimeStamp(String stDate_in) {\n try {\n long timeStamp = Long.parseLong(stDate_in) * 1000L;\n SimpleDateFormat sdfDay = new SimpleDateFormat(\"E\");\n SimpleDateFormat sdfDateTime = new SimpleDateFormat(\"E MM/dd/yyyy HH:mm:ss\");\n Date netDate = (new Date(timeStamp));\n return sdfDay.format(netDate);\n } catch (Exception e) {\n AppDataLog.TPostExep(e);\n return null;\n }\n }", "public String getLeavingDate();", "public String getCurrentDate() {\n\t\t\t\tDateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yy\");\n\t\t\t\tDate date = new Date();\n\t\t\t\treturn dateFormat.format(date);\n\t\t\t}", "public static String getDate() {\n\t\tString\ttoday=\"\";\n\n\t\tCalendar Datenow=Calendar.getInstance();\n\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t today = formatter.format(Datenow.getTime());\n\n\t return today;\n\t}", "private static Date dateToString(Date start) {\n\t\treturn start;\n\t}", "public int getToday() {\n \treturn 0;\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 void testFormatDateStringFromTimestamp_yesterdayLastYear() {\n calendar.set(Calendar.YEAR, 1999);\n calendar.set(Calendar.DAY_OF_YEAR, 365);\n long lastYear = calendar.getTimeInMillis();\n calendar.add(Calendar.DAY_OF_YEAR, 1);\n\n assertEquals(getContext().getResources().getString(R.string.yesterday),\n ContactInteractionUtil.formatDateStringFromTimestamp(lastYear,\n getContext(), calendar));\n }", "public String getCurrentDate(String dateForm) {\n DateFormat dateFormat = new SimpleDateFormat(dateForm);\n\n //get current date time with Date()\n Date date = new Date();\n\n // Now format the date\n String date1= dateFormat.format(date);\n\n return date1;\n }", "private String dayName() {\n int arrayDay = (day + month + year + (year/4) + (year/100) % 4) % 7;\n return dayName[arrayDay];\n }", "public static void main(String[] args) {\n\t\tLocalDate today=LocalDate.now();\n\t\t\n\t\tDateTimeFormatter dtf=DateTimeFormatter.ofPattern(\"YYYY/MM/DD\");\n\t\tDateTimeFormatter dtf1=DateTimeFormatter.ofPattern(\"YYYY MM DD\");\n\t\t\n\t\tDateTimeFormatter dtfull=DateTimeFormatter.ofLocalizedDate(FormatStyle.FULL);\n\t\tDateTimeFormatter dtm=DateTimeFormatter.ofLocalizedDate(FormatStyle.MEDIUM);\n\t\tDateTimeFormatter dts=DateTimeFormatter.ofLocalizedDate(FormatStyle.SHORT);\n\t\t\n\t\t\n\t\tString afterformat=today.format(dtf);\n\t\tSystem.out.println(afterformat);\n\t\tString afterformat1=today.format(dtf1);\n\t\tSystem.out.println(afterformat1);\n\t\tString fd=today.format(dtfull);\n\t\tSystem.out.println(fd);\n\t\tString md=today.format(dtm);\n\t\tSystem.out.println(md);\n\t\tString sd=today.format(dts);\n\t\tSystem.out.println(sd);\n\t\t\n\t\t\n\n\t}", "private static String makeDateUrl(String day, String times) {\n StringBuffer sb = new StringBuffer();\n sb.append(\"DAY \");\n sb.append(day);\n sb.append(\" \");\n sb.append(day);\n sb.append(\";TIME \");\n sb.append(times);\n // System.err.println(\"time:\" + sb);\n return sb.toString();\n }", "public static String getCurrentDate() {\n\t\tDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd\");\n\t\tDate dateobj = new Date();\n\t\treturn df.format(dateobj);\n\t}", "public static String getSQLDateNextLifting(Date val) {\n\n\t\t\n\t\t// Adds another day to Date and converts date into SQL format, ignores time\n\t\tif (val != null) {\n\n\t\t\tDate next = DateUtils.addDays(val, 1);\n\t\t\tSimpleDateFormat format = new SimpleDateFormat(\"yyyy/MM/dd\");\n\t\t\treturn \"date_format('\" + format.format(next) + \" 6:00','%Y-%m-%d %H:%i')\";\n\n\t\t} else {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t}", "String getQuoteOfTheDay();", "public static void main(String[] args) {\n String s = FormatFecha.format(FormatFecha.FMT_ISO, new Date());\n System.out.println(\"Fecha: \" + s);\n //\"10/6/2010\" 2010-06-10\n }", "public static String dateStr(String str)\n {\n String month = str.split(\"/\")[0];\n String day = str.split(\"/\")[1];\n String year = str.split(\"/\")[2];\n return day + \"-\" + month + \"-\" + year;\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tString date=\"2021/02/04\";//default date format\r\n\t\tLocalDate today=LocalDate.now();\r\n\t\t\r\n\t\tDateTimeFormatter pattern1=DateTimeFormatter.ofPattern(\"yyyy/MMM/dd\");\r\n\t\tDateTimeFormatter pattern2=DateTimeFormatter.ofPattern(\"yyyy/MM/dd\");\r\n\t\t\r\n\t\tSystem.out.println(\"Default format \"+today);\r\n\t\t\r\n\t\tSystem.out.println(\"my format \"+today.format(pattern2));\r\n\t\tSystem.out.println(\"my format \"+today.format(pattern1));\r\n\t\t\r\n\t\tSystem.out.println(\"====================================================\");\r\n\t\t\r\n\t\t\tLocalDate ld=LocalDate.parse(date,pattern2);\r\n\t\t\tSystem.out.println(ld);\r\n\t}", "public static String getToday(String format) {\n Date c = Calendar.getInstance().getTime();\n System.out.println(\"Current time => \" + c);\n SimpleDateFormat df = new SimpleDateFormat(format, Locale.getDefault());\n return df.format(c);\n }", "private Date getTo(RuleTypes.HistoricRequirements ph) {\n Calendar date = new GregorianCalendar();\n date.set(Calendar.HOUR_OF_DAY, 0);\n date.set(Calendar.MINUTE, 0);\n date.set(Calendar.SECOND, 0);\n date.set(Calendar.MILLISECOND, 0);\n int today;\n\n Calendar now = new GregorianCalendar();\n\n switch(ph) {\n case TODAY:\n return now.getTime();\n case YESTERDAY:\n return date.getTime();\n case THIS_WEEK:\n return now.getTime();\n case LAST_WEEK:\n today = date.get(Calendar.DAY_OF_WEEK);\n date.add(Calendar.DAY_OF_WEEK,-today+Calendar.SUNDAY);\n return date.getTime();\n case THIS_MONTH:\n return now.getTime();\n case LAST_MONTH:\n date.add(Calendar.MONTH, -1);\n date.set(Calendar.DAY_OF_MONTH, date.getActualMaximum(Calendar.DAY_OF_MONTH));\n return date.getTime();\n case T12_HRS:\n return now.getTime();\n case T24_HRS:\n return now.getTime();\n case T2_DAYS:\n return now.getTime();\n case T3_DAYS:\n return now.getTime();\n case T4_DAYS:\n return now.getTime();\n case T5_DAYS:\n return now.getTime();\n case T6_DAYS:\n return now.getTime();\n case T7_DAYS:\n return now.getTime();\n }\n return null;\n\n }", "public String getDateString() {\n int year = date.get(Calendar.YEAR);\n int month = date.get(Calendar.MONTH); // month is stored from 0-11 so adjust +1 for final display\n int day_of_month = date.get(Calendar.DAY_OF_MONTH);\n return String.valueOf(month + 1) + '/' + String.valueOf(day_of_month) + '/' + year;\n }", "Date getDate();", "Date getDate();", "Date getDate();", "public static String timeAgo(Context c, long dateStar, long dateEnd) {\n\n Period p = new Period(dateStar, dateEnd);\n //Log.d(tag, \" periodDefault ---> \" + PeriodFormat.getDefault().print(p));\n\n if (p.getYears() != 0) {\n if (p.getYears() == 1) {\n return p.getYears() + \" \" + c.getString(R.string.date_year)\n + \" \" + c.getString(R.string.date_suffix_ago);\n } else {\n return p.getYears() + \" \" + c.getString(R.string.date_years)\n + \" \" + c.getString(R.string.date_suffix_ago);\n }\n }\n\n if (p.getMonths() != 0) {\n if (p.getMonths() == 1) {\n return p.getMonths() + \" \" + c.getString(R.string.date_month)\n + \" \" + c.getString(R.string.date_suffix_ago);\n } else {\n return p.getMonths() + \" \" + c.getString(R.string.date_months)\n + \" \" + c.getString(R.string.date_suffix_ago);\n }\n }\n\n if (p.getWeeks() != 0) {\n if (p.getWeeks() == 1) {\n return p.getWeeks() + \" \" + c.getString(R.string.date_week)\n + \" \" + c.getString(R.string.date_suffix_ago);\n } else {\n return p.getWeeks() + \" \" + c.getString(R.string.date_week)\n + \" \" + c.getString(R.string.date_suffix_ago);\n }\n }\n\n if (p.getDays() != 0) {\n if (p.getDays() == 1) {\n return p.getDays() + \" \" + c.getString(R.string.date_day)\n + \" \" + c.getString(R.string.date_suffix_ago);\n } else {\n return p.getDays() + \" \" + c.getString(R.string.date_days)\n + \" \" + c.getString(R.string.date_suffix_ago);\n }\n }\n\n if (p.getHours() != 0) {\n if (p.getHours() == 1) {\n return p.getHours() + \" \" + c.getString(R.string.date_hour)\n + \" \" + c.getString(R.string.date_suffix_ago);\n } else {\n return p.getHours() + \" \" + c.getString(R.string.date_hours)\n + \" \" + c.getString(R.string.date_suffix_ago);\n }\n }\n\n if (p.getMinutes() != 0) {\n if (p.getMinutes() == 1) {\n return p.getMinutes() + \" \" + c.getString(R.string.date_minute)\n + \" \" + c.getString(R.string.date_suffix_ago);\n } else {\n return p.getMinutes() + \" \" + c.getString(R.string.date_minutes)\n + \" \" + c.getString(R.string.date_suffix_ago);\n }\n }\n\n if (p.getMinutes() != 0) {\n if (p.getSeconds() <= 1) {\n return c.getString(R.string.date_just_now);\n } else {\n return p.getSeconds() + \" \" + c.getString(R.string.date_seconds)\n + \" \" + c.getString(R.string.date_suffix_ago);\n }\n }\n\n Calendar calendar = Calendar.getInstance();\n Calendar.getInstance().setTimeInMillis(dateStar);\n return Commons.dateToString(calendar.getTime(), c);\n }" ]
[ "0.59389454", "0.59160185", "0.5891804", "0.5885038", "0.57359815", "0.5728237", "0.5700247", "0.5696409", "0.5685456", "0.5685456", "0.5671619", "0.5660897", "0.5645732", "0.5587533", "0.5567934", "0.5565187", "0.55124235", "0.54804844", "0.547564", "0.5462714", "0.54271173", "0.5426196", "0.541993", "0.5406766", "0.53832036", "0.5339798", "0.5324987", "0.5316244", "0.5315071", "0.5294501", "0.52808446", "0.5227115", "0.52167237", "0.51986575", "0.5184206", "0.5181733", "0.5175536", "0.51629525", "0.5131516", "0.5123972", "0.5118662", "0.5117689", "0.511589", "0.51026887", "0.5090055", "0.50896424", "0.50702965", "0.5068978", "0.506848", "0.5058652", "0.5056065", "0.50539374", "0.5051818", "0.50457233", "0.50319546", "0.5030886", "0.5018211", "0.50141287", "0.50137407", "0.5011479", "0.50094336", "0.5007812", "0.50022656", "0.5001663", "0.4995172", "0.49825388", "0.49824035", "0.49814504", "0.49742606", "0.49722064", "0.49705124", "0.49621263", "0.49616197", "0.4961326", "0.49612272", "0.49580687", "0.4931238", "0.49259126", "0.49163893", "0.49156344", "0.49120945", "0.49055943", "0.4895619", "0.489125", "0.488859", "0.4883545", "0.4875273", "0.48732832", "0.48666942", "0.48573366", "0.48511723", "0.4846822", "0.48464867", "0.48380023", "0.48379692", "0.4828417", "0.48241508", "0.48241508", "0.48241508", "0.48235336" ]
0.52997404
29
Get only single unit estimated time e.g: 1 year ago | 2 weeks ago | 5 months ago.
public static String getEstimatedTimeElapsed(Date _DateTime) { String strJustNow, strSecsSingle, strSecsMultiple, strMinSingle, strMinMultiple, strHourSingle, strHourMultiple, strDaySingle, strDayMultiple, strDayYesterday, strDayTomorrow, strWeekSingle, strWeekMultiple, strMonthSingle, strMonthMultiple, strYearSingle, strYearMultiple, titlePast, titleFuture; if (!AppConfig.getInstance().isEnglishMode) { //Arabic mode strJustNow = "الآن"; strSecsSingle = "ثانيا"; strSecsMultiple = "ثواني"; strMinSingle = "دقيقة"; strMinMultiple = "الدقائق"; strHourSingle = "ساعة"; strHourMultiple = "ساعات"; strDaySingle = "يوم"; strDayMultiple = "أيام"; strDayYesterday = "في الامس"; strDayTomorrow = "غدا"; strWeekSingle = "أسبوع"; strWeekMultiple = "أسابيع"; strMonthSingle = "شهر"; strMonthMultiple = "الشهور"; strYearSingle = "سنة"; strYearMultiple = "سنوات"; titlePast = " منذ"; titleFuture = " متبق"; } else { //Default mode strJustNow = "Just now"; strSecsSingle = "sec"; strSecsMultiple = "secs"; strMinSingle = "min"; strMinMultiple = "mins"; strHourSingle = "hr"; strHourMultiple = "hrs"; strDaySingle = "day"; strDayMultiple = "days"; strDayYesterday = "Yesterday"; strDayTomorrow = "Tomorrow"; strWeekSingle = "week"; strWeekMultiple = "weeks"; strMonthSingle = "month"; strMonthMultiple = "months"; strYearSingle = "year"; strYearMultiple = "years"; titlePast = " ago"; titleFuture = " remaining"; } long secsPrevious = _DateTime.getTime() / 1000; long secsNow = System.currentTimeMillis() / 1000; // Calculate difference in milliseconds long diff = secsNow - secsPrevious; boolean isPastTime = diff > 0; diff = Math.abs(diff); // Calculate difference in seconds long diffSeconds = diff; // Calculate difference in minutes long diffMinutes = diff / (60); // Calculate difference in hours long diffHours = diff / (60 * 60); // Calculate difference in days long diffDays = diff / (60 * 60 * 24); // Calculate difference in weeks long diffWeeks = diff / (60 * 60 * 24 * 7); // Calculate difference in months long diffMonths = diff / (60 * 60 * 24 * 30); // Calculate difference in years long diffYears = diff / (60 * 60 * 24 * 365); String timeElapsed = ""; String tempTitle = isPastTime ? titlePast : titleFuture; if (diffYears > 0) { timeElapsed = AppConfig.getInstance().numberToCurrLang(diffYears + "") + " " + (diffYears > 1 ? strYearMultiple : strYearSingle) + tempTitle; } else if (diffMonths > 0) { timeElapsed = AppConfig.getInstance().numberToCurrLang(diffMonths + "") + " " + (diffMonths > 1 ? strMonthMultiple : strMonthSingle) + tempTitle; } else if (diffWeeks > 0) { timeElapsed = AppConfig.getInstance().numberToCurrLang(diffWeeks + "") + " " + (diffWeeks > 1 ? strWeekMultiple : strWeekSingle) + tempTitle; } else if (diffDays > 0) { if (diffDays == 1) { timeElapsed = isPastTime ? strDayYesterday : strDayTomorrow; } else { timeElapsed = AppConfig.getInstance().numberToCurrLang(diffDays + "") + " " + strDayMultiple + tempTitle; } } else if (diffHours > 0) { timeElapsed = AppConfig.getInstance().numberToCurrLang(diffHours + "") + " " + (diffHours > 1 ? strHourMultiple : strHourSingle) + tempTitle; } else if (diffMinutes > 0) { timeElapsed = AppConfig.getInstance().numberToCurrLang(diffMinutes + "") + " " + (diffMinutes > 1 ? strMinMultiple : strMinSingle) + tempTitle; } else if (diffSeconds > 10) { timeElapsed = AppConfig.getInstance().numberToCurrLang(diffSeconds + "") + " " + (diffSeconds > 1 ? strSecsMultiple : strSecsSingle) + tempTitle; } else {//diff few Seconds timeElapsed = strJustNow; } return timeElapsed; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ChronoUnit getUnit();", "public String estimatedTime() {\n int m = (int)(getFreeBytes()/500000000);\n return (m <= 1) ? \"a minute\" : m+\" minutes\";\n }", "public String getEstimatedRemainingTime() {\n long d = executable.getParent().getEstimatedDuration();\n if(d<0) return \"N/A\";\n \n long eta = d-(System.currentTimeMillis()-startTime);\n if(eta<=0) return \"N/A\";\n \n return Util.getTimeSpanString(eta);\n }", "public static String getElapsedTimeFromNow(Date date) {\n long duration = new Date().getTime() - date.getTime();\n\n long diffInMinutes = TimeUnit.MILLISECONDS.toMinutes(duration);\n long diffInHours = TimeUnit.MILLISECONDS.toHours(duration);\n long diffInDays = TimeUnit.MILLISECONDS.toDays(duration);\n long diffInMonths = diffInDays / 30;\n long diffInYears = diffInMonths / 365;\n\n if (diffInYears > 0) {\n if (diffInYears == 1) return Long.toString(diffInYears) + \" year ago\";\n return Long.toString(diffInYears) + \" years ago\";\n }\n\n else if (diffInMonths > 0) {\n if (diffInMonths == 1) return Long.toString(diffInMonths) + \" month ago\";\n return Long.toString(diffInMonths) + \" months ago\";\n }\n\n else if (diffInDays > 0) {\n if (diffInDays == 1) return Long.toString(diffInDays) + \" day ago\";\n return Long.toString(diffInDays) + \" days ago\";\n }\n\n else if (diffInHours > 0) {\n if (diffInHours == 1) return Long.toString(diffInHours) + \" hour ago\";\n return Long.toString(diffInHours) + \" hours ago\";\n }\n\n else if (diffInMinutes > 0) {\n if (diffInMinutes == 1) return Long.toString(diffInMinutes) + \" minute ago\";\n return Long.toString(diffInMinutes) + \" minutes ago\";\n }\n\n else return \"Just now\";\n }", "float getEstimatedTime() {\n return estimated_time;\n }", "TimeUnit getUnit();", "public String getEstimatedTime() {\n return estimatedTime;\n }", "public int getDuration( ) {\nreturn numberOfPayments / MONTHS;\n}", "public long elapsedTime(TimeUnit desiredUnit) {\n/* 153 */ return desiredUnit.convert(elapsedNanos(), TimeUnit.NANOSECONDS);\n/* */ }", "long getTotalDoExamTime();", "long getSince();", "public int getTT()\n {\n return toTime;\n }", "public static String getAmountOfTime(Date time) {\r\n if (time == null) {\r\n return \"\";\r\n }\r\n\r\n String agoString;\r\n Date now = new Date();\r\n long diffMilli = now.getTime() - time.getTime();\r\n\r\n long diffSecs = diffMilli / NUM_MILLI;\r\n if (diffSecs == 1) {\r\n agoString = diffSecs + \" second\";\r\n } else if (diffSecs < NUM_SECS) {\r\n agoString = diffSecs + \" seconds\";\r\n } else {\r\n long diffMins = diffSecs / NUM_SECS;\r\n if (diffMins == 1) {\r\n agoString = diffMins + \" minute\";\r\n } else if (diffMins < NUM_MINS) {\r\n agoString = diffMins + \" minutes\";\r\n } else {\r\n long diffHours = diffMins / NUM_MINS;\r\n if (diffHours == 1) {\r\n agoString = diffHours + \" hour\";\r\n } else if (diffHours < NUM_HOURS) {\r\n agoString = diffHours + \" hours\";\r\n } else {\r\n long diffDays = diffHours / NUM_HOURS;\r\n if (diffDays == 1) {\r\n agoString = diffDays + \" day\";\r\n } else if (diffDays < NUM_DAYS) {\r\n agoString = diffDays + \" days\";\r\n } else {\r\n long diffWeeks = diffDays / NUM_DAYS;\r\n if (diffWeeks == 1) {\r\n agoString = diffWeeks + \" week\";\r\n } else {\r\n agoString = diffWeeks + \" weeks\";\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n return agoString;\r\n }", "public int getExtraTimeGiven()\r\n {\r\n return extraTimeGiven;\r\n }", "public String getElapsedTime() {\n /**\n * Joda instruction credit to BalusC @ stackoverflow.com\n * http://stackoverflow.com/posts/2179831/revisions\n */\n Period delta = new Period(getOccurrenceTime(), DateTime.now());\n return\n // 1+ weeks\n (delta.getWeeks() >= 1) ? delta.getWeeks()+\"w\" :\n // 1+ days\n (delta.getDays() >= 1) ? delta.getDays()+\"d\" :\n // 1+ hours\n (delta.getHours() >= 1) ? delta.getHours()+\"h\" :\n // 1+ minutes\n (delta.getMinutes() >= 1) ? delta.getMinutes()+\"m\" :\n // 1+ seconds\n delta.getSeconds()+\"s\";\n }", "@Test\n public void getAmountDescription_current_durationGoal() {\n Goal goal = new Goal(2, 49, GoalType.Walk, \"2018-09-28\", \"2017-01-12\",\n \"PT2H47M\");\n // Create the real and expected currentAmount descriptions\n description = goal.getAmountDescription(\"current\");\n expectedDescription = \"1 hour and 22 minutes\";\n\n // Check the 2 Strings are the same\n assertEquals(expectedDescription, description);\n }", "public static String getTimeDuration(Date _DateTime, String _DefaultFormat, boolean isSingleUnit) {\n\n boolean oneUnitPicked = false;\n\n //TimeZone Offset\n Calendar rightNow = Calendar.getInstance();\n long offset = 0;//rightNow.get(Calendar.ZONE_OFFSET) +rightNow.get(Calendar.DST_OFFSET);\n\n long currTimeStamp = System.currentTimeMillis() - offset;\n\n long duration = currTimeStamp - _DateTime.getTime();\n\n StringBuffer res = new StringBuffer();\n long temp = 0;\n if ((duration) >= NOW && duration < (ONE_DAY * 6)) {\n temp = duration / ONE_DAY;\n if (temp > 0) {\n duration -= temp * ONE_DAY;\n res.append(temp).append(\" day\").append(temp > 1 ? \"s\" : \"\");\n res.append((duration >= ONE_MINUTE && !isSingleUnit) ? \", \" : \"\");\n oneUnitPicked = isSingleUnit ? true : false;\n }\n\n temp = duration / ONE_HOUR;\n if (temp > 0 && !oneUnitPicked) {\n duration -= temp * ONE_HOUR;\n res.append(temp).append(\" hour\").append(temp > 1 ? \"s\" : \"\");\n res.append((duration >= ONE_MINUTE && !isSingleUnit) ? \", \" : \"\");\n oneUnitPicked = isSingleUnit ? true : false;\n }\n\n temp = duration / ONE_MINUTE;\n if (temp > 0 && !oneUnitPicked) {\n duration -= temp * ONE_MINUTE;\n res.append(temp).append(\" minute\").append(temp > 1 ? \"s\" : \"\");\n res.append((duration >= ONE_SECOND && !isSingleUnit) ? \" and \" : \"\");\n oneUnitPicked = isSingleUnit ? true : false;\n }\n\n temp = duration / ONE_SECOND;\n if (temp > 0 && !oneUnitPicked) {\n res.append(temp).append(\" second\").append(temp > 1 ? \"s\" : \"\");\n } else if (temp == 0 && !oneUnitPicked) {\n res.append(\"a moment\");\n }\n res.append(\" ago\");\n return res.toString();\n } else {\n //Ahead of time\n res.append(getFormattedDate(_DateTime, _DefaultFormat));\n return res.toString();\n }\n }", "java.lang.String getEmploymentDurationText();", "public double getSecs( );", "private String getTimingt(Long pastvalue) {\n DateTime zulu = DateTime.now(DateTimeZone.UTC);\n // DateTimeFormatter formatter = DateTimeFormat.forPattern(\"HH:mm:ss am\");\n Date date = new Date(pastvalue);\n// formattter\n SimpleDateFormat formatter= new SimpleDateFormat(\"hh:mm a\");\n formatter.setTimeZone(TimeZone.getDefault());\n// Pass date object\n return formatter.format(date );\n /*\n long mint = TimeUnit.MILLISECONDS.toMinutes(zulu.toInstant().getMillis() - pastvalue);\n\n if (mint < 60) {\n if (mint > 1)\n return \"Hace \" + mint + \" minutos\";\n else\n return \"Hace \" + mint + \" minuto\";\n } else {\n long horas = TimeUnit.MILLISECONDS.toHours(zulu.toDate().getTime() - pastvalue);\n\n if (horas < 24) {\n if (horas > 1)\n return \"Hace \" + horas + \" horas\";\n else\n return \"Hace \" + horas + \" hora\";\n } else {\n long dias = TimeUnit.MILLISECONDS.toDays(zulu.toDate().getTime() - pastvalue);\n\n if (dias > 1) {\n return \"Hace \" + dias + \" dias\";\n } else\n return \"Hace \" + dias + \" dia\";\n }\n\n\n }*/\n }", "protected String currentElapsedTimeExp(RomanticTransaction tx) {\n return tx.currentElapsedTimeExp();\n }", "@Override\n public double explorationTime(){\n return timespent;\n }", "String getUnit();", "long getDuration(TimeUnit timeUnit);", "@Test\n public void getAmountDescription_total_durationGoal() {\n Goal goal = new Goal(2, 49, GoalType.Walk, \"2018-09-28\", \"2017-01-12\",\n \"PT2H47M\");\n // Create the real and expected total amount descriptions\n description = goal.getAmountDescription(\"total\");\n expectedDescription = \"2 hours and 47 minutes\";\n\n // Check the 2 Strings are the same\n assertEquals(expectedDescription, description);\n }", "int getEvalTm();", "@Test public void Ago()\t\t\t\t\t\t\t\t\t\t{tst_date_(\"1 month ago\"\t\t\t, \"2012-01-27\");}", "public int getTotalTime();", "int getEmploymentDurationInMonths();", "public ucar.nc2.units.DateUnit getTimeUnits();", "public long getEstimatedTimeAtNextMark() {\n return estimatedTimeAtNextMark;\n }", "Double getActualDuration();", "Double getRemainingTime();", "public double calcTuition(){\r\n return getNumCredits() * COST_PER_CREDIT_HOUR;\r\n }", "public String getUnit();", "public String getTotalTime() {\r\n if (recipe != null) {\r\n return readableTime(recipe.getCookTime() + recipe.getPrepTime());\r\n } else {\r\n return \"\";\r\n }\r\n }", "public String getEstimate() {\n\t\treturn estimate;\n\t}", "TimeSpent createTimeSpent();", "public Double getBestTime() {\n return bestTime;\n }", "ShipmentTimeEstimate createShipmentTimeEstimate();", "@Basic\n\tpublic double getTimeInMagma(){\n\t\treturn this.time_in_magma;\n\t}", "com.google.protobuf.Duration getMinExperience();", "public int getTimeToComplete() {\n // one level is ten minutes long\n int totalTime = numberOfLevels * 10;\n if (is3D) {\n // if it's 3d then it take twice as long because its harder\n totalTime = totalTime * 2;\n }\n \n return totalTime;\n }", "double getFullTime();", "hr.client.appuser.CouponCenter.TimeRange getUseTime();", "hr.client.appuser.CouponCenter.TimeRange getUseTime();", "int getTau();", "public long method_1950(TimeUnit var1) {\n return var1.convert(System.nanoTime() - this.field_1249, TimeUnit.NANOSECONDS);\n }", "public void getSecsDetail( );", "protected EditorLanguage timeDiff(String varStart, String varEnd)\n\t{\n\t\treturn text('(').text(varEnd).text(\" - \").text(varStart).text(\") / 1000.0\");\n\t}", "public int getSkillRechargeTime(Skills currentSkill);", "public double gettimetoAchieve(){\n\t\treturn this.timeFrame;\n\t}", "public double getMonthlyAmount()\n\t{\n\t\treturn amountGoal%timeFrame;\n\t}", "public long getTotalTime() {\n/* 73 */ return this.totalTime;\n/* */ }", "TimeUnit getTimeUnit() {\n return timeUnit;\n }", "java.lang.String getDepartureTime();", "java.lang.String getDepartureTime();", "double getMonthTask(){\n\t\treturn this.monthTax = (super.getAvailableMoney()+(super.getAvailableMoney()*super.getYearInterest()))/this.period;\n\t}", "BigInteger getResponse_time();", "double getTime();", "String getUnits();", "String getUnits();", "String getUnits();", "public Long getTimeLapsed() {\r\n\t\tif(moodTimestamp == null) \r\n\t\t\treturn null;\r\n\t\telse \r\n\t\t\treturn ((System.currentTimeMillis()/1000) - moodTimestamp.longValue());\r\n\t}", "private String getFinalTimeString() {\n double fltTime = (double)(lngTimelineDataAmountInRmsFrames * fltRmsFramePeriodInMs)/1000.0f;\n return new DecimalFormat(\"000.00\").format(fltTime);\n }", "public double getTime();", "@Test\n public void getAmountDescription_current_distanceGoal_meterDistance() {\n Goal goal = new Goal(2, 49.5, GoalType.Walk, \"2018-09-28\", \"2017-01-12\",\n 0.5);\n // Create the real and expected currentAmount descriptions\n description = goal.getAmountDescription(\"current\");\n expectedDescription = \"248 m\";\n\n // Check the 2 Strings are the same\n assertEquals(expectedDescription, description);\n }", "long getElapsedTime();", "public String getAverageVenueTime()\n\t{\n\t\t// TODO: 4/12/2017 fix this method to work properly\n\t\t//to get the GUI to run, this must be commented out 4/12/17 9:20pm\n\t\t//sum=storeTick-person.getTickTime()+sum;\n\t\t//average=sum/completed;\n\t\treturn Integer.toString(average);\n\t}", "public Unit<Time> second() {return second;}", "@Override\n public Duration getSetupTime(ISPObservation obs) {\n return Duration.ofMinutes(20);\n }", "@Override\r\n\tpublic double getTMB() {\r\n\t\tif (isAdultoJovem()) {\r\n\t\t\treturn 15.3 * anamnese.getPesoUsual() + 679;\r\n\t\t}\r\n\t\tif (isAdulto()) {\r\n\t\t\treturn 11.6 * anamnese.getPesoUsual() + 879;\r\n\t\t}\r\n\t\tif (isIdoso()) {\r\n\t\t\treturn 13.5 * anamnese.getPesoUsual() + 487;\r\n\t\t}\r\n\t\treturn 0;\r\n\t}", "public long getTimeDisplay(long nowm) {\n checkRunningExpired(nowm); // Pour éviter le cas (nowm - timeStart) > timeDef, cad nowm > timeExp, pour un timer\n long tacc = timeAcc;\n if (running) {\n tacc = tacc + nowm - timeStart;\n }\n long taus = timeAccUntilSplit;\n if (mode.equals(MODES.TIMER)) {\n tacc = -tacc;\n taus = -taus;\n }\n return (timeDef + (splitted ? taus : tacc)) % TIME_UNITS.DAY.DURATION_MS(); // => Retour à 00:00:00.00 après 23:59:59.99\n }", "T getEventTime();", "public long getTimeTaken();", "public String getUnit()\n {\n return (this.unit);\n }", "double getPeriod();", "public double getElapsedTime()\n\t{\n\t\tdouble elapsedTime = 0. ;\n\t\tEnumeration<SpItem> children = children() ;\n\t\tSpItem child = null ;\n\n\t\twhile( children.hasMoreElements() )\n\t\t{\n\t\t\tchild = children.nextElement() ;\n\t\t\tif( child instanceof SpObs && (( SpObs )child).isOptional() )\n\t\t\t\t\telapsedTime += ( ( SpObs )child ).getElapsedTime() ;\n\t\t\telse if( child instanceof SpMSB )\n\t\t\t\telapsedTime += (( SpMSB )child).getElapsedTime() ;\n\t\t}\n\n\t\tint totRemaining = 0 ;\n\t\tfor( int i = 0 ; i < size() ; i++ )\n\t\t\ttotRemaining += getRemaining( i ) ;\n\n\t\telapsedTime *= totRemaining ;\n\t\treturn elapsedTime ;\n\t}", "@Test public void shouldGive120MinFor350cent() {\r\n // Two hours: $1.5+2.0\r\n assertEquals( 2 * 60 /*minutes*/ , rs.calculateTime(350) ); \r\n }", "@Test()\n public void testGetBiggestPerMonthWithYearly() {\n\tYearMonth yearMonth = YearMonth.of(2015, 8);\n\tList<Expense> list = expenseManager.getBiggestPerMonth(yearMonth);\n\tassertEquals(\"vacation\", list.get(0).getName());\n }", "public String getRelativeTimeAgo() {\n\n String twitterFormat = \"EEE MMM dd HH:mm:ss ZZZZZ yyyy\";\n SimpleDateFormat sf = new SimpleDateFormat(twitterFormat, Locale.ENGLISH);\n sf.setLenient(true);\n\n String relativeDate = \"\";\n try {\n long dateMillis = sf.parse(created_at).getTime();\n relativeDate = DateUtils.getRelativeTimeSpanString(dateMillis,\n System.currentTimeMillis(), DateUtils.SECOND_IN_MILLIS).toString();\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n return relativeDate;\n }", "Duration getRemainingTime();", "Expression getReaction_time_parm();", "public TimeStep getTimeStep() {\n\t\t// Only here to ensure it is being used correctly.\n\t\t// cbit.util.Assertion.assertNotNull(fieldTimeStep);\n\t\treturn fieldTimeStep;\n\t}", "double getRelativeTime() {\n return relativeTime;\n }", "Unit getUnit();", "Units getUnits();", "public int getET()\n {\n return exTime;\n }", "public double showHarvestTime(){\r\n\t\tSystem.out.println(\"The average harvest time is \" + averageHarvestTime + \" \" + timeUnit);\r\n\t\treturn averageHarvestTime;}", "long getInhabitedTime();", "public double getTimeYgFullGcs() {\n return timeYgFullGcs;\n }", "public long getTimeElapsed() {\r\n\t long now = new Date().getTime();\r\n\t long timePassedSinceLastUpdate = now - this.updatedSimTimeAt;\r\n\t return this.pTrialTime + timePassedSinceLastUpdate;\r\n\t}", "public String getTimeUnit()\n\t{\n\t\treturn timeUnit;\n\t}", "public TimeUnit\tgetAccumulateTimeUnit(){\n\t\treturn this.accumulateTimeUnit;\n\t}", "public double getTime() { return time; }", "public int getTimeTaken() {\n return this.getTreeNode().getBuilding().getTotalTimeTaken();\n }", "public java.lang.String getExpenseTotalTime () {\n\t\treturn expenseTotalTime;\n\t}", "String getUnitsString();", "public long getElapsedTimeMili() {\n return running ? ((System.currentTimeMillis() - startTime)/100) % 1000 : 0;\n }", "Integer getTHunYear();" ]
[ "0.6331769", "0.6147215", "0.6046739", "0.5982659", "0.59412336", "0.5865201", "0.5825151", "0.57316774", "0.5675098", "0.5639834", "0.5610094", "0.55583", "0.55466133", "0.55399483", "0.5538149", "0.55287856", "0.5488365", "0.547032", "0.5468832", "0.5467253", "0.54582256", "0.54312277", "0.542856", "0.53863436", "0.5384019", "0.5371433", "0.53666323", "0.5340745", "0.53052753", "0.5301679", "0.52992964", "0.52455515", "0.52401346", "0.52227825", "0.520274", "0.5197005", "0.51881605", "0.5184996", "0.51823425", "0.5176819", "0.5171334", "0.51689404", "0.51642436", "0.5155369", "0.5152071", "0.5152071", "0.51473665", "0.5137465", "0.51308596", "0.51172465", "0.51156735", "0.5108448", "0.5106222", "0.5081703", "0.50717795", "0.50715464", "0.50715464", "0.5067085", "0.5066392", "0.5063438", "0.506117", "0.506117", "0.506117", "0.5055365", "0.5052512", "0.50502944", "0.50480044", "0.5046725", "0.5045487", "0.50431424", "0.5028645", "0.50161123", "0.5015045", "0.5004987", "0.50040066", "0.49988782", "0.4988758", "0.49859288", "0.49845114", "0.49840766", "0.4977494", "0.49713263", "0.49702138", "0.49638903", "0.49543417", "0.4951341", "0.4947661", "0.4943287", "0.4941154", "0.49390572", "0.4937791", "0.49342853", "0.49291122", "0.49275416", "0.49251378", "0.49242443", "0.49237412", "0.49230582", "0.4922625", "0.49208543" ]
0.61267465
2
Get e.g: 3 days, 10 hours, 1 minute and 4 seconds ago OR date in given format
public static String getTimeDuration(Date _DateTime, String _DefaultFormat, boolean isSingleUnit) { boolean oneUnitPicked = false; //TimeZone Offset Calendar rightNow = Calendar.getInstance(); long offset = 0;//rightNow.get(Calendar.ZONE_OFFSET) +rightNow.get(Calendar.DST_OFFSET); long currTimeStamp = System.currentTimeMillis() - offset; long duration = currTimeStamp - _DateTime.getTime(); StringBuffer res = new StringBuffer(); long temp = 0; if ((duration) >= NOW && duration < (ONE_DAY * 6)) { temp = duration / ONE_DAY; if (temp > 0) { duration -= temp * ONE_DAY; res.append(temp).append(" day").append(temp > 1 ? "s" : ""); res.append((duration >= ONE_MINUTE && !isSingleUnit) ? ", " : ""); oneUnitPicked = isSingleUnit ? true : false; } temp = duration / ONE_HOUR; if (temp > 0 && !oneUnitPicked) { duration -= temp * ONE_HOUR; res.append(temp).append(" hour").append(temp > 1 ? "s" : ""); res.append((duration >= ONE_MINUTE && !isSingleUnit) ? ", " : ""); oneUnitPicked = isSingleUnit ? true : false; } temp = duration / ONE_MINUTE; if (temp > 0 && !oneUnitPicked) { duration -= temp * ONE_MINUTE; res.append(temp).append(" minute").append(temp > 1 ? "s" : ""); res.append((duration >= ONE_SECOND && !isSingleUnit) ? " and " : ""); oneUnitPicked = isSingleUnit ? true : false; } temp = duration / ONE_SECOND; if (temp > 0 && !oneUnitPicked) { res.append(temp).append(" second").append(temp > 1 ? "s" : ""); } else if (temp == 0 && !oneUnitPicked) { res.append("a moment"); } res.append(" ago"); return res.toString(); } else { //Ahead of time res.append(getFormattedDate(_DateTime, _DefaultFormat)); return res.toString(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String getElapsedTimeFromNow(Date date) {\n long duration = new Date().getTime() - date.getTime();\n\n long diffInMinutes = TimeUnit.MILLISECONDS.toMinutes(duration);\n long diffInHours = TimeUnit.MILLISECONDS.toHours(duration);\n long diffInDays = TimeUnit.MILLISECONDS.toDays(duration);\n long diffInMonths = diffInDays / 30;\n long diffInYears = diffInMonths / 365;\n\n if (diffInYears > 0) {\n if (diffInYears == 1) return Long.toString(diffInYears) + \" year ago\";\n return Long.toString(diffInYears) + \" years ago\";\n }\n\n else if (diffInMonths > 0) {\n if (diffInMonths == 1) return Long.toString(diffInMonths) + \" month ago\";\n return Long.toString(diffInMonths) + \" months ago\";\n }\n\n else if (diffInDays > 0) {\n if (diffInDays == 1) return Long.toString(diffInDays) + \" day ago\";\n return Long.toString(diffInDays) + \" days ago\";\n }\n\n else if (diffInHours > 0) {\n if (diffInHours == 1) return Long.toString(diffInHours) + \" hour ago\";\n return Long.toString(diffInHours) + \" hours ago\";\n }\n\n else if (diffInMinutes > 0) {\n if (diffInMinutes == 1) return Long.toString(diffInMinutes) + \" minute ago\";\n return Long.toString(diffInMinutes) + \" minutes ago\";\n }\n\n else return \"Just now\";\n }", "public String getRelativeTimeAgo() {\n\n String twitterFormat = \"EEE MMM dd HH:mm:ss ZZZZZ yyyy\";\n SimpleDateFormat sf = new SimpleDateFormat(twitterFormat, Locale.ENGLISH);\n sf.setLenient(true);\n\n String relativeDate = \"\";\n try {\n long dateMillis = sf.parse(created_at).getTime();\n relativeDate = DateUtils.getRelativeTimeSpanString(dateMillis,\n System.currentTimeMillis(), DateUtils.SECOND_IN_MILLIS).toString();\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n return relativeDate;\n }", "public static String getAmountOfTime(Date time) {\r\n if (time == null) {\r\n return \"\";\r\n }\r\n\r\n String agoString;\r\n Date now = new Date();\r\n long diffMilli = now.getTime() - time.getTime();\r\n\r\n long diffSecs = diffMilli / NUM_MILLI;\r\n if (diffSecs == 1) {\r\n agoString = diffSecs + \" second\";\r\n } else if (diffSecs < NUM_SECS) {\r\n agoString = diffSecs + \" seconds\";\r\n } else {\r\n long diffMins = diffSecs / NUM_SECS;\r\n if (diffMins == 1) {\r\n agoString = diffMins + \" minute\";\r\n } else if (diffMins < NUM_MINS) {\r\n agoString = diffMins + \" minutes\";\r\n } else {\r\n long diffHours = diffMins / NUM_MINS;\r\n if (diffHours == 1) {\r\n agoString = diffHours + \" hour\";\r\n } else if (diffHours < NUM_HOURS) {\r\n agoString = diffHours + \" hours\";\r\n } else {\r\n long diffDays = diffHours / NUM_HOURS;\r\n if (diffDays == 1) {\r\n agoString = diffDays + \" day\";\r\n } else if (diffDays < NUM_DAYS) {\r\n agoString = diffDays + \" days\";\r\n } else {\r\n long diffWeeks = diffDays / NUM_DAYS;\r\n if (diffWeeks == 1) {\r\n agoString = diffWeeks + \" week\";\r\n } else {\r\n agoString = diffWeeks + \" weeks\";\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n return agoString;\r\n }", "public String far(Date date){\n Date d2 = new Date();\n// 两个日期相减\n long cha = d2.getTime() - date.getTime();\n// 拆分天数,小时,分钟\n long day = cha / (24 * 60 * 60 * 1000);\n long hour = (cha / (60 * 60 * 1000) - day * 24);\n long min = ((cha / (60 * 1000)) - day * 24 * 60 - hour * 60);\n String time = \"出错\";\n int a = 0;\n //显示天\n if (day > 0) {\n a = (int) day;\n time = a + \"天前\";\n } else if (day == 0) {\n// 显示小时\n if (hour > 0) {\n a = (int) hour;\n time = a + \"小时前\";\n }\n //显示分钟\n else if (hour == 0) {\n if (min > 0) {\n a = (int) min;\n time = a + \"分钟前\";\n }\n if(min==0){\n time = \"1分钟前\";\n }\n }\n }\n return time;\n }", "public String getCreatedAtString() {\n String createdAt = \"\";\n\n // get the time in millis for the created at\n long createdDate = getCreatedAt().getTime();\n\n // get the time in millis for now\n long currentDate = new Date().getTime();\n\n int secondsBetween = (int) TimeUtils.getTimeSpan(createdDate, currentDate, TimeConstants.SEC);\n\n // get the number of minutes in between\n int minutesBetween = (int) TimeUtils.getTimeSpan(createdDate, currentDate, TimeConstants.MIN);\n\n // get the number of hours in between\n int hoursBetween = (int) TimeUtils.getTimeSpan(createdDate, currentDate, TimeConstants.HOUR);\n\n // if less than 1 minute ago return \"minutes ago\n if (secondsBetween < 60) {\n createdAt = DateUtils.getRelativeTimeSpanString(createdDate, currentDate, DateUtils.SECOND_IN_MILLIS).toString();\n }\n\n // if less than 1 hour ago return \"minutes ago\n if (minutesBetween >= 1 && minutesBetween < 60) {\n createdAt = DateUtils.getRelativeTimeSpanString(createdDate, currentDate, DateUtils.MINUTE_IN_MILLIS).toString();\n }\n\n // if less than 24 hours ago or greater than 1 return \"hours ago\"\n if (hoursBetween >= 1 && hoursBetween < 24) {\n createdAt = DateUtils.getRelativeTimeSpanString(createdDate, currentDate, DateUtils.HOUR_IN_MILLIS).toString();\n }\n\n // if more than 24 hours ago return \"days ago\"\n if (hoursBetween >= 24) {\n createdAt = DateUtils.getRelativeTimeSpanString(createdDate, currentDate, DateUtils.DAY_IN_MILLIS).toString();\n }\n\n return createdAt;\n }", "public static String timeAgo(Context c, long dateStar, long dateEnd) {\n\n Period p = new Period(dateStar, dateEnd);\n //Log.d(tag, \" periodDefault ---> \" + PeriodFormat.getDefault().print(p));\n\n if (p.getYears() != 0) {\n if (p.getYears() == 1) {\n return p.getYears() + \" \" + c.getString(R.string.date_year)\n + \" \" + c.getString(R.string.date_suffix_ago);\n } else {\n return p.getYears() + \" \" + c.getString(R.string.date_years)\n + \" \" + c.getString(R.string.date_suffix_ago);\n }\n }\n\n if (p.getMonths() != 0) {\n if (p.getMonths() == 1) {\n return p.getMonths() + \" \" + c.getString(R.string.date_month)\n + \" \" + c.getString(R.string.date_suffix_ago);\n } else {\n return p.getMonths() + \" \" + c.getString(R.string.date_months)\n + \" \" + c.getString(R.string.date_suffix_ago);\n }\n }\n\n if (p.getWeeks() != 0) {\n if (p.getWeeks() == 1) {\n return p.getWeeks() + \" \" + c.getString(R.string.date_week)\n + \" \" + c.getString(R.string.date_suffix_ago);\n } else {\n return p.getWeeks() + \" \" + c.getString(R.string.date_week)\n + \" \" + c.getString(R.string.date_suffix_ago);\n }\n }\n\n if (p.getDays() != 0) {\n if (p.getDays() == 1) {\n return p.getDays() + \" \" + c.getString(R.string.date_day)\n + \" \" + c.getString(R.string.date_suffix_ago);\n } else {\n return p.getDays() + \" \" + c.getString(R.string.date_days)\n + \" \" + c.getString(R.string.date_suffix_ago);\n }\n }\n\n if (p.getHours() != 0) {\n if (p.getHours() == 1) {\n return p.getHours() + \" \" + c.getString(R.string.date_hour)\n + \" \" + c.getString(R.string.date_suffix_ago);\n } else {\n return p.getHours() + \" \" + c.getString(R.string.date_hours)\n + \" \" + c.getString(R.string.date_suffix_ago);\n }\n }\n\n if (p.getMinutes() != 0) {\n if (p.getMinutes() == 1) {\n return p.getMinutes() + \" \" + c.getString(R.string.date_minute)\n + \" \" + c.getString(R.string.date_suffix_ago);\n } else {\n return p.getMinutes() + \" \" + c.getString(R.string.date_minutes)\n + \" \" + c.getString(R.string.date_suffix_ago);\n }\n }\n\n if (p.getMinutes() != 0) {\n if (p.getSeconds() <= 1) {\n return c.getString(R.string.date_just_now);\n } else {\n return p.getSeconds() + \" \" + c.getString(R.string.date_seconds)\n + \" \" + c.getString(R.string.date_suffix_ago);\n }\n }\n\n Calendar calendar = Calendar.getInstance();\n Calendar.getInstance().setTimeInMillis(dateStar);\n return Commons.dateToString(calendar.getTime(), c);\n }", "private String getTimingt(Long pastvalue) {\n DateTime zulu = DateTime.now(DateTimeZone.UTC);\n // DateTimeFormatter formatter = DateTimeFormat.forPattern(\"HH:mm:ss am\");\n Date date = new Date(pastvalue);\n// formattter\n SimpleDateFormat formatter= new SimpleDateFormat(\"hh:mm a\");\n formatter.setTimeZone(TimeZone.getDefault());\n// Pass date object\n return formatter.format(date );\n /*\n long mint = TimeUnit.MILLISECONDS.toMinutes(zulu.toInstant().getMillis() - pastvalue);\n\n if (mint < 60) {\n if (mint > 1)\n return \"Hace \" + mint + \" minutos\";\n else\n return \"Hace \" + mint + \" minuto\";\n } else {\n long horas = TimeUnit.MILLISECONDS.toHours(zulu.toDate().getTime() - pastvalue);\n\n if (horas < 24) {\n if (horas > 1)\n return \"Hace \" + horas + \" horas\";\n else\n return \"Hace \" + horas + \" hora\";\n } else {\n long dias = TimeUnit.MILLISECONDS.toDays(zulu.toDate().getTime() - pastvalue);\n\n if (dias > 1) {\n return \"Hace \" + dias + \" dias\";\n } else\n return \"Hace \" + dias + \" dia\";\n }\n\n\n }*/\n }", "public static String getLastUpdateString(Date time) {\r\n if (time == null) {\r\n return \"\";\r\n }\r\n return getAmountOfTime(time) + \" ago\";\r\n }", "public static String timeCalc(String createdAt){\n String relativeDate = Utility.relativeTime(createdAt);\n String d = Utility.formatDate(createdAt);\n return d;\n\n }", "private String timeToAgo(Long timestamp){\n\n\n Calendar cal = Calendar.getInstance(TimeZone.getTimeZone(\"GMT\"));\n Log.d(TAG, \"timeToAgo:TimeZone :\"+TimeZone.getTimeZone(\"GMT\"));\n long time = cal.getTimeInMillis();\n Log.d(TAG, \"timeToAgo: time with cal : \"+time);\n long curTime = System.currentTimeMillis() / 1000 + 32400;\n Log.d(TAG, \"timeToAgo: curTime : \" + curTime);\n long diffTime = (curTime - timestamp); //1000으로 나눠주는 이유는 millisecond가 아닌 second만 신경을 써줄 것이므로\n Log.d(TAG, \"timeToAgo: diffTime \" + diffTime);\n long hour =diffTime/3600;\n Log.d(TAG, \"timeToAgo: hour \"+ hour);\n Log.d(TAG, \"timeToAgo: timestamp : \"+timestamp);\n diffTime =diffTime%3600;\n long min = diffTime/60;\n long sec = diffTime%60;\n\n String ret = \"\";\n\n\n if(hour > 24){\n ret = new SimpleDateFormat(\"MM/dd\").format(new Date(timestamp));\n\n if (hour>8760){\n ret = new SimpleDateFormat(\"MM/dd/yyyy\").format(new Date(timestamp));\n }\n }\n else if(hour > 0){\n ret = hour+\" hours ago\";\n }\n else if(min > 0){\n ret = min+\" mins ago\";\n }\n else if(sec > 0){\n ret = \"just now!\";\n }\n else{\n ret = new SimpleDateFormat(\"MM/dd\").format(new Date(timestamp));\n }\n\n return ret;\n }", "public static String humanReadableDate(Clock clock, LocalDateTime dateTime) {\n final int MINUTE = 60;\n final int TWOMINUTES = 2 * 60;\n final int HOUR = 60 * 60;\n final int TWOHOURS = 2 *60 *60;\n final int DAY = 24 * 60 * 60;\n final int TWODAYS = 2 * 24 * 60 * 60;\n\n final long timeElapsed = dateTime.until(LocalDateTime.now(clock), ChronoUnit.SECONDS);\n\n if (timeElapsed >= TWODAYS) {\n return timeElapsed / DAY + \" days ago\";\n }\n if (timeElapsed >= DAY) {\n return \"1 day ago\";\n }\n if (timeElapsed >= TWOHOURS) {\n return timeElapsed / HOUR + \" hours ago\";\n }\n if (timeElapsed >= HOUR) {\n return \"1 hour ago\";\n }\n if (timeElapsed >= TWOMINUTES) {\n return timeElapsed / MINUTE + \" minutes ago\";\n }\n if (timeElapsed >= MINUTE) {\n return \"1 minute ago\";\n }\n if (timeElapsed >= 2) {\n return timeElapsed + \" seconds ago\";\n }\n if (timeElapsed > 0) {\n return \"1 second ago\";\n }\n return \"just now\";\n }", "public static String getRelativeTimeAgo(String rawJsonDate) {\n String twitterFormat = \"EEE MMM dd HH:mm:ss ZZZZZ yyyy\";\n SimpleDateFormat sf = new SimpleDateFormat(twitterFormat, Locale.ENGLISH);\n sf.setLenient(true);\n\n String relativeDate = \"\";\n try {\n long dateMillis = sf.parse(rawJsonDate).getTime();\n relativeDate = DateUtils.getRelativeTimeSpanString(dateMillis,\n System.currentTimeMillis(), DateUtils.SECOND_IN_MILLIS, DateUtils.FORMAT_ABBREV_ALL).toString();\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n return relativeDate;\n }", "long getSince();", "public static String getDisplayDatePrevious(Date val) {\n\t\t\n\t\t\n\n\t\tif (val != null) {\n\t\t\tDate previous = DateUtils.addDays(val, -1);\n\t\t\tSimpleDateFormat format = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\t\treturn format.format(previous);\n\n\t\t} else {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t}", "public String getRelativeTimeAgo(String rawJsonDate) {\n String twitterFormat = \"EEE MMM dd HH:mm:ss ZZZZZ yyyy\";\n SimpleDateFormat sf = new SimpleDateFormat(twitterFormat, Locale.ENGLISH);\n sf.setLenient(true);\n\n String relativeDate = \"\";\n try {\n long dateMillis = sf.parse(rawJsonDate).getTime();\n relativeDate = DateUtils.getRelativeTimeSpanString(dateMillis,\n System.currentTimeMillis(), DateUtils.SECOND_IN_MILLIS, DateUtils.FORMAT_ABBREV_RELATIVE).toString();\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n return relativeDate;\n }", "@Test public void Ago()\t\t\t\t\t\t\t\t\t\t{tst_date_(\"1 month ago\"\t\t\t, \"2012-01-27\");}", "public static String calcualte_timeDifference(String datetobeFormatted) {\n\n int days = 0,hours = 0,minutes = 0,seconds = 0,weeks=0;\n try {\n Calendar c = Calendar.getInstance();\n SimpleDateFormat df_current = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n String formattedDate = df_current.format(c.getTime());\n Date date_current = df_current.parse(formattedDate);\n\n SimpleDateFormat df = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n Date date = df.parse(datetobeFormatted);\n\n\n DateTime dt1 = new DateTime(date);\n DateTime dt2 = new DateTime(date_current);\n\n days = Days.daysBetween(dt1, dt2).getDays();\n hours = Hours.hoursBetween(dt1, dt2).getHours() % 24;\n minutes = Minutes.minutesBetween(dt1, dt2).getMinutes() % 60;\n seconds = Seconds.secondsBetween(dt1, dt2).getSeconds() % 60;\n weeks = Weeks.weeksBetween(dt1, dt2).getWeeks();\n\n\n Log.i(\"Date \",datetobeFormatted);\n Log.i(\"Days \",(Days.daysBetween(dt1, dt2).getDays() + \" days, \"));\n //Log.i(\"Days \",Hours.hoursBetween(dt1, dt2).getHours() % 24 + \" hours, \");\n //Log.i(\"Days \",Minutes.minutesBetween(dt1, dt2).getMinutes() % 60 + \" minutes, \");\n\n\n\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if(weeks>1)\n {\n return weeks+\"w\";\n }else\n {\n return days+\"d\";\n }\n /* else if(hours>1 && days<1)\n {\n return hours+\"h\";\n }\n else if(minutes>1 && hours<1)\n {\n return minutes+\"m\";\n }else\n {\n return seconds+\"s\";\n }*/\n }", "private static String timeHandler(String date) {\n SimpleDateFormat dbFormat = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'\");\n SimpleDateFormat dayFormat = new SimpleDateFormat(\"MM-dd\");\n SimpleDateFormat timeFormat = new SimpleDateFormat(\"HH:mm\");\n dbFormat.setTimeZone(TimeZone.getTimeZone(\"UTC\"));\n String today = dayFormat.format(new Date());\n String day = \"\";\n String time = \"\";\n try {\n time = timeFormat.format(dbFormat.parse(date));\n day = dayFormat.format(dbFormat.parse(date));\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if (day.equals(today)) {\n return \"Today \" + time;\n } else if (day.equals(dayFormat.format(yesterday()))) {\n return \"Yesterday \" + time;\n } else {\n return day + \" \" + time;\n }\n }", "DateTime extractDeadline() {\r\n int indexOfBy = Arrays.asList(lowerParams).lastIndexOf(\"by\");\r\n if (indexOfBy < 0) {\r\n return null;\r\n } else {\r\n paramsByIndex = indexOfBy;\r\n }\r\n // get the rest of the params after \"by\"\r\n String[] candidates = Arrays.copyOfRange(lowerParams, indexOfBy + 1,\r\n lowerParams.length);\r\n DateTime parsed = DateUtil.parse(candidates);\r\n if (parsed == null) {\r\n return parsed;\r\n }\r\n\r\n // add time 23:59 to deadline if no time was specified\r\n if (parsed.getHour() == null) {\r\n return initTimeToEndOfDay(parsed);\r\n } else {\r\n return parsed;\r\n }\r\n }", "public String getMyDatePosted() {\n SimpleDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'\", Locale.US);\n try {\n Date date = format.parse(myDatePosted);\n Calendar cal = Calendar.getInstance();\n cal.setTime(date);\n cal.add(Calendar.HOUR, -7);\n Date temp = cal.getTime();\n format.applyPattern(\"MMM dd, yyyy hh:mm a\");\n return format.format(temp);\n } catch (ParseException e) {\n return myDatePosted;\n }\n }", "private CharSequence getTimeDifference(String formattedDate) {\n long currentTime = System.currentTimeMillis();\n long publicationTime = getDateInMillis(formattedDate);\n return DateUtils.getRelativeTimeSpanString(publicationTime, currentTime,\n DateUtils.SECOND_IN_MILLIS);\n }", "public static String converTimeToReadable(long time) {\n // check if its in the last minute:\n long diff = (new Date()).getTime() - time;\n // TimeUnit.MILLISECONDS.toMinutes(diff)\n\n if (diff / 60000 < 1) {\n return \"now\";\n }\n\n // if its more then a minute, then write time\n String str = \"\";\n Date date = new Date(time);\n\n try {\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n Date currentDay = sdf.parse(sdf.format(new Date()));\n Date lastLocationDay = sdf.parse(sdf.format(time));\n long daysDifference = TimeUnit.MILLISECONDS\n .toDays(currentDay.getTime() - lastLocationDay.getTime());\n\n // ispis:\n str += getNameOfTheDay(daysDifference, lastLocationDay);\n\n } catch (ParseException ex) {\n // if something fails, just write the date\n str += new SimpleDateFormat(\"dd.MM.yyyy\").format(date);\n }\n\n /*\n String dayOfTheWeek = (String) DateFormat.format(\"EEEE\", date); // Thursday\n String day = (String) DateFormat.format(\"dd\", date); // 20\n String monthString = (String) DateFormat.format(\"MMM\", date); // Jun\n String monthNumber = (String) DateFormat.format(\"MM\", date); // 06\n String year = (String) DateFormat.format(\"yyyy\", date); // 2013\n */\n\n str += \", \";\n str += new SimpleDateFormat(\"HH:mm\").format(date);\n\n return str;\n }", "private static String getPolltime(String date) {\n\t\tif (date.equals(\"\")) {\r\n\t\t\treturn \"pollTime > date_sub(now(),interval 1 WEEK)\";\r\n\t\t} else if (date.startsWith(\"20\") && date.length() == 10) {\r\n\t\t\treturn \"date(pollTime)='\" + date + \"'\";\r\n\t\t}\r\n\t\treturn \"\";\r\n\r\n\t}", "public static String getEstimatedTimeElapsed(Date _DateTime) {\n\n\n String strJustNow,\n strSecsSingle, strSecsMultiple,\n strMinSingle, strMinMultiple,\n strHourSingle, strHourMultiple,\n strDaySingle, strDayMultiple,\n strDayYesterday, strDayTomorrow,\n strWeekSingle, strWeekMultiple,\n strMonthSingle, strMonthMultiple,\n strYearSingle, strYearMultiple,\n titlePast, titleFuture;\n\n if (!AppConfig.getInstance().isEnglishMode) {\n //Arabic mode\n strJustNow = \"الآن\";\n\n strSecsSingle = \"ثانيا\";\n strSecsMultiple = \"ثواني\";\n\n strMinSingle = \"دقيقة\";\n strMinMultiple = \"الدقائق\";\n\n strHourSingle = \"ساعة\";\n strHourMultiple = \"ساعات\";\n\n strDaySingle = \"يوم\";\n strDayMultiple = \"أيام\";\n strDayYesterday = \"في الامس\";\n strDayTomorrow = \"غدا\";\n\n strWeekSingle = \"أسبوع\";\n strWeekMultiple = \"أسابيع\";\n\n strMonthSingle = \"شهر\";\n strMonthMultiple = \"الشهور\";\n\n strYearSingle = \"سنة\";\n strYearMultiple = \"سنوات\";\n\n titlePast = \" منذ\";\n titleFuture = \" متبق\";\n } else {\n //Default mode\n strJustNow = \"Just now\";\n\n strSecsSingle = \"sec\";\n strSecsMultiple = \"secs\";\n\n strMinSingle = \"min\";\n strMinMultiple = \"mins\";\n\n strHourSingle = \"hr\";\n strHourMultiple = \"hrs\";\n\n strDaySingle = \"day\";\n strDayMultiple = \"days\";\n strDayYesterday = \"Yesterday\";\n strDayTomorrow = \"Tomorrow\";\n\n strWeekSingle = \"week\";\n strWeekMultiple = \"weeks\";\n\n strMonthSingle = \"month\";\n strMonthMultiple = \"months\";\n\n strYearSingle = \"year\";\n strYearMultiple = \"years\";\n\n titlePast = \" ago\";\n titleFuture = \" remaining\";\n }\n\n\n long secsPrevious = _DateTime.getTime() / 1000;\n long secsNow = System.currentTimeMillis() / 1000;\n\n // Calculate difference in milliseconds\n long diff = secsNow - secsPrevious;\n boolean isPastTime = diff > 0;\n\n diff = Math.abs(diff);\n\n // Calculate difference in seconds\n long diffSeconds = diff;\n\n // Calculate difference in minutes\n long diffMinutes = diff / (60);\n\n // Calculate difference in hours\n long diffHours = diff / (60 * 60);\n\n // Calculate difference in days\n long diffDays = diff / (60 * 60 * 24);\n\n // Calculate difference in weeks\n long diffWeeks = diff / (60 * 60 * 24 * 7);\n\n // Calculate difference in months\n long diffMonths = diff / (60 * 60 * 24 * 30);\n\n // Calculate difference in years\n long diffYears = diff / (60 * 60 * 24 * 365);\n\n\n String timeElapsed = \"\";\n\n String tempTitle = isPastTime ? titlePast : titleFuture;\n\n if (diffYears > 0) {\n timeElapsed = AppConfig.getInstance().numberToCurrLang(diffYears + \"\") +\n \" \" + (diffYears > 1 ? strYearMultiple : strYearSingle) + tempTitle;\n } else if (diffMonths > 0) {\n timeElapsed = AppConfig.getInstance().numberToCurrLang(diffMonths + \"\") +\n \" \" + (diffMonths > 1 ? strMonthMultiple : strMonthSingle) + tempTitle;\n } else if (diffWeeks > 0) {\n timeElapsed = AppConfig.getInstance().numberToCurrLang(diffWeeks + \"\") +\n \" \" + (diffWeeks > 1 ? strWeekMultiple : strWeekSingle) + tempTitle;\n } else if (diffDays > 0) {\n if (diffDays == 1) {\n timeElapsed = isPastTime ? strDayYesterday : strDayTomorrow;\n } else {\n timeElapsed = AppConfig.getInstance().numberToCurrLang(diffDays + \"\") +\n \" \" + strDayMultiple + tempTitle;\n }\n } else if (diffHours > 0) {\n timeElapsed = AppConfig.getInstance().numberToCurrLang(diffHours + \"\") +\n \" \" + (diffHours > 1 ? strHourMultiple : strHourSingle) + tempTitle;\n } else if (diffMinutes > 0) {\n timeElapsed = AppConfig.getInstance().numberToCurrLang(diffMinutes + \"\") +\n \" \" + (diffMinutes > 1 ? strMinMultiple : strMinSingle) + tempTitle;\n } else if (diffSeconds > 10) {\n timeElapsed = AppConfig.getInstance().numberToCurrLang(diffSeconds + \"\") +\n \" \" + (diffSeconds > 1 ? strSecsMultiple : strSecsSingle) + tempTitle;\n } else {//diff few Seconds\n timeElapsed = strJustNow;\n }\n\n return timeElapsed;\n\n }", "public String findDeadlineDatetime(String input) {\n assert input.length() > 0;\n return findDatetime(input, \"/by\");\n }", "java.lang.String getDate();", "String getDate();", "String getDate();", "public static String getTimeDiff(long time) {\n long diff ;\n // Date dnow = cal.getTime();\n String str ;\n diff = System.currentTimeMillis() - time;\n \n if (diff > 2592000000L) {// 30 * 24 * 60 * 60 * 1000=2592000000 毫秒\n str = \"1个月前\";\n }\n else if (diff > 1814400000) {// 21 * 24 * 60 * 60 * 1000=1814400000 毫秒\n str = \"3周前\";\n }\n else if (diff > 1209600000) {// 14 * 24 * 60 * 60 * 1000=1209600000 毫秒\n str = \"2周前\";\n }\n else if (diff > 604800000) {// 7 * 24 * 60 * 60 * 1000=604800000 毫秒\n str = \"1周前\";\n }\n else if (diff > 86400000) { // 24 * 60 * 60 * 1000=86400000 毫秒\n // System.out.println(\"X天前\");\n str = (int) Math.floor(diff / 86400000f) + \"天前\";\n }\n else if (diff > 18000000) {// 5 * 60 * 60 * 1000=18000000 毫秒\n // System.out.println(\"X小时前\");\n str = (int) Math.floor(diff / 18000000f) + \"小时前\";\n }\n else if (diff > 60000) {// 1 * 60 * 1000=60000 毫秒\n // System.out.println(\"X分钟前\");\n str = (int) Math.floor(diff / 60000) + \"分钟前\";\n }\n else {\n str = (int) Math.floor(diff / 1000) + \"秒前\";\n }\n return str;\n }", "String getPreviousCloseDate();", "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 String getRelativeTimeAgo(Date parseDate) {\n\n String relativeDate;\n long dateMillis = parseDate.getTime();\n relativeDate = DateUtils.getRelativeTimeSpanString(dateMillis, System.currentTimeMillis(), DateUtils.SECOND_IN_MILLIS).toString();\n\n return relativeDate;\n }", "Date getPriorDate();", "public static void main(String[] args) throws ParseException {\n\t\n\t\t String temp = \"2016-06-20 22:49:02.967\";\n\t\t Date date = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\").parse(temp);\n\t\t System.out.println(date.after(new Date()));\n\t}", "public static String getSQLDatePrevious(Date val) {\n\t\t\n\t\t// Substracts a day from Date and converts date into SQL format, ignores time\n\n\t\tif (val != null) {\n\t\t\tDate previous = DateUtils.addDays(val, -1);\n\t\t\tSimpleDateFormat format = new SimpleDateFormat(\"yyyy/MM/dd\");\n\t\t\treturn \"'\" + format.format(previous) + \"'\";\n\n\t\t} else {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t}", "String formatDateCondition(Date date);", "private String getDateString(Calendar cal) {\n Calendar current = Calendar.getInstance();\n String date = \"\";\n if (cal.get(Calendar.DAY_OF_YEAR) == current.get(Calendar.DAY_OF_YEAR)) {\n date = getResources().getString(R.string.content_today) + String.format(\" %02d:%02d\", cal.get(Calendar.HOUR_OF_DAY), cal.get(Calendar.MINUTE));\n } else if ((cal.get(Calendar.DAY_OF_YEAR) - 1) == current.get(Calendar.DAY_OF_YEAR)) {\n date = getResources().getString(R.string.content_yesterday) + String.format(\" %02d:%02d\", cal.get(Calendar.HOUR_OF_DAY), cal.get(Calendar.MINUTE));\n } else if ((cal.get(Calendar.DAY_OF_YEAR) - 2) == current.get(Calendar.DAY_OF_YEAR)\n && getResources().getConfiguration().locale.equals(new Locale(\"vn\"))) {\n date = getResources().getString(R.string.content_before_yesterday) + String.format(\" %02d:%02d\", cal.get(Calendar.HOUR_OF_DAY), cal.get(Calendar.MINUTE));\n } else {\n date = String.format(\"%02d-%02d-%02d %02d:%02d\", mCal.get(Calendar.DAY_OF_MONTH), mCal.get(Calendar.MONTH) + 1, mCal.get(Calendar.YEAR), cal.get(Calendar.HOUR_OF_DAY), cal.get(Calendar.MINUTE));\n }\n\n return date;\n }", "private static String getPrettyTimeDiffInMinutes(Calendar c1, Calendar c2) {\n\t\tif (c1.getTimeZone() == null || c2.getTimeZone() == null \n\t\t\t\t|| c1.getTimeZone().getRawOffset() != c2.getTimeZone().getRawOffset()) {\n\t\t\treturn \"N.A.\";\n\t\t}\n\t\telse {\n\t\t\t//Log.d(TAG, \"c2: \" + c2 + \", c1: \" + c1);\n\t\t\tlong diff = c2.getTimeInMillis() - c1.getTimeInMillis();\n\t\t\t\n\t\t\tif (diff / Utils.DAY_SCALE != 0) {\n\t\t\t\treturn \"many days ago\";\n\t\t\t}\n\t\t\telse if (diff / Utils.HOUR_SCALE != 0) {\n\t\t\t\treturn \"many hours ago\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn (diff / Utils.MINUTE_SCALE) + \" min(s) ago\";\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) throws ParseException {\n String pattern = \"yyyy-MM-dd HH:mm:ss\";\n SimpleDateFormat sf = new SimpleDateFormat(pattern);\n Date yesterday = sf.parse(\"2016-12-11 23:59:59\");\n Date todayBegin = sf.parse(\"2016-12-12 00:00:00\");\n Date today1 = sf.parse(\"2016-12-12 00:00:01\");\n Date todayend = sf.parse(\"2016-12-12 23:23:59\");\n\n System.out.println(sf.format(yesterday) + \" is before \" + sf.format(todayBegin) + \":\" + yesterday.before(todayBegin));\n System.out.println(sf.format(todayBegin) + \" is before \" + sf.format(today1) + \":\" + todayBegin.before(today1));\n System.out.println(sf.format(todayBegin) + \" is before \" + sf.format(todayend) + \":\" + todayBegin.before(todayend));\n System.out.println(sf.format(today1) + \" is before \" + sf.format(todayend) + \":\" + today1.before(todayend));\n }", "@Override\n public String toString() {\n StringBuilder elapsedTime = new StringBuilder();\n\n if(days > 0) {\n elapsedTime.append(getDays()).append(\" day\");\n if(days > 1) {\n elapsedTime.append(\"s\");\n }\n \n int remainingElements = 0;\n if(hours> 0) remainingElements++;\n if(minutes> 0) remainingElements++;\n if(seconds> 0) remainingElements++;\n \n if(remainingElements > 0) {\n if(remainingElements == 1) {\n elapsedTime.append(\" and \");\n }\n else elapsedTime.append(\", \");\n }\n }\n \n if (hours > 0) {\n elapsedTime.append(getHours()).append(\" hour\");\n if (hours > 1) {\n elapsedTime.append(\"s\");\n }\n\n int remainingElements = 0;\n if (minutes > 0) remainingElements++;\n if (seconds > 0) remainingElements++;\n\n if (remainingElements > 0) {\n if (remainingElements == 1) {\n elapsedTime.append(\" and \");\n } else {\n elapsedTime.append(\", \");\n }\n }\n \n }\n \n if (minutes > 0) {\n elapsedTime.append(getMinutes()).append(\" minute\");\n if (minutes > 1) {\n elapsedTime.append(\"s\");\n }\n if (seconds > 0) {\n elapsedTime.append(\" and \");\n }\n }\n \n if (seconds > 0) {\n elapsedTime.append(getSeconds()).append(\" second\");\n if (seconds > 1) {\n elapsedTime.append(\"s\");\n }\n }\n \n return elapsedTime.toString();\n }", "public static long getRelativeTimeAgo(String rawJsonDate) {\n String twitterFormat = \"EEE MMM dd HH:mm:ss ZZZZZ yyyy\";\n SimpleDateFormat sf = new SimpleDateFormat(twitterFormat, Locale.ENGLISH);\n sf.setLenient(true);\n\n long dateMillis = 0;\n try {\n dateMillis = sf.parse(rawJsonDate).getTime();\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n return dateMillis;\n }", "public String toReadableString(boolean relative, int maxParts) \n\t{\n\t\t//long now = System.currentTimeMillis();\n\t\tlong diff = milliseconds; // - now;\n\t\tif (Math.abs(diff) < SECOND)\n\t\t\treturn relative ? \"jetzt\" : \"sofort\";\n\t\tString ret;\n\t\tif(relative)\n\t\t\tret = (diff > 0) ? \"in \" : \"vor \";\n\t\telse\n\t\t\tret = (diff > 0) ? \"\" : \"minus \";\n\t\tLinkedList<String> parts = new LinkedList<String>();\n\n\t\tif (diff < 0)\n\t\t\tdiff *= -1;\n\n\t\tlong years = diff / YEAR;\n\t\tdiff -= years * YEAR;\n\t\tif (years > 0)\n\t\t\tparts.add(years + ((years == 1) ? \" Jahr\" : (relative ? \" Jahren\" : \" Jahre\")));\n\n\t\tlong months = diff / MONTH;\n\t\tdiff -= months * MONTH;\n\t\tif (months > 0)\n\t\t\tparts.add(months + ((months == 1) ? \" Monat\" : (relative ? \" Monaten\" : \" Monate\")));\n\n\t\tif (parts.size() > maxParts)\n\t\t\treturn ret + concatParts(parts, maxParts);\n\n\t\tlong weeks = diff / WEEK;\n\t\tdiff -= weeks * WEEK;\n\t\tif (weeks > 0)\n\t\t\tparts.add(weeks + ((weeks == 1) ? \" Woche\" : \" Wochen\"));\n\n\t\tif (parts.size() > maxParts)\n\t\t\treturn ret + concatParts(parts, maxParts);\n\n\t\tlong days = diff / DAY;\n\t\tdiff -= days * DAY;\n\t\tif (days > 0)\n\t\t\tparts.add(days + ((days == 1) ? \" Tag\" : (relative ? \" Tagen\" : \" Tage\")));\n\n\t\tif (parts.size() > maxParts)\n\t\t\treturn ret + concatParts(parts, maxParts);\n\n\t\tlong hours = diff / HOUR;\n\t\tdiff -= hours * HOUR;\n\t\tif (hours > 0)\n\t\t\tparts.add(hours + ((hours == 1) ? \" Stunde\" : \" Stunden\"));\n\n\t\tif (parts.size() > maxParts)\n\t\t\treturn ret + concatParts(parts, maxParts);\n\n\t\tlong minutes = diff / MINUTE;\n\t\tdiff -= minutes * MINUTE;\n\t\tif (minutes > 0)\n\t\t\tparts.add(minutes + ((minutes == 1) ? \" Minute\" : \" Minuten\"));\n\n\t\tif (parts.size() > maxParts)\n\t\t\treturn ret + concatParts(parts, maxParts);\n\n\t\tlong seconds = diff / SECOND;\n\t\tdiff -= seconds * SECOND;\n\t\tif (seconds > 0 || parts.isEmpty())\n\t\t\tparts.add(seconds + ((seconds == 1) ? \" Sekunde\" : \" Sekunden\"));\n\n\t\treturn ret + concatParts(parts, maxParts);\n\t}", "public static String getPastTime(int n) {\n Date date = new Date(System.currentTimeMillis());\n SimpleDateFormat df = new SimpleDateFormat(\"yyyyMMddHHmmss\");\n String dt = df.format(date);\n date = new Date(System.currentTimeMillis() - n * 60 * 60 * 1000);\n dt = df.format(date);\n return dt;\n }", "private String formatDuration(long remaining) {\n\t\tif (remaining < 1000) {\n\t\t\treturn \"< 1 second\";\n\t\t} else if (remaining < 60000) {\n\t\t\treturn remaining / 1000 + \" seconds\";\n\t\t} else if (remaining < 3600000) {\n\t\t\treturn remaining / 60000 + \" minutes\";\n\t\t} else if (remaining < 86400000) {\n\t\t\treturn remaining / 3600000 + \" hours\";\n\t\t} else {\n\t\t\treturn remaining / 86400000 + \" days\";\n\t\t}\n\t}", "public static String dateDiff(Date date1, Date date2) {\n long lower = Math.min(date1.getTime(), date2.getTime());\n long upper = Math.max(date1.getTime(), date2.getTime());\n long diff = upper - lower;\n\n long days = diff / (24 * 60 * 60 * 1000);\n long hours = diff / (60 * 60 * 1000) % 24;\n long minutes = diff / (60 * 1000) % 60;\n long seconds = diff / 1000 % 60;\n\n return String.format(\"%02d:%02d:%02d:%02d\", days, hours, minutes, seconds);\n\t}", "public static String dateStr(String input ){\n String mm = input.substring(0,2);\n String dd = input.substring(3,5);\n String yyyy = input.substring(6,10);\n return dd + \" - \" + mm + \" - \" + yyyy;\n }", "java.lang.String getFoundingDate();", "static String toPrettyFormat(Date d, Date today) {\n\t\tlong days_diff = toJulianDayNumber(today) - toJulianDayNumber(d);\n\n\t\tif (days_diff == 0) {\n\t\t\t// Today: show just the time (HH:MM)\n\t\t\treturn String.format(\"%tR\", d);\n\t\t}\n\n\t\tif (days_diff == 1) {\n\t\t\t// Yesterday\n\t\t\tString mgsstr = i18n(\"Yesterday at %H:%M\");\n\t\t\treturn new Strftime(mgsstr).format(d);\n\t\t}\n\n\t\tif (days_diff > 1 && days_diff < 7) {\n\t\t\t// Days from last week\n\t\t\treturn String.format(\"%tA\", d);\n\t\t}\n\n\t\t// Any other date\n\t\treturn DateFormat.getDateInstance(DateFormat.SHORT).format(d);\n\t}", "public static String getPastTimeByDay(int n) {\n Date date = new Date(System.currentTimeMillis());\n SimpleDateFormat df = new SimpleDateFormat(\"yyyyMMdd\");\n String dt = df.format(date);\n date = new Date(System.currentTimeMillis() - n * 60 * 60 * 1000);\n dt = df.format(date);\n return dt;\n }", "String getCreated_at();", "public static String getYYYYMMDDHHMMSS()\r\n/* 56: */ {\r\n/* 57: 68 */ String nowTime = \"\";\r\n/* 58: 69 */ Date now = new Date();\r\n/* 59: 70 */ SimpleDateFormat formatter = new SimpleDateFormat(\"yyyyMMddHHmmss\");\r\n/* 60: 71 */ nowTime = formatter.format(now);\r\n/* 61: 72 */ return nowTime;\r\n/* 62: */ }", "private String getTimingString() {\n return DateTimeHandler.STANDARD_DATETIME_FORMAT.format(deadline);\n }", "public static String millisToLongDHMS(Date _DateTime, String _DefualtFormat) {\n\n long currTimeStamp = System.currentTimeMillis();\n\n long duration = _DateTime.getTime() - currTimeStamp;\n\n StringBuffer res = new StringBuffer();\n long temp = 0;\n if (duration >= NOW) {\n temp = duration / ONE_DAY;\n if (temp > 0) {\n duration -= temp * ONE_DAY;\n res.append(temp).append(\" day\").append(temp > 1 ? \"s\" : \"\")\n .append(duration >= ONE_MINUTE ? \", \" : \"\");\n }\n\n temp = duration / ONE_HOUR;\n if (temp > 0) {\n duration -= temp * ONE_HOUR;\n res.append(temp).append(\" hour\").append(temp > 1 ? \"s\" : \"\")\n .append(duration >= ONE_MINUTE ? \", \" : \"\");\n }\n\n temp = duration / ONE_MINUTE;\n if (temp > 0) {\n duration -= temp * ONE_MINUTE;\n res.append(temp).append(\" minute\").append(temp > 1 ? \"s\" : \"\");\n }\n\n if (!res.toString().equals(\"\") && duration >= ONE_SECOND) {\n res.append(\" and \");\n }\n\n temp = duration / ONE_SECOND;\n if (temp > 0) {\n res.append(temp).append(\" second\").append(temp > 1 ? \"s\" : \"\");\n }\n return res.toString();\n } else if (duration < ONE_SECOND) {\n return _DefualtFormat;\n } else {\n return \"a moment ago\";//\"0 second\";\n }\n }", "public static String formatDateRelative(Date date) {\n return DateUtils.getRelativeTimeSpanString(date.getTime(), System.currentTimeMillis(), DateUtils.SECOND_IN_MILLIS, 0).toString();\n }", "public int getDateRmain() throws ParseException {\n String[] dateParts = description.split(\"<br />\");\n\n\n SimpleDateFormat sdf = new SimpleDateFormat(\"E, dd MMMMM yyyy - HH:mm\");\n String start = dateParts[0];\n Date st = sdf.parse(start.split(\": \")[1]);\n String end = dateParts[1];\n Date ed = sdf.parse(end.split(\": \")[1]);\n Date now = Calendar.getInstance().getTime();\n\n //long daysRemain1=(e.getTime()-s.getTime()+1000000)/(3600*24*1000);\n long diffInMillies = Math.abs(ed.getTime() - st.getTime());\n long diff = TimeUnit.DAYS.convert(diffInMillies, TimeUnit.MILLISECONDS);\n\n dateRmain = (int)diff;\n return dateRmain;\n }", "public static String calFormatDateDifference(final Date start, final Date end) {\r\n\t\tlong l1 = start.getTime();\r\n\t\tlong l2 = end.getTime();\r\n\t\tlong diff = l2 - l1;\r\n\r\n\t\tlong secondInMillis = 1000;\r\n\t\tlong minuteInMillis = secondInMillis * 60;\r\n\t\tlong hourInMillis = minuteInMillis * 60;\r\n\t\tlong dayInMillis = hourInMillis * 24;\r\n\t\tlong yearInMillis = dayInMillis * 365;\r\n\r\n\t\tlong elapsedYears = diff / yearInMillis;\r\n\t\tdiff = diff % yearInMillis;\r\n\t\tlong elapsedDays = diff / dayInMillis;\r\n\t\tdiff = diff % dayInMillis;\r\n\t\tlong elapsedHours = diff / hourInMillis;\r\n\t\tdiff = diff % hourInMillis;\r\n\t\tlong elapsedMinutes = diff / minuteInMillis;\r\n\t\tdiff = diff % minuteInMillis;\r\n\t\tlong elapsedSeconds = diff / secondInMillis;\r\n\t\t\r\n\t\treturn elapsedYears + \" years, \" + elapsedDays + \" days, \" + elapsedHours + \" hrs, \" + elapsedMinutes + \" mins, \" + elapsedSeconds + \" secs\";\r\n\t}", "private static String dateChange(int time) {\n int hour = time / 3600;\n time %= 3600;\n int minute = time / 60;\n int second = time % 60;\n\n String strHour = hour > 9 ? String.valueOf(hour) : \"0\" + hour;\n String strMinute = minute > 9 ? String.valueOf(minute) : \"0\" + minute;\n String strSecond = second > 9 ? String.valueOf(second) : \"0\" + second;\n\n return String.join(\":\", strHour, strMinute, strSecond);\n }", "public String getDate(){\n String d=\"\";\n String m=\"\";\n if(day<10){\n d=0+(String.valueOf(day));\n }\n else{\n d=String.valueOf(day);\n }\n\n if(month<10){\n m=0+(String.valueOf(month));\n }\n else{\n m=String.valueOf(month);\n }\n //returning day/month/year\n return (d+\"/\"+m+\"/\"+String.valueOf(year));\n }", "Date getDateCreated();", "public static String formatDurationTruncated(Instant fromInstant)\n\t{\n\t\tif (fromInstant != null)\n\t\t{\n\t\t\tlong toInstant = Instant.now().getEpochSecond();\n\n\t\t\t//Time since trade was done.\n\t\t\tlong timeAgo = (toInstant - fromInstant.getEpochSecond());\n\n\t\t\tString result = timeAgo + (timeAgo == 1 ? \" second\" : \" seconds\");\n\t\t\tif (timeAgo >= 60)\n\t\t\t{\n\t\t\t\t//Seconds to minutes.\n\t\t\t\tlong timeAgoMinutes = timeAgo / 60;\n\t\t\t\tresult = timeAgoMinutes + (timeAgoMinutes == 1 ? \" minute\" : \" minutes\");\n\n\t\t\t\tif (timeAgoMinutes >= 60)\n\t\t\t\t{\n\t\t\t\t\t//Minutes to hours\n\t\t\t\t\tint timeAgoHours = (int) (timeAgoMinutes / 60);\n\t\t\t\t\tresult = timeAgoHours + (timeAgoHours == 1 ? \" hour\" : \" hours\");\n\t\t\t\t\tif (timeAgoHours > 24)\n\t\t\t\t\t{\n\t\t\t\t\t\tint timeAgoDays = timeAgoHours / 24;\n\t\t\t\t\t\tresult = timeAgoDays + (timeAgoDays == 1 ? \" day\" : \" days\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn result;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn \"\";\n\t\t}\n\t}", "public static String getDateString(){\n\t\t\tCalendar now = Calendar.getInstance();\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd__HH-mm-ss\");\n\t\t\treturn sdf.format(now.getTime());\n\t }", "public String getTimestamp() \n{\n Calendar now = Calendar.getInstance();\n return String.format(\"20%1$ty-%1$tm-%1$td_%1$tHh%1$tMm%1$tSs\", now);\n}", "public static String getDate()\r\n {\r\n Date now = new Date();\r\n DateFormat df = new SimpleDateFormat (\"yyyy-MM-dd'T'hh-mm-ss\");\r\n String currentTime = df.format(now);\r\n return currentTime; \r\n \r\n }", "java.lang.String getToDate();", "public String getDifference(long now, long then){\n\t\t\n\t\ttry {\n\t if(now > then) {\n\t return DateUtils.formatElapsedTime((now - then)/1000L);\n\t }\n\t else {\n\t return \"Time Error!\";\n\t }\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tLog.e(\"Error: \", \"\" + e);\n\t\t\treturn \"Time Error!\";\n\t\t}\n }", "@SuppressLint(\"SimpleDateFormat\") public static String parse(String date, String format){\r\n\t\ttry {\r\n\t\t\tSimpleDateFormat localFormatter= new SimpleDateFormat(format);\r\n\t\t\tlocalFormatter.setLenient(false);\r\n\t\t\tString formattedDate=localFormatter.parse(date).toString();\r\n\t\t\t\r\n\t\t\t//days, months, years\r\n\t\t\tif(format.equals(formats[0])) return convertDate(formattedDate);\r\n\t\t\t\r\n\t\t\t//hours, minutes, seconds\r\n\t\t\telse if(format.equals(formats[1])) return convertHoursMinsSecs(formattedDate);\t\r\n\t\t\t\r\n\t\t\t//hours, minutes\r\n\t\t\telse if(format.equals(formats[2])) return convertHoursMins(formattedDate);\t\r\n\t\t\t\r\n\t\t\treturn \"\";\r\n\t\t\r\n\t\t} catch (ParseException e) {\r\n\t\t\t//e.printStackTrace();\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t}", "public Date getWhen();", "String timeCreated();", "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 Date getMessageDate();", "public static String getFriendlyTime(long duration) {\n final StringBuilder sb = new StringBuilder();\n\n long months = TimeUnit.MILLISECONDS.toDays(duration);\n if (months >= 30) {\n months = months / 30;\n duration -= TimeUnit.DAYS.toMillis(months * 30);\n } else {\n months = 0;\n }\n\n final long years = months / 12;\n if (years > 0) {\n months -= Math.floor(years * 12);\n duration -= TimeUnit.DAYS.toMillis(years * 365);\n }\n\n final long days = TimeUnit.MILLISECONDS.toDays(duration);\n duration -= TimeUnit.DAYS.toMillis(days);\n\n final long hours = TimeUnit.MILLISECONDS.toHours(duration);\n duration -= TimeUnit.HOURS.toMillis(hours);\n\n final long minutes = TimeUnit.MILLISECONDS.toMinutes(duration);\n duration -= TimeUnit.MINUTES.toMillis(minutes);\n\n final long seconds = TimeUnit.MILLISECONDS.toSeconds(duration);\n\n if (years > 0) {\n sb.append(\" \").append(years);\n sb.append(\" \").append(years == 1 ? \"year\" : \"years\");\n }\n\n if (months > 0) {\n sb.append(\" \").append(months);\n sb.append(\" \").append(months == 1 ? \"month\" : \"months\");\n }\n\n if (days > 0) {\n sb.append(\" \").append(days);\n sb.append(\" \").append(days == 1 ? \"day\" : \"days\");\n }\n\n if (hours > 0) {\n sb.append(\" \").append(hours);\n sb.append(\" \").append(hours == 1 ? \"hour\" : \"hours\");\n }\n\n if (minutes > 0) {\n sb.append(\" \").append(minutes);\n sb.append(\" \").append(minutes == 1 ? \"minute\" : \"minutes\");\n }\n\n if (seconds > 0) {\n sb.append(\" \").append(seconds);\n sb.append(\" \").append(seconds == 1 ? \"second\" : \"seconds\");\n }\n\n return sb.toString().trim();\n }", "public static String getDifferenceDateShort(Long val) {\n\n Long date_current = Calendar.getInstance().getTimeInMillis();\n Long years_difference = date_current - val;\n\n Calendar c = Calendar.getInstance();\n c.setTimeInMillis(years_difference);\n int mYear = c.get(Calendar.YEAR) - 1970;\n int mMonth = c.get(Calendar.MONTH);\n int mDay = c.get(Calendar.DAY_OF_MONTH);\n\n String display_age = \"\";\n if (mYear != 0) display_age = mYear + \" year\" + ((mYear > 1) ? \"s\" : \"\");\n else if (mMonth != 0 && !DataUtils.isStringValueExist(display_age))\n display_age = mMonth + \" month\" + ((mMonth > 1) ? \"s\" : \"\");\n else if (!DataUtils.isStringValueExist(display_age))\n display_age = mDay + \" day\" + ((mDay == 1) ? \"\" : \"s\");\n\n return display_age;\n }", "public static String getStrDate(Date date) {\n //TODO get date\n SimpleDateFormat formatter;\n if (DateUtils.isToday(date.getTime())) {\n formatter = new SimpleDateFormat(\"HH:mm\");\n return formatter.format(date);\n }\n formatter = new SimpleDateFormat(\"MMM dd\");\n return formatter.format(date);\n }", "private static Command parseDate(String content) {\r\n\t\tDate startDate, endDate;\r\n\t\tArrayList<String> sensitiveWord = new ArrayList<>(Arrays.asList(DATE));\r\n\t\tString description = \"\", patstring = \"\\\"(.*)\\\"\", strPattern = \"\", matPattern;\r\n\t\tString[] noPatList, leftConList;\r\n\t\tPattern pat = Pattern.compile(patstring);\r\n\t\tMatcher mat = pat.matcher(content);\r\n\t\tboolean find = mat.find();\r\n\t\t// if description indicated by user,\r\n\t\t// remove it and extract the time\r\n\t\tif (find) {\r\n\t\t\tstrPattern = mat.group(0).replaceAll(\"\\\"\", \"\");\r\n\t\t\tcontent = content.replace(strPattern, \"\");\r\n\r\n\t\t}\r\n\r\n\t\tArrayList<Date> date = DateGUIparser.getListDate(content);\r\n\t\tif (!date.isEmpty()) {\r\n\t\t\tif (find) {\r\n\t\t\t\tdescription = strPattern;\r\n\t\t\t} else {\r\n\t\t\t\tmatPattern = DateGUIparser.getMatchInput(content);\r\n\t\t\t\tnoPatList = content.split(matPattern);\r\n\t\t\t\tleftConList = noPatList[0].split(\" \");\r\n\t\t\t\tArrayList<String> wordList = new ArrayList<>(Arrays.asList(leftConList));\r\n\t\t\t\tif (!sensitiveWord.contains(matPattern)) {\r\n\t\t\t\t\twordList.remove(wordList.size() - 1);\r\n\t\t\t\t}\r\n\t\t\t\tfor (String str : wordList) {\r\n\t\t\t\t\tdescription += str + \" \";\r\n\t\t\t\t}\r\n\t\t\t\tfor (int i = 1; i < noPatList.length; i++) {\r\n\t\t\t\t\tdescription = description + noPatList[i] + \" \";\r\n\t\t\t\t}\r\n\t\t\t\tdescription = description.trim();\r\n\t\t\t}\r\n\t\t}\r\n\t\t// 1 date(as a deadline)\r\n\t\tif (date.size() == 1) {\r\n\t\t\treturn new CommandAdd(description, date.get(0));\r\n\t\t}\r\n\t\t// 2 dates(as start time and end time)\r\n\t\tif (date.size() == 2) {\r\n\t\t\tstartDate = date.get(0);\r\n\t\t\tendDate = date.get(1);\r\n\t\t\tif (startDate.compareTo(endDate) < 0) {\r\n\t\t\t\treturn new CommandAdd(description, date.get(0), date.get(1));\r\n\t\t\t} else {\r\n\t\t\t\tthrow new InvalidDateOrderException();\r\n\t\t\t}\r\n\t\t}\r\n\t\t// 3 or more dates(will be a exception)\r\n\t\tif (date.size() > 2) {\r\n\t\t\tthrow new MultipleDatesException(date.size());\r\n\t\t}\r\n\t\tif (find) {\r\n\t\t\tdescription = strPattern;\r\n\t\t} else {\r\n\t\t\tdescription = content;\r\n\t\t}\r\n\t\tif (description.trim().equals(\"\")) {\r\n\t\t\tthrow new EmptyDescriptionException();\r\n\t\t}\r\n\t\tCommandAddLogger.log(Level.INFO, \"successful add\");\r\n\t\treturn new CommandAdd(description);\r\n\t}", "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 long getDate()\r\n/* 204: */ {\r\n/* 205:309 */ return getFirstDate(\"Date\");\r\n/* 206: */ }", "public CharSequence getCountdownText(Context context, Date futureDate) {\n StringBuilder countdownText = new StringBuilder();\n\n // Calculate the time between now and the future date.\n long timeRemaining = futureDate.getTime() - new Date().getTime();\n\n // If there is no time between (ie. the date is now or in the past), do nothing\n if (timeRemaining > 0) {\n Resources resources = context.getResources();\n // Calculate the days/hours/minutes/seconds within the time difference.\n // It's important to subtract the value from the total time remaining after each is calculated.\n // For example, if we didn't do this and the time was 25 hours from now,\n // we would get `1 day, 25 hours`.\n int days = (int) TimeUnit.MILLISECONDS.toDays(timeRemaining);\n timeRemaining -= TimeUnit.DAYS.toMillis(days);\n int hours = (int) TimeUnit.MILLISECONDS.toHours(timeRemaining);\n timeRemaining -= TimeUnit.HOURS.toMillis(hours);\n int minutes = (int) TimeUnit.MILLISECONDS.toMinutes(timeRemaining);\n timeRemaining -= TimeUnit.MINUTES.toMillis(minutes);\n int seconds = (int) TimeUnit.MILLISECONDS.toSeconds(timeRemaining);\n\n // For each time unit, add the quantity string to the output, with a space.\n if (days > 0) {\n countdownText.append(resources.getQuantityString(R.plurals.days, days, days));\n countdownText.append(\" \");\n }\n if (days > 0 || hours > 0) {\n countdownText.append(resources.getQuantityString(R.plurals.hours, hours, hours));\n countdownText.append(\" \");\n }\n if (days > 0 || hours > 0 || minutes > 0) {\n countdownText.append(resources.getQuantityString(R.plurals.minutes, minutes, minutes));\n countdownText.append(\" \");\n }\n if (days > 0 || hours > 0 || minutes > 0 || seconds > 0) {\n countdownText.append(resources.getQuantityString(R.plurals.seconds, seconds, seconds));\n countdownText.append(\" \");\n }\n }\n return countdownText.toString();\n }", "public String getLastDateHistory( String code) {\n String query = \"SELECT * FROM \"+ code +\"R where time > '2015-06-01T00:00:00Z'\";\n QueryResult list = InfluxDaoConnector.getPoints(query,dbName);\n\n if (!checker(list))\n return null;\n\n int size = list.getResults().get(0).getSeries().get(0).getValues().size();\n\n\n return (String) list.getResults().get(0).getSeries().get(0).getValues().get(size-1).get(0);\n\n }", "protected String getDateTimeString(String input) {\n String result;\n DateTimeFormatter datePattern = DateTimeFormatter.ofPattern(\"MMM dd yyyy\");\n if (dateTime == null) {\n result = input;\n } else {\n String date = getDate().format(datePattern);\n String time = getTime().toString();\n result = date + Constants.SPACE + time;\n }\n return result;\n }", "java.lang.String getTime();", "public String getLeavingDate();", "private LocalDate findPreviousWeekDate() throws IOException {\n\n\t\t/* Iterate historyFolder */\n\t\treturn Files.list(Paths.get(baseHistoryPath)).map(filePath -> {\n\t\t\tString fileName = FilenameUtils.getBaseName(filePath.getFileName().toString()).replace(\"SonarQube_\", \"\");\n\t\t\tString[] splitter = fileName.split(\"-\");\n\t\t\tfinal int year = Integer.parseInt(splitter[0]);\n\t\t\tfinal int month = Integer.parseInt(splitter[1]);\n\t\t\tfinal int dayOfMonth = Integer.parseInt(splitter[2]);\n\n\t\t\treturn LocalDate.of(year, month, dayOfMonth);\n\t\t}).max((final LocalDate d1, final LocalDate d2) -> d1.compareTo(d2)).get();\n\n\t}", "private static String subtractTime(String curtime, String string) {\r\n\r\n\t\tString ff = \"\";\r\n\t\t\r\n\t\tint m2 = Integer.parseInt(curtime.substring(0,2));\r\n\t\tint m1 = Integer.parseInt(string.substring(0,2));\r\n\t\t\r\n\t\tint s2 = Integer.parseInt(curtime.substring(3,5));\r\n\t\tint s1 = Integer.parseInt(string.substring(3,5));\r\n\t\t\r\n\t\tif(s2<s1) {\r\n\t\t\tff = ((m2-m1)<0?Math.abs(m2-m1+59):m2-m1-1)+\":\"+Math.abs(s2-s1+60);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tff = ((m2-m1)<0?Math.abs(m2-m1+60):m2-m1)+\":\"+(s2-s1);\r\n\t\t}\r\n\t\treturn ff;\r\n\t}", "private String getFormattedDate(Integer format) {\n Date date = new Date(format * 1000L);\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss.SSS\");\n dateFormat.setTimeZone(TimeZone.getTimeZone(\"Etc/UTC\"));\n Log.e(\"time\",dateFormat.format(date));\n return dateFormat.format(date);\n }", "java.lang.String getStartDateYYYYMMDD();", "public static String getSQLDateLifting(Date val) {\n\t\t\n\t\t// Converts date into sql format and ignores time\n\n\t\tif (val != null) {\n\n\t\t\tSimpleDateFormat format = new SimpleDateFormat(\"yyyy/MM/dd\");\n\t\t\treturn \"date_format('\" + format.format(val) + \" 6:00','%Y-%m-%d %H:%i')\";\n\n\t\t} else {\n\n\t\t\treturn null;\n\n\t\t}\n\n\t}", "private String currentTime()\t{\n\t\tCalendar c = Calendar.getInstance(); \n\n\t\tString seconds;\n\t\tif(c.get(Calendar.SECOND) < 10)\t{\n\t\t\tseconds = \"0\"+Integer.toString(c.get(Calendar.SECOND));\n\t\t} else {\n\t\t\tseconds = Integer.toString(c.get(Calendar.SECOND));\n\t\t}\n\n\t\tString minutes;\n\t\tif(c.get(Calendar.MINUTE) < 10)\t{\n\t\t\tminutes = \"0\"+Integer.toString(c.get(Calendar.MINUTE));\n\t\t} else {\n\t\t\tminutes = Integer.toString(c.get(Calendar.MINUTE));\n\t\t}\n\n\t\tString hours;\n\t\tif(c.get(Calendar.HOUR_OF_DAY) < 10)\t{\n\t\t\thours = \"0\"+Integer.toString(c.get(Calendar.HOUR_OF_DAY));\n\t\t} else {\n\t\t\thours = Integer.toString(c.get(Calendar.HOUR_OF_DAY));\n\t\t}\n\n\t\tString day;\n\t\tif(c.get(Calendar.DATE) < 10)\t{\n\t\t\tday = \"0\"+Integer.toString(c.get(Calendar.DATE));\n\t\t} else {\n\t\t\tday = Integer.toString(c.get(Calendar.DATE));\n\t\t}\n\n\t\tString month;\n\t\tif((c.get(Calendar.MONTH)+1) < 10)\t{\n\t\t\tmonth = \"0\"+Integer.toString(c.get(Calendar.MONTH)+1);\n\t\t} else {\n\t\t\tmonth = Integer.toString(c.get(Calendar.MONTH)+1);\n\t\t}\n\n\t\tString year;\n\t\tif(c.get(Calendar.YEAR) < 10)\t{\n\t\t\tyear = \"0\"+Integer.toString(c.get(Calendar.YEAR));\n\t\t} else {\n\t\t\tyear = Integer.toString(c.get(Calendar.YEAR));\n\t\t}\n\n\t\treturn day+\"/\"+month+\"/\"+year + \" \"+hours+\":\"+minutes+\":\"+seconds;\t\n\t}", "private static String getFormattedCurrentDateAndTime(){\n StringBuilder dateAndTime = new StringBuilder();\n LocalDateTime now = LocalDateTime.now();\n\n String hour = Integer.toString(now.getHour());\n String minute = Integer.toString(now.getMinute());\n\n if (hour.length() == 1){\n hour = \"0\" + hour;\n }\n if (minute.length() == 1){\n minute = \"0\" + minute;\n }\n\n //Creates \"XX/XX/XX @ XX:XX\" format (24 hours)\n dateAndTime.append(now.getMonthValue()).append(\"/\").\n append(now.getDayOfMonth()).append(\"/\").\n append(now.getYear()).append(\" @ \").\n append(hour).append(\":\").\n append(minute);\n\n return dateAndTime.toString();\n }", "private String getDateTime() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"[yyyy/MM/dd - HH:mm:ss]\");\n return sdf.format(new Date());\n }", "private String getDateTime() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"[yyyy/MM/dd - HH:mm:ss]\");\n return sdf.format(new Date());\n }", "private String getDateTime() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"[yyyy/MM/dd - HH:mm:ss]\");\n return sdf.format(new Date());\n }", "private String getHistoryQueryWithTimeStampCheck(Query requestQuery, String tempQuery) {\n\t\treturn tempQuery + \" \" + getTimeStampCheckPart(requestQuery);\n\t}", "public static String getRelativeDate(String format, String dateValue, int noOfDays) {\n Calendar calendar = Calendar.getInstance();\n DateFormat dateFormat = new SimpleDateFormat(format);\n try {\n calendar.setTime(dateFormat.parse(dateValue));\n } catch (ParseException e) {\n LOGGER.error(e.getMessage());\n }\n calendar.add(Calendar.DAY_OF_MONTH, noOfDays);\n return dateFormat.format(calendar.getTime());\n }", "private String prettyTime() {\n String[] dt = time.split(\"T\");\n String[] ymd = dt[0].split(\"-\");\n String[] hms = dt[1].split(\":\");\n\n int hour = Integer.parseInt(hms[0]);\n\n String date = getMonth(Integer.parseInt(ymd[1])) + \" \" + ymd[2] + \", \" + ymd[0];\n String time = (hour > 12 ? hour - 12 : hour) + \":\" + hms[1] + \":\" + hms[2].substring(0, hms[2].indexOf(\".\"));\n return date + \" at \" + time;\n }", "public String getTimeLeft() {\n return NumberToTimeLeft.convert(_dateExpiration - System.currentTimeMillis(),true);\n }", "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 }", "private Date computeLastDate() {\n\t\tSyncHistory history = historyDao.loadLastOk();\n\t\tif (history != null) {\n\t\t\treturn history.getTime();\n\t\t}\n\t\treturn new Date(-1);\n\t}", "private static String millisToLongDHMS(long duration, String date) {\n StringBuilder res = new StringBuilder();\n long temp = 0;\n long cal = 0;\n if (duration >= ONE_SECOND) {\n temp = duration / ONE_SECOND;\n if (temp > 0 && temp < 60) {\n res.append(temp).append(\" giây \");\n } else {\n temp = duration / ONE_MINUTE;\n if (temp > 0 && temp < 60) {\n res.append(temp).append(\" phút \");\n } else {\n temp = duration / ONE_HOUR;\n cal = duration / ONE_MINUTE;\n if (temp > 0 && temp < 24) {\n if (cal % 60 != 0) {\n res.append(\"Khoảng \");\n }\n res.append(temp).append(\" giờ \");\n } else {\n temp = duration / ONE_DAY;\n cal = duration / ONE_HOUR;\n if (temp > 0 && temp < 2) {\n if (cal % 24 != 0) {\n res.append(\"Khoảng \");\n }\n res.append(temp).append(\" ngày \");\n } else {\n return res.append(getTimeDetails(date)).toString();\n }\n }\n }\n }\n \n return res.append(\"trước\").toString();\n } else {\n return \"Vừa tải lên\";\n }\n }", "Date getDate();", "Date getDate();" ]
[ "0.6543063", "0.6264994", "0.6065021", "0.596462", "0.5829921", "0.5800291", "0.55761623", "0.5563361", "0.5555359", "0.5542284", "0.55300903", "0.5349147", "0.53456086", "0.5323054", "0.5319073", "0.52666515", "0.5212218", "0.5204371", "0.5202385", "0.51691043", "0.51652795", "0.51222366", "0.50964403", "0.50937253", "0.50849694", "0.5037788", "0.5025974", "0.5025974", "0.500926", "0.5006189", "0.50043845", "0.50033844", "0.49958998", "0.49856025", "0.49751976", "0.49361947", "0.49346367", "0.49342874", "0.49239665", "0.49115562", "0.49030492", "0.49020067", "0.48848626", "0.48735356", "0.48732603", "0.48053402", "0.48012796", "0.4797492", "0.4774737", "0.47590306", "0.47381938", "0.47190863", "0.47129902", "0.47090125", "0.47012153", "0.46903744", "0.4685736", "0.46779636", "0.46586883", "0.46553436", "0.4653041", "0.46449947", "0.46416244", "0.4636733", "0.4634219", "0.4633069", "0.463207", "0.46096689", "0.4607583", "0.46062136", "0.45900732", "0.45840183", "0.4577626", "0.4577444", "0.4574357", "0.45648658", "0.4557288", "0.4538698", "0.4535878", "0.45349628", "0.45341948", "0.45316368", "0.45223013", "0.45158693", "0.45149297", "0.4502595", "0.45018256", "0.44998586", "0.4490929", "0.4490929", "0.4489702", "0.44883674", "0.44854704", "0.448328", "0.44722706", "0.447033", "0.44680843", "0.4466856", "0.4465927", "0.4465927" ]
0.51947415
19
converts time (in milliseconds) to humanreadable format " days, hours, minutes and (z) seconds"
public static String millisToLongDHMS(Date _DateTime, String _DefualtFormat) { long currTimeStamp = System.currentTimeMillis(); long duration = _DateTime.getTime() - currTimeStamp; StringBuffer res = new StringBuffer(); long temp = 0; if (duration >= NOW) { temp = duration / ONE_DAY; if (temp > 0) { duration -= temp * ONE_DAY; res.append(temp).append(" day").append(temp > 1 ? "s" : "") .append(duration >= ONE_MINUTE ? ", " : ""); } temp = duration / ONE_HOUR; if (temp > 0) { duration -= temp * ONE_HOUR; res.append(temp).append(" hour").append(temp > 1 ? "s" : "") .append(duration >= ONE_MINUTE ? ", " : ""); } temp = duration / ONE_MINUTE; if (temp > 0) { duration -= temp * ONE_MINUTE; res.append(temp).append(" minute").append(temp > 1 ? "s" : ""); } if (!res.toString().equals("") && duration >= ONE_SECOND) { res.append(" and "); } temp = duration / ONE_SECOND; if (temp > 0) { res.append(temp).append(" second").append(temp > 1 ? "s" : ""); } return res.toString(); } else if (duration < ONE_SECOND) { return _DefualtFormat; } else { return "a moment ago";//"0 second"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String displayTime(long milliseconds) {\n String displayTime = \"\";\n double seconds = milliseconds / 1000.0;\n int minute = (int) (seconds / 60);\n double second = seconds % 60;\n displayTime = String.format(\"%02d:%06.3f\", minute, second);\n\n return displayTime;\n }", "public static String getReadableTime(long time_ms) {\n String output = \"\";\n long time_delta = time_ms;\n\n int milliseconds = (int) (time_delta % 1000);\n time_delta /= 1000;\n int seconds = (int) (time_delta % 60);\n time_delta /= 60;\n int minutes = (int) (time_delta % 60);\n time_delta /= 60;\n int hours = (int) (time_delta % 24);\n int days = (int) (time_delta / 24);\n\n if (days != 0) {\n output += String.format(\"%d day\", days);\n if (days > 1) {\n output += \"s\";\n }\n if ((hours != 0) || (minutes != 0) || (seconds != 0)) {\n output += \" \";\n }\n }\n if ((hours != 0) || (minutes != 0)) {\n return output + String.format(\"%d:%02d:%02d\", hours, minutes, seconds);\n }\n if (seconds != 0) {\n return output + String.format(\"%d.%d seconds\", seconds, milliseconds);\n }\n if (milliseconds != 0) {\n return output + String.format(\"%d ms\", milliseconds);\n }\n\n return (output.length() == 0 ? \"0\" : output);\n }", "private String formatTime(long ms) {\n String format = String.format(\"%%.%df s\", decimals);\n return String.format(format, ms > 0 ? ms/1000f : 0f);\n }", "public static String convertMillis(long millis){\n\t\tlong hours = millis / 3600000;\r\n\t\tmillis = millis % 3600000;\r\n\t\tlong minutes = millis / 60000;\r\n\t\tmillis = millis % 60000;\r\n\t\tlong seconds = millis / 1000;\r\n\t\t\r\n\t\tString strHours = hours + \"\";\t\t\t\t\t//pretvaranje cjelobrojnih vrijednosti u satima, minutama i sekundama\r\n\t\tString strMinutes = minutes + \"\";\t\t\t\t//u String vrijednosti \r\n\t\tString strSeconds = seconds + \"\";\r\n\t\t\r\n\t\treturn strHours + \":\" + strMinutes + \":\" + strSeconds + \".\";\t\r\n\t}", "public static String millisToStr(long time) {\r\n long ms = time;\r\n long h = ms / 3600000;\r\n ms = ms % 3600000;\r\n long m = ms / 60000;\r\n ms = ms % 60000;\r\n long s = ms / 1000;\r\n ms = ms % 1000;\r\n return String.format(\"%02d:%02d:%02d.%03d\", h, m, s, ms);\r\n }", "public static String toHumanReadableTime(long milliseconds) {\n StringBuilder sb = new StringBuilder();\n int len = TIME_UNITS.length;\n int i = 0;\n for (; i < len; i++) {\n long quotient = milliseconds / TIME_UNITS[i];\n if (quotient > 0) {\n if (sb.length() > 0) {\n sb.append(' ');\n }\n sb.append(quotient).append(TIME_UNITS_ABBR[i]);\n milliseconds = milliseconds % TIME_UNITS[i];\n }\n }\n if (sb.length() > 0) {\n if (milliseconds > 0) {\n sb.append(' ').append(milliseconds).append(TIME_UNITS_ABBR[i]);\n }\n } else {\n sb.append(milliseconds).append(TIME_UNITS_ABBR[i]);\n }\n return sb.toString();\n }", "public static String convertTimeMillisecondsAsLongToDuration(long milliseconds) {\n\t\t\t\tString hours = String.format(\"%02d\", TimeUnit.MILLISECONDS.toHours(milliseconds));\n\t\t\t\tString minutes = String.format(\"%02d\",\n\t\t\t\t\t TimeUnit.MILLISECONDS.toMinutes(milliseconds) - TimeUnit.HOURS.toMinutes(TimeUnit.MILLISECONDS.toHours(milliseconds)));\n\t\t\t String seconds = String.format(\"%02d\",\n\t\t\t TimeUnit.MILLISECONDS.toSeconds(milliseconds) - TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS.toMinutes(milliseconds)));\n\t\t\t String duration = Integer.valueOf(hours) + \":\" + minutes + \":\" + seconds;\n\t\t\t return duration; \n\t\t\t}", "public static String formatConsumeTimeMillis(long millis) { \r\n\t long days = millis / (1000 * 60 * 60 * 24); \r\n\t long hours = (millis % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60); \r\n\t long minutes = (millis % (1000 * 60 * 60)) / (1000 * 60); \r\n\t double seconds = (millis % (1000 * 60)) / 1000.0; \r\n\t return days + \" dats \" + hours + \" hours \" + minutes + \" mins \" \r\n\t + seconds + \" seconds\";\r\n\t}", "public static String milliSecondsToTimer(long milliseconds){\r\n String finalTimerString = \"\";\r\n String secondsString = \"\";\r\n \r\n // Convert total duration into time\r\n int hours = (int)( milliseconds / (1000*60*60));\r\n int minutes = (int)(milliseconds % (1000*60*60)) / (1000*60);\r\n int seconds = (int) ((milliseconds % (1000*60*60)) % (1000*60) / 1000);\r\n // Add hours if there\r\n if(hours > 0){\r\n finalTimerString = hours + \":\";\r\n }\r\n \r\n // Prepending 0 to seconds if it is one digit\r\n if(seconds < 10){\r\n secondsString = \"0\" + seconds;\r\n }else{\r\n secondsString = \"\" + seconds;}\r\n \r\n finalTimerString = finalTimerString + minutes + \":\" + secondsString;\r\n \r\n // return timer string\r\n return finalTimerString;\r\n }", "private String intTime(long l){\r\n String s=\"\";\r\n s+=(char)(((l/1000)/60)+'0')+\":\"+(char)((((l/1000)%60)/10)+'0')+(char)((((l/1000)%60)%10)+'0'); \r\n return s;\r\n }", "public static String TimeConverter(long t)\r\n {\r\n int h, m, s, ms;\r\n ms = (int)t;\r\n h = ms / 3600000;\r\n ms = ms % 3600000;\r\n m = ms / 60000;\r\n ms = ms % 60000;\r\n s = ms / 1000;\r\n ms = ms % 1000;\r\n return h + \" :: \" + m + \" :: \" + s + \" :: \" + ms;\r\n }", "public static String formatTime(final long ms){\n long s = ms / 1000, m = s / 60, h = m / 60;\n s %= 60; m %= 60; h %= 24;\n return String.format(\"%02d:%02d:%02d\", h, m, s);\n }", "private String formatTime(final long time) {\n if ( time == 0 ) {\n return \"-\";\n }\n if ( time < 1000 ) {\n return time + \" ms\";\n } else if ( time < 1000 * 60 ) {\n return time / 1000 + \" secs\";\n }\n final long min = time / 1000 / 60;\n final long secs = (time - min * 1000 * 60);\n return min + \" min \" + secs / 1000 + \" secs\";\n }", "public static String showTime(long ms)\n {\n long minutes = ms/1000/60;\n long seconds = (ms - 1000*60*minutes)/1000;\n long millis = ms % 1000;\n return minutes + \"m \" + seconds + \"s \" + millis +\"ms\";\n }", "public static String formattime(long millis) {\n\t\treturn String.format(\"%02d:%02d:%02d:%03d\", //This formats the time correctly\n\t\t\t\tTimeUnit.MILLISECONDS.toHours(millis),\n\t\t\t TimeUnit.MILLISECONDS.toMinutes(millis) -\n\t\t\t TimeUnit.HOURS.toMinutes(TimeUnit.MILLISECONDS.toHours(millis)),\n\t\t\t TimeUnit.MILLISECONDS.toSeconds(millis) -\n\t\t\t TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS.toMinutes(millis)),\n\t\t\t millis -\n\t\t\t TimeUnit.SECONDS.toMillis(TimeUnit.MILLISECONDS.toSeconds(millis)));\n\t\t\n\t}", "public String convertTime(long milliseconds) {\n Date date = new Date(milliseconds);\n SimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n formatter.setTimeZone(TimeZone.getTimeZone(\"Asia/Shanghai\"));\n return formatter.format(date);\n }", "public String convertTimeMillisecondsAsLongToDurationNoLeadZero(long milliseconds) {\n\t\t\t\tString hours = String.format(\"%02d\", TimeUnit.MILLISECONDS.toHours(milliseconds));\n\t\t\t\tString minutes = String.format(\"%02d\",\n\t\t\t\t\t TimeUnit.MILLISECONDS.toMinutes(milliseconds) - TimeUnit.HOURS.toMinutes(TimeUnit.MILLISECONDS.toHours(milliseconds)));\n\t\t\t String seconds = String.format(\"%02d\",\n\t\t\t TimeUnit.MILLISECONDS.toSeconds(milliseconds) - TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS.toMinutes(milliseconds)));\n\t\t\tif (Integer.valueOf(hours) == 0) {\n\t\t\t\tint min = Integer.valueOf(minutes);\n\t\t\t if (min != 0) { minutes = String.valueOf(min); }\n\t\t\t String duration = minutes + \":\" + seconds;\n\t\t\t return duration;\n\t\t\t} else {\n\t\t\t hours = String.valueOf(Integer.valueOf(hours));\n\t\t\t String duration = hours + \":\" + minutes + \":\" + seconds;\n\t\t\t return duration;\n\t\t\t} \n\t\t\t}", "public String milliSecondsToTimer(long milliseconds){\n\t\tString finalTimerString = \"\";\n\t\tString secondsString = \"\";\n\t\t\n\t\t// Convert total duration into time\n\t\t int hours = (int)( milliseconds / (1000*60*60));\n\t\t int minutes = (int)(milliseconds % (1000*60*60)) / (1000*60);\n\t\t int seconds = (int) ((milliseconds % (1000*60*60)) % (1000*60) / 1000);\n\t\t // Add hours if there\n\t\t if(hours > 0){\n\t\t\t finalTimerString = hours + \":\";\n\t\t }\n\t\t \n\t\t // Prepending 0 to seconds if it is one digit\n\t\t if(seconds < 10){ \n\t\t\t secondsString = \"0\" + seconds;\n\t\t }else{\n\t\t\t secondsString = \"\" + seconds;}\n\t\t \n\t\t finalTimerString = finalTimerString + minutes + \":\" + secondsString;\n\t\t\n\t\t// return timer string\n\t\treturn finalTimerString;\n\t}", "public static String getElapsedTimeFromMilliseconds(long inputTime)\r\n {\r\n String format = String.format(\"%%0%dd\", 2);\r\n long elapsedTime = inputTime / 1000000;\r\n String millisecond = String.format(format, elapsedTime % 1000);\r\n String seconds = String.format(format, (elapsedTime/1000) % 60);\r\n String minutes = String.format(format, ((elapsedTime/1000) % 3600) / 60);\r\n String hours = String.format(format, (elapsedTime/1000) / 3600);\r\n\r\n hours = hours.equals(\"00\") ? \"\" : (Integer.parseInt(hours) < 9 ? hours.substring(hours.lastIndexOf(\"0\") + 1)+\":\" :hours+\":\");\r\n minutes = minutes.equals(\"00\") ? \"\" : (Integer.parseInt(minutes) < 9 ? minutes.substring(minutes.lastIndexOf(\"0\") + 1)+\":\" :minutes+\":\");\r\n seconds = seconds.equals(\"00\") ? \"\" : (Integer.parseInt(seconds) < 9 ? seconds.substring(seconds.lastIndexOf(\"0\") + 1)+\",\" :seconds+\",\");\r\n millisecond = millisecond.equals(\"00\") ? \"\" : millisecond+(seconds.equals(\"\") ? \"ms\":(minutes.equals(\"\") ? \" sec\" : \" min\"));\r\n String time = hours+minutes+seconds+millisecond;\r\n return time;\r\n }", "public static String formatTime(long elapsed) {\n int[] convConst = {100, 60, 60, 24};\n int[] formatValues = new int[convConst.length];\n\n for (int i = 0; i < (convConst.length & formatValues.length); i++) {\n if (i > 0) elapsed /= convConst[i - 1];\n formatValues[i] = (int) (elapsed % convConst[i]);\n }\n\n int[] trimmed = ArrayUtils.autobox(ArrayUtils.reverse(ArrayUtils.trimBack(ArrayUtils.autobox(formatValues), 0)));\n String[] filled = new String[trimmed.length];\n\n for (int i = 0; i < (trimmed.length & filled.length); i++)\n filled[i] = i > 0 ? StringUtils.fillLeading(\"\" + trimmed[i], '0', 2) : \"\" + trimmed[i];\n\n List<String> filledList = new ArrayList<>(Arrays.asList(filled));\n if (filledList.size() <= 1) filledList.add(0, \"0\");\n\n return String.join(\".\", String.join(\":\", filledList.subList(0, filledList.size() - 1)), filledList.get(filledList.size() - 1));\n }", "private String TimeConversion() {\n\n int hours, minutes, seconds, dayOfWeek, date, month, year;\n\n seconds = ((raw[27] & 0xF0) >> 4) + ((raw[28] & 0x03) << 4);\n minutes = ((raw[28] & 0xFC) >> 2);\n hours = (raw[29] & 0x1F);\n dayOfWeek = ((raw[29] & 0xE0) >> 5);\n date = (raw[30]) & 0x1F;\n month = ((raw[30] & 0xE0) >> 5) + ((raw[31] & 0x01) << 3);\n year = (((raw[31] & 0xFE) >> 1) & 255) + 2000;\n\n\n\n return hR(month) + \"/\" + hR(date) + \"/\" + year + \" \" + hR(hours) + \":\" + hR(minutes) + \":\" + hR(seconds) + \":00\";\n }", "public static String millisecondsToDateTimeDuration(long milliseconds) {\n long hours = MILLISECONDS.toHours(milliseconds);\n long minutes = MILLISECONDS.toMinutes(milliseconds % MINUTES_MOD);\n long seconds = MILLISECONDS.toSeconds((milliseconds % MINUTES_MOD) % SECONDS_MOD);\n\n return String.format(\"PT%02dH%02dM%02dS\", hours, minutes, seconds);\n }", "public static String millisecondsToString(long milliseconds) {\n if (milliseconds == 0 || milliseconds < MINUTE_IN_MILLIS) {\n return \"0 min\";\n }\n\n String output = \"\";\n\n long hours = MILLISECONDS.toHours(milliseconds);\n if (hours > 0) {\n output = hours + \" hr \";\n }\n\n long minutes = MILLISECONDS.toMinutes(milliseconds);\n long leftOverMinutes = minutes - HOURS.toMinutes(hours);\n\n if (leftOverMinutes > 0) {\n output += leftOverMinutes + \" min\";\n }\n return output.trim();\n }", "public String getTimeInString() {\n int minutes = (time % 3600) / 60;\n int seconds = time % 60;\n String timeString = String.format(\"%02d:%02d\", minutes, seconds);\n\n return timeString;\n }", "public static String convert(int secs) {\n int h = secs / 3600, i = secs - h * 3600, m = i / 60, s = i - m * 60;\n String timeF = \"\";\n\n if (h < 10) {\n timeF = timeF + \"\";\n }\n timeF = timeF + h + \" hour(s) \";\n if (m < 10) {\n timeF = timeF + \"\";\n }\n timeF = timeF + m + \" minute(s) \";\n if (s < 10) {\n timeF = timeF + \"\";\n }\n timeF = timeF + s + \" second(s) \";\n\n return timeF;\n }", "public String convertTimeMillisecondsAsLongToDurationAuto(long milliseconds) {\n\t\t\t\tString hours = String.format(\"%02d\", TimeUnit.MILLISECONDS.toHours(milliseconds));\n\t\t\t\tString minutes = String.format(\"%02d\",\n\t\t\t\t\t TimeUnit.MILLISECONDS.toMinutes(milliseconds) - TimeUnit.HOURS.toMinutes(TimeUnit.MILLISECONDS.toHours(milliseconds)));\n\t\t\t String seconds = String.format(\"%02d\",\n\t\t\t TimeUnit.MILLISECONDS.toSeconds(milliseconds) - TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS.toMinutes(milliseconds)));\n\t\t\tif (Integer.valueOf(hours) == 0) {\n\t\t\t\tString duration = minutes + \":\" + seconds;\n\t\t\t return duration;\n\t\t\t} else {\n\t\t\t String duration = hours + \":\" + minutes + \":\" + seconds;\n\t\t\t return duration;\n\t\t\t} \n\t\t\t}", "public static String formatTime(long timeDiff){\n StringBuilder buf = new StringBuilder();\n long hours = timeDiff / (60*60*1000);\n long rem = (timeDiff % (60*60*1000));\n long minutes = rem / (60*1000);\n rem = rem % (60*1000);\n long seconds = rem / 1000;\n\n if (hours != 0){\n buf.append(hours);\n buf.append(\" hrs, \");\n }\n if (minutes != 0){\n buf.append(minutes);\n buf.append(\" mins, \");\n }\n\n if (seconds != 0) {\n buf.append(seconds);\n buf.append(\" sec\");\n }\n\n if (timeDiff < 1000) {\n buf.append(timeDiff);\n buf.append(\" msec\");\n }\n return buf.toString();\n }", "public static String formatMillis(int millis) {\n String result = \"\";\n int hr = millis / 3600000;\n millis %= 3600000;\n int min = millis / 60000;\n millis %= 60000;\n int sec = millis / 1000;\n if (hr > 0) {\n result += hr + \":\";\n }\n if (min >= 0) {\n if (min > 9) {\n result += min + \":\";\n } else {\n result += \"0\" + min + \":\";\n }\n }\n if (sec > 9) {\n result += sec;\n } else {\n result += \"0\" + sec;\n }\n return result;\n }", "public static String formatMillis(int millis) {\n String result = \"\";\n int hr = millis / 3600000;\n millis %= 3600000;\n int min = millis / 60000;\n millis %= 60000;\n int sec = millis / 1000;\n if (hr > 0) {\n result += hr + \":\";\n }\n if (min >= 0) {\n if (min > 9) {\n result += min + \":\";\n } else {\n result += \"0\" + min + \":\";\n }\n }\n if (sec > 9) {\n result += sec;\n } else {\n result += \"0\" + sec;\n }\n return result;\n }", "public static String updateText(long milliseconds) {\n\t\tString finalTimeString = \"\";\n\t\tString secondsString = \"\";\n\n\t\tint hours = (int) (milliseconds / (1000 * 60 * 60));\n\t\tint minutes = (int) ((milliseconds % (1000 * 60 * 60)) / (1000 * 60));\n\t\tint seconds = (int) ((milliseconds % (1000 * 60 * 60)) % (1000 * 60) / 1000);\n\n\t\tif (hours > 0)\n\t\t\tfinalTimeString = hours + \":\";\n\n\t\tif (seconds < 10)\n\t\t\tsecondsString = \"0\" + seconds;\n\t\telse\n\t\t\tsecondsString = \"\" + seconds;\n\n\t\tfinalTimeString = finalTimeString + minutes + \":\" + secondsString;\n\n\t\treturn finalTimeString;\n\t}", "public static String millisToLongDHMS(long duration) {\n StringBuilder res = new StringBuilder();\n long temp = 0;\n if (duration >= ONE_SECOND) {\n temp = duration / ONE_DAY;\n if (temp > 0) {\n duration -= temp * ONE_DAY;\n res.append(temp).append(\" day\").append(temp > 1 ? \"s\" : \"\").append(duration >= ONE_MINUTE ? \", \" : \"\");\n }\n \n temp = duration / ONE_HOUR;\n if (temp > 0) {\n duration -= temp * ONE_HOUR;\n res.append(temp).append(\" hour\").append(temp > 1 ? \"s\" : \"\").append(duration >= ONE_MINUTE ? \", \" : \"\");\n }\n \n temp = duration / ONE_MINUTE;\n if (temp > 0) {\n duration -= temp * ONE_MINUTE;\n res.append(temp).append(\" minute\").append(temp > 1 ? \"s\" : \"\");\n }\n \n if (!res.toString().equals(\"\") && duration >= ONE_SECOND) {\n res.append(\" and \");\n }\n \n temp = duration / ONE_SECOND;\n if (temp > 0) {\n res.append(temp).append(\" second\").append(temp > 1 ? \"s\" : \"\");\n }\n return res.toString();\n } else {\n return \"0 second\";\n }\n }", "public static String formatTime(long time) {\n long tmp = time;\n int hour = (int) (time / 3600);\n tmp -= hour * 3600;\n int min = (int) (tmp / 60);\n int sec = (int) (tmp - min * 60);\n\n String hourText = hour < 10 ? \"0\" + hour : \"\" + hour;\n String minText = min < 10 ? \"0\" + min : \"\" + min;\n String secText = sec < 10 ? \"0\" + sec : \"\" + sec;\n\n\n return hourText + \":\" + minText + \":\" + secText;\n }", "public static String GetTimeString(long nanoseconds) {\n\t\tStringBuilder exTime = new StringBuilder();\n\t\tlong tmp;\n\n\t\ttmp = nanoseconds / 86400000000000L;\n if (tmp != 0) {\n exTime.append(tmp);\n if(tmp != 1)\n exTime.append(\" days\");\n else exTime.append(\" day\");\n }\n nanoseconds -= 86400000000000L * tmp;\n\n tmp = nanoseconds / 3600000000000L;\n if (tmp != 0) {\n if(exTime.length() > 0)\n exTime.append(\", \");\n exTime.append(tmp);\n if(tmp != 1)\n exTime.append(\" hours\");\n else exTime.append(\" hour\");\n }\n nanoseconds -= 3600000000000L * tmp;\n\n tmp = nanoseconds / 60000000000L;\n if (tmp != 0) {\n if(exTime.length() > 0)\n exTime.append(\", \");\n exTime.append(tmp);\n if(tmp != 1)\n exTime.append(\" minutes\");\n else exTime.append(\" minute\");\n }\n nanoseconds -= 60000000000L * tmp;\n\n tmp = nanoseconds / 1000000000L;\n if (tmp != 0) {\n if(exTime.length() > 0)\n exTime.append(\", \");\n exTime.append(tmp);\n if(tmp != 1)\n exTime.append(\" seconds\");\n else exTime.append(\" second\");\n }\n nanoseconds -= 1000000000L * tmp;\n\n tmp = nanoseconds / 1000000L ;\n if (tmp != 0) {\n if(exTime.length() > 0)\n exTime.append(\", \");\n exTime.append(tmp);\n if(tmp != 1)\n exTime.append(\" milliseconds\");\n else exTime.append(\" millisecond\");\n }\n nanoseconds -= 1000000L * tmp;\n\n tmp = nanoseconds / 1000L ;\n if (tmp != 0) {\n if(exTime.length() > 0)\n exTime.append(\", \");\n exTime.append(tmp);\n if(tmp != 1)\n exTime.append(\" microseconds\");\n else exTime.append(\" microsecond\");\n }\n nanoseconds -= 1000L * tmp;\n\n tmp = nanoseconds;\n if (tmp != 0) {\n if(exTime.length() > 0)\n exTime.append(\", \");\n exTime.append(tmp);\n if(tmp != 1)\n exTime.append(\" nanoseconds\");\n else exTime.append(\" nanosecond\");\n }\n \n return exTime.toString();\n\t}", "public static String format( long elapsedMillis ) {\n String s = \"\";\n int hours = (int) ( elapsedMillis / ( 1000 * 60 * 60 ) );\n int minutes = (int) ( ( elapsedMillis % ( 1000 * 60 * 60 ) ) / ( 1000 * 60 ) );\n int seconds = (int) ( ( ( elapsedMillis % ( 1000 * 60 * 60 ) ) % ( 1000 * 60 ) ) / 1000 );\n if ( hours > 0 ) {\n // hours:minutes:seconds\n Object[] args = { ONE_DIGIT_TIME_FORMAT.format( hours ), TWO_DIGIT_TIME_FORMAT.format( minutes ), TWO_DIGIT_TIME_FORMAT.format( seconds ) };\n s = MessageFormat.format( \"{0}:{1}:{2}\", args );\n }\n else {\n // minutes:seconds\n Object[] args = { ONE_DIGIT_TIME_FORMAT.format( minutes ), TWO_DIGIT_TIME_FORMAT.format( seconds ) };\n s = MessageFormat.format( \"{0}:{1}\", args );\n }\n return s;\n }", "public static String secondsToTimeString(double time) {\n\t\tint rawSecs = (int) Math.floor(time);\n\t\tdouble millis = time - rawSecs;\n\t\tint days = Math.floorDiv(rawSecs, 86400);\n\t\tint hours = Math.floorDiv((rawSecs % 86400), 3600);\n\t\tint minutes = Math.floorDiv((rawSecs % 3600), 60);\t\n\t\tint seconds = rawSecs % 60;\n\n\t\tString ret;\n\t\tif(days > 0)\n\t\t\tret = String.format(\"%d:%02d:%02d:%02d\", days, hours, minutes, seconds);\n\t\telse if(hours > 0)\n\t\t\tret = String.format(\"%d:%02d:%02d\", hours, minutes, seconds);\n\t\telse\n\t\t\tret = String.format(\"%d:%02d\", minutes, seconds);\n\t\t\n\t\tif(millis != 0)\n\t\t\tret += \".\"+ String.format(\"%03d\", (int)(millis*1000));\n\t\t\n\t\treturn ret;\n\t}", "public static String formatDuration(int hours, int minutes, int seconds, int millis){\n Date tmpDate = new Date();\n long durationMillis = (hours * 60 * 60 * 1000) + (minutes * 60 * 1000) + (seconds * 1000) + millis;\n\n int totalHours = (int) Math.floor(durationMillis / 60 / 60 / 1000);\n int totalMinutes = (int) Math.floor((durationMillis - (totalHours * 60 * 60 * 1000)) / 60 / 1000);\n int totalSeconds = (int) Math.floor((durationMillis - (totalHours * 60 * 60 * 1000) - (totalMinutes * 60 * 1000)) / 1000);\n //Milliseconds are... whatever.\n\n tmpDate.setHours(totalHours);\n tmpDate.setMinutes(totalMinutes);\n tmpDate.setSeconds(totalSeconds);\n if(totalHours > 0){\n return HOURS_MINUTES_SECONDS.format(tmpDate);\n } else {\n return MINUTES_SECONDS.format(tmpDate);\n }\n }", "public static String millisToLongDhms(long duration) {\r\n if (duration < ONE_SECOND) {\r\n return \"0 second\";\r\n }\r\n int[] items = millisToDHMS(duration);\r\n StringBuilder res = new StringBuilder();\r\n if (items[0] > 0) {\r\n res.append(items[0]).append(\" day\").append(items[0] > 1 ? \"s\" : \"\")\r\n .append(items[1] > 0 ? \", \" : \"\");\r\n }\r\n if (items[1] > 0) {\r\n res.append(items[1]).append(\" hour\").append(items[1] > 1 ? \"s\" : \"\")\r\n .append(items[2] > 0 ? \", \" : \"\");\r\n }\r\n if (items[2] > 0) {\r\n res.append(items[2]).append(\" minute\").append(items[2] > 1 ? \"s\" : \"\");\r\n }\r\n if (res.length() > 0 && items[3] > 0) {\r\n res.append(\" and \");\r\n }\r\n if (items[3] > 0) {\r\n res.append(items[3]).append(\" second\").append(items[3] > 1 ? \"s\" : \"\");\r\n }\r\n return res.toString();\r\n }", "java.lang.String getTime();", "public static String timem( long p_lMillis ) {\n String sTime = \"\";\n if ( p_lMillis > 999 ) sTime =time( p_lMillis );\n sTime += \" \" + (p_lMillis % 1000 ) + \"ms\"; \n return sTime;\n }", "public static String getWorkTimeSecondsInFormattedString(long seconds) {\r\n int totalMinutos = (int) (seconds/60);\r\n int totalHoras = totalMinutos / 60;\r\n int restoMinutos = totalMinutos % 60;\r\n int restoSegundos = (int) (seconds % 60);\r\n\r\n return (totalHoras + \":\" + restoMinutos + \":\" + restoSegundos);\r\n\r\n }", "private String secondsToMinutesAndSeconds(double seconds) {\n\t\tint numberOfminutes = (int) (seconds / 60);\n\t\tint numberOfSeconds = (int) (seconds % 60);\n\t\tif (numberOfSeconds < 10) {\n\t\t\treturn numberOfminutes + \":0\" + numberOfSeconds;\n\t\t} else {\n\t\t\treturn numberOfminutes + \":\" + numberOfSeconds;\n\t\t}\n\t}", "private String formatTime(long nanoSeconds)\n {\n int hours, minutes, remainder, totalSecondsNoFraction;\n double totalSeconds, seconds;\n\n totalSeconds = (double) nanoSeconds / 1000000000.0;\n\n hours = (int) totalSeconds / 3600;\n totalSeconds -= hours * 3600;\n\n minutes = (int) totalSeconds / 60;\n totalSeconds -= minutes * 60;\n\n seconds = totalSeconds;\n\n // Formatting the string that conatins hours, minutes and seconds\n StringBuilder result = new StringBuilder(\"\");\n if (hours > 0) {\n if (hours < 10)\n result.append(\"0\");\n result.append(hours);\n }\n else\n result.append(\"00\");\n result.append(\":\");\n if (minutes > 0) {\n if (minutes < 10)\n result.append(\"0\");\n result.append(minutes);\n }\n else\n result.append(\"00\");\n result.append(\":\");\n if (seconds > 0) {\n if (seconds < 10)\n result.append(\"0\");\n DecimalFormat df = new DecimalFormat(\"##.00\");\n result.append(df.format(seconds));\n }\n else\n result.append(\"00\");\n return result.toString();\n }", "public static String getFriendlyTime(long duration) {\n final StringBuilder sb = new StringBuilder();\n\n long months = TimeUnit.MILLISECONDS.toDays(duration);\n if (months >= 30) {\n months = months / 30;\n duration -= TimeUnit.DAYS.toMillis(months * 30);\n } else {\n months = 0;\n }\n\n final long years = months / 12;\n if (years > 0) {\n months -= Math.floor(years * 12);\n duration -= TimeUnit.DAYS.toMillis(years * 365);\n }\n\n final long days = TimeUnit.MILLISECONDS.toDays(duration);\n duration -= TimeUnit.DAYS.toMillis(days);\n\n final long hours = TimeUnit.MILLISECONDS.toHours(duration);\n duration -= TimeUnit.HOURS.toMillis(hours);\n\n final long minutes = TimeUnit.MILLISECONDS.toMinutes(duration);\n duration -= TimeUnit.MINUTES.toMillis(minutes);\n\n final long seconds = TimeUnit.MILLISECONDS.toSeconds(duration);\n\n if (years > 0) {\n sb.append(\" \").append(years);\n sb.append(\" \").append(years == 1 ? \"year\" : \"years\");\n }\n\n if (months > 0) {\n sb.append(\" \").append(months);\n sb.append(\" \").append(months == 1 ? \"month\" : \"months\");\n }\n\n if (days > 0) {\n sb.append(\" \").append(days);\n sb.append(\" \").append(days == 1 ? \"day\" : \"days\");\n }\n\n if (hours > 0) {\n sb.append(\" \").append(hours);\n sb.append(\" \").append(hours == 1 ? \"hour\" : \"hours\");\n }\n\n if (minutes > 0) {\n sb.append(\" \").append(minutes);\n sb.append(\" \").append(minutes == 1 ? \"minute\" : \"minutes\");\n }\n\n if (seconds > 0) {\n sb.append(\" \").append(seconds);\n sb.append(\" \").append(seconds == 1 ? \"second\" : \"seconds\");\n }\n\n return sb.toString().trim();\n }", "private static String format(double elapsedSec) {\n\t\tint elapsedMs = (int) Math.round(elapsedSec * 1000);\n\t\treturn Integer.toString(elapsedMs) + \" ms\";\n\t}", "long getTimeInMilliSeconds();", "public static String longToHHMM(long longTime)\r\n/* 150: */ {\r\n/* 151:219 */ SimpleDateFormat formatter = new SimpleDateFormat(\"HH:mm\");\r\n/* 152:220 */ Date strtodate = new Date(longTime);\r\n/* 153:221 */ return formatter.format(strtodate);\r\n/* 154: */ }", "private static String timeConversion(long totalSeconds) {\n\n final int MINUTES_IN_AN_HOUR = 60;\n final int SECONDS_IN_A_MINUTE = 60;\n\n long seconds = totalSeconds % SECONDS_IN_A_MINUTE;\n long totalMinutes = totalSeconds / SECONDS_IN_A_MINUTE;\n long minutes = totalMinutes % MINUTES_IN_AN_HOUR;\n long hours = totalMinutes / MINUTES_IN_AN_HOUR;\n\n StringBuilder time = new StringBuilder();\n time.append(totalSeconds < 0 ? \"-\" : \"\");\n time.append(hours < 10 ? \"0\" : \"\");\n time.append(Math.abs(hours) + \":\");\n time.append(minutes < 10 ? \"0\" : \"\");\n time.append(Math.abs(minutes) + \":\");\n time.append(seconds < 10 ? \"0\" : \"\");\n time.append(Math.abs(seconds));\n\n return time.toString();\n }", "public String formatTime() {\n if ((myGameTicks / 16) + 1 != myOldGameTicks) {\n myTimeString = \"\";\n myOldGameTicks = (myGameTicks / 16) + 1;\n int smallPart = myOldGameTicks % 60;\n int bigPart = myOldGameTicks / 60;\n myTimeString += bigPart + \":\";\n if (smallPart / 10 < 1) {\n myTimeString += \"0\";\n }\n myTimeString += smallPart;\n }\n return (myTimeString);\n }", "public String convertCalendarMillisecondsAsLongToDateTimeHourMinSec(long fingerprint) {\n\t\t\t\tDateFormat format = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t\t\t\tDate date = new Date(fingerprint);\n\t\t\t\treturn format.format(date);\n\t\t\t}", "public static String buildTimeString(long time) {\r\n\t\t\r\n\t\t// Days\r\n\t\tlong days = time / (1000 * 60 * 60 * 24);\r\n\t\ttime = time % (1000 * 60 * 60 * 24);\r\n\t\t\r\n\t\tlong hours = time / (1000 * 60 * 60);\r\n\t\ttime = time % (1000 * 60 * 60);\r\n\t\t\r\n\t\tlong mins = time / (1000 * 60);\r\n\t\ttime = time % (1000 * 60);\r\n\t\t\r\n\t\tlong secs = time / 1000;\r\n\t\t\r\n\t\tStringBuilder builder = new StringBuilder();\r\n\t\tif (days>0) {\r\n\t\t\tbuilder.append(days + \" d : \");\r\n\t\t}\r\n\t\tbuilder.append(String.format(\"%02d h : \", hours));\r\n\t\tbuilder.append(String.format(\"%02d m : \", mins));\r\n\t\tbuilder.append(String.format(\"%02d s\", secs));\r\n\r\n\t\treturn builder.toString();\r\n\t}", "public static String convertMillisTime(long time_millis, String format) {\n String result = \"\";\n if (time_millis <= 0) {\n return result;\n }\n\n try {\n SimpleDateFormat dateFormat = new SimpleDateFormat(format, Locale.US);\n result = dateFormat.format(new Date(time_millis));\n } catch (IllegalArgumentException e) {\n e.printStackTrace();\n }\n\n return result;\n }", "static public String getElapsed(long lTime) {\n // Convert from milliseconds to seconds\n lTime /= 1000;\n\n // Get hours, minutes, seconds\n int nHr = (int) lTime / 3600;\n lTime %= 3600;\n int nMn = (int) lTime / 60;\n lTime %= 60;\n int nSc = (int) lTime;\n\n // Convert to a string and return\n return (((nHr < 10) ? \"0\" + nHr : new Integer(nHr).toString()) + \":\"\n + ((nMn < 10) ? \"0\" + nMn : new Integer(nMn).toString()) + \":\" + ((nSc < 10) ? \"0\"\n + nSc\n : new Integer(nSc).toString()));\n }", "private String formatTime(int seconds){\n return String.format(\"%02d:%02d\", seconds / 60, seconds % 60);\n }", "public static double getTimeMs(){\n return System.nanoTime()*nanoToMs;\n }", "public static String convertMillisTime(long time_millis) {\n return convertMillisTime(time_millis, \"yyyy-MM-dd\");\n }", "private String computeTime(long l_time){\n \tString studyTime = \" \";\n \tlong hours, mins, secs;\n \t\n \tif (l_time > 3600) {\n \t\thours = l_time / 3600;\n \t\tl_time = l_time % 3600;\n \t\tmins = l_time / 60;\n \t\tsecs = l_time % 60;\n \t\tif (hours > 1) {\n \t\t\tstudyTime = Long.toString(hours) + \" hours \" + Long.toString(mins) + \" minutes and \" + Long.toString(secs) + \" seconds\";\n \t\t} else {\n \t\t\tstudyTime = Long.toString(hours) + \" hour \" + Long.toString(mins) + \" minutes and \" + Long.toString(secs) + \" seconds\";\n \t\t}\n \t} else if (l_time > 60 ){\n \t\tmins = l_time / 60;\n \t\tsecs = l_time % 60;\n \t\tif (mins > 1) {\n \t\t\tstudyTime = Long.toString(mins) + \" minutes and \" + Long.toString(secs) + \" seconds\";\n \t\t} else {\n \t\t\tstudyTime = Long.toString(mins) + \" minute and \" + Long.toString(secs) + \" seconds\";\n \t\t}\n \t} else {\n \t\tif (l_time > 1) {\n \t\t\tstudyTime = Long.toString(l_time) + \" seconds\";\n \t\t} else {\n \t\t\tstudyTime = Long.toString(l_time) + \" second\";\n \t\t}\n \t}\n \treturn studyTime;\n }", "public static String time_str(double t) {\n int hours = (int) t/3600;\n int rem = (int) t - hours*3600;\n int mins = rem / 60;\n int secs = rem - mins*60;\n return String.format(\"%02d:%02d:%02d\", hours, mins, secs);\n //return hoursMinutesSeconds(t);\n }", "public static String getDurationString(long seconds) {\n long hours = seconds / 3600;\n long minutes = (seconds % 3600) / 60;\n long secs = seconds % 60;\n if (hours > 0) {\n return twoDigitString(hours) + \":\" + twoDigitString(minutes) + \":\" + twoDigitString(secs);\n }\n return twoDigitString(minutes) + \":\" + twoDigitString(secs);\n }", "public static String getPrintToTextTime() {\n @SuppressLint(\"SimpleDateFormat\") SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n return sdf.format(System.currentTimeMillis());\n }", "protected String toXSTime() {\n\t\treturn String.format(\"%s,%s,%s,%s\",\"{0:00}:{1:00}:{2:00}\",\n\t\t\t\tthis.getHours(), this\n\t\t\t\t.getMinutes(), this.getSeconds());\n\t}", "private String formatTime(long length) {\n\t\tString hms = \"\";\n\t\tif(length < 3600000) {\n\t\t\thms = String.format(\"%02d:%02d\",\n\t\t\t\t\tTimeUnit.MILLISECONDS.toMinutes(length) - TimeUnit.HOURS.toMinutes(TimeUnit.MILLISECONDS.toHours(length)),\n\t\t\t\t\tTimeUnit.MILLISECONDS.toSeconds(length) - TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS.toMinutes(length)));\n\t\t} else {\n\t\t\thms = String.format(\"%02d:%02d:%02d\", TimeUnit.MILLISECONDS.toHours(length),\n\t\t\t\t\tTimeUnit.MILLISECONDS.toMinutes(length) - TimeUnit.HOURS.toMinutes(TimeUnit.MILLISECONDS.toHours(length)),\n\t\t\t\t\tTimeUnit.MILLISECONDS.toSeconds(length) - TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS.toMinutes(length)));\n\t\t}\n\n\t\treturn hms;\n\t}", "public static String format(long seconds) {\n\t\tlong minutes = seconds / SECONDS_PER_MINUTE;\n\t\tlong hours = 0;\n\t\tif (minutes > MINUTES_PER_HOUR) {\n\t\t\thours = minutes / MINUTES_PER_HOUR;\n\t\t\tminutes = minutes % MINUTES_PER_HOUR;\n\t\t}\n\t\tseconds = seconds % SECONDS_PER_MINUTE;\n\t\treturn doFormat(hours, minutes, seconds);\n\t}", "public static String time(int time) {\n return time((long)time);\n }", "public static String hoursMinutesSeconds(double t) {\n int hours = (int) t/3600;\n int rem = (int) t - hours*3600;\n int mins = rem / 60;\n int secs = rem - mins*60;\n //return String.format(\"%2d:%02d:%02d\", hours, mins, secs);\n return String.format(\"%d:%02d:%02d\", hours, mins, secs);\n }", "public float getTimeSeconds() { return getTime()/1000f; }", "public String timeToText(long timeInMillis)\n {\n // FIRST CALCULATE THE NUMBER OF HOURS,\n // SECONDS, AND MINUTES\n long hours = timeInMillis/MILLIS_IN_AN_HOUR;\n timeInMillis -= hours * MILLIS_IN_AN_HOUR; \n long minutes = timeInMillis/MILLIS_IN_A_MINUTE;\n timeInMillis -= minutes * MILLIS_IN_A_MINUTE;\n long seconds = timeInMillis/MILLIS_IN_A_SECOND;\n \n // THEN ADD THE TIME OF GAME SUMMARIZED IN PARENTHESES\n String minutesText = \"\" + minutes;\n if (minutes < 10) minutesText = \"0\" + minutesText;\n String secondsText = \"\" + seconds;\n if (seconds < 10) secondsText = \"0\" + secondsText;\n return hours + \":\" + minutesText + \":\" + secondsText;\n }", "public static String millisToShortDHMS(long duration) {\n String res = \"\";\n duration /= ONE_SECOND;\n int seconds = (int) (duration % SECONDS);\n duration /= SECONDS;\n int minutes = (int) (duration % MINUTES);\n duration /= MINUTES;\n int hours = (int) (duration % HOURS);\n int days = (int) (duration / HOURS);\n if (days == 0) {\n res = String.format(\"%02d:%02d:%02d\", hours, minutes, seconds);\n } else {\n res = String.format(\"%dd%02d:%02d:%02d\", days, hours, minutes, seconds);\n }\n return res;\n }", "public String durationInMinutesAndSeconds( ){\n\t\t\n\t\tString time = \"\";\n\t\t\n\t\tint duration = totalTime();\n\n\t\tint minutes = 0;\n\n\t\tint seconds = 0;\n\n\t\tminutes = (int) (duration/60);\n\n\t\tseconds = (int) (duration- (minutes*60));\n\n\t\ttime = minutes + \":\" + seconds +\"\";\n\t\treturn time;\n\t\t\n\t}", "public static String getTimeAsString(final double timeInMillis, final Locale locale) {\n\t\tif (timeInMillis > 1.0) {\n\t\t\treturn getTimeAsString((long) timeInMillis, locale);\n\t\t}\n\t\tFormat nf = new DecimalFormat(\"#.###\", new DecimalFormatSymbols(locale));\n\t\treturn nf.format(timeInMillis) + \" ms\";\n\t}", "public static String getTimeString(int t) {\n\t\tint hours = t / 3600;\n\t\tint minutes = (t / 60) % 60;\n\t\tint seconds = t % 60;\n\t\treturn (hours < 10 ? \"0\" : \"\")\n\t\t\t+ hours\n\t\t\t+ (minutes < 10 ? \":0\" : \":\")\n\t\t\t+ minutes\n\t\t\t+ (seconds < 10 ? \":0\" : \":\")\n\t\t\t+ seconds;\n\t}", "public synchronized static DateFormat getMillisecondTimeFormat()\n\t{\n\t\treturn MILLISECOND_TIME_FORMAT;\n\t}", "public static String converTimeToReadable(long time) {\n // check if its in the last minute:\n long diff = (new Date()).getTime() - time;\n // TimeUnit.MILLISECONDS.toMinutes(diff)\n\n if (diff / 60000 < 1) {\n return \"now\";\n }\n\n // if its more then a minute, then write time\n String str = \"\";\n Date date = new Date(time);\n\n try {\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n Date currentDay = sdf.parse(sdf.format(new Date()));\n Date lastLocationDay = sdf.parse(sdf.format(time));\n long daysDifference = TimeUnit.MILLISECONDS\n .toDays(currentDay.getTime() - lastLocationDay.getTime());\n\n // ispis:\n str += getNameOfTheDay(daysDifference, lastLocationDay);\n\n } catch (ParseException ex) {\n // if something fails, just write the date\n str += new SimpleDateFormat(\"dd.MM.yyyy\").format(date);\n }\n\n /*\n String dayOfTheWeek = (String) DateFormat.format(\"EEEE\", date); // Thursday\n String day = (String) DateFormat.format(\"dd\", date); // 20\n String monthString = (String) DateFormat.format(\"MMM\", date); // Jun\n String monthNumber = (String) DateFormat.format(\"MM\", date); // 06\n String year = (String) DateFormat.format(\"yyyy\", date); // 2013\n */\n\n str += \", \";\n str += new SimpleDateFormat(\"HH:mm\").format(date);\n\n return str;\n }", "public String getElapsedTimeHoursMinutesSecondsString(int milisec) {\n\t\t int time = milisec/1000;\n\t\t String seconds = Integer.toString((int)(time % 60)); \n\t\t String minutes = Integer.toString((int)((time % 3600) / 60)); \n\t\t String hours = Integer.toString((int)(time / 3600)); \n\t\t for (int i = 0; i < 2; i++) { \n\t\t if (seconds.length() < 2) { \n\t\t seconds = \"0\" + seconds; \n\t\t } \n\t\t if (minutes.length() < 2) { \n\t\t minutes = \"0\" + minutes; \n\t\t } \n\t\t if (hours.length() < 2) { \n\t\t hours = \"0\" + hours; \n\t\t } \n\t\t }\n\t\t String timeString = hours + \":\" + minutes + \":\" + seconds; \n\t\t return timeString;\n\t }", "public static String getTimeString() {\n\t\treturn getTimeString(time);\n\t}", "private String secsToTime(int secs) {\n String min = secs / 60 + \"\";\n String sec = secs % 60 + \"\";\n if(sec.length() == 1) {\n sec = \"0\" + sec;\n }\n\n return min + \":\" + sec;\n }", "public static String formatTimeInterval(final long intervalMilliseconds) {\r\n \tlong l = intervalMilliseconds;\r\n final long hr = TimeUnit.MILLISECONDS.toHours(l);\r\n final long min = TimeUnit.MILLISECONDS.toMinutes(l - TimeUnit.HOURS.toMillis(hr));\r\n final long sec = TimeUnit.MILLISECONDS.toSeconds(l - TimeUnit.HOURS.toMillis(hr) - TimeUnit.MINUTES.toMillis(min));\r\n// final long ms = TimeUnit.MILLISECONDS.toMillis(l - TimeUnit.HOURS.toMillis(hr) - TimeUnit.MINUTES.toMillis(min) - TimeUnit.SECONDS.toMillis(sec));\r\n return String.format(\"%02d:%02d:%02d\" /* + \".%03d\" */, hr, min, sec /*, ms */);\r\n }", "public static String formatTime(int seconds){\n\t\tTimeZone tz = TimeZone.getTimeZone(\"UTC\");\n\t SimpleDateFormat df = new SimpleDateFormat(\"HH:mm:ss\");\n\t df.setTimeZone(tz);\n\t return df.format(new Date((long)(seconds * 1000)));\n\t}", "String formatTime(int time) {\r\n\t\tint h = time / 3600;\r\n\t\ttime %= 3600;\r\n\t\tint m = time / 60;\r\n\t\ttime %= 60;\r\n\t\tint s = time;\r\n\t\treturn String.format(\"%02d:%02d:%02d\", h, m, s);\r\n\t}", "@SuppressLint(\"SimpleDateFormat\")\n\tpublic static String getStringTime(Long time){\n\t\tSimpleDateFormat dateaf = new SimpleDateFormat(\"MM-dd\"); \n\t\tSimpleDateFormat timef = new SimpleDateFormat(\"HH:mm\"); \n\t\tString date = dateaf.format(time);\n\t\tString times = timef.format(time);\n\t\tString result = date+\" \"+times;\n\t\treturn result;\n\t}", "protected String timeToSpeed() {\n String speedValueText = \"\";\n try {\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"hh:mm:ss aa\");\n localDate = dateFormat.parse(mLastUpdateTimeTextView.getText().toString());\n long localDateMS = localDate.getTime();\n long previousDateMs = previousDate.getTime();\n double timeValueSecond = (localDateMS - previousDateMs) / 1000;\n timeSingleValue = timeValueSecond;\n double distance = Double.parseDouble(mMoveTextView.getText().toString().substring(0, mMoveTextView.length() - 2));\n double speedValue = Math.round(((distance / timeValueSecond) * 3600 / 1000)*100)/100.0;\n if (speedValue < 0.01 || Double.isNaN(speedValue) || speedValue > 10000) speedValue = 0;\n speedValueText = String.valueOf(speedValue);\n previousDate = localDate;\n }\n catch (ParseException e) {\n mSpeedTextView.setText(e.getMessage());\n }\n return speedValueText ; // String.valueOf(timeValueMS);\n }", "public static long convertTimeMillisecondsAsLongToSeconds(long milliseconds) {\n\t\t\t\tint MILLISECONDS_IN_A_SECOND = 1000;\n\t\t\t\tDouble d = Double.valueOf(milliseconds) / Double.valueOf(MILLISECONDS_IN_A_SECOND);\n\t\t\t\treturn Math.round(d);\n\t\t\t}", "public static long convertTimeMillisecondsAsStringToSeconds(String milliseconds) {\n\t\t\t\tint MILLISECONDS_IN_A_SECOND = 1000;\n\t\t\t\tDouble d = Double.valueOf(milliseconds) / Double.valueOf(MILLISECONDS_IN_A_SECOND);\n\t\t\t\treturn Math.round(d);\n\t\t\t}", "public static String tenthsToString(int time) {\r\n\t\t// If we have negative time, just return zero\r\n\t\tif ( time < 0 ) {\r\n\t\t\treturn \"0:00.0\";\r\n\t\t}\r\n\t\t\r\n\t\tint tenths = time % 10;\r\n\t\tint sec = (time / 10) % 60;\r\n\t\tint min = (time / 10) / 60;\r\n\t\treturn String.format(\"%d:%02d.%d\", min, sec, tenths);\r\n\t}", "private String readableTime(Integer minutes) {\r\n String time = \"\";\r\n if (minutes / 60.0 > 1) {\r\n time = (minutes / 60) + \" hrs, \"\r\n + (minutes % 60) + \" min\";\r\n } else {\r\n time = minutes + \" min\";\r\n }\r\n return time;\r\n }", "public static String millsToMinSec(long mills) {\n int min = (int) (mills / 1000 / 60);\n int second = (int) (mills / 1000 % 3600 % 60);\n String time = \"\";\n// if (hour < 10) {\n// time = \"0\" + hour;\n// } else {\n// time = \"\" + hour;\n// }\n if (min < 10) {\n time += \"0\" + min;\n } else {\n time += \"\" + min;\n }\n if (second < 10) {\n time += \":0\" + second;\n } else {\n time += \":\" + second;\n }\n return time;\n }", "public static String mSecsToString(long actualTimeInMseconds) {\n Date date = new Date(actualTimeInMseconds);\n DateFormat formatter = new SimpleDateFormat(\"HH:mm:ss\");\n formatter.setTimeZone(TimeZone.getTimeZone(\"UTC\"));\n return (formatter.format(date));\n }", "private String convertToDuration(Long songDuration){\n long seconds = songDuration/1000;\n long minutes = seconds / 60;\n seconds = seconds % 60;\n return minutes +\":\"+seconds;\n }", "private String formatTime(final long elapsedTicks) {\n\t\tString formattedTime = \"\";\n\t\t// should be hh:mm:ss.SSS, but 00 starts with 01\n\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"00:mm:ss.SSS\");\n\t\tCalendar calendar = Calendar.getInstance();\n\n\t\tif (elapsedTicks <= 9999) {\n\t\t\tcalendar.setTimeInMillis(0);\n\t\t\tformattedTime = formatter.format(calendar.getTime()) + String.valueOf(String.format(\"%04d\", elapsedTicks));\n\t\t} else {\n\t\t\tcalendar.setTimeInMillis(elapsedTicks * nsPerTick / nsPerMs);\n\t\t\tString formattedTicks = String.format(\"%07d\", elapsedTicks);\n\t\t\tformattedTicks = formattedTicks.substring(formattedTicks.length() - 4);\n\t\t\tformattedTime = formatter.format(calendar.getTime()) + formattedTicks;\n\t\t}\n\t\treturn formattedTime;\n\t}", "public static String getFormattedInterval(final long ms) {\n long x = ms / 1000;\n long seconds = x % 60;\n x = x / 60;\n long minutes = x % 60;\n x /= 60;\n long hours = x % 24;\n\n return String.format(Locale.US, \"%02d:%02d:%02d\", hours, minutes, seconds);\n }", "public String countTime(int miliseconds) {\n \tString timeInMinutes = new String();\n \tint minutes = miliseconds / 60000;\n \tint seconds = (miliseconds % 60000)/1000;\n \ttimeInMinutes = minutes + \":\" + (seconds<10?\"0\" + seconds:seconds);\n\t\treturn timeInMinutes;\n }", "public static String getTime(int second) {\n if (second < 10) {\n return \"00:00:0\" + second;\n }\n if (second < 60) {\n return \"00:00:\" + second;\n }\n if (second < 3600) {\n int minute = second / 60;\n second = second - minute * 60;\n if (minute < 10) {\n if (second < 10) {\n return \"00:\" + \"0\" + minute + \":0\" + second;\n }\n return \"00:\" + \"0\" + minute + \":\" + second;\n }\n if (second < 10) {\n return \"00:\" + minute + \":0\" + second;\n }\n return \"00:\" + minute + \":\" + second;\n }\n int hour = second / 3600;\n int minute = (second - hour * 3600) / 60;\n second = second - hour * 3600 - minute * 60;\n if (hour < 10) {\n if (minute < 10) {\n if (second < 10) {\n return \"0\" + hour + \":0\" + minute + \":0\" + second;\n }\n return \"0\" + hour + \":0\" + minute + \":\" + second;\n }\n if (second < 10) {\n return \"0\" + hour + \":\" + minute + \":0\" + second;\n }\n return \"0\" + hour + \":\" + minute + \":\" + second;\n }\n if (minute < 10) {\n if (second < 10) {\n return hour + \":0\" + minute + \":0\" + second;\n }\n return hour + \":0\" + minute + \":\" + second;\n }\n if (second < 10) {\n return hour + \":\" + minute + \":0\" + second;\n }\n return hour + \":\" + minute + \":\" + second;\n }", "public static String longToYYYYMMDDHHMM(long longTime)\r\n/* 157: */ {\r\n/* 158:232 */ SimpleDateFormat formatter = new SimpleDateFormat(\"yyyyMMdd HH:mm\");\r\n/* 159:233 */ Date strtodate = new Date(longTime);\r\n/* 160:234 */ return formatter.format(strtodate);\r\n/* 161: */ }", "static String getTime(int time) {\r\n\t\tint hours = time / 60;\r\n\t\tint minutes = time % 60;\r\n\r\n\t\tString ampm;\r\n\t\tif (time >= 720) ampm = \"PM\";\r\n\t\telse ampm = \"AM\";\r\n\r\n\t\treturn (String.format(\"%d:%02d%s\", hours, minutes, ampm));\r\n\t}", "public static String convertMilliSecondsToDateFormat(long milliSeconds) {\n String dateFormat = \"MMM-dd hh:mm:ss a\";\n SimpleDateFormat formatter = new SimpleDateFormat(dateFormat, Locale.US);\n // Create a calendar object that will convert the date and time value in milliseconds to date.\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeInMillis(milliSeconds);\n\n\n SimpleDateFormat mnthFormat = new SimpleDateFormat(\"MMM\", Locale.US);\n String month = mnthFormat.format(calendar.getTime());\n\n SimpleDateFormat formatDayOfMonth = new SimpleDateFormat(\"d\", Locale.US);\n int day = Integer.parseInt(formatDayOfMonth.format(calendar.getTime()));\n String daySuffix = getDayOfMonthSuffix(day);\n\n SimpleDateFormat timeFormat = new SimpleDateFormat(\"hh:mm:ss a\", Locale.US);\n String timeStr = timeFormat.format(calendar.getTime());\n\n\n// return formatter.format(calendar.getTime());\n\n return month + \" \" + day + daySuffix + \" \" + timeStr;\n }", "private String getFormattedTime(int totalElapsedSeconds)\n {\n int minutes = totalElapsedSeconds / 60;\n int seconds = totalElapsedSeconds - (minutes * 60);\n String timerText = String.format(\"%02d\", minutes)\n + \":\" + String.format(\"%02d\", seconds);\n return timerText;\n }", "public static String tenthsToStringShort(int time) {\r\n\t\t// If we have negative time, just return zero\r\n\t\tif ( time < 0 ) {\r\n\t\t\treturn \"0:00\";\r\n\t\t}\r\n\t\t\r\n\t\tint sec = (time / 10) % 60;\r\n\t\tint min = (time / 10) / 60;\r\n\t\treturn String.format(\"%d:%02d\", min, sec);\r\n\t}", "public static String timeAsString(long totalTime) {\n long second = totalTime / 1000 % 60;\n long minute = totalTime / (1000 * 60) % 60;\n long hour = totalTime / (1000 * 60 * 60);\n\n return String.format(\"%02d:%02d:%02d\", hour, minute, second);\n }", "static String timeConversion1(String s) {\n String[] timeSplit = s.split(\":\");\n String hours = timeSplit[0];\n String minutes = timeSplit[1];\n String seconds = timeSplit[2].substring(0, 2);\n String ampm = timeSplit[2].substring(2);\n\n int hour = Integer.parseInt(hours);\n\n int differential = 0;\n if (\"PM\".equals(ampm) && hour != 12) {\n differential = 12;\n }\n\n\n hour += differential;\n hour = hour % 24;\n\n hours = String.format(\"%02d\", hour);\n\n return hours + \":\" + minutes + \":\" + seconds;\n\n }", "static String timeConversion(String s) throws ParseException {\n SimpleDateFormat to = new SimpleDateFormat(\"HH:mm:ss\");\n SimpleDateFormat from = new SimpleDateFormat(\"hh:mm:ssa\");\n Date parse = from.parse(s);\n return to.format(parse);\n\n }", "public static String getTimeDiff(long time) {\n long diff ;\n // Date dnow = cal.getTime();\n String str ;\n diff = System.currentTimeMillis() - time;\n \n if (diff > 2592000000L) {// 30 * 24 * 60 * 60 * 1000=2592000000 毫秒\n str = \"1个月前\";\n }\n else if (diff > 1814400000) {// 21 * 24 * 60 * 60 * 1000=1814400000 毫秒\n str = \"3周前\";\n }\n else if (diff > 1209600000) {// 14 * 24 * 60 * 60 * 1000=1209600000 毫秒\n str = \"2周前\";\n }\n else if (diff > 604800000) {// 7 * 24 * 60 * 60 * 1000=604800000 毫秒\n str = \"1周前\";\n }\n else if (diff > 86400000) { // 24 * 60 * 60 * 1000=86400000 毫秒\n // System.out.println(\"X天前\");\n str = (int) Math.floor(diff / 86400000f) + \"天前\";\n }\n else if (diff > 18000000) {// 5 * 60 * 60 * 1000=18000000 毫秒\n // System.out.println(\"X小时前\");\n str = (int) Math.floor(diff / 18000000f) + \"小时前\";\n }\n else if (diff > 60000) {// 1 * 60 * 1000=60000 毫秒\n // System.out.println(\"X分钟前\");\n str = (int) Math.floor(diff / 60000) + \"分钟前\";\n }\n else {\n str = (int) Math.floor(diff / 1000) + \"秒前\";\n }\n return str;\n }", "public String getElapsedTime() {\n\n long elapsed;\n int mins;\n int secs;\n int millis;\n\n if (running) {\n elapsed = System.currentTimeMillis() - startTime;\n } else {\n elapsed = stopTime - startTime;\n }\n\n mins = (int) (elapsed / 60000);\n secs = (int) (elapsed - mins * 60000) / 1000;\n millis = (int) (elapsed - mins * 60000 - secs * 1000);\n\n //Keeps 3 digits when a second rolls over. Perhaps find a better way of doing this\n return (String.format(\"%02d\", mins) + \":\" + String.format(\"%02d\", secs) + \":\"\n + String.format(\"%03d\", millis));\n }" ]
[ "0.7067919", "0.70056474", "0.6994394", "0.69776064", "0.6967398", "0.6917681", "0.6878295", "0.6838786", "0.6838706", "0.68175936", "0.6803378", "0.67950124", "0.67668587", "0.6754173", "0.67403615", "0.6735499", "0.6719835", "0.6696185", "0.66758835", "0.6629755", "0.6508565", "0.6500999", "0.64870465", "0.6466775", "0.64611524", "0.64573646", "0.64409214", "0.6433438", "0.6433438", "0.6402041", "0.6385505", "0.6370952", "0.6369893", "0.6340944", "0.6300471", "0.62955964", "0.6281903", "0.6231281", "0.6229152", "0.6221988", "0.62209094", "0.62033236", "0.62000215", "0.6197655", "0.6191179", "0.6177296", "0.6169409", "0.61652935", "0.6142216", "0.61349267", "0.61140174", "0.61125296", "0.61106086", "0.6106985", "0.6091575", "0.6086595", "0.6084496", "0.607599", "0.6070484", "0.6067748", "0.60594904", "0.60494274", "0.6047133", "0.6040828", "0.6037167", "0.6030342", "0.60216147", "0.60205656", "0.60164887", "0.6014906", "0.59900165", "0.5982609", "0.597169", "0.59648794", "0.5952168", "0.59393317", "0.59206945", "0.5916281", "0.5905766", "0.59012395", "0.5898164", "0.58836263", "0.5881463", "0.5880341", "0.58717793", "0.58714145", "0.5857741", "0.5855521", "0.58481", "0.5832283", "0.5828495", "0.5825116", "0.58129823", "0.5801574", "0.5794751", "0.5794239", "0.5793152", "0.57869303", "0.57841945", "0.57795614", "0.5778637" ]
0.0
-1
Date de hoje sem tempo
public static void main(String[] args) { LocalDate hoje = LocalDate.now(); System.out.println(hoje); //Criando nova data LocalDate olimpiadas = LocalDate.of(2016, Month.JUNE, 5); System.out.println(olimpiadas); //Calculando diferenca de anos int anos = olimpiadas.getYear() - hoje.getYear(); System.out.println(anos); //Demonstracao de imutabilidade olimpiadas.plusYears(4); System.out.println(olimpiadas); LocalDate proximasOlimpiadas = olimpiadas.plusYears(4); System.out.println(proximasOlimpiadas); //Periodo entre data de inicio e fim Period periodo = Period.between(hoje, olimpiadas); System.out.println(periodo); //Formata data DateTimeFormatter formataData = DateTimeFormatter.ofPattern("dd/MM/yyyy"); System.out.println(proximasOlimpiadas.format(formataData)); //Craindo data e hora LocalDateTime agora = LocalDateTime.now(); System.out.println(agora); //Formatando data e hora //Obs.: O formatado de data e hora nao pode ser usado para formata data. DateTimeFormatter formataDataComHoras = DateTimeFormatter.ofPattern("dd/MM/yyyy hh:mm"); System.out.println(agora.format(formataDataComHoras )); LocalTime intervalo = LocalTime.of(15, 30); System.out.println(intervalo); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 getDate()\r\n\t{\r\n\t\tCalendar cal = Calendar.getInstance();\r\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd HH:mm\");\r\n\t\treturn sdf.format(cal.getTime());\r\n\t}", "Date getFechaNacimiento();", "public abstract java.sql.Timestamp getFecha_ingreso();", "public void get_fecha(){\n //Obtenemos la fecha\n Calendar c1 = Calendar.getInstance();\n fecha.setCalendar(c1);\n }", "public void createDate(){\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy_MM_dd\"); //TODO -HHmm si dejo diagonales separa bonito en dia, pero para hacer un armado de excel creo que debo hacer un for mas\n currentDateandTime = sdf.format(new Date());\n Log.e(TAG, \"todays date is: \"+currentDateandTime );\n\n}", "public static String fechaActual() {\n Calendar calendario = new GregorianCalendar();\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n return sdf.format(calendario.getTime());\n }", "public Date getFechaSistema() {\n\t\tfechaSistema = new Date();\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tcalendar.setTime(fechaSistema);\n\t\tcalendar.add(Calendar.HOUR, (-3));\n\t\tfechaSistema = calendar.getTime();\n\t\treturn fechaSistema;\n\t}", "public java.sql.Timestamp getFecha_envio();", "public Date getFechaIniDate(){\n Date date=new Date(fechaInicio.getTime());\n return date;\n }", "Date getDate();", "Date getDate();", "Date getDate();", "DateTime getTime();", "public static String getDate() {\n\t\tString\ttoday=\"\";\n\n\t\tCalendar Datenow=Calendar.getInstance();\n\t\tSimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\n\t today = formatter.format(Datenow.getTime());\n\n\t return today;\n\t}", "public Date getDateNow(){\n\t\tconfigDefaults(getProp(LOCALE), getProp(TIME_ZONE), null);\r\n\t\t\r\n\t\t// o time millis é sempre GMT 0, a transformação fica por conta do Date\r\n\t\treturn new Date(System.currentTimeMillis()+getProp(TIME_CORRECTION));\r\n\t}", "public String getFecha() {\n Calendar calendario = new GregorianCalendar();\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n return sdf.format(calendario.getTime());\n }", "public java.sql.Timestamp getFecha();", "public Date getFechaCreacion() {\r\n return fechaCreacion;\r\n }", "private static String getDate() {\n return new SimpleDateFormat(\"yyyyMMddHHmmss\").format\n (new Date(System.currentTimeMillis()));\n }", "public Date getCreacion() {\r\n return creacion;\r\n }", "private void inicializarFechaHora(){\n Calendar c = Calendar.getInstance();\r\n year1 = c.get(Calendar.YEAR);\r\n month1 = (c.get(Calendar.MONTH)+1);\r\n String mes1 = month1 < 10 ? \"0\"+month1 : \"\" +month1;\r\n String dia1 = \"01\";\r\n\r\n String date1 = \"\"+dia1+\"/\"+mes1+\"/\"+year1;\r\n txt_fecha_desde.setText(date1);\r\n\r\n\r\n day2 = c.getActualMaximum(Calendar.DAY_OF_MONTH) ;\r\n String date2 = \"\"+day2+\"/\"+mes1+\"/\"+ year1;\r\n\r\n Log.e(TAG,\"date2: \" + date2 );\r\n txt_fecha_hasta.setText(date2);\r\n\r\n }", "public void mostrarHora(String formato){\n Date objDate = new Date();\n SimpleDateFormat objSDF = new SimpleDateFormat(formato);\n //este sera el resultado de la fechas\n fecha=objSDF.format(objDate);\n }", "@Override\n public java.util.Date getFecha() {\n return _partido.getFecha();\n }", "public Date obtenerPrimeraFecha() {\n String sql = \"SELECT proyind_periodo_inicio\"\n + \" FROM proy_indices\"\n + \" WHERE proyind_periodo_inicio IS NOT NULL\"\n + \" ORDER BY proyind_periodo_inicio ASC\"\n + \" LIMIT 1\";\n Query query = getEm().createNativeQuery(sql);\n List result = query.getResultList();\n return (Date) DAOUtils.obtenerSingleResult(result);\n }", "public static Date getDateNowSingl(){\n\t\tconfigDefaultsTimeZoneAndLocale();\r\n\t\t\r\n\t\t// o time millis é sempre GMT 0, a transformação fica por conta do Date\r\n\t\treturn new Date(System.currentTimeMillis()+getPropDefaultForAll(TIME_CORRECTION));\r\n\t}", "public String Get_date() \n {\n \n return date;\n }", "public static String getFechaActual() {\n Date ahora = new Date();\n SimpleDateFormat formateador = new SimpleDateFormat(\"yyyy-MM-dd\");\n return formateador.format(ahora);\n }", "public Date getFechaFinDate(){\n Date date=new Date(fechaFin.getTime());\n return date;\n }", "public Date getdate() {\n\t\treturn new Date(date.getTime());\n\t}", "public Date getToDate()\r\n/* 28: */ {\r\n/* 29:35 */ return this.toDate;\r\n/* 30: */ }", "private void fechaActual() {\r\n\t\tDate date = new Date();\r\n\t\tSimpleDateFormat sm = new SimpleDateFormat(\"yyyy-MM-dd hh:mm:ss\");\r\n\t\t// Formateo de Fecha para mostrar en la vista - (String)\r\n\t\tsetFechaCreacion(sm.format(date.getTime()));\r\n\t\t// Formateo de Fecha campo db - (Date)\r\n\t\ttry {\r\n\t\t\tnewEntidad.setFechaCreacion(sm.parse(getFechaCreacion()));\r\n\t\t} catch (ParseException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t;\r\n\t}", "public abstract java.sql.Timestamp getFecha_fin();", "public String getFecha(){\r\n return fechaInicial.get(Calendar.DAY_OF_MONTH)+\"/\"+(fechaInicial.get(Calendar.MONTH)+1)+\"/\"+fechaInicial.get(Calendar.YEAR);\r\n }", "public static String getDate()\r\n {\r\n Date now = new Date();\r\n DateFormat df = new SimpleDateFormat (\"yyyy-MM-dd'T'hh-mm-ss\");\r\n String currentTime = df.format(now);\r\n return currentTime; \r\n \r\n }", "private static String fechaMod(File imagen) {\n\t\tlong tiempo = imagen.lastModified();\n\t\tDate d = new Date(tiempo);\n\t\tCalendar c = new GregorianCalendar();\n\t\tc.setTime(d);\n\t\tString dia = Integer.toString(c.get(Calendar.DATE));\n\t\tString mes = Integer.toString(c.get(Calendar.MONTH));\n\t\tString anyo = Integer.toString(c.get(Calendar.YEAR));\n\t\tString hora = Integer.toString(c.get(Calendar.HOUR_OF_DAY));\n\t\tString minuto = Integer.toString(c.get(Calendar.MINUTE));\n\t\tString segundo = Integer.toString(c.get(Calendar.SECOND));\n\t\treturn hora+\":\"+minuto+\":\"+segundo+\" - \"+ dia+\"/\"+mes+\"/\"+\n\t\tanyo;\n\t}", "public Date getCreatTime() {\n return creatTime;\n }", "public Date getCreatTime() {\n return creatTime;\n }", "public Date getFechaHasta()\r\n/* 174: */ {\r\n/* 175:302 */ return this.fechaHasta;\r\n/* 176: */ }", "public String getDateCreationLibelle() {\n\t\tDateTimeFormatter format = DateTimeFormatter.ofPattern(\"dd/MM/yyyy hh:mm:ss\");\n\t\treturn this.dateCreation.format(format);\n\t}", "public abstract java.lang.String getFecha_inicio();", "private String leerFecha() {\n\t\ttry {\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"YYYY/MM/dd\");\n\t\t\treturn sdf.format(txtFecha.getDate());\n\t\t} catch (Exception e) {\n\t\t\tJOptionPane.showMessageDialog(this, \"Seleccione una fecha válida\", \"Aviso\", 2);\n\t\t\treturn null;\n\t\t}\n\t}", "public Date generarFechaSolicitudGarantia() {\r\n return new Date();\r\n }", "public Date getDateDembauche () {\n return dateEmbauche.copie();\n }", "private static String getDate()\n\t{\n\t\tString dateString = null;\n\t\tDate sysDate = new Date( System.currentTimeMillis() );\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"dd-MM-yy HH:mm:ss\");\n\t\tdateString = sdf.format(sysDate);\n\t\treturn dateString;\n\t}", "public String date(int lmao) {\r\n switch (lmao) {\r\n case 1:\r\n return time.showDay();\r\n\r\n case 2:\r\n return time.showMonth();\r\n\r\n case 3:\r\n return time.showYear();\r\n\r\n case 4:\r\n return time.showDay() + \"/\" + time.showMonth() + \"/\" + time.showYear();\r\n\r\n default:\r\n return \"error\";\r\n }\r\n }", "public Date getDateDembauche() {\r\n return dateEmbauche.copie();\r\n }", "public Date getDateObject(){\n \n Date date = new Date(this.getAnio(), this.getMes(), this.getDia());\n return date;\n }", "public Timestamp getFechaReserva() {\n return this.fechaReserva.get();\n }", "public String dar_hora(){\n Date date = new Date();\n DateFormat dateFormat = new SimpleDateFormat(\"HH:mm:ss\");\n return dateFormat.format(date).toString();\n }", "public String formatoCortoDeFecha(Date fecha){\n SimpleDateFormat format = new SimpleDateFormat(\"dd/MM/yyyy HH:mm\");\n return format.format(fecha);\n }", "public Date getDate() {\n Calendar calendar = Calendar.getInstance(TimeZone.getTimeZone(\"GMT\"));\n calendar.set(Calendar.YEAR, year);\n calendar.set(Calendar.MONTH, month - 1); // MONTH is zero based\n calendar.set(Calendar.DAY_OF_MONTH, day);\n calendar.set(Calendar.HOUR_OF_DAY, hour);\n calendar.set(Calendar.MINUTE, minute);\n calendar.set(Calendar.SECOND, 0);\n calendar.set(Calendar.MILLISECOND, 0);\n return calendar.getTime();\n }", "protected Date getCurrentDateAndTime() {\n\t\tDate date = new Date();\n\t\tDate updatedDate = new Date((date.getTime() + (1000 * 60 * 60 * 24)));//(1000 * 60 * 60 * 24)=24 hrs. **** 120060 = 2 mins\n\t\treturn updatedDate;\n\t}", "public static void main(String[] args) throws Exception {\n Calendar cal = Calendar.getInstance();\n SimpleDateFormat simpleformat = new SimpleDateFormat(\"E, dd MMM yyyy HH:mm:ss Z\");\n System.out.println(\"Today's date and time = \"+simpleformat.format(cal.getTime()));\n // displaying date\n simpleformat = new SimpleDateFormat(\"dd/MMMM/yyyy\");\n String str = simpleformat.format(new Date());\n System.out.println(\"Current Date = \"+str);\n // current time\n simpleformat = new SimpleDateFormat(\"HH:mm:ss\");\n String strTime = simpleformat.format(new Date());\n System.out.println(\"Current Time = \"+strTime);\n // displaying hour in HH format\n simpleformat = new SimpleDateFormat(\"HH\");\n String strHour = simpleformat.format(new Date());\n System.out.println(\"Hour in HH format = \"+strHour);\n\n\n\n //formato ideal\n simpleformat = new SimpleDateFormat(\"dd/MM/yyyy - HH:mm:ss\");\n String strTimeDay = simpleformat.format(new Date());\n System.out.println(\"Dia e Hora = \" + strTimeDay);\n\n }", "public Date getCreTim() {\r\n\t\treturn creTim;\r\n\t}", "public void setCreacion(Date creacion) {\r\n this.creacion = creacion;\r\n }", "public Timestamp getFechaInicio() {\n return fechaInicio;\n }", "public java.util.Calendar getFecha()\r\n {\r\n return this.fecha;\r\n }", "public static Date today() // should it be void?\n {\n GregorianCalendar currentDate = new GregorianCalendar();\n int day = currentDate.get(GregorianCalendar.DATE);\n int month = currentDate.get(GregorianCalendar.MONTH) + 1;\n int year = currentDate.get(GregorianCalendar.YEAR);\n int hour = currentDate.get(GregorianCalendar.HOUR_OF_DAY);\n int minute = currentDate.get(GregorianCalendar.MINUTE);\n return new Date(day, month, year, hour, minute);\n }", "@Override\n public java.util.Date getCreateDate() {\n return _partido.getCreateDate();\n }", "public Timestamp getFechaEntrega() {\n return this.fechaEntrega.get();\n }", "public Date getFcreatetime() {\n return fcreatetime;\n }", "public Date getGioBatDau();", "public Date getTimeCreate() {\n return timeCreate;\n }", "private void getDateTime() {\n String todayDateTime = String.valueOf(Calendar.getInstance().getTime());\n\n // Calendar.getInstance().getTime() returns a long string of various data for today, split and access what we need\n String[] splitTime = todayDateTime.split(\" \");\n\n dayDate = splitTime[1] + \" \" + splitTime[2] + \" \" + splitTime[5]; // Month, Day, Year\n dayTime = splitTime[3];\n }", "long getDate();", "public java.util.Calendar getFechaFacturado(){\n return localFechaFacturado;\n }", "public String getHoraInicial(){\r\n return fechaInicial.get(Calendar.HOUR_OF_DAY)+\":\"+fechaInicial.get(Calendar.MINUTE);\r\n }", "public String getCurrentDateTime(){\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\n \"yyyy-MM-dd HH:mm:ss\", Locale.getDefault()\n );\n Date date = new Date();\n return simpleDateFormat.format(date);\n }", "Date getEDate();", "Date getLastTime();", "public String getTime() {\n String pattern = \"yyyy-MM-dd HH:mm:ss\";\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(pattern);\n\n String date = simpleDateFormat.format(new Date());\n return date;\n }", "public static String getDate() {\n return getDate(System.currentTimeMillis());\n }", "public long getTime() {\n\t\treturn date.getTime();\n }", "public static Calendar getFechaHoy(){\n\n Calendar cal = new GregorianCalendar();\n cal.set(Calendar.HOUR_OF_DAY,0);\n cal.set(Calendar.MINUTE, 0);\n cal.set(Calendar.SECOND, 0);\n cal.set(Calendar.MILLISECOND, 0);\n\n return cal;\n }", "public Date date (){\r\n\t\t\treturn _date;\r\n\t\t}", "private String ObtenerFechaActual() {\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"dd/mm/yyyy\");\n Calendar calendar = GregorianCalendar.getInstance();\n return String.valueOf(simpleDateFormat.format(calendar.getTime()));\n }", "public HiResDate getTime();", "private String getCurrentTimestamp() {\n\n String mytime = java.text.DateFormat.getTimeInstance().format(Calendar.getInstance().getTime());\n String mydate =java.text.DateFormat.getDateTimeInstance().format(Calendar.getInstance().getTime());\n return mytime;\n }", "String getDate();", "String getDate();", "final public synchronized Date getDate() {\n return new Date(crtime) ;\n }", "public Date getdCreatetime() {\n return dCreatetime;\n }", "Date getDateCreated();", "public void setFechaCompra() {\n LocalDate fecha=LocalDate.now();\n this.fechaCompra = fecha;\n }", "java.lang.String getDate();", "Date getCreateDate();", "Date getCreateDate();", "public String getTodayDate() \n\t{\n\t\treturn getMonthInteger() + \"/\" + getDayOfMonth() + \"/\" + getYear();\n\n\t}", "public Date getCreDate() {\n return creDate;\n }", "public java.time.LocalDateTime getFechaCreacion() {\n return fechaCreacion.get();\n }", "public static String getDateString(){\n\t\t\tCalendar now = Calendar.getInstance();\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd__HH-mm-ss\");\n\t\t\treturn sdf.format(now.getTime());\n\t }", "Date getTimestamp();", "private String getDateTime() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"[yyyy/MM/dd - HH:mm:ss]\");\n return sdf.format(new Date());\n }", "private String getDateTime() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"[yyyy/MM/dd - HH:mm:ss]\");\n return sdf.format(new Date());\n }", "public Date getModifiTime() {\n return modifiTime;\n }", "public Fecha getFecha() {\r\n return fecha;\r\n }", "private Date getSamoaNow() {\n\t\t// Get the current datetime in UTC\n\t\tCalendar calendar = Calendar.getInstance();\n\t\tcalendar.setTime(new Date());\n\t\t\n\t\t// Get the datetime minus 11 hours (Samoa is UTC-11)\n\t\tcalendar.add(Calendar.HOUR_OF_DAY, -11);\n\t\t\n\t\treturn calendar.getTime();\n\t}", "public java.util.Date getDate(){\n return localDate;\n }", "public Date getDateCreated() {\r\n\t\t\r\n\t\t\tDate date= new Date(System.currentTimeMillis());\r\n\t\treturn date;\r\n\t}", "public void fechahoy(){\n Date fecha = new Date();\n \n Calendar c1 = Calendar.getInstance();\n Calendar c2 = new GregorianCalendar();\n \n String dia = Integer.toString(c1.get(Calendar.DATE));\n String mes = Integer.toString(c2.get(Calendar.MONTH));\n int mm = Integer.parseInt(mes);\n int nmes = mm +1;\n String memes = String.valueOf(nmes);\n if (nmes < 10) {\n memes = \"0\"+memes;\n }\n String anio = Integer.toString(c1.get(Calendar.YEAR));\n \n String fechoy = anio+\"-\"+memes+\"-\"+dia;\n \n txtFecha.setText(fechoy);\n \n }" ]
[ "0.70086324", "0.6883957", "0.6843835", "0.6811038", "0.67845094", "0.6684066", "0.6682804", "0.66794586", "0.66553724", "0.6644827", "0.6614291", "0.6614291", "0.6614291", "0.65732884", "0.6565999", "0.6555444", "0.6554273", "0.6553324", "0.65077746", "0.6496417", "0.64851797", "0.6414877", "0.6409026", "0.63811654", "0.6368442", "0.633566", "0.63346654", "0.63303113", "0.6324659", "0.6300372", "0.62935084", "0.62908024", "0.628748", "0.62869614", "0.6282441", "0.6268948", "0.6260786", "0.6260786", "0.62212783", "0.6215434", "0.62146646", "0.62076527", "0.62038404", "0.6194493", "0.61940324", "0.619191", "0.6182262", "0.61681", "0.6164189", "0.61618495", "0.6159074", "0.61559016", "0.61554354", "0.61453944", "0.6144467", "0.6141992", "0.613021", "0.61290497", "0.61244357", "0.6116633", "0.60933894", "0.6087723", "0.6072087", "0.60645306", "0.6063505", "0.6060735", "0.60541296", "0.6051672", "0.6044941", "0.6040285", "0.6038438", "0.6038362", "0.6035987", "0.60343665", "0.6028425", "0.6026193", "0.60167485", "0.60127103", "0.6010969", "0.6005442", "0.6005442", "0.5995053", "0.59920186", "0.59886557", "0.59873956", "0.5984576", "0.5979602", "0.5979602", "0.5976367", "0.59741366", "0.5972843", "0.5971476", "0.5969332", "0.5969209", "0.5969209", "0.5962979", "0.5959846", "0.59593666", "0.5957726", "0.59556", "0.5953114" ]
0.0
-1
/ 4455261600273262 Visa 4766112373743631 Visa 5159484379360088 Master Card 5501985571257620 Master Card 372750828187351 American Express
@Override public boolean valida() { mediatorCredito m = new mediatorCredito(); try{ BigInteger dit = new BigInteger(JOptionPane.showInputDialog(null,"Digite su número de " + "tarjeta de crédito","")); String pag = JOptionPane.showInputDialog(null,"Ingrese su medio de pago: (Visa, master Card" + ", American Express)",""); if(m.verificarForm(dit, pag)==false){ JOptionPane.showMessageDialog(null,"ups, el medio de pago o la tarjeta de crédito no es válido" ,"Error",0); } return m.verificarForm(dit, pag); }catch(Exception e){ JOptionPane.showMessageDialog(null,"Acción cancelada","Advertencia",2); return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "C15430g mo56154a();", "private static byte[] m24635a(Context context, String str) {\n String f = C6014b.m23956f();\n String string = Secure.getString(context.getContentResolver(), \"android_id\");\n String substring = str.substring(0, Math.min(8, str.length() - 1));\n StringBuilder sb = new StringBuilder();\n sb.append(substring);\n sb.append(f.substring(0, Math.min(8, f.length() - 1)));\n String sb2 = sb.toString();\n StringBuilder sb3 = new StringBuilder();\n sb3.append(sb2);\n sb3.append(string.substring(0, Math.min(8, string.length() - 1)));\n String sb4 = sb3.toString();\n if (sb4.length() != 24) {\n StringBuilder sb5 = new StringBuilder();\n sb5.append(sb4);\n sb5.append(str.substring(8, 24 - sb4.length()));\n sb4 = sb5.toString();\n }\n return sb4.getBytes();\n }", "public long getStreetCredGain();", "public final void mo75263ad() {\n String str;\n super.mo75263ad();\n if (C25352e.m83313X(this.f77546j)) {\n if (C6399b.m19944t()) {\n if (!C6776h.m20948b(mo75261ab(), C25352e.m83305P(this.f77546j)) && C25371n.m83443a(mo75261ab())) {\n C25371n.m83471b(mo75261ab(), C25352e.m83305P(this.f77546j));\n }\n } else if (!DownloaderManagerHolder.m75524a().mo51673b(C25352e.m83241x(this.f77546j))) {\n C19535g a = DownloaderManagerHolder.m75524a();\n String x = C25352e.m83241x(this.f77546j);\n Aweme aweme = this.f77546j;\n C7573i.m23582a((Object) aweme, \"mAweme\");\n AwemeRawAd awemeRawAd = aweme.getAwemeRawAd();\n if (awemeRawAd == null) {\n C7573i.m23580a();\n }\n C7573i.m23582a((Object) awemeRawAd, \"mAweme.awemeRawAd!!\");\n Long adId = awemeRawAd.getAdId();\n C7573i.m23582a((Object) adId, \"mAweme.awemeRawAd!!.adId\");\n long longValue = adId.longValue();\n Aweme aweme2 = this.f77546j;\n C7573i.m23582a((Object) aweme2, \"mAweme\");\n C19386b a2 = C22943b.m75512a(\"result_ad\", aweme2.getAwemeRawAd(), false);\n Aweme aweme3 = this.f77546j;\n C7573i.m23582a((Object) aweme3, \"mAweme\");\n AwemeRawAd awemeRawAd2 = aweme3.getAwemeRawAd();\n if (awemeRawAd2 == null) {\n C7573i.m23580a();\n }\n a.mo51670a(x, longValue, 2, a2, C22942a.m75508a(awemeRawAd2));\n }\n }\n m110463ax();\n if (!C25352e.m83313X(this.f77546j) || C6776h.m20948b(mo75261ab(), C25352e.m83305P(this.f77546j)) || DownloaderManagerHolder.m75524a().mo51673b(C25352e.m83241x(this.f77546j))) {\n C24961b b = C24958f.m81905a().mo65273b(this.f77546j).mo65266a(\"result_ad\").mo65276b(\"click\");\n if (C25352e.m83313X(this.f77546j)) {\n str = \"download_button\";\n } else {\n str = \"more_button\";\n }\n b.mo65283e(str).mo65270a(mo75261ab());\n }\n }", "C2451d mo3408a(C2457e c2457e);", "public String mo81386a() {\n String d = C6969H.m41409d(\"G5C91D93EBA3CAE2EE71A95\");\n WebUtil.m68654a(d, C6969H.m41409d(\"G6691DC1DB63E9E3BEA54D0\") + this.f58070b);\n if (TextUtils.isEmpty(this.f58070b)) {\n return \"\";\n }\n this.f58071c = Uri.parse(this.f58070b);\n this.f58083o = m81839a(this.f58071c.getScheme());\n String m = m81849m();\n m81850n();\n m81852p();\n m81853q();\n m81854r();\n m81855s();\n m81856t();\n return m;\n }", "public static CardGiftInfo m84652a(C15317ao c15317ao) {\n LinkedList linkedList;\n AppMethodBeat.m2504i(87788);\n CardGiftInfo cardGiftInfo = new CardGiftInfo();\n cardGiftInfo.toUserName = c15317ao.vBE;\n cardGiftInfo.cKE = c15317ao.vBF;\n cardGiftInfo.kcl = c15317ao.vBG;\n cardGiftInfo.kcm = c15317ao.content;\n cardGiftInfo.kcn = c15317ao.vBH;\n cardGiftInfo.kco = c15317ao.vBI;\n cardGiftInfo.kcp = c15317ao.vBJ;\n cardGiftInfo.kcq = c15317ao.vBK;\n cardGiftInfo.kcs = c15317ao.vBM;\n cardGiftInfo.kcr = c15317ao.vBL;\n cardGiftInfo.kct = c15317ao.vBN;\n cardGiftInfo.kcu = c15317ao.vBO;\n cardGiftInfo.kcv = c15317ao.kcU;\n cardGiftInfo.kcw = c15317ao.kcV;\n cardGiftInfo.kcx = c15317ao.vBP;\n cardGiftInfo.color = c15317ao.color;\n cardGiftInfo.kcy = c15317ao.vBQ;\n cardGiftInfo.kcz = c15317ao.vBR;\n cardGiftInfo.kcA = c15317ao.vBS;\n cardGiftInfo.kcB = c15317ao.vBT;\n cardGiftInfo.kcC = c15317ao.vBU;\n cardGiftInfo.kcD = c15317ao.vBV;\n cardGiftInfo.kcE = c15317ao.vBW;\n cardGiftInfo.kcF = c15317ao.vBX;\n cardGiftInfo.kcG = c15317ao.vBY;\n cardGiftInfo.kcH = c15317ao.vBZ;\n cardGiftInfo.kcI = c15317ao.vCa;\n cardGiftInfo.kcJ = c15317ao.vCb;\n cardGiftInfo.kcK = c15317ao.vCc;\n cardGiftInfo.kcL = c15317ao.vCd;\n cardGiftInfo.kcM = c15317ao.kbU;\n cardGiftInfo.kcN = c15317ao.vCe;\n Iterator it = c15317ao.kcO.iterator();\n while (it.hasNext()) {\n C7250ap c7250ap = (C7250ap) it.next();\n linkedList = cardGiftInfo.kcO;\n AcceptedCardItem acceptedCardItem = new AcceptedCardItem();\n acceptedCardItem.kcV = c7250ap.kcV;\n acceptedCardItem.kcU = c7250ap.kcU;\n linkedList.add(acceptedCardItem);\n }\n it = c15317ao.kcP.iterator();\n while (it.hasNext()) {\n C35902aq c35902aq = (C35902aq) it.next();\n linkedList = cardGiftInfo.kcP;\n AccepterItem accepterItem = new AccepterItem();\n accepterItem.kcV = c35902aq.kcV;\n accepterItem.kcU = c35902aq.kcU;\n accepterItem.kcX = c35902aq.kcX;\n accepterItem.kcW = c35902aq.kcW;\n linkedList.add(accepterItem);\n }\n cardGiftInfo.kcQ = c15317ao.kcQ;\n cardGiftInfo.kcR = c15317ao.kcR;\n cardGiftInfo.kcS = c15317ao.kcS;\n cardGiftInfo.kcT = c15317ao.kcT;\n AppMethodBeat.m2505o(87788);\n return cardGiftInfo;\n }", "public abstract void mo90486a(C9515Ad ad);", "String mo10312id();", "private static byte[] m5293aA(String str) {\n try {\n if (TextUtils.isEmpty(str)) {\n return null;\n }\n StringBuilder sb = new StringBuilder();\n sb.append(str);\n sb.append(C1248f.getKey());\n return Arrays.copyOf(sb.toString().getBytes(AudienceNetworkActivity.WEBVIEW_ENCODING), 16);\n } catch (Throwable unused) {\n return null;\n }\n }", "private byte m1655h() {\n char charAt;\n int i = this.f2519d;\n while (true) {\n int i2 = this.f2519d;\n if (i2 <= 0) {\n break;\n }\n CharSequence charSequence = this.f2516a;\n int i3 = i2 - 1;\n this.f2519d = i3;\n char charAt2 = charSequence.charAt(i3);\n this.f2520e = charAt2;\n if (charAt2 == '<') {\n return 12;\n }\n if (charAt2 == '>') {\n break;\n } else if (charAt2 == '\\\"' || charAt2 == '\\'') {\n do {\n int i4 = this.f2519d;\n if (i4 <= 0) {\n break;\n }\n CharSequence charSequence2 = this.f2516a;\n int i5 = i4 - 1;\n this.f2519d = i5;\n charAt = charSequence2.charAt(i5);\n this.f2520e = charAt;\n } while (charAt != charAt2);\n }\n }\n this.f2519d = i;\n this.f2520e = '>';\n return 13;\n }", "public String getAgentidcard() {\r\n\t\treturn agentidcard;\r\n\t}", "private byte[] parseInsertRecord_lantrix(String s)\n { \n // ASCII Data:\t\n // Example:\n // ------- \t\n\t\t//>RGP190805211932-3457215-058493640000000FFBF0300;ID=8247;#2122;*54<CRLF\n\t\t// R = [ 0, 1] Response \n // GP = [ 1, 3] Global Position \n\t\t// 190805 = [ 3, 9] GPS time-of-day DDMMAA\n\t\t// 211932 = [ 9 , 15] GPS time-of-hours GMT HHMMSS\n\t\t// -3457215 = [ 15, 23] Latitude \n\t\t// -05849364 = [ 23, 32] Longitude\n\t\t// 000 = [ 32, 35] Speed (kph 0...999)\n\t\t// 000 = [ 35, 38] Heading (degrees 0...359)\n\t\t// 0 = [ 38, 39] GPS source 3 = Position 3D, 2 = Position 2D , 0= invalid\n\t\t// FF = [ 39, 41] Age of the data in Hexadecimal\n\t\t// BF = [ 41, 43] I/O Digital \n\t\t// 03 = [ 43, 45] Number of events generated by the report (decimal).\n\t\t// 00 = [ 45, 47] Horizontal Accuracy HDOP (0 .. 50)\n\t\t// ; = Separator\n\t\t// ID=d8247 = Number Device ID \n\t\t// ; = Separator\n\t\t// #2122 = [ 57 , 62] Sentence Number (as generated by the mobile van from # 0000 to # 7FFF and those generated by the base go # 8000 to # FFFF)\n\t\t// ;*54 = Checksum\n\t\t// < = End of message\n\t\t// CRLF = End of line and carriage advance \n\n /* pre-validate */\n if (StringTools.isBlank(s)) {\n Print.logError(\"String is null/blank\");\n return null;\n } else\n if (s.length() < 5) {\n Print.logError(\"String is invalid length\");\n return null;\n } else\n if (!s.startsWith(\">\")) {\n Print.logError(\"String does not start with '>'\");\n return null;\n }\n\n /* ends with \"<\"? */\n int se = s.endsWith(\"<\")? (s.length() - 1) : s.length();\n s = s.substring(1,se);\n\n /* split */\n String T[] = StringTools.split(s,';'); \n\n /* RPG record */\n if (T[0].length() < 33) {\n Print.logError(\"Invalid 'RPG' data length\");\n return null;\n }\n\n /* mobile id */\n String mobileID = null;\n for (int i = 1; i < T.length; i++) {\n if (T[i].startsWith(\"ID=\")) {\n mobileID = T[i].substring(3);\n break;\n }\n }\n\n\t\t/* Sentence Number */\n String Sentence_number = null;\n for (int j = 1; j < T.length; j++) {\n if (T[j].startsWith(\"#\")) {\n Sentence_number = T[j].substring(1);\n break;\n }\n }\n\n //Arming the ACK frame to remove the data sent from the tracker\n\t String tracker_ID = mobileID;\n\t\tString frame_data_checksum = null;\t\t\n\t\tframe_data_checksum = \">ACK;ID=\" + tracker_ID + \";#\" + Sentence_number + \";*\";\n\t\tString chksum = getCheckSum(frame_data_checksum);\n\t\tString frame_data_ACK = null;\t\t\t\n\t\tframe_data_ACK = frame_data_checksum + chksum + \"<\\r\\n\";\n\n\t\t/* parse */ \t\n long dmy = StringTools.parseLong(T[0].substring( 3, 9), 0L);\n long hms = StringTools.parseLong(T[0].substring( 9, 15), 0L); \n long fixtime = this._getUTCSeconds(dmy, hms);\t\t\n double latitude = (double)StringTools.parseLong(T[0].substring( 15,23),0L) / 100000.0;\n double longitude = (double)StringTools.parseLong(T[0].substring(23,32),0L) / 100000.0;\n\t\tdouble KPH = StringTools.parseDouble(T[0].substring(32,35), 0.0);\n double speedKPH = KPH; \n double headingDeg = StringTools.parseDouble(T[0].substring(35,38), 0.0);\n\t\tint age_data = Integer.parseInt(T[0].substring(39,41),16);\n String decimal = Integer.toString(age_data);\n long inout = Long.parseLong(T[0].substring(41,43),16);\n String binary_io = Long.toBinaryString(inout);\n\t\tString srcStr = T[0].substring(38,39);\n String ageStr = decimal;\n double altitudeM = 0.0;\n double odomKM = 0.0;\n long gpioInput = 0L; \n\t\tint statusCode = StatusCodes.STATUS_LOCATION;\n\n /* I/O Digital */\n\t\tgpioInput = inout; \n\n\t\t/* get time */ \n if (fixtime <= 0L) {\n Print.logWarn(\"Invalid date.\");\n fixtime = DateTime.getCurrentTimeSec(); // default to now\n } \n\n /* lat/lon valid? */\n boolean validGPS = true;\n if (!GeoPoint.isValid(latitude,longitude)) {\n Print.logWarn(\"Invalid lat/lon: \" + latitude + \"/\" + longitude);\n validGPS = false;\n latitude = 0.0;\n longitude = 0.0;\n speedKPH = 0.0;\n headingDeg = 0.0;\n }\n GeoPoint geoPoint = new GeoPoint(latitude,longitude);\n\n /* adjustments to received values */\n if (speedKPH < MINIMUM_SPEED_KPH) {\n speedKPH = 0.0;\n headingDeg = 0.0;\n } else\n if (headingDeg < 0.0) { \n headingDeg = 0.0;\n }\n \n /* debug */\t\t\n Print.logInfo(\"MobileID : \" + mobileID);\n\t\tPrint.logInfo(\"Sentence : \" + Sentence_number);\n Print.logInfo(\"Timestamp: \" + fixtime + \" [\" + new DateTime(fixtime) + \"]\");\n Print.logInfo(\"GeoPoint : \" + geoPoint);\n Print.logInfo(\"Speed km/h: \" + speedKPH + \" [\" + headingDeg + \"]\");\n\n /* mobile-id */\n if (StringTools.isBlank(mobileID)) {\n Print.logError(\"Missing MobileID\");\n return null;\n }\n\n /* find Device */\n String accountID = \"\";\n String deviceID = \"\";\n String uniqueID = \"\";\n //Device device = DCServerFactory.loadDeviceByPrefixedModemID(UNIQUEID_PREFIX, mobileID);\n Device device = DCServerConfig.loadDeviceUniqueID(Main.getServerConfig(), mobileID);\n if (device == null) {\n return null; // errors already displayed\n } else {\n accountID = device.getAccountID();\n deviceID = device.getDeviceID();\n uniqueID = device.getUniqueID();\n Print.logInfo(\"UniqueID : \" + uniqueID);\n Print.logInfo(\"DeviceID : \" + accountID + \"/\" + deviceID);\n }\n \n /* check IP address */\n DataTransport dataXPort = device.getDataTransport();\n if ((this.ipAddress != null) && !dataXPort.isValidIPAddress(this.ipAddress)) {\n DTIPAddrList validIPAddr = dataXPort.getIpAddressValid(); // may be null\n Print.logError(\"Invalid IP Address from device: \" + this.ipAddress + \" [expecting \" + validIPAddr + \"]\");\n return null;\n }\n dataXPort.setIpAddressCurrent(this.ipAddress); // FLD_ipAddressCurrent\n dataXPort.setRemotePortCurrent(this.clientPort); // FLD_remotePortCurrent\n dataXPort.setLastTotalConnectTime(DateTime.getCurrentTimeSec()); // FLD_lastTotalConnectTime\n if (!dataXPort.getDeviceCode().equalsIgnoreCase(Constants.DEVICE_CODE)) {\n dataXPort.setDeviceCode(Constants.DEVICE_CODE); // FLD_deviceCode\n }\n\n /* reject invalid GPS fixes? */\n if (!validGPS && (statusCode == StatusCodes.STATUS_LOCATION)) {\n // ignore invalid GPS fixes that have a simple 'STATUS_LOCATION' status code\n Print.logWarn(\"Ignoring event with invalid latitude/longitude\");\n return null;\n }\n\n /* estimate GPS-based odometer */\n if (odomKM <= 0.0) {\n // calculate odometer\n odomKM = (ESTIMATE_ODOMETER && validGPS)? \n device.getNextOdometerKM(geoPoint) : \n device.getLastOdometerKM();\n } else {\n // bounds-check odometer\n odomKM = device.adjustOdometerKM(odomKM);\n }\n Print.logInfo(\"OdometerKM: \" + odomKM);\n\n /* simulate Geozone arrival/departure */\n if (SIMEVENT_GEOZONES && validGPS) {\n java.util.List<Device.GeozoneTransition> zone = device.checkGeozoneTransitions(fixtime, geoPoint);\n if (zone != null) {\n for (Device.GeozoneTransition z : zone) {\n this.insertEventRecord(device, \n z.getTimestamp(), z.getStatusCode(), z.getGeozone(),\n geoPoint, gpioInput, speedKPH, headingDeg, altitudeM, odomKM);\n Print.logInfo(\"Geozone : \" + z);\n if (z.getStatusCode() == statusCode) {\n // suppress 'statusCode' event if we just added it here\n Print.logDebug(\"StatusCode already inserted: 0x\" + StatusCodes.GetHex(statusCode));\n statusCode = StatusCodes.STATUS_IGNORE;\n }\n }\n }\n }\n\n /* insert event */\n if (statusCode == StatusCodes.STATUS_NONE) {\n // ignore this event\n } else\n if ((statusCode != StatusCodes.STATUS_LOCATION) || !validGPS) {\n this.insertEventRecord(device, \n fixtime, statusCode, null/*GeoZone*/,\n geoPoint, gpioInput, speedKPH, headingDeg, altitudeM, odomKM);\n } else\n if (!device.isNearLastValidLocation(geoPoint,MINIMUM_MOVED_METERS)) {\n if ((statusCode == StatusCodes.STATUS_LOCATION) && (speedKPH > 0.0)) {\n statusCode = StatusCodes.STATUS_MOTION_IN_MOTION;\n }\n this.insertEventRecord(device, \n fixtime, statusCode, null/*GeoZone*/,\n geoPoint, gpioInput, speedKPH, headingDeg, altitudeM, odomKM);\n }\n \n /* save device changes */\n try {\n // TODO: check \"this.device\" vs \"this.dataXPort\" \n device.updateChangedEventFields();\n } catch (DBException dbe) {\n Print.logException(\"Unable to update Device: \" + accountID + \"/\" + deviceID, dbe);\n } finally {\n //\n }\n Print.logInfo(\"ACK: \" + frame_data_ACK);\n\t\treturn frame_data_ACK.getBytes();// //return required acknowledgement (ACK) back to the device\n\n }", "private String m50417p() {\n String cardType = this.f30729a0.getCardType();\n String str = C10527a.f28544e;\n if (cardType.equalsIgnoreCase(str)) {\n return str;\n }\n if (cardType.equalsIgnoreCase(\"MASTERCARD\")) {\n return \"MASTER\";\n }\n String str2 = \"MADA\";\n return cardType.equalsIgnoreCase(str2) ? str2 : \"UNKNOWN\";\n }", "C1458cs mo7613iS();", "public static String m114840g() {\n String str;\n if (!C7163a.m22363a() || !f93231M.mo93305a(Property.UseEffectCam)) {\n str = \"142710f02c3a11e8b42429f14557854a\";\n } else {\n str = \"68d32050064f11e891efe7cc07299bc5\";\n }\n if (!str.equals(\"142710f02c3a11e8b42429f14557854a\")) {\n return str;\n }\n if (!C7163a.m22363a() || !f93231M.mo93305a(Property.UsePlanQi)) {\n return \"142710f02c3a11e8b42429f14557854a\";\n }\n return \"9f623eb0ee4911e98a27811dc5ef9137\";\n }", "byte[] mo38566a();", "private boolean validateVisa() {\r\n\t\tString creditCardNumber = getCreditCardNumber();\r\n\t\t// checking the card number length\r\n\t\tif (creditCardNumber.length() != 13 && creditCardNumber.length() != 16 && creditCardNumber.length() != 19) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t// checking the validity of the credit card number\r\n\t\tif (creditCardNumber.charAt(0) != '4') {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public static String getAcountAsterixData(String ccNum) \r\n\t{\r\n\t\tif(ccNum.length() < 4)\r\n\t\t\treturn ccNum;\r\n\t\tint len = ccNum.length();\r\n\t\tString temp = \"\";\r\n\t\tfor (int i = 0; i < (len - 4); i++) {\r\n\t\t\ttemp = temp + \"*\";\r\n\t\t}\r\n\t\treturn (temp + ccNum.substring((len - 4), (len)));\r\n\t}", "public static String m21387a(Context context) {\n String str = \"wns_ab\";\n try {\n if (TextUtils.isEmpty(f16890a)) {\n f16890a = Secure.getString(context.getContentResolver(), \"android_id\");\n }\n if (TextUtils.isEmpty(f16890a)) {\n f16890a = C5206p.m21472b(context, str);\n if (TextUtils.isEmpty(f16890a)) {\n f16890a = UUID.randomUUID().toString().replace(\"-\", \"\");\n C5206p.m21471a(context, str, f16890a);\n }\n }\n } catch (Throwable th) {\n C5205o.m21464a(th);\n }\n return f16890a;\n }", "java.lang.String getField1658();", "java.lang.String getField1305();", "public final void mo77069a(String str) {\n C32569u.m150519b(str, C6969H.m41409d(\"G658ADB118A22A7\"));\n C30167Za.log(ZaLogEntry.EnumC31331b.CardShow).mo122570a(new C14698a(str)).mo122575a();\n }", "public static String generateCardNumber(Issuer issuer) {\n // cardNumber = Visa start with 4400, AMex: 3715, MasterCard = 3507\n String number = \"\";\n switch(issuer){\n case VISA: number += \"4400\"; break;\n case MASTER_CARD: number += \"3507\"; break;\n case AMEX: number += \"3715\"; break;\n case DISCOVER: number += \"5555\"; break;\n }\n /*\n if(issuer.equalsIgnoreCase(\"Visa\")) {\n number += \"4400\";\n }\n else if(issuer.equalsIgnoreCase(\"MasterCard\")) {\n number += \"3507\";\n }\n else if(issuer.equalsIgnoreCase(\"American Express\") \n || issuer.equalsIgnoreCase(\"Amex\")) {\n number += \"3715\";\n }\n else { // for our program, a default starting number\n number += \"5555\"; \n }\n */\n // could make random 12 digit number to add on.\n // or a counter that would add on\n number += COUNTER; \n COUNTER++;\n\n return number;\n }", "Base64Binary getCarrierAIDC();", "public static C2573hn m5600a(boolean z, boolean z2) {\n C2573hn hnVar;\n String str = \"\\\"\";\n Context c = C2505gd.m5298c();\n if (c == null) {\n return null;\n }\n try {\n WifiInfo connectionInfo = ((WifiManager) c.getSystemService(TapjoyConstants.TJC_CONNECTION_TYPE_WIFI)).getConnectionInfo();\n if (connectionInfo != null) {\n String bssid = connectionInfo.getBSSID();\n String ssid = connectionInfo.getSSID();\n if (bssid != null && !m5603a(z, ssid)) {\n hnVar = new C2573hn();\n try {\n hnVar.f5675a = m5599a(bssid);\n String substring = (ssid == null || !ssid.startsWith(str) || !ssid.endsWith(str)) ? ssid : ssid.substring(1, ssid.length() - 1);\n if (z2) {\n substring = null;\n }\n hnVar.f5676b = substring;\n hnVar.f5677c = connectionInfo.getRssi();\n hnVar.f5678d = connectionInfo.getIpAddress();\n } catch (Exception e) {\n e = e;\n C2463fd.m5161a().mo28382a(new C2495fz(e));\n return hnVar;\n }\n return hnVar;\n }\n }\n hnVar = null;\n } catch (Exception e2) {\n e = e2;\n hnVar = null;\n C2463fd.m5161a().mo28382a(new C2495fz(e));\n return hnVar;\n }\n return hnVar;\n }", "java.lang.String getField1636();", "C4945r5 mo19056B();", "java.lang.String getField1648();", "public static void main(String[] args) {\n String idNum = \"410326880818551\";\n System.out.println(verify15(idNum));\n// String idNum2 = \"411111198808185510\";\n String idNum2 = \"410326198808185515\";\n System.out.println(verify(idNum2));\n }", "public String getencodedCard() {\r\n \r\n String cardDesc=\"\";\r\n String partnerId=\"\";\r\n String cardId=\"\";\r\n \r\n if(session!=null) {\r\n if (session.getAttribute(\"Partner_Object_List\") != null) {\r\n partnerInfoList =\r\n (List<PartnerInfo>)session.getAttribute(\"Partner_Object_List\");\r\n if(getPartner()!=null && !getPartner().equals(\"\") && getCardPk() != null && !getCardPk().equals(\"\")){\r\n partnerId=getPartner();\r\n cardId=getCardPk().toString().trim();\r\n \r\n if (partnerInfoList != null) {\r\n for (int k = 0; k < partnerInfoList.size(); k++) {\r\n if (partnerId.equalsIgnoreCase(partnerInfoList.get(k).getPartnerValue().toString())) {\r\n for (int ac = 0;ac < partnerInfoList.get(k).getAccountList().size();ac++) {\r\n for (int cg = 0;cg < partnerInfoList.get(k).getAccountList().get(ac).getCardGroup().size();cg++) {\r\n for (int cd = 0;cd < partnerInfoList.get(k).getAccountList().get(ac).getCardGroup().get(cg).getCard().size();cd++) {\r\n if(cardId.equalsIgnoreCase(partnerInfoList.get(k).getAccountList().get(ac).getCardGroup().get(cg).getCard().get(cd).getCardID())) {\r\n if(partnerInfoList.get(k).getAccountList().get(ac).getCardGroup().get(cg).getCard().get(cd).getDisplayCardNumber() != null)\r\n {\r\n cardDesc= partnerInfoList.get(k).getAccountList().get(ac).getCardGroup().get(cg).getCard().get(cd).getDisplayCardNumber().toString();\r\n }\r\n }\r\n }\r\n }\r\n\r\n }\r\n }\r\n\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return cardDesc;\r\n \r\n \r\n }", "private static int zzaz(java.lang.String r5) {\n /*\n int r0 = r5.hashCode()\n r1 = 0\n r2 = 3\n r3 = 2\n r4 = 1\n switch(r0) {\n case -1095064472: goto L_0x002a;\n case 187078296: goto L_0x0020;\n case 1504578661: goto L_0x0016;\n case 1505942594: goto L_0x000c;\n default: goto L_0x000b;\n }\n L_0x000b:\n goto L_0x0034\n L_0x000c:\n java.lang.String r0 = \"audio/vnd.dts.hd\"\n boolean r5 = r5.equals(r0)\n if (r5 == 0) goto L_0x0034\n r5 = 3\n goto L_0x0035\n L_0x0016:\n java.lang.String r0 = \"audio/eac3\"\n boolean r5 = r5.equals(r0)\n if (r5 == 0) goto L_0x0034\n r5 = 1\n goto L_0x0035\n L_0x0020:\n java.lang.String r0 = \"audio/ac3\"\n boolean r5 = r5.equals(r0)\n if (r5 == 0) goto L_0x0034\n r5 = 0\n goto L_0x0035\n L_0x002a:\n java.lang.String r0 = \"audio/vnd.dts\"\n boolean r5 = r5.equals(r0)\n if (r5 == 0) goto L_0x0034\n r5 = 2\n goto L_0x0035\n L_0x0034:\n r5 = -1\n L_0x0035:\n if (r5 == 0) goto L_0x0045\n if (r5 == r4) goto L_0x0043\n if (r5 == r3) goto L_0x0041\n if (r5 == r2) goto L_0x003e\n return r1\n L_0x003e:\n r5 = 8\n return r5\n L_0x0041:\n r5 = 7\n return r5\n L_0x0043:\n r5 = 6\n return r5\n L_0x0045:\n r5 = 5\n return r5\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.google.android.gms.internal.ads.zzio.zzaz(java.lang.String):int\");\n }", "private boolean m76078a(String str) {\n return str.contains(Uri.encode(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FBF2CF403DF52FAECCBC22497D008B223\"))) || str.contains(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FBF2CF403DF52FAECCBC22497D008B223\")) || str.contains(Uri.encode(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FBF2CF403DF52FAECCBC22497D008B223\"))) || str.contains(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FBF2CF403DF52FAECCBC22497D008B223\")) || str.contains(Uri.encode(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FAA2AE5018546E6AAD7D27B8E9A0AAD39BD28E517\"))) || str.contains(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FAA2AE5018546E6AAD7D27B8E9A0AAD39BD28E517\")) || str.contains(Uri.encode(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FBF2CF403DF58E0ECD5D66A9A\"))) || str.contains(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FBF2CF403DF58E0ECD5D66A9A\")) || str.contains(Uri.encode(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FAA2AE5018546E6AAC2C77986D416E025BF24D91D9F5DE0E6C68A688DD108B039AF\"))) || str.contains(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FAA2AE5018546E6AAC2C77986D416E025BF24D91D9F5DE0E6C68A688DD108B039AF\")) || str.contains(Uri.encode(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FAA39F618994DE5AACBD26593EA19BA3EBF2CF441815DF7F6D7DE668DEA0EA620AE\"))) || str.contains(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FAA39F618994DE5AACBD26593EA19BA3EBF2CF441815DF7F6D7DE668DEA0EA620AE\")) || str.contains(C6969H.m41409d(\"G738BDC12AA6AE466F51B9245FBF1FCD16C86D118BE33A0\")) || str.contains(Uri.encode(C6969H.m41409d(\"G738BDC12AA6AE466F51B9245FBF1FCD16C86D118BE33A0\"))) || str.contains(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FAA39F618994DE5AACBD26593EA19BA3EBF2CF441815DF7F6D7DE668D\")) || str.contains(Uri.encode(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FAA39F618994DE5AACBD26593EA19BA3EBF2CF441815DF7F6D7DE668D\"))) || str.contains(C6969H.m41409d(\"G6197C10AAC6AE466E340C110ABABC0D92690D111F031AC3BE30B9D4DFCF18CD36C97D413B37EAF26B906994CF7F1CCC73497C70FBA\")) || str.contains(Uri.encode(C6969H.m41409d(\"G6197C10AAC6AE466E340C110ABABC0D92690D111F031AC3BE30B9D4DFCF18CD36C97D413B37EAF26B906994CF7F1CCC73497C70FBA\"))) || str.contains(C6969H.m41409d(\"G6197C10AAC6AE466F10F8006F1E8D3D67A90C515AD24E52AE903DF5AF7F6CCC27B80D009F038BF24EA419347FCF1D1D66A979B12AB3DA7\")) || str.contains(Uri.encode(C6969H.m41409d(\"G6197C10AAC6AE466F10F8006F1E8D3D67A90C515AD24E52AE903DF5AF7F6CCC27B80D009F038BF24EA419347FCF1D1D66A979B12AB3DA7\"))) || str.contains(C6969H.m41409d(\"G6197C10AAC6AE466EB1DDE52E8FD9A996A8D9A12AB3DA766E90F855CFAAAD3C56697DA19B03CF967EE1A9D44\")) || str.contains(Uri.encode(C6969H.m41409d(\"G6197C10AAC6AE466EB1DDE52E8FD9A996A8D9A12AB3DA766E90F855CFAAAD3C56697DA19B03CF967EE1A9D44\"))) || str.contains(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FAA27F2078358F3E88CC26781D915BC3B\")) || str.contains(Uri.encode(C6969H.m41409d(\"G6197C10AAC6AE466F1198706E8EDCADF7CCDD615B27FAA27F2078358F3E88CC26781D915BC3B\")));\n }", "java.lang.String getField1248();", "public String mo10115a(Context context) {\n try {\n return (String) C2342q.m9000a(\"getId\", context);\n } catch (Exception e) {\n Log.e(\"AdvertisingInfo\", \"Error getting advertising id: \" + e.getMessage());\n return null;\n }\n }", "static int hexa_to_deci(String hexa_address){\n\t\tint deci_val = 0;\n\t\tint multiply = 1;\n\t\tfor(int i=hexa_address.length()-1;i>=0;i--){\n\t\t\tint j=0;\n\t\t\tfor(;j<16;j++)\n\t\t\t\tif(hexa_address.charAt(i)==hexa[j])\n\t\t\t\t\tbreak;\n\t\t\tdeci_val+=(multiply*j);\n\t\t\tmultiply*=16;\n\t\t}\n\t\treturn deci_val;\n\t}", "java.lang.String getField1536();", "public int mo15797hn() {\n return this.f3883JI;\n }", "public String getUniqueIdentifier(){\n return (streetAddress + aptNumber + zip).toLowerCase().replaceAll(\"\\\\s+\",\"\"); \n }", "private byte m1654g() {\n char charAt;\n do {\n int i = this.f2519d;\n if (i >= this.f2518c) {\n return 12;\n }\n CharSequence charSequence = this.f2516a;\n this.f2519d = i + 1;\n charAt = charSequence.charAt(i);\n this.f2520e = charAt;\n } while (charAt != ';');\n return 12;\n }", "java.lang.String getField1394();", "private String m25428h() {\n if (this.a == null) {\n return null;\n }\n Uri parse;\n Builder builder;\n String a = AdSettings.m6374a();\n if (a != null) {\n if (!a.isEmpty()) {\n a = String.format(\"https://www.%s.facebook.com/audience_network/server_side_reward\", new Object[]{a});\n parse = Uri.parse(a);\n builder = new Builder();\n builder.scheme(parse.getScheme());\n builder.authority(parse.getAuthority());\n builder.path(parse.getPath());\n builder.query(parse.getQuery());\n builder.fragment(parse.getFragment());\n builder.appendQueryParameter(\"puid\", this.a.m7645a());\n builder.appendQueryParameter(\"pc\", this.a.m7646b());\n builder.appendQueryParameter(\"ptid\", this.f19103e);\n builder.appendQueryParameter(\"appid\", this.f19107i);\n return builder.build().toString();\n }\n }\n a = \"https://www.facebook.com/audience_network/server_side_reward\";\n parse = Uri.parse(a);\n builder = new Builder();\n builder.scheme(parse.getScheme());\n builder.authority(parse.getAuthority());\n builder.path(parse.getPath());\n builder.query(parse.getQuery());\n builder.fragment(parse.getFragment());\n builder.appendQueryParameter(\"puid\", this.a.m7645a());\n builder.appendQueryParameter(\"pc\", this.a.m7646b());\n builder.appendQueryParameter(\"ptid\", this.f19103e);\n builder.appendQueryParameter(\"appid\", this.f19107i);\n return builder.build().toString();\n }", "private void checkDataBalance() {\n String ussdCode = \"*175*4\" + Uri.encode(\"#\");\n startActivity(new Intent(Intent.ACTION_CALL,Uri.parse(\"tel:\"+ussdCode)));\n\n }", "public String getCvvNumber();", "java.lang.String getField1281();", "public String getIdentityCard() {\n return identityCard;\n }", "public String m50420r() {\n try {\n return this.f30729a0.getCardNumber();\n } catch (Exception unused) {\n return this.f30729a0.getText().toString().trim();\n }\n }", "private static String m85766a(Aweme aweme) {\n if (aweme == null) {\n return \"\";\n }\n String m = C33230ac.m107238m(aweme);\n C7573i.m23582a((Object) m, \"MobUtils.getAid(data ?: return \\\"\\\")\");\n return m;\n }", "java.lang.String getField1665();", "private void m81850n() {\n m81843b(m81844c(C6969H.m41409d(\"G738BEA12B634AE16F20F9277F0E4D1\")));\n }", "private byte m1656i() {\n char charAt;\n int i = this.f2519d;\n while (true) {\n int i2 = this.f2519d;\n if (i2 < this.f2518c) {\n CharSequence charSequence = this.f2516a;\n this.f2519d = i2 + 1;\n char charAt2 = charSequence.charAt(i2);\n this.f2520e = charAt2;\n if (charAt2 == '>') {\n return 12;\n }\n if (charAt2 == '\\\"' || charAt2 == '\\'') {\n do {\n int i3 = this.f2519d;\n if (i3 >= this.f2518c) {\n break;\n }\n CharSequence charSequence2 = this.f2516a;\n this.f2519d = i3 + 1;\n charAt = charSequence2.charAt(i3);\n this.f2520e = charAt;\n } while (charAt != charAt2);\n }\n } else {\n this.f2519d = i;\n this.f2520e = '<';\n return 13;\n }\n }\n }", "private static int m1645a(CharSequence charSequence) {\n return new C0510a(charSequence, false).mo4451d();\n }", "public String getIdcard() {\r\n return idcard;\r\n }", "public String getIdcard() {\r\n return idcard;\r\n }", "public String getIdcard() {\r\n return idcard;\r\n }", "private final void m46511P() {\n C15593cd.m50346a(this.f40707H.f44224a, this.f40705F, \"aeh2\");\n }", "java.lang.String getField1283();", "public final String mo5960az(String str) {\n try {\n if (TextUtils.isEmpty(str)) {\n return null;\n }\n byte[] bArr = new byte[16];\n new SecureRandom().nextBytes(bArr);\n Cipher instance = Cipher.getInstance(\"AES/CBC/PKCS5Padding\");\n String string = C1251i.m5302ck().getString(f3976js, null);\n if (TextUtils.isEmpty(string)) {\n string = m5297cj();\n C1251i.m5302ck().putString(f3976js, string);\n }\n if (TextUtils.isEmpty(string)) {\n return null;\n }\n byte[] aA = m5293aA(string);\n if (aA == null) {\n return null;\n }\n instance.init(1, new SecretKeySpec(aA, \"AES\"), new IvParameterSpec(bArr));\n return Base64.encodeToString(m5292a(bArr, instance.doFinal(str.getBytes(AudienceNetworkActivity.WEBVIEW_ENCODING))), 2);\n } catch (Throwable unused) {\n return null;\n }\n }", "public static int m84097AS(String str) {\n AppMethodBeat.m2504i(3207);\n if (\"fingerPrint\".equals(str)) {\n AppMethodBeat.m2505o(3207);\n return 1;\n } else if (\"facial\".equals(str)) {\n AppMethodBeat.m2505o(3207);\n return 8;\n } else if (\"speech\".equals(str)) {\n AppMethodBeat.m2505o(3207);\n return 2;\n } else {\n C4990ab.m7412e(\"MicroMsg.AppBrandSoterTranslateUtil\", \"hy: invalid item\");\n AppMethodBeat.m2505o(3207);\n return 0;\n }\n }", "public String getlbr_Barcode2();", "Info mo7564ix();", "private boolean validateAmericanExpress() {\n\t\tString creditCardNumber = getCreditCardNumber();\r\n\t\tif (creditCardNumber.length() != 15)\r\n\t\t\treturn false;\r\n\t\tint firstTwo = Integer.parseInt(creditCardNumber.substring(0, 2));\r\n\t\t// Checking the validity of the number\r\n\t\tif (!(34 <= firstTwo && firstTwo <= 37))\r\n\t\t\treturn false;\r\n\t\treturn true;\r\n\r\n\t}", "CarPaymentMethod processSavedVisa(String securityCode);", "public String m18472f() {\n return this.cardId;\n }", "String billingPartNumber();", "java.lang.String getField1663();", "public String getIdcard() {\n return idcard;\n }", "public void mo63047b(String str) {\n String str2;\n String str3;\n String str4;\n String str5;\n super.mo63047b(str);\n if (C25352e.m83221d(this.f77546j)) {\n this.f89203a.mo65916c();\n C24961b e = C24958f.m81905a().mo65273b(this.f77546j).mo65266a(\"result_ad\").mo65276b(\"play_over\").mo65283e(\"video\");\n Aweme aweme = this.f77546j;\n C7573i.m23582a((Object) aweme, \"mAweme\");\n Video video = aweme.getVideo();\n C7573i.m23582a((Object) video, \"mAweme.video\");\n e.mo65271b((long) video.getVideoLength()).mo65270a(mo75261ab());\n this.f89214bh++;\n C28418f a = C28418f.m93413a();\n C7573i.m23582a((Object) a, \"FeedSharePlayInfoHelper.inst()\");\n a.f74936f = this.f89214bh;\n if (this.f89214bh >= this.f89215bi) {\n C28418f a2 = C28418f.m93413a();\n C7573i.m23582a((Object) a2, \"FeedSharePlayInfoHelper.inst()\");\n if (!a2.f74934d) {\n Aweme aweme2 = this.f77546j;\n C7573i.m23582a((Object) aweme2, \"mAweme\");\n AwemeRawAd awemeRawAd = aweme2.getAwemeRawAd();\n if (awemeRawAd != null) {\n str3 = awemeRawAd.getWebUrl();\n } else {\n str3 = null;\n }\n if (TextUtils.isEmpty(str3)) {\n C24961b b = C24958f.m81905a().mo65273b(this.f77546j).mo65266a(\"result_ad\").mo65276b(\"play\");\n if (!C25352e.m83224g(this.f77546j) || !TextUtils.equals(mo75290r(), \"general_search\")) {\n str4 = \"\";\n } else {\n str4 = \"video\";\n }\n b.mo65283e(str4).mo65270a(mo75261ab());\n return;\n } else if (mo75314al()) {\n mo75311ai();\n return;\n } else {\n this.f89215bi++;\n C24961b b2 = C24958f.m81905a().mo65273b(this.f77546j).mo65266a(\"result_ad\").mo65276b(\"play\");\n if (!C25352e.m83224g(this.f77546j) || !TextUtils.equals(mo75290r(), \"general_search\")) {\n str5 = \"\";\n } else {\n str5 = \"video\";\n }\n b2.mo65283e(str5).mo65270a(mo75261ab());\n return;\n }\n }\n }\n C24961b b3 = C24958f.m81905a().mo65273b(this.f77546j).mo65266a(\"result_ad\").mo65276b(\"play\");\n if (!C25352e.m83224g(this.f77546j) || !TextUtils.equals(mo75290r(), \"general_search\")) {\n str2 = \"\";\n } else {\n str2 = \"video\";\n }\n b3.mo65283e(str2).mo65270a(mo75261ab());\n }\n }", "public static String[] decryptIDTECHBlock(byte[] data) {\n /*\n * DATA[0]: CARD TYPE: 0x0 - payment card\n * DATA[1]: TRACK FLAGS\n * DATA[2]: TRACK 1 LENGTH\n * DATA[3]: TRACK 2 LENGTH\n * DATA[4]: TRACK 3 LENGTH\n * DATA[??]: TRACK 1 DATA MASKED\n * DATA[??]: TRACK 2 DATA MASKED\n * DATA[??]: TRACK 3 DATA\n * DATA[??]: TRACK 1 AND TRACK 2 TDES ENCRYPTED\n * DATA[??]: TRACK 1 SHA1 (0x14 BYTES)\n * DATA[??]: TRACK 2 SHA1 (0x14 BYTES)\n * DATA[??]: DUKPT SERIAL AND COUNTER (0x0A BYTES)\n */\n int cardType = data[0] & 0xff;\n int track1Len = data[2] & 0xff;\n int track2Len = data[3] & 0xff;\n int track3Len = data[4] & 0xff;\n int offset = 5;\n\n String[] result = new String[4];\n result[0] = (cardType == 0) ? \"PAYMENT\" : \"UNKNOWN\";\n\n if (track1Len > 0) {\n offset += track1Len;\n }\n\n if (track2Len > 0) {\n offset += track2Len;\n }\n\n if (track3Len > 0) {\n result[3] = new String(data, offset, track3Len);\n offset += track3Len;\n }\n\n if ((track1Len + track2Len) > 0) {\n int blockSize = (track1Len + track2Len + 7) & 0xFFFFFF8;\n byte[] encrypted = new byte[blockSize];\n System.arraycopy(data, offset, encrypted, 0, encrypted.length);\n offset += blockSize;\n\n byte[] track1Hash = new byte[20];\n System.arraycopy(data, offset, track1Hash, 0, track1Hash.length);\n offset += track1Hash.length;\n\n byte[] track2Hash = new byte[20];\n System.arraycopy(data, offset, track2Hash, 0, track2Hash.length);\n offset += track2Hash.length;\n\n byte[] ipek = IDTECH_DATA_KEY_BYTES;\n byte[] ksn = new byte[10];\n System.arraycopy(data, offset, ksn, 0, ksn.length);\n offset += ksn.length;\n\n byte[] dataKey = CryptoUtil.calculateDataKey(ksn, ipek);\n byte[] decrypted = CryptoUtil.decrypt3DESCBC(dataKey, encrypted);\n\n if (decrypted == null) throw new RuntimeException(\"Failed to decrypt\");\n\n if (track1Len > 0) {\n byte[] calcHash = CryptoUtil.calculateSHA1(decrypted, 0, track1Len);\n if (!Arrays.equals(track1Hash, calcHash)) {\n throw new RuntimeException(\"Wrong key\");\n }\n }\n\n if (track2Len > 0) {\n byte[] calcHash = CryptoUtil.calculateSHA1(decrypted, track1Len, track2Len);\n if (!Arrays.equals(track2Hash, calcHash)) {\n throw new RuntimeException(\"Wrong key\");\n }\n }\n\n if (track1Len > 0) {\n result[1] = new String(decrypted, 0, track1Len);\n }\n\n if (track2Len > 0) {\n result[2] = new String(decrypted, track1Len, track2Len);\n }\n }\n\n return result;\n }", "public Info mo7564ix() {\n boolean z = false;\n try {\n return AdvertisingIdClient.getAdvertisingIdInfo(C1358a.this.mContext);\n } catch (IllegalStateException e) {\n C1401bh.m4078w(\"IllegalStateException getting Advertising Id Info\");\n return z;\n } catch (GooglePlayServicesRepairableException e2) {\n C1401bh.m4078w(\"GooglePlayServicesRepairableException getting Advertising Id Info\");\n return z;\n } catch (IOException e3) {\n C1401bh.m4078w(\"IOException getting Ad Id Info\");\n return z;\n } catch (GooglePlayServicesNotAvailableException e4) {\n C1401bh.m4078w(\"GooglePlayServicesNotAvailableException getting Advertising Id Info\");\n return z;\n } catch (Exception e5) {\n C1401bh.m4078w(\"Unknown exception. Could not get the Advertising Id Info.\");\n return z;\n }\n }", "java.lang.String getField1696();", "public abstract byte[] mo32305a(String str);", "java.lang.String getField1697();", "String mo21078i();", "private final void m110463ax() {\n boolean z;\n if (C25352e.m83221d(this.f77546j)) {\n C24962g.m81963b(this.f77546j);\n boolean z2 = true;\n if (!C25352e.m83313X(this.f77546j) || C6776h.m20948b(mo75261ab(), C25352e.m83305P(this.f77546j))) {\n z = true;\n } else {\n z = false;\n }\n Aweme aweme = this.f77546j;\n C7573i.m23582a((Object) aweme, \"mAweme\");\n AwemeRawAd awemeRawAd = aweme.getAwemeRawAd();\n if (awemeRawAd == null) {\n C7573i.m23580a();\n }\n C7573i.m23582a((Object) awemeRawAd, \"mAweme.awemeRawAd!!\");\n String openUrl = awemeRawAd.getOpenUrl();\n boolean b = C25371n.m83473b(openUrl);\n if (C25352e.m83361c(openUrl)) {\n String builder = Uri.parse(C24505a.f64678a).buildUpon().appendQueryParameter(\"tag\", \"result_ad\").toString();\n C7573i.m23582a((Object) builder, \"Uri.parse(CommercializeC… .toString()\");\n openUrl = C25352e.m83325a(openUrl, builder);\n } else {\n z2 = false;\n }\n if (!z || !b || !C25371n.m83458a(mo75261ab(), openUrl, this.f77546j, false, false)) {\n Context ab = mo75261ab();\n Aweme aweme2 = this.f77546j;\n String N = C25352e.m83303N(this.f77546j);\n String O = C25352e.m83304O(this.f77546j);\n Aweme aweme3 = this.f77546j;\n C7573i.m23582a((Object) aweme3, \"mAweme\");\n AwemeRawAd awemeRawAd2 = aweme3.getAwemeRawAd();\n if (awemeRawAd2 == null) {\n C7573i.m23580a();\n }\n C7573i.m23582a((Object) awemeRawAd2, \"mAweme.awemeRawAd!!\");\n if (C25371n.m83453a(ab, aweme2, N, O, awemeRawAd2.isUseOrdinaryWeb(), false, 5)) {\n C24958f.m81905a().mo65273b(this.f77546j).mo65266a(\"result_ad\").mo65276b(\"open_url_h5\").mo65270a(mo75261ab());\n }\n return;\n }\n if (z2) {\n C24558c a = C24558c.m80613a();\n C7573i.m23582a((Object) a, \"CommercializeManager.getInstance()\");\n a.f64800a = this.f77546j;\n }\n C24958f.m81905a().mo65273b(this.f77546j).mo65266a(\"result_ad\").mo65276b(\"open_url_app\").mo65270a(mo75261ab());\n C25371n.m83440a((C25372a) new C34217k(this));\n }\n }", "void mo7352a(C1655s sVar, AdError adError);", "private void m81856t() {\n try {\n String c = m81844c(C6969H.m41409d(\"G738BEA0DBA32BD20E319AF5CEBF5C6\"));\n if (!TextUtils.isEmpty(c)) {\n this.f58084p = Integer.parseInt(c);\n }\n } catch (Exception e) {\n WebUtil.m68654a(C6969H.m41409d(\"G5C91D93EBA3CAE2EE71A95\"), e.getMessage());\n }\n }", "public static final String number2show(String phoneNumber) throws Exception {\n\t\tif (phoneNumber == null || phoneNumber.length() == 0) {\n\t\t\treturn phoneNumber;\n\t\t}\n\n\t\tboolean isIpCall = false;\n\n\t\tint lth = phoneNumber.length();\n\t\tif(lth >= CHINA_MOBILE_LDC.length()){\n\t\t\tif (phoneNumber.substring(0, 5).equals(CHINA_MOBILE_LDC)) {\n\t\t\t\tisIpCall = true;\n\n\t\t\t\tphoneNumber = phoneNumber.substring(5);\n\t\t\t}\n\t\t}\n\t\t//phone not encrypt yet, like 10086/955555 etc, it is not a cipher text\n\t\tif (phoneNumber.length() != CIPHER_FIXED_LENGTH) {\n\t\t\t//with '+'\n\t\t\tif (phoneNumber.length() != 22) {\n\t\t\t\tif (isIpCall) {\n\t\t\t\t\treturn CHINA_MOBILE_LDC + phoneNumber;\n\t\t\t\t}\n\t\t\t\treturn phoneNumber;\n\t\t\t} else {\n\t\t\t\t// with '+' maybe\n\t\t\t\t//TODO: strange here\n\t\t\t\tchar first = phoneNumber.charAt(0);\n\t\t\t\tif (first != '+') {\n\t\t\t\t\tif (isIpCall) {\n\t\t\t\t\t\treturn CHINA_MOBILE_LDC + phoneNumber;\n\t\t\t\t\t}\n\t\t\t\t\treturn phoneNumber;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn phoneNumber;\n\t\t}\n\t\tif (phoneNumber.charAt(0) == '+') {\n\t\t\tphoneNumber = phoneNumber.substring(1);\n\t\t}\n\t\t\n\t\t//TODO when input length is 21, can not know it is a \n\t\t//plain text or encrypt text\n\t\t//check the last two bit, if more than 19, return \n\t\tint length = phoneNumber.length();\n\t\tString twobitString = phoneNumber.substring(length - 2);\n\t\tint twobitInt = 0;\n\t\ttry{\n\t\t\ttwobitInt = Integer.parseInt(twobitString);\n\t\t}catch(Exception e){\n\t\t\treturn phoneNumber;\n\t\t}\n\t\t\n\t\tif(twobitInt > CIPHER_FIXED_LENGTH - LAST_TWO_BITS_INDICATOR){\n\t\t\treturn phoneNumber;\n\t\t}\n\t\t//do the real work, it is must the valid encrypt phone\n\t\tString body = unpadding(phoneNumber);\n\n\t\tString realPhone = show(body, TIMES);\n\t\tif (!isEmpty(realPhone) || realPhone.length() >= 2) {\n\t\t\tString with86 = realPhone.substring(0, 2);\n\n\t\t\tif (with86.equals(\"86\")) {\n\t\t\t\trealPhone = realPhone.substring(2);\n\t\t\t}\n\t\t}\n\n\t\tif (isIpCall) {\n\t\t\treturn CHINA_MOBILE_LDC + realPhone;\n\t\t}\n\t\treturn realPhone;\n\t}", "public CreditCard(String n){\n \n\t\tnumber = n;\n\t\tvalid = true;\n errorCode = 0;\n firstDigit = Integer.parseInt(number.substring(0,1));\n fourthDigit = Integer.parseInt(number.substring(3,4));\n fifthDigit = Integer.parseInt(number.substring(4,5));\n ninthDigit = Integer.parseInt(number.substring(8,9));\n\t}", "private void greensnum(long a) {\n\n\t\tSystem.out.println(\"OMR phonenumber is\"+a);\n\t}", "@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:58:38.932 -0500\", hash_original_method = \"5678F2B610228E0CE45D092607B03827\", hash_generated_method = \"7B2C35C921BBD0175CC55FEA5D981832\")\n \nprivate static String isimTlvToString(byte[] record) {\n SimTlv tlv = new SimTlv(record, 0, record.length);\n do {\n if (tlv.getTag() == TAG_ISIM_VALUE) {\n return new String(tlv.getData(), Charset.forName(\"UTF-8\"));\n }\n } while (tlv.nextObject());\n\n Log.e(LOG_TAG, \"[ISIM] can't find TLV tag in ISIM record, returning null\");\n return null;\n }", "C4945r5 mo19057F();", "java.lang.String getField1548();", "public abstract C44490de mo70701a(C44491df c44491df, C44481at c44481at);", "public C3244x1 mo12665a(String str) {\n C3244x1 x1Var = new C3244x1();\n String trim = str.trim();\n String str2 = trim;\n for (String replace : f11725a) {\n str2 = str2.replace(replace, \"\");\n }\n if (str2.length() > 512) {\n str2 = str2.substring(0, C0753l.f3451u);\n StringBuilder sb = new StringBuilder();\n sb.append(str2.trim());\n sb.append(\"... exceeds the limit of \");\n sb.append(512);\n sb.append(\" characters. Trimmed\");\n x1Var.mo12658a(sb.toString());\n x1Var.mo12656a(510);\n }\n x1Var.mo12657a((Object) str2.trim());\n return x1Var;\n }", "void mo8712a(C9714a c9714a);", "public void creditCard() {\n\t\tSystem.out.println(\"hsbc --- credit card\");\n\t\t\n\t}", "public static String getCompany(String _card){\r\n\t\t\tString _errorLength = \"Invalid number of digits.\";\r\n\t\t\tString _errorInvalid = \"Invalid credit card number.\";\r\n\t\t\t\r\n\t\t\tif (_card.length() >= 13 && _card.length() <=16){\r\n\t\t\t\tif (_card.charAt(0) == '4'){\r\n\t\t\t\t\treturn \"Visa\";\r\n\t\t\t\t}else if (_card.charAt(0) == '5'){\r\n\t\t\t\t\treturn \"Mastercard\";\r\n\t\t\t\t}else if (_card.charAt(0) == '6'){\r\n\t\t\t\t\treturn \"Discover\";\r\n\t\t\t\t}else if (_card.charAt(0) == '3' && _card.charAt(1) == '7'){\r\n\t\t\t\t\treturn \"American Express\";\r\n\t\t\t\t}else{\r\n\t\t\t\t\treturn _errorInvalid;\r\n\t\t\t\t}\r\n\t\t\t}else {\r\n\t\t\t\treturn _errorLength;\r\n\t\t\t}\r\n\t}", "boolean mo6499P(C41531v c41531v);", "long mo1685a(C2369e c2369e);", "private void checkBalance() {\n String ussdCode = \"*131\"+ Uri.encode(\"#\");\n startActivity(new Intent(Intent.ACTION_CALL,Uri.parse(\"tel:\"+ussdCode)));\n }", "public String getMerchantNo();", "private String m29111g() {\n PersistentConfiguration cVar = this.f22554b;\n if (cVar != null) {\n String string = cVar.getString(\"UTDID2\");\n if (!C6804i.m29033a(string) && this.f22552a.mo32716a(string) != null) {\n return string;\n }\n }\n return null;\n }", "CarPaymentMethod creditCardNumber(String cardNumber);", "public static CardGiftInfo m84651a(agk agk) {\n AppMethodBeat.m2504i(87789);\n CardGiftInfo cardGiftInfo = new CardGiftInfo();\n cardGiftInfo.toUserName = agk.vBE;\n cardGiftInfo.cKE = agk.vBF;\n cardGiftInfo.kcl = agk.vBG;\n cardGiftInfo.kcm = agk.content;\n cardGiftInfo.kcn = agk.vBH;\n cardGiftInfo.kco = agk.vBI;\n cardGiftInfo.kcp = agk.vBJ;\n cardGiftInfo.kcq = agk.vBK;\n cardGiftInfo.kcs = agk.vBM;\n cardGiftInfo.kcr = agk.vBL;\n cardGiftInfo.kct = agk.vBN;\n cardGiftInfo.kcu = agk.vBO;\n cardGiftInfo.kcv = agk.kcU;\n cardGiftInfo.kcw = agk.kcV;\n cardGiftInfo.kcx = agk.vBP;\n cardGiftInfo.color = agk.color;\n cardGiftInfo.kcy = agk.vBQ;\n cardGiftInfo.kcz = agk.vBR;\n cardGiftInfo.kcA = agk.vBS;\n cardGiftInfo.kcB = agk.vBT;\n cardGiftInfo.kcC = agk.vBU;\n cardGiftInfo.kcD = agk.vBV;\n cardGiftInfo.kcE = agk.vBW;\n cardGiftInfo.kcF = agk.vBX;\n cardGiftInfo.kcG = agk.vBY;\n cardGiftInfo.kcH = agk.vBZ;\n cardGiftInfo.kcI = agk.vCa;\n cardGiftInfo.kcJ = agk.vCb;\n cardGiftInfo.kcK = agk.vCc;\n cardGiftInfo.kcL = agk.vCd;\n cardGiftInfo.kcM = agk.kbU;\n cardGiftInfo.kcN = agk.vCe;\n AppMethodBeat.m2505o(87789);\n return cardGiftInfo;\n }", "private static Registration m2626a(Cursor cursor, @NonNull C4022a aVar) {\n boolean z = false;\n Registration.C4128a a = Registration.m3386c().mo56972j(aVar.mo56545b(cursor.getString(cursor.getColumnIndex(\"et_app_id\")))).mo56957a(C4029h.m2778c(aVar.mo56545b(cursor.getString(cursor.getColumnIndex(\"attributes\"))))).mo56958a(C4029h.m2780d(aVar.mo56545b(cursor.getString(cursor.getColumnIndex(\"tags\"))))).mo56969g(aVar.mo56545b(cursor.getString(cursor.getColumnIndex(\"subscriber_key\")))).mo56956a(aVar.mo56545b(cursor.getString(cursor.getColumnIndex(C4003a.f2858s)))).mo56963c(aVar.mo56545b(cursor.getString(cursor.getColumnIndex(C4003a.f2854o)))).mo56961b(cursor.getString(cursor.getColumnIndex(\"device_id\"))).mo56966d(cursor.getInt(cursor.getColumnIndex(\"push_enabled\")) == 1).mo56962b(cursor.getInt(cursor.getColumnIndex(\"location_enabled\")) == 1).mo56964c(cursor.getInt(cursor.getColumnIndex(C4003a.f2851l)) == 1).mo56973k(cursor.getString(cursor.getColumnIndex(\"locale\"))).mo56955a(cursor.getInt(cursor.getColumnIndex(\"timezone\")));\n if (cursor.getInt(cursor.getColumnIndex(\"dst\")) == 1) {\n z = true;\n }\n Registration b = a.mo56959a(z).mo56971i(cursor.getString(cursor.getColumnIndex(\"hwid\"))).mo56970h(cursor.getString(cursor.getColumnIndex(\"platform\"))).mo56968f(cursor.getString(cursor.getColumnIndex(\"platform_version\"))).mo56967e(cursor.getString(cursor.getColumnIndex(C4003a.f2856q))).mo56965d(cursor.getString(cursor.getColumnIndex(C4003a.f2857r))).mo56981b();\n b.mo56974a(cursor.getInt(cursor.getColumnIndex(\"id\")));\n return b;\n }", "public abstract java.lang.String getIdpcTV();", "public String SoloDNI() {\nreturn MuestraSoloDNI();\t\t\t\t\t\n}", "int getNidFromSNOMED(String sctid);", "public static String m21416s(Context context) {\n if (TextUtils.isEmpty(f16894e)) {\n try {\n f16894e = ((TelephonyManager) context.getSystemService(\"phone\")).getDeviceId();\n } catch (Exception e) {\n C5205o.m21464a((Throwable) e);\n }\n }\n return f16894e;\n }", "boolean mo6498O(C41531v c41531v);" ]
[ "0.5606459", "0.56052494", "0.5473896", "0.5453405", "0.54326624", "0.5429619", "0.5399117", "0.5368145", "0.5338187", "0.5333042", "0.5330637", "0.5329139", "0.53291327", "0.53178746", "0.5309476", "0.5293441", "0.52905905", "0.528474", "0.52757573", "0.5274979", "0.5274708", "0.52735263", "0.52651805", "0.52604055", "0.5240143", "0.52230084", "0.5216244", "0.5213176", "0.5210438", "0.52017325", "0.51865923", "0.51589274", "0.51202816", "0.5117848", "0.50963765", "0.5091173", "0.5087815", "0.5087576", "0.508749", "0.50874794", "0.5071231", "0.506889", "0.5064157", "0.5063549", "0.5056625", "0.50533015", "0.5051205", "0.504703", "0.5043774", "0.50420904", "0.50394547", "0.50326467", "0.5030138", "0.5030138", "0.5030138", "0.50297195", "0.50210726", "0.5018838", "0.5015304", "0.501139", "0.50098425", "0.5006706", "0.5005471", "0.50036424", "0.49900687", "0.49878395", "0.49777853", "0.49766982", "0.4974985", "0.49724972", "0.4970961", "0.4967136", "0.49523264", "0.49494317", "0.49449575", "0.49448225", "0.4937573", "0.49373507", "0.493195", "0.49278107", "0.49272922", "0.49251527", "0.49233463", "0.4919687", "0.4913203", "0.4912458", "0.49123418", "0.4910207", "0.49091548", "0.49069518", "0.48987287", "0.48977938", "0.48975155", "0.4893466", "0.4892409", "0.48922694", "0.48899126", "0.4885115", "0.4883081", "0.48752585", "0.4873927" ]
0.0
-1
Create a minimal graph with the default configuration
public static void main(String[] args) { Graph g = new GraphBuilder().build(); //Connect the graph g.connect(isConnected -> { //Display that the graph database is connected! System.out.println("Connected : " + isConnected); long timepoint_0 = 0; //the timestamp is a long and represents the time concept Node sensor0 = g.newNode(0, timepoint_0); //the second param is the time sensor0.set("id", Type.STRING, "4494F"); sensor0.set("name", Type.STRING, "sensor0"); sensor0.set("value", Type.DOUBLE, 0.5); //set the value of the sensor long timepoint_1 = 100; sensor0.travelInTime(timepoint_1, (Node sensor0T1) -> { sensor0T1.set("value", Type.DOUBLE, 21.3); //update the value of the time now //Display the value at time 0 System.out.println("T0:" + sensor0.toString()); //print T0:{"world":0,"time":0,"id":1,"id":"4494F","name":"sensor0","value":0.5} //Display the value at time now System.out.println("T1:" + sensor0T1.toString()); //print T1:{"world":0,"time":100,"id":1,"id":"4494F","name":"sensor0","value":21.3} long timepoint_2= 50; sensor0.travelInTime(timepoint_2, (Node sensor0T2) ->{ System.out.println("T2:" + sensor0T2.toString()); //prints T2:{"world":0,"time":50,"id":1,"id":"4494F","name":"sensor0","value":0.5} }); }); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Graph<Node, DefaultEdge> initialiseSpaceGraph() {\n Graph<Node, DefaultEdge> g = new SimpleGraph<>(DefaultEdge.class);\n g = addNodes(g);\n g = addEdges(g);\n return g;\n }", "public Graph() {\r\n\t\tinit();\r\n\t}", "void makeSampleGraph() {\n\t\tg.addVertex(\"a\");\n\t\tg.addVertex(\"b\");\n\t\tg.addVertex(\"c\");\n\t\tg.addVertex(\"d\");\n\t\tg.addVertex(\"e\");\n\t\tg.addVertex(\"f\");\n\t\tg.addVertex(\"g\");\n\t\tg.addEdge(\"a\", \"b\");\n\t\tg.addEdge(\"b\", \"c\");\n\t\tg.addEdge(\"b\", \"f\");\n\t\tg.addEdge(\"c\", \"d\");\n\t\tg.addEdge(\"d\", \"e\");\n\t\tg.addEdge(\"e\", \"f\");\n\t\tg.addEdge(\"e\", \"g\");\n\t}", "void createGraphForSingleLoad();", "public Graph() {\n }", "void createGraphForDistributedSingleLoad();", "public PlainGraph createGraph() {\n PlainGraph graph = new PlainGraph(getUniqueGraphName(), GraphRole.RULE);\n graphNodeMap.put(graph, new HashMap<>());\n return graph;\n }", "public Graphs() {\n graph = new HashMap<>();\n }", "@Override\n public Graph newInstance(int vertexesCount) {\n return new SimpleGraph();\n }", "public static Graph makeMeAGraph(Set<Operation> operations, State init){\n Graph graph = new implementGraph(operations , init) ;\n return graph;\n\n\t //\t throw new NotImplementedException();\n }", "public BasicKPartiteGraph() {\n\t\tthis(\"none\",UNLIMITED_PARTITIONS);\n\t}", "public void loadOrCreateGraph() {\n if(new File(graphPath + OVERLAY_GRAPH).exists())\n loadGraph();\n else {\n System.out.println(\"No file with the graph exists\");\n createGraph();\n }\n //graph.print();\n }", "public GraphInfo(){}", "public Graph(){\n\t\tthis.sizeE = 0;\n\t\tthis.sizeV = 0;\n\t}", "public void buildGraph(){\n\t}", "public DefaultGraphDecorator() {\n\t\tthis(Color.LIGHT_GRAY, Color.LIGHT_GRAY, Color.DARK_GRAY, Color.DARK_GRAY, new Color(128, 128, 255));\n\t}", "protected IWeightedGraph<GraphNode, WeightedEdge> createGraph() {\r\n\t\treturn createGraph(goapUnit.getGoalState());\r\n\t}", "public WeightedGraph() {\n super();\n }", "void createGraphForMassiveLoad();", "public Builder() {\n this(Graphs.<N, E>createUndirected());\n }", "private void createGraph() {\r\n graph = new Graph(SHELL, SWT.NONE);\r\n\r\n final GridData gridData = new GridData();\r\n gridData.horizontalAlignment = GridData.FILL;\r\n gridData.verticalAlignment = GridData.FILL;\r\n gridData.grabExcessHorizontalSpace = true;\r\n gridData.grabExcessVerticalSpace = true;\r\n gridData.heightHint = DEFAULT_GRAPH_SIZE;\r\n gridData.widthHint = DEFAULT_GRAPH_SIZE;\r\n graph.setLayoutData(gridData);\r\n }", "GraphFactory getGraphFactory();", "public Graph()\r\n\t{\r\n\t\tthis.adjacencyMap = new HashMap<String, HashMap<String,Integer>>();\r\n\t\tthis.dataMap = new HashMap<String,E>();\r\n\t}", "public GraphWrapper() {\n\t\tthis.graph = new Graph<T,E>();\n\t}", "public Graph()\n\t{\n\t\tthis.map = new HashMap<Object, SinglyLinkedList>();\n\t}", "public Graph() {\r\n\t\tthis.matrix = new Matrix();\r\n\t\tthis.listVertex = new ArrayList<Vertex>();\r\n\t}", "Graph<Integer, DefaultEdge> buildMap();", "public Graph(){\r\n this.listEdges = new ArrayList<>();\r\n this.listNodes = new ArrayList<>();\r\n this.shown = true;\r\n }", "@SuppressWarnings(\"rawtypes\")\r\n\tpublic Graph() {\r\n \tthis.vertex = new HashMap<T, Vertex>();\r\n \tthis.edge = new HashMap<Integer, Edge>();\r\n }", "public DSAGraph()\n\t{\n\t\tvertices = new DSALinkedList();\n\t\tedgeCount = 0;\n\t}", "public Graph()\n\t{\n\t\tthis.total_verts = null;\n\t\tthis.total_edges = null;\n\t\tnodes = new HashMap<String, Node>();\n\t}", "public static Graph buildGraph1() {\n Graph g = new Graph(\"Undirected graph For Kruskal Algorithm\");\n g.addEdge(\"A\", \"E\", 5);\n g.addEdge(\"A\", \"D\", 3);\n g.addEdge(\"A\", \"H\", 7);\n g.addEdge(\"A\", \"B\", 6);\n g.addEdge(\"D\", \"E\", 9);\n g.addEdge(\"D\", \"C\", 12);\n g.addEdge(\"C\", \"B\", 20);\n g.addEdge(\"B\", \"F\", 15);\n g.addEdge(\"F\", \"G\", 17);\n g.addEdge(\"G\", \"H\", 1);\n\n g.sortEdgesByIncreasingWeights();\n\n System.out.println(g);\n\n return g;\n }", "public Graph() {\n\t\tdictionary=new HashMap<>();\n\t}", "public Graph() {\n\t\ttowns = new HashSet<Town>();\n\t\troads = new HashSet<Road>();\n\t\tprevVertex = new HashMap<String, Town>();\n\t}", "private void createGraph() {\n \t\t\n \t\t// Check capacity\n \t\tCytoscape.ensureCapacity(nodes.size(), edges.size());\n \n \t\t// Extract nodes\n \t\tnodeIDMap = new OpenIntIntHashMap(nodes.size());\n \t\tginy_nodes = new IntArrayList(nodes.size());\n \t\t// OpenIntIntHashMap gml_id2order = new OpenIntIntHashMap(nodes.size());\n \n \t\tfinal HashMap gml_id2order = new HashMap(nodes.size());\n \n \t\tSet nodeNameSet = new HashSet(nodes.size());\n \n \t\tnodeMap = new HashMap(nodes.size());\n \n \t\t// Add All Nodes to Network\n \t\tfor (int idx = 0; idx < nodes.size(); idx++) {\n \t\t\t\n \t\t\tif (taskMonitor != null) {\n \t\t\t\ttaskMonitor.setPercentCompleted(percentUtil.getGlobalPercent(1,\n \t\t\t\t\t\tidx, nodes.size()));\n \t\t\t}\n \n \t\t\t// Get a node object (NOT a giny node. XGMML node!)\n \t\t\tfinal cytoscape.generated2.Node curNode = (cytoscape.generated2.Node) nodes\n \t\t\t\t\t.get(idx);\n \t\t\tfinal String nodeType = curNode.getName();\n \t\t\tfinal String label = (String) curNode.getLabel();\n \n \t\t\treadAttributes(label, curNode.getAtt(), NODE);\n \n \t\t\tnodeMap.put(curNode.getId(), label);\n \n \t\t\tif (nodeType != null) {\n \t\t\t\tif (nodeType.equals(\"metaNode\")) {\n \t\t\t\t\tfinal Iterator it = curNode.getAtt().iterator();\n \t\t\t\t\twhile (it.hasNext()) {\n \t\t\t\t\t\tfinal Att curAttr = (Att) it.next();\n \t\t\t\t\t\tif (curAttr.getName().equals(\"metanodeChildren\")) {\n \t\t\t\t\t\t\tmetanodeMap.put(label, ((Graph) curAttr.getContent()\n \t\t\t\t\t\t\t\t\t.get(0)).getNodeOrEdge());\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t\tif (nodeNameSet.add(curNode.getId())) {\n \t\t\t\tfinal Node node = (Node) Cytoscape.getCyNode(label, true);\n \n \t\t\t\tginy_nodes.add(node.getRootGraphIndex());\n \t\t\t\tnodeIDMap.put(idx, node.getRootGraphIndex());\n \n \t\t\t\t// gml_id2order.put(Integer.parseInt(curNode.getId()), idx);\n \n \t\t\t\tgml_id2order.put(curNode.getId(), Integer.toString(idx));\n \n \t\t\t\t// ((KeyValue) node_root_index_pairs.get(idx)).value = (new\n \t\t\t\t// Integer(\n \t\t\t\t// node.getRootGraphIndex()));\n \t\t\t} else {\n \t\t\t\tthrow new XGMMLException(\"XGMML id \" + nodes.get(idx)\n \t\t\t\t\t\t+ \" has a duplicated label: \" + label);\n \t\t\t\t// ((KeyValue)node_root_index_pairs.get(idx)).value = null;\n \t\t\t}\n \t\t}\n \t\tnodeNameSet = null;\n \n \t\t// Extract edges\n \t\tginy_edges = new IntArrayList(edges.size());\n \t\tSet edgeNameSet = new HashSet(edges.size());\n \n \t\tfinal CyAttributes edgeAttributes = Cytoscape.getEdgeAttributes();\n \n \t\t// Add All Edges to Network\n \t\tfor (int idx = 0; idx < edges.size(); idx++) {\n \n \t\t\tif (taskMonitor != null) {\n \t\t\t\ttaskMonitor.setPercentCompleted(percentUtil.getGlobalPercent(2,\n \t\t\t\t\t\tidx, edges.size()));\n \t\t\t}\n \t\t\tfinal cytoscape.generated2.Edge curEdge = (cytoscape.generated2.Edge) edges\n \t\t\t\t\t.get(idx);\n \n \t\t\tif (gml_id2order.containsKey(curEdge.getSource())\n \t\t\t\t\t&& gml_id2order.containsKey(curEdge.getTarget())) {\n \n \t\t\t\tString edgeName = curEdge.getLabel();\n \n \t\t\t\tif (edgeName == null) {\n \t\t\t\t\tedgeName = \"N/A\";\n \t\t\t\t}\n \n \t\t\t\tint duplicate_count = 1;\n \t\t\t\twhile (!edgeNameSet.add(edgeName)) {\n \t\t\t\t\tedgeName = edgeName + \"_\" + duplicate_count;\n \t\t\t\t\tduplicate_count += 1;\n \t\t\t\t}\n \n \t\t\t\tEdge edge = Cytoscape.getRootGraph().getEdge(edgeName);\n \n \t\t\t\tif (edge == null) {\n \n \t\t\t\t\tfinal String sourceName = (String) nodeMap.get(curEdge\n \t\t\t\t\t\t\t.getSource());\n \t\t\t\t\tfinal String targetName = (String) nodeMap.get(curEdge\n \t\t\t\t\t\t\t.getTarget());\n \n \t\t\t\t\tfinal Node node_1 = Cytoscape.getRootGraph().getNode(\n \t\t\t\t\t\t\tsourceName);\n \t\t\t\t\tfinal Node node_2 = Cytoscape.getRootGraph().getNode(\n \t\t\t\t\t\t\ttargetName);\n \n \t\t\t\t\tfinal Iterator it = curEdge.getAtt().iterator();\n \t\t\t\t\tAtt interaction = null;\n \t\t\t\t\tString itrValue = \"unknown\";\n \t\t\t\t\twhile (it.hasNext()) {\n \t\t\t\t\t\tinteraction = (Att) it.next();\n \t\t\t\t\t\tif (interaction.getName().equals(\"interaction\")) {\n \t\t\t\t\t\t\titrValue = interaction.getValue();\n \t\t\t\t\t\t\tif (itrValue == null) {\n \t\t\t\t\t\t\t\titrValue = \"unknown\";\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t\tbreak;\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \n \t\t\t\t\tedge = Cytoscape.getCyEdge(node_1, node_2,\n \t\t\t\t\t\t\tSemantics.INTERACTION, itrValue, true);\n \n \t\t\t\t\t// Add interaction to CyAttributes\n \t\t\t\t\tedgeAttributes.setAttribute(edge.getIdentifier(),\n \t\t\t\t\t\t\tSemantics.INTERACTION, itrValue);\n \t\t\t\t}\n \n \t\t\t\t// Set correct ID, canonical name and interaction name\n \t\t\t\tedge.setIdentifier(edgeName);\n \n \t\t\t\treadAttributes(edgeName, curEdge.getAtt(), EDGE);\n \n \t\t\t\tginy_edges.add(edge.getRootGraphIndex());\n \t\t\t\t// ((KeyValue) edge_root_index_pairs.get(idx)).value = (new\n \t\t\t\t// Integer(\n \t\t\t\t// edge.getRootGraphIndex()));\n \t\t\t} else {\n \t\t\t\tthrow new XGMMLException(\n \t\t\t\t\t\t\"Non-existant source/target node for edge with gml (source,target): \"\n \t\t\t\t\t\t\t\t+ nodeMap.get(curEdge.getSource()) + \",\"\n \t\t\t\t\t\t\t\t+ nodeMap.get(curEdge.getTarget()));\n \t\t\t}\n \t\t}\n \t\tedgeNameSet = null;\n \n \t\tif (metanodeMap.size() != 0) {\n \t\t\tfinal Iterator it = metanodeMap.keySet().iterator();\n \t\t\twhile (it.hasNext()) {\n \t\t\t\tfinal String key = (String) it.next();\n \t\t\t\tcreateMetaNode(key, (List) metanodeMap.get(key));\n \t\t\t}\n \t\t}\n \t}", "public Graph() {\r\n\t\tnodePos = new HashMap<Integer, Vec2D>();\r\n\t\tconnectionLists = new HashMap<Integer, List<Connection>>();\r\n\t\t//screenWidth = Config.SCREEN_WIDTH;\r\n\t}", "private static ManagementGraph constructTestManagementGraph() {\n\n\t\t/**\n\t\t * This is the structure of the constructed test graph. The graph\n\t\t * contains two stages and all three channel types.\n\t\t * 4\n\t\t * | In-memory\n\t\t * 3\n\t\t * --/ \\-- Network (was FILE)\n\t\t * 2 2\n\t\t * \\ / Network\n\t\t * 1\n\t\t */\n\n\t\t// Graph\n\t\tfinal ManagementGraph graph = new ManagementGraph(new JobID());\n\n\t\t// Stages\n\t\tfinal ManagementStage lowerStage = new ManagementStage(graph, 0);\n\t\tfinal ManagementStage upperStage = new ManagementStage(graph, 1);\n\n\t\t// Group vertices\n\t\tfinal ManagementGroupVertex groupVertex1 = new ManagementGroupVertex(lowerStage, \"Group Vertex 1\");\n\t\tfinal ManagementGroupVertex groupVertex2 = new ManagementGroupVertex(lowerStage, \"Group Vertex 2\");\n\t\tfinal ManagementGroupVertex groupVertex3 = new ManagementGroupVertex(upperStage, \"Group Vertex 3\");\n\t\tfinal ManagementGroupVertex groupVertex4 = new ManagementGroupVertex(upperStage, \"Group Vertex 4\");\n\n\t\t// Vertices\n\t\tfinal ManagementVertex vertex1_1 = new ManagementVertex(groupVertex1, new ManagementVertexID(), \"Host 1\",\n\t\t\t\"small\", 0);\n\t\tfinal ManagementVertex vertex2_1 = new ManagementVertex(groupVertex2, new ManagementVertexID(), \"Host 2\",\n\t\t\t\"medium\", 0);\n\t\tfinal ManagementVertex vertex2_2 = new ManagementVertex(groupVertex2, new ManagementVertexID(), \"Host 2\",\n\t\t\t\"medium\", 1);\n\t\tfinal ManagementVertex vertex3_1 = new ManagementVertex(groupVertex3, new ManagementVertexID(), \"Host 2\",\n\t\t\t\"medium\", 0);\n\t\tfinal ManagementVertex vertex4_1 = new ManagementVertex(groupVertex4, new ManagementVertexID(), \"Host 2\",\n\t\t\t\"medium\", 0);\n\n\t\t// Input/output gates\n\t\tfinal ManagementGate outputGate1_1 = new ManagementGate(vertex1_1, new ManagementGateID(), 0, false);\n\n\t\tfinal ManagementGate inputGate2_1 = new ManagementGate(vertex2_1, new ManagementGateID(), 0, true);\n\t\tfinal ManagementGate outputGate2_1 = new ManagementGate(vertex2_1, new ManagementGateID(), 0, false);\n\n\t\tfinal ManagementGate inputGate2_2 = new ManagementGate(vertex2_2, new ManagementGateID(), 0, true);\n\t\tfinal ManagementGate outputGate2_2 = new ManagementGate(vertex2_2, new ManagementGateID(), 0, false);\n\n\t\tfinal ManagementGate inputGate3_1 = new ManagementGate(vertex3_1, new ManagementGateID(), 0, true);\n\t\tfinal ManagementGate outputGate3_1 = new ManagementGate(vertex3_1, new ManagementGateID(), 0, false);\n\n\t\tfinal ManagementGate inputGate4_1 = new ManagementGate(vertex4_1, new ManagementGateID(), 0, true);\n\n\t\t// Group Edges\n\t\tnew ManagementGroupEdge(groupVertex1, 0, groupVertex2, 0, ChannelType.NETWORK);\n\t\tnew ManagementGroupEdge(groupVertex2, 0, groupVertex3, 0, ChannelType.NETWORK);\n\t\tnew ManagementGroupEdge(groupVertex3, 0, groupVertex4, 0, ChannelType.IN_MEMORY);\n\n\t\t// Edges\n\t\tnew ManagementEdge(new ManagementEdgeID(), new ManagementEdgeID(), outputGate1_1, 0, inputGate2_1, 0,\n\t\t\tChannelType.NETWORK);\n\t\tnew ManagementEdge(new ManagementEdgeID(), new ManagementEdgeID(), outputGate1_1, 1, inputGate2_2, 0,\n\t\t\tChannelType.NETWORK);\n\t\tnew ManagementEdge(new ManagementEdgeID(), new ManagementEdgeID(), outputGate2_1, 0, inputGate3_1, 0,\n\t\t\tChannelType.NETWORK);\n\t\tnew ManagementEdge(new ManagementEdgeID(), new ManagementEdgeID(), outputGate2_2, 0, inputGate3_1, 1,\n\t\t\tChannelType.NETWORK);\n\t\tnew ManagementEdge(new ManagementEdgeID(), new ManagementEdgeID(), outputGate3_1, 0, inputGate4_1, 0,\n\t\t\tChannelType.IN_MEMORY);\n\n\t\treturn graph;\n\t}", "public Resource getDefaultGraphName() {\n \t\treturn createResource(this.baseGraphName);\n \t}", "Graph(){\n\t\taddNode();\n\t\tcurrNode=myNodes.get(0);\n\t}", "public Graph()\r\n {\r\n this( \"x\", \"y\" );\r\n }", "public JXGraph() {\r\n this(0.0, 0.0, -1.0, 1.0, -1.0, 1.0, 0.2, 4, 0.2, 4);\r\n }", "public Builder(GraphConfig config) {\n this(Graphs.<N, E>createUndirected(config));\n }", "protected void createTopologyGraph() {\n graph = new TopologyGraph(roots, boundaries);\n\n // check and resolve conflicts about input priorities\n AbstractExecNodeExactlyOnceVisitor inputPriorityVisitor =\n new AbstractExecNodeExactlyOnceVisitor() {\n @Override\n protected void visitNode(ExecNode<?> node) {\n if (!boundaries.contains(node)) {\n visitInputs(node);\n }\n updateTopologyGraph(node);\n }\n };\n roots.forEach(n -> n.accept(inputPriorityVisitor));\n }", "@Override\n\tpublic Graph<String> emptyInstance() {\n\t\treturn new ConcreteEdgesGraph();\n\t}", "private void createGraphs() {\n initialGraphCreation.accept(caller, listener);\n graphCustomization.accept(caller, listener);\n caller.generateAndAdd(params.getNumCallerEvents(), callerAddToGraphTest);\n listener.generateAndAdd(params.getNumListenerEvents(), listenerAddToGraphTest);\n generationDefinitions.accept(caller, listener);\n }", "public GraphNode buildGraph()\n {\n GraphNode node1 = new GraphNode(1);\n GraphNode node2 = new GraphNode(2);\n GraphNode node3 = new GraphNode(3);\n GraphNode node4 = new GraphNode(4);\n List<GraphNode> v = new ArrayList<GraphNode>();\n v.add(node2);\n v.add(node4);\n node1.neighbours = v;\n v = new ArrayList<GraphNode>();\n v.add(node1);\n v.add(node3);\n node2.neighbours = v;\n v = new ArrayList<GraphNode>();\n v.add(node2);\n v.add(node4);\n node3.neighbours = v;\n v = new ArrayList<GraphNode>();\n v.add(node3);\n v.add(node1);\n node4.neighbours = v;\n return node1;\n }", "public void createGraph() {\n System.out.println(\"The overlay graph will be created from scratch\");\n graph = new MatrixOverlayGraph();\n parse(dumpPath);\n saveGraph();\n graph.createSupporters(kdTreeSupporterActived);\n saveSupporters();\n }", "private void initializeFromGraph(Graph<HyperNode, DefaultEdge> graph) {\n Map<HyperNode, Node> nodesMap = addNodes(graph);\n addEdges(graph, nodesMap);\n }", "public Node generateDefaultNode(Position pos) {\n\t\tNode n = generateNode(pos);\n\t\tn.finishInitializationWithDefaultModels(true);\n\t\treturn n;\n\t}", "Graph(){\n\t\tadjlist = new HashMap<String, Vertex>();\n\t\tvertices = 0;\n\t\tedges = 0;\n\t\tkeys = new ArrayList<String>();\n\t}", "private void initializeGraphAsEmpty() {\n int max = getNumNodes();\n\n parentMatrix = new int[getNumNodes()][max];\n childMatrix = new int[getNumNodes()][max];\n\n for (int i = 0; i < getNumNodes(); i++) {\n parentMatrix[i][0] = 1; //set first node\n childMatrix[i][0] = 1;\n }\n\n for (int i = 0; i < getNumNodes(); i++) {\n for (int j = 1; j < max; j++) {\n parentMatrix[i][j] = -5; //set first node\n childMatrix[i][j] = -5;\n }\n }\n }", "public static GraphNode createGraphNodeForUseCase() {\n GraphNode graphNode = new GraphNode();\n GraphNode graphNodeName = new GraphNode();\n\n for (int i = 0; i < 3; i++) {\n GraphNode childNode = new GraphNode();\n\n childNode.setPosition(AccuracyTestHelper.createPoint(60, 20 + 20 * i));\n childNode.setSize(AccuracyTestHelper.createDimension(100, 22));\n\n graphNodeName.addContained(childNode);\n }\n\n graphNode.addContained(graphNodeName);\n\n graphNode.setPosition(AccuracyTestHelper.createPoint(20, 20));\n graphNode.setSize(AccuracyTestHelper.createDimension(100, 100));\n\n // create a use case\n UseCase usecase = new UseCaseImpl();\n\n // set stereotype\n Stereotype stereotype = new StereotypeImpl();\n usecase.addStereotype(stereotype);\n\n // set namespace\n Namespace namespace = new MockAccuracyNamespaceImpl();\n usecase.setNamespace(namespace);\n\n // create a semantic model\n Uml1SemanticModelBridge semanticModel = new Uml1SemanticModelBridge();\n semanticModel.setElement(usecase);\n\n graphNode.setSemanticModel(semanticModel);\n\n return graphNode;\n }", "public MapGraph()\n {\n this.nodes = new HashMap<Integer, MapNode>();\n this.edges = new HashMap<Integer, Set<MapEdge>>();\n this.nodesByName = new HashMap<String, Set<Integer>>();\n }", "protected GraphNode() {\n }", "protected GraphNode() {\n }", "public DefaultDirectedWeightedFlowGraph(DefaultDirectedWeightedGraph<V, E> dWG) {\r\n this.graph = dWG;\r\n\r\n }", "public DFSGraph() {\n this(new HashMap<>(), HashMap::new, HashSet::new, HashSet::new);\n }", "public static Graph<Vertex,Edge> createGraphObject()\n\t{\n\t\tGraph<Vertex,Edge> g = new DirectedSparseMultigraph<Vertex, Edge>();\n\t\treturn g;\n\t}", "private Moneygraph() {\n super(\"moneygraph\", null);\n }", "private static SimpleWeightedGraph<String, DefaultWeightedEdge> criaGrafo() {\r\n\t\tSimpleWeightedGraph<String,DefaultWeightedEdge> graph = new SimpleWeightedGraph<String, DefaultWeightedEdge>(DefaultWeightedEdge.class);\r\n\t\t\r\n\t\tgraph.addVertex(\"a\");\tgraph.addVertex(\"b\");\tgraph.addVertex(\"c\");\r\n\t\tgraph.addVertex(\"d\");\tgraph.addVertex(\"e\");\tgraph.addVertex(\"f\");\r\n\t\tgraph.addVertex(\"g\");\tgraph.addVertex(\"h\");\tgraph.addVertex(\"i\");\r\n\t\t\r\n\t\tgraph.setEdgeWeight(graph.addEdge(\"a\",\"b\"),2);\r\n\t\tgraph.setEdgeWeight(graph.addEdge(\"b\",\"c\"),4);\r\n\t\tgraph.setEdgeWeight(graph.addEdge(\"c\",\"d\"),2);\r\n\t\tgraph.setEdgeWeight(graph.addEdge(\"d\",\"e\"),1);\r\n\t\tgraph.setEdgeWeight(graph.addEdge(\"e\",\"f\"),6);\r\n\t\tgraph.setEdgeWeight(graph.addEdge(\"f\",\"a\"),7);\r\n\t\tgraph.setEdgeWeight(graph.addEdge(\"a\",\"g\"),3);\r\n\t\tgraph.setEdgeWeight(graph.addEdge(\"g\",\"i\"),1);\r\n\t\tgraph.setEdgeWeight(graph.addEdge(\"g\",\"h\"),3);\r\n\t\tgraph.setEdgeWeight(graph.addEdge(\"g\",\"b\"),6);\r\n\t\tgraph.setEdgeWeight(graph.addEdge(\"h\",\"c\"),2);\r\n\t\tgraph.setEdgeWeight(graph.addEdge(\"h\",\"d\"),8);\r\n\t\tgraph.setEdgeWeight(graph.addEdge(\"h\",\"i\"),4);\r\n\t\tgraph.setEdgeWeight(graph.addEdge(\"i\",\"f\"),5);\r\n\t\tgraph.setEdgeWeight(graph.addEdge(\"i\",\"e\"),2);\r\n\t\treturn graph;\r\n\t}", "public GameConfig createDefaultConfig() {\n\n return null;\n }", "private void initGraph() {\n nodeMap = Maps.newIdentityHashMap();\n stream.forEach(t -> {\n Object sourceKey = sourceId.extractValue(t.get(sourceId.getTableId()));\n Object targetKey = targetId.extractValue(t.get(targetId.getTableId()));\n ClosureNode sourceNode = nodeMap.get(sourceKey);\n ClosureNode targetNode = nodeMap.get(targetKey);\n if (sourceNode == null) {\n sourceNode = new ClosureNode(sourceKey);\n nodeMap.put(sourceKey, sourceNode);\n }\n if (targetNode == null) {\n targetNode = new ClosureNode(targetKey);\n nodeMap.put(targetKey, targetNode);\n }\n sourceNode.next.add(targetNode);\n });\n\n }", "public static GraphNode createGraphNodeForUseCaseConnector() {\n GraphNode graphNode = new GraphNode();\n GraphNode graphNodeName = new GraphNode();\n\n for (int i = 0; i < 3; i++) {\n GraphNode childNode = new GraphNode();\n\n childNode.setPosition(AccuracyTestHelper.createPoint(60, 20 + 20 * i));\n childNode.setSize(AccuracyTestHelper.createDimension(100, 22));\n\n graphNodeName.addContained(childNode);\n }\n graphNode.addContained(graphNodeName);\n\n graphNode.setPosition(AccuracyTestHelper.createPoint(-50, -50));\n graphNode.setSize(AccuracyTestHelper.createDimension(100, 100));\n\n // create a use case\n UseCase usecase = new UseCaseImpl();\n\n // set stereotype\n Stereotype stereotype = new StereotypeImpl();\n\n // set namespace\n Namespace namespace = new MockAccuracyNamespaceImpl();\n usecase.setNamespace(namespace);\n // create a semantic model\n Uml1SemanticModelBridge semanticModel = new Uml1SemanticModelBridge();\n semanticModel.setElement(usecase);\n\n graphNode.setSemanticModel(semanticModel);\n\n return graphNode;\n }", "public Graph() {\n\t\tthis(new PApplet());\n\t}", "private void setUpCLRSGraph() {\n\t\tvertices = new HashMap<Character, DirectedOrderedDfsVertex>();\n\t\tfor (char i = 'a'; i <= 'h'; i++) {\n\t\t\tvertices.put(i, new DirectedOrderedDfsVertex());\n\t\t}\n\t\tgraph = new DirectedSimpleGraph<DirectedOrderedDfsVertex>(vertices.values());\n\t\tvertices.get('a').addAdjacency(vertices.get('b'));\n\t\tvertices.get('b').addAdjacency(vertices.get('f'));\n\t\tvertices.get('b').addAdjacency(vertices.get('e'));\n\t\tvertices.get('b').addAdjacency(vertices.get('c'));\n\t\tvertices.get('c').addAdjacency(vertices.get('d'));\n\t\tvertices.get('c').addAdjacency(vertices.get('g'));\n\t\tvertices.get('d').addAdjacency(vertices.get('c'));\n\t\tvertices.get('d').addAdjacency(vertices.get('h'));\n\t\tvertices.get('e').addAdjacency(vertices.get('a'));\n\t\tvertices.get('e').addAdjacency(vertices.get('f'));\n\t\tvertices.get('f').addAdjacency(vertices.get('g'));\n\t\tvertices.get('g').addAdjacency(vertices.get('f'));\n\t\tvertices.get('g').addAdjacency(vertices.get('h'));\n\t\tvertices.get('h').addAdjacency(vertices.get('h'));\n\t}", "public void createGraphFromFile() {\n\t\t//如果图未初始化\n\t\tif(graph==null)\n\t\t{\n\t\t\tFileGetter fileGetter= new FileGetter();\n\t\t\ttry(BufferedReader bufferedReader=new BufferedReader(new FileReader(fileGetter.readFileFromClasspath())))\n\t\t\t{\n\t\t\t\tString line = null;\n\t\t\t\twhile((line=bufferedReader.readLine())!=null)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(line);\n\t\t\t\t}\n\t\t\t\t//create the graph from file\n\t\t\t\tgraph = new Graph();\n\t\t\t}\n\t\t\tcatch (Exception e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "private ChainsTraceGraph makeSimpleGraph()\n throws InternalSynopticException, ParseException {\n\n String[] logArr = new String[] { \"a\", \"a\", \"--\", \"b\", \"--\", \"a\", \"b\" };\n TraceParser defParser = SynopticTest.genDefParser();\n\n ChainsTraceGraph ret = (ChainsTraceGraph) genChainsTraceGraph(logArr,\n defParser);\n return ret;\n }", "private DGraph initFactory(DGraph g) {\n\t\tg= new DGraph();\n\t\tNodeData d0 = new NodeData(0);\n\t\tNodeData d1 = new NodeData(1);\n\t\tNodeData d2 = new NodeData(2);\n\t\tNodeData d3 = new NodeData(3);\n\t\tNodeData d4 = new NodeData(4);\n\t\tg.addNode(d0);\n\t\tg.addNode(d1);\n\t\tg.addNode(d2);\n\t\tg.addNode(d3);\n\t\tg.addNode(d4);\n\t\tg.connect(1, 2, 3);\n\t\tg.connect(2, 1, 4);\n\t\tg.connect(3, 4, 5);\n\t\tg.connect(4,3, 7);\n\t\tg.connect(3,2, 4);\n\t\tg.connect(3,1, 5);\n\t\tg.connect(1,3, 2);\n\t\treturn g;\n\t}", "Graph testGraph();", "public DefaultDirectedWeightedFlowGraph(EdgeFactory<V, E> ef) {\r\n this.graph = new DefaultDirectedWeightedGraph(ef);\r\n\r\n }", "@Test\n public void getGraphNull() throws Exception {\n try (final Graph defaultGraph = dataset.getGraph(null).get()) {\n // TODO: Can we assume the default graph was empty before our new triples?\n assertEquals(2, defaultGraph.size());\n assertTrue(defaultGraph.contains(alice, isPrimaryTopicOf, graph1));\n // NOTE: wildcard as graph2 is a (potentially mapped) BlankNode\n assertTrue(defaultGraph.contains(bob, isPrimaryTopicOf, null));\n }\n }", "@Override public Graph<String> emptyInstance() {\n return new ConcreteVerticesGraph<String>();\n }", "private void setupGraph() {\n graph = new DualGraph(SchemaFactoryUtilities.getSchemaFactory(VisualSchemaFactory.VISUAL_SCHEMA_ID).createSchema());\n try {\n\n WritableGraph wg = graph.getWritableGraph(\"\", true);\n\n // Create LayerMask attributes\n layerMaskV = LayersConcept.VertexAttribute.LAYER_MASK.ensure(wg);\n layerMaskT = LayersConcept.TransactionAttribute.LAYER_MASK.ensure(wg);\n\n // Create LayerVisilibity Attributes\n layerVisibilityV = LayersConcept.VertexAttribute.LAYER_VISIBILITY.ensure(wg);\n layerVisibilityT = LayersConcept.TransactionAttribute.LAYER_VISIBILITY.ensure(wg);\n\n // Create Selected Attributes\n selectedV = VisualConcept.VertexAttribute.SELECTED.ensure(wg);\n selectedT = VisualConcept.TransactionAttribute.SELECTED.ensure(wg);\n\n // Adding 2 Vertices - not selected, layer 1, visible\n vxId1 = wg.addVertex();\n wg.setIntValue(layerMaskV, vxId1, 1);\n wg.setFloatValue(layerVisibilityV, vxId1, 1.0f);\n wg.setBooleanValue(selectedV, vxId1, false);\n\n vxId2 = wg.addVertex();\n wg.setIntValue(layerMaskV, vxId2, 1);\n wg.setFloatValue(layerVisibilityV, vxId2, 1.0f);\n wg.setBooleanValue(selectedV, vxId2, false);\n\n // Adding 2 Transactions - not selected, layer 1, visible\n txId1 = wg.addTransaction(vxId1, vxId2, true);\n wg.setIntValue(layerMaskT, txId1, 1);\n wg.setFloatValue(layerVisibilityT, txId1, 1.0f);\n wg.setBooleanValue(selectedT, txId1, false);\n\n txId2 = wg.addTransaction(vxId1, vxId2, false);\n wg.setIntValue(layerMaskT, txId2, 1);\n wg.setFloatValue(layerVisibilityT, vxId2, 1.0f);\n wg.setBooleanValue(selectedT, vxId2, false);\n\n wg.commit();\n\n } catch (final InterruptedException ex) {\n Exceptions.printStackTrace(ex);\n Thread.currentThread().interrupt();\n }\n }", "public Graph(){//constructor\n //edgemap\n srcs=new LinkedList<>();\n maps=new LinkedList<>();\n chkIntegrity(\"edgemap\");\n \n nodes=new LinkedList<>();\n //m=new EdgeMap();\n }", "AdjacencyGraph(){\r\n vertices = new HashMap<>();\r\n }", "public HashGraph()\n {\n graph = new HashMap <>();\n }", "public QosGraphFixture2() throws JobGraphDefinitionException, GraphConversionException {\n if (!Logger.getRootLogger().getAllAppenders().hasMoreElements()) {\n BasicConfigurator.configure();\n Logger.getRootLogger().setLevel(Level.WARN);\n }\n\n createJobGraph();\n createExecutionGraph();\n createConstaints();\n }", "public static Graph instantiateAdjacencyMapGraph() {\r\n\t\treturn new AdjacencyMapGraph();\r\n\t}", "TripleGraph createTripleGraph();", "IGraphEngine graphEngineFactory();", "public ExportGraph()\n {\n }", "public SGraphValidator() {\r\n\t\tsuper();\r\n\t}", "private void createNullVertex(int x, int y, DefaultGraphCell dad){\n\t\t\tDefaultGraphCell v = new DefaultGraphCell(\"\");\n\t\t\tnullnodes.add(v);\n\t\t\tDefaultPort port = new DefaultPort();\n\t\t\tv.add(port);\n\t\t\tport.setParent(v);\n\t\t\tint width = DEFAULT_NULL_SIZE.width;\n\t\t\tint height = DEFAULT_NULL_SIZE.height;\n\t\t\tGraphConstants.setBounds(v.getAttributes(), new\n\t\t\t\t\t Rectangle2D.Double(x-width/2,y,width,height));\n\t\t\tGraphConstants.setGradientColor(v.getAttributes(), Color.black);\n\t\t\tGraphConstants.setOpaque(v.getAttributes(), true);\n\t\t\tinsertEdge(getDefaultPort(dad), getDefaultPort(v));\n\t\t}", "GraphLayout createGraphLayout();", "private static void simpleGraphDemo() throws CALExecutorException {\r\n \r\n // Construct a graph by starting with an empty graph and adding edges and vertices to it.\r\n final ImmutableDirectedGraph<String> graph1 = ImmutableDirectedGraph\r\n .<String>emptyGraph(executionContext)\r\n .addEdge(Pair.make(\"one\", \"two\"))\r\n .addVertex(\"three\");\r\n \r\n // graph2 is graph1 with one more edge - this does not modify graph1\r\n final ImmutableDirectedGraph<String> graph2 = graph1.addEdge(Pair.make(\"two\", \"three\"));\r\n \r\n // Let's look at graph2, both via its toString() implementation\r\n System.out.println(graph2);\r\n // ...and via the support to show the structure of a CalValue\r\n System.out.println(DebugSupport.showInternal(graph2.getCalValue()));\r\n \r\n // removeEdge does not modify graph1\r\n System.out.println(graph1.removeEdge(Pair.make(\"one\", \"two\")));\r\n // ...as can be witnessed by displaying graph1\r\n System.out.println(graph1);\r\n }", "public samJGraph()\n {\n super(new GraphPane( new GraphModel(), new samGraphController() ) );\n }", "public UGraph()\r\n {\r\n uNodes = new HashMap<Integer , UNode>();\r\n uEdges = new HashMap<Integer, UEdge>();\r\n }", "private void buildGraph()\n\t{\n\t\taddVerticesToGraph();\n\t\taddLinkesToGraph();\n\t}", "public GraphUtil buildGraph() {\n try {\n GraphUtil graphUtilObject = new GraphUtil();\n graphUtilObject.setCountryGraph(gameMap.getCountryHashMap());\n return graphUtilObject;\n }catch(Exception e) {\n return null;\n }\n }", "public static FlatGeneratorSettings getDefaultSettings() {\n final List<FlatLayer> layers = Lists.newArrayListWithCapacity(3);\n layers.add(new FlatLayer(BlockTypes.BEDROCK, 1));\n layers.add(new FlatLayer(BlockTypes.DIRT, 2));\n layers.add(new FlatLayer(BlockTypes.GRASS, 1));\n return new FlatGeneratorSettings(BiomeTypes.PLAINS, layers);\n }", "private void initializeGraph() {\r\n map = new HashMap<>();\r\n graph = new List[n];\r\n for (int i = 0; i < n; i++) graph[i] = new ArrayList<>();\r\n\r\n\r\n }", "public static void exampleGraph() {\n\t\t// create a simple FNSS topology\n\t\tTopology topology = new Topology();\n\t\ttopology.addEdge(\"1\", \"2\", new Edge());\n\t\ttopology.addEdge(\"2\", \"3\", new Edge());\n\t\t\n\t\t// convert to JGraphT\n\t\tGraph<String, Edge> graph = JGraphTConverter.getGraph(topology);\n\t\t\n\t\t// Find shortest paths\n\t\tString source = \"3\";\n\t\tString destination = \"1\";\n\t\tList<Edge> sp = DijkstraShortestPath.findPathBetween(graph, source, destination);\n\t\t\n\t\t// Print results\n\t\tSystem.out.println(\"Shortest path from \" + source + \" to \" + destination + \":\");\n\t\tfor (Edge e : sp) {\n\t\t\tSystem.out.println(graph.getEdgeSource(e) + \" -> \" + graph.getEdgeTarget(e));\n\t\t}\n\t}", "private void testBuildGraph() {\n\t\t// All test graphs have a node 8 with children [9, 10]\n\t\tSet<Node> expectedChildren = new HashSet<>();\n\t\texpectedChildren.add(new Node(9));\n\t\texpectedChildren.add(new Node(10));\n\n\t\tStudySetGraph disconnectedGraphWithoutCycle = new StudySetGraph(Edges.disconnectedGraphWithoutCycle);\n\t\tNode node = disconnectedGraphWithoutCycle.getNode(8);\n\t\tassert node != null;\n\t\tassert node.getChildren().equals(expectedChildren);\n\t\t\n\t\tStudySetGraph disconnectedGraphWithCycle = new StudySetGraph(Edges.disconnectedGraphWithCycle);\n\t\tnode = disconnectedGraphWithoutCycle.getNode(8);\n\t\tassert node != null;\n\t\tassert node.getChildren().equals(expectedChildren);\n\t\t\n\t\tStudySetGraph connectedGraphWithCycle = new StudySetGraph(Edges.connectedGraphWithCycle);\n\t\tnode = disconnectedGraphWithoutCycle.getNode(8);\n\t\tassert node != null;\n\t\tassert node.getChildren().equals(expectedChildren);\n\n\t\tStudySetGraph connectedGraphWithoutCycle = new StudySetGraph(Edges.connectedGraphWithoutCycle);\n\t\tnode = disconnectedGraphWithoutCycle.getNode(8);\n\t\tassert node != null;\n\t\tassert node.getChildren().equals(expectedChildren);\n\t}", "public Graph(int numberOfVertices){\r\n this.numberOfVertices = numberOfVertices;\r\n this.adjacencyList = new TreeMap<>();\r\n }", "void graph2() {\n\t\tconnect(\"1\", \"7\");\n\t\tconnect(\"1\", \"8\");\n\t\tconnect(\"1\", \"9\");\n\t\tconnect(\"9\", \"1\");\n\t\tconnect(\"9\", \"0\");\n\t\tconnect(\"9\", \"4\");\n\t\tconnect(\"4\", \"8\");\n\t\tconnect(\"4\", \"3\");\n\t\tconnect(\"3\", \"4\");\n\t}", "@Override\n\tpublic DataConfig createDefaultConfig() {\n\t\treturn new DataConfig();\n\t}", "public GraphPool() {\n\t\tmMetadataPool = new PoolNodeMetadata();\n\t\tmIdentifierPool = new PoolNodeIdentifier(mMetadataPool);\n\t\tmLinkPool = new PoolExpandedLink(mIdentifierPool, mMetadataPool);\n\t}", "public static graphNode[] createGraph() {\n\t\tgraphNode[] graph = new graphNode[16];\n\t\t\n\t\tgraph[0] = new graphNode(1, new graphNode(5, null));\n\t\tgraph[1] = new graphNode(0, null);\n\t\tgraph[2] = new graphNode(7, new graphNode(11, null));\n\t\tgraph[3] = null; //illegal, fox eats chicken\n\t\tgraph[4] = new graphNode(5, new graphNode(7, new graphNode(13, null)));\n\t\tgraph[5] = new graphNode(0, new graphNode(4, null));\n\t\tgraph[6] = null; //illegal, chicken eats grain\n\t\tgraph[7] = new graphNode(2, new graphNode(4, null));\n\t\tgraph[8] = new graphNode(11, new graphNode(13, null));\n\t\tgraph[9] = null; //illegal, chicken eats grain\n\t\tgraph[10] = new graphNode(11, new graphNode(15, null));\n\t\tgraph[11] = new graphNode(2, new graphNode(8, new graphNode(10, null)));\n\t\tgraph[12] = null; //illegal, fox eats chicken\n\t\tgraph[13] = new graphNode(4, new graphNode(8, null));\n\t\tgraph[14] = new graphNode(15, null);\n\t\tgraph[15] = new graphNode(10, new graphNode(14, null));\n\t\t\n\t\treturn graph;\n\t}", "public WeightedAdjacencyGraph() {\n this.vertices = new HashMap<>();\n }", "public static void main(String[] args) {\n generateAndSaveExampleGraph();\n\n\n /*\n * select graph for prepairing and handling by algorhytm\n * determine graph source from config.xml:\n * config case = ?\n * 1 - from matrix\n * 2 - from edges list\n * 3 - from xml\n * */\n //read configCase\n Integer configCase = 0;\n try {\n configCase = (Integer) XMLSerializer.read( \"config.xml\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n //determine case\n EuclidDirectedGraph graph = null;\n switch (configCase){\n case 1:\n graph = getGraphFromMatrix();\n break;\n case 2:\n graph = getGraphFromEdgesList();\n break;\n case 3:\n graph = getGraphFromXML();\n break;\n default:\n return;\n\n }\n //find all sources and sinks\n ArrayList<BoundsGraphVertex> sources = new ArrayList<>();\n ArrayList<BoundsGraphVertex> sinks = new ArrayList<>();\n //get all sources and sinks\n for (Map.Entry<BoundsGraphVertex, Map<BoundsGraphVertex, Double>> vertexEntry : graph.getMap().entrySet()) {\n //if there are no edges from vertex then its sink\n if (vertexEntry.getValue().isEmpty()) {\n sinks.add(vertexEntry.getKey());\n } else {\n //mark all vertexes which have incoming edges\n for (BoundsGraphVertex dest : vertexEntry.getValue().keySet()) {\n dest.setMarked(true);\n }\n }\n }\n //all unmarked vertexes are sources\n for (BoundsGraphVertex vertex : graph) {\n if (!vertex.isMarked()) sources.add(vertex);\n }\n\n /*\n * First algorithm: for each source-sink pair get path using euclid heuristics\n * */\n List<BoundsGraphVertex> minPath = null;\n Double minLength = Double.MAX_VALUE;\n for (BoundsGraphVertex source :\n sources) {\n for (BoundsGraphVertex sink :\n sinks) {\n //need use path storage list because algorhytm returns only double val of length.\n //path will be saved in this storage.\n List<BoundsGraphVertex> pathStorage = new ArrayList<>();\n //do algo\n Double length = Algorithms.shortestEuclidDijkstraFibonacciPathWithHeuristics(graph, source, sink, pathStorage, minLength);\n //check min\n if (minLength > length) {\n minLength = length;\n minPath = pathStorage;\n }\n\n }\n }\n\n /*\n * Second algorithm: for each source get better sink\n * */\n minPath = null;\n minLength = Double.MAX_VALUE;\n for (BoundsGraphVertex source :\n sources) {\n //need use path storage list because algorhytm returns only double val of length.\n //path will be saved in this storage.\n List<BoundsGraphVertex> pathStorage = new ArrayList<>();\n //do algo\n Double length = Algorithms.shortestEuclidDijkstraFibonacciPathToManySinks(graph, source, sinks, pathStorage, minLength);\n //check min\n if (minLength > length) {\n minLength = length;\n minPath = pathStorage;\n }\n }\n try {\n XMLSerializer.write(minPath, \"output.xml\", false);\n XMLSerializer.write(minLength, \"output.xml\", true);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n }", "public MapGraphExtra()\n\t{\n\t\t// TODO: Implement in this constructor in WEEK 3\n\t\tmap = new HashMap<GeographicPoint, MapNode> ();\n\t}" ]
[ "0.737686", "0.7011131", "0.67392135", "0.6730455", "0.6658999", "0.66539127", "0.65266967", "0.6486463", "0.6455278", "0.6437089", "0.6391055", "0.6338116", "0.63276166", "0.6319339", "0.6314862", "0.6310117", "0.629887", "0.62927645", "0.6265427", "0.6265343", "0.6259609", "0.62595654", "0.6220578", "0.62186503", "0.61998886", "0.61962706", "0.6183875", "0.61791456", "0.61759424", "0.61671954", "0.61641014", "0.61580086", "0.61475044", "0.61341745", "0.61297405", "0.61238056", "0.6112052", "0.6099168", "0.6094676", "0.60886544", "0.6075881", "0.6049084", "0.6047728", "0.60277873", "0.6022135", "0.6000467", "0.6000354", "0.5992372", "0.59795916", "0.5972386", "0.5956232", "0.5947896", "0.5945485", "0.59285575", "0.59285575", "0.5925473", "0.59230405", "0.5918541", "0.59122515", "0.5911774", "0.58805436", "0.5879634", "0.58720464", "0.5871876", "0.58644706", "0.5849913", "0.5847985", "0.5842121", "0.58395904", "0.5836174", "0.5826366", "0.5821976", "0.58175874", "0.5816718", "0.5801465", "0.57718164", "0.57705474", "0.5770063", "0.5762466", "0.5761361", "0.5759215", "0.5755228", "0.5745538", "0.5730748", "0.57281274", "0.57274675", "0.57198995", "0.569784", "0.56897795", "0.5681134", "0.5679109", "0.56759113", "0.5660194", "0.56424904", "0.5639192", "0.5626684", "0.5623641", "0.5621457", "0.56127435", "0.560668", "0.55922556" ]
0.0
-1
String msg1 = "get(long) failed.";
@Test public final void testGetLong() { String msg2 = "get(long) illegal arguments check failed."; boolean[] a1_a = new boolean[1023]; boolean[] a1_1_a = new boolean[320]; boolean[] a1_2_a = new boolean[621]; boolean[] a1_3_a = new boolean[82]; boolean[] a2_a = new boolean[2048]; boolean[] a2_1_a = new boolean[641]; boolean[] a2_2_a = new boolean[490]; boolean[] a2_3_a = new boolean[690]; boolean[] a2_4_a = new boolean[317]; for (int i = 0; i < a1_a.length; i++) { a1_a[i] = (i % 17 == 0); } { int c = 17, i = 0, s; for (s = i; (i - s) < a1_1_a.length; i++) { a1_1_a[i - s] = (i % c == 0); } for (s = i; (i - s) < a1_2_a.length; i++) { a1_2_a[i - s] = (i % c == 0); } for (s = i; (i - s) < a1_3_a.length; i++) { a1_3_a[i - s] = (i % c == 0); } } for (int i = 0; i < a2_a.length; i++) { a2_a[i] = (i % 19 == 0); } { int c = 19, i = 0, s; for (s = i; (i - s) < a2_1_a.length; i++) { a2_1_a[i - s] = (i % c == 0); } for (s = i; (i - s) < a2_2_a.length; i++) { a2_2_a[i - s] = (i % c == 0); } for (s = i; (i - s) < a2_3_a.length; i++) { a2_3_a[i - s] = (i % c == 0); } for (s = i; (i - s) < a2_4_a.length; i++) { a2_4_a[i - s] = (i % c == 0); } } MemoryBitList a1_1 = new MemoryBitList(a1_1_a); MemoryBitList a1_2 = new MemoryBitList(a1_2_a); MemoryBitList a1_3 = new MemoryBitList(a1_3_a); SequenceBitList a1 = new SequenceBitList(); a1.add(new SimpleRange(a1_1, 0, a1_1.length())); a1.add(new SimpleRange(a1_2, 0, a1_2.length())); a1.add(new SimpleRange(a1_3, 0, a1_3.length())); MemoryBitList a2_1 = new MemoryBitList(a2_1_a); MemoryBitList a2_2 = new MemoryBitList(a2_2_a); MemoryBitList a2_3 = new MemoryBitList(a2_3_a); MemoryBitList a2_4 = new MemoryBitList(a2_4_a); SequenceBitList a2 = new SequenceBitList(); a2.add(new SimpleRange(a2_1, 0, a2_1.length())); a2.add(new SimpleRange(a2_2, 0, a2_2.length())); a2.add(new SimpleRange(a2_3, 0, a2_3.length())); a2.add(new SimpleRange(a2_4, 0, a2_4.length())); LargeBitListTest.testGetLongInner(a1, 0, a1_a); LargeBitListTest.testGetLongInner(a2, 0, a2_a); try { a1.get(a1_a.length); fail(msg2); } catch (IndexOutOfBoundsException ex) { //OK } try { a1.get(-1); fail(msg2); } catch (IndexOutOfBoundsException ex) { //OK } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "long getUnknown2();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "public String getMessage()\r\n/* 22: */ {\r\n/* 23:23 */ return this.a.a();\r\n/* 24: */ }", "long get();", "String getMessage();", "String getMessage();", "String getMessage();", "int mo23350e(String str, String str2, Throwable th);", "long getMsgId();", "@Test\n public void testGetLong() {\n System.out.println(\"getLong\");\n AbstractMethod instance = new AbstractMethodImpl();\n instance.setAccountNumber(\"012345\");\n long expResult = 12345L;\n long result = instance.getLong();\n assertEquals(expResult, result);\n\n }", "int mo23348d(String str, String str2, Throwable th);", "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 }", "long getLongValue();", "long getLongValue();", "@Override\r\n\tpublic long getLong(String string) {\n\t\treturn 0;\r\n\t}", "long getUnknown12();", "BigInteger getMessage();", "public int getMes();", "@Test\n public void test_GetLong() {\n Assert.assertEquals(\"Values werent the same\", 1234567890987654321L, SecureEnvironment.getLong(\"test_key_long\"));\n }", "Long mo20729a();", "@Test\n public void stringFromLong() {\n assertEquals(\n \"784dd132\",\n JdkHashTools.getStringFromLong(2018365746)\n );\n }", "String errorMessage();", "long getELong();", "int mo23354w(String str, String str2, Throwable th);", "void mo64942a(String str, long j, long j2);", "long getMessageID();", "long getMessageID();", "private static String getMessage(String key)\n {\n return mh.getMessage(key);\n }", "public abstract int read_long();", "String longRead();", "public static long getLong(String param, long defval) {\n\t\t\n\t\tlong returnValue = defval;\n\t\ttry{\n\t\t\treturnValue = pref().getLong(param, defval);\n\t\t\n\t\t}catch(Exception e){\n\t\t\treturnValue = defval;\n\t\t\t}\t\t\t\n\t\t\n\t\treturn returnValue;\n\t}", "java.lang.String getMsg();", "void mo1335i(String str, String str2, Throwable th);", "private static String getMessage(int code) {\n switch (code) {\n case ME_DIV_BY_ZERO:\n return \"Attempt to divide by zero.\";\n case ME_ASSIGNLITERAL:\n return \"Attempt to assign to a literal.\";\n case ME_NONVARASSIGN:\n return \"Attempt to assign to a non-variable.\";\n default:\n return \"Unknown error.\";\n }\n }", "String getStatusMessage( );", "String getFailureMessage();", "public abstract void getLongImpl(String str, double d, Resolver<Double> resolver);", "int getClientMsgNo();", "String getGetErrorMessage();", "java.lang.String getErr();", "public void method_197(class_1549 var1, long var2) {}", "public long getLong(String name) {\n Enumeration enumer = LONGS.elements();\n while(enumer.hasMoreElements()) {\n SimpleMessageObjectLongItem item = (SimpleMessageObjectLongItem) enumer.nextElement();\n if(item.getName().compareTo(name) == 0) {\n return item.getValue();\n }\n }\n return -1L;\n }", "String mo30285c(long j);", "@Override\r\n\tpublic String test(String msg) throws Exception {\n\t\tString rs = msg;\r\n\t\treturn rs;\r\n\t}", "public abstract String getMessage();", "public Long L(String key) throws AgentBuilderRuntimeException {\n\t\treturn getLong(key);\n\t}", "public String getMessage();", "public String getMessage();", "public String getMessage();", "public String getMessage();", "public String getMessage();", "public String getMessage();", "public String getMessage();", "private static String str(long i) {\n return String.valueOf(i);\n }", "private static String str(long i) {\n return String.valueOf(i);\n }", "Object getMessage();", "public abstract long mo24412e();", "public long longValue();", "int mo5867a(String str, long j);", "public static long getLong(String key, long i) {\n\t\tString token = getString(key);\n\t\tif (token == null) {\n\t\t\treturn i;\n\t\t}\n\t\treturn Long.parseLong(token);\n\t}", "void mo1332e(String str, String str2, Throwable th);", "long getTime() throws Exception;", "String getLo();", "public long getLong(String key) {\n long result;\n Object value = get(key);\n if (value instanceof Long) {\n result = (Long)value;\n } else if (value instanceof String) {\n try {\n String valueString = (String)value;\n if (valueString.length() == 0) {\n result = 0;\n } else if (valueString.charAt(0) == '-') {\n result = Long.parseLong(valueString);\n } else {\n result = Long.parseUnsignedLong((String)value);\n }\n } catch (NumberFormatException exc) {\n result = 0;\n }\n } else {\n result = 0;\n }\n return result;\n }", "void mo1341v(String str, String str2, Throwable th);", "String getInvalidMessage();", "public long getLong(String key) {\n\t\tString value = getString(key);\n\t\t\n\t\ttry {\n\t\t\treturn Long.parseLong(value);\n\t\t}\n\t\tcatch( NumberFormatException e ) {\n\t\t\tthrow new IllegalStateException( \"Illegal value for long integer configuration parameter: \" + key);\n\t\t}\n\t}", "private static long parseValue(String param2String) throws IllegalArgumentException {\n/* 591 */ long l = Long.parseLong(param2String);\n/* 592 */ if (l < 0L) {\n/* 593 */ throw new IllegalArgumentException(\"negative limit: \" + param2String);\n/* */ }\n/* 595 */ return l;\n/* */ }", "long mo133613a();", "private static long parseValue(String param2String) throws IllegalArgumentException {\n/* 593 */ long l = Long.parseLong(param2String);\n/* 594 */ if (l < 0L) {\n/* 595 */ throw new IllegalArgumentException(\"negative limit: \" + param2String);\n/* */ }\n/* 597 */ return l;\n/* */ }", "long getUnknown72();", "public long l(String key) throws AgentBuilderRuntimeException {\n\t\treturn getLong(key).longValue();\n\t}", "long mo117970a();", "java.lang.String getErrmsg();", "String getLongToken();", "String getLongToken();", "String getErrorMessage();", "String getErrorMessage();", "long mo734e() throws RemoteException;", "void mo1330d(String str, String str2, Throwable th);", "@Test(timeout = 4000)\n public void test33() throws Throwable {\n String string0 = EWrapperMsgGenerator.fundamentalData((-1622103582), \"convertible = \");\n assertEquals(\"id = -1622103582 len = 14\\nconvertible = \", string0);\n }", "String failureReason();", "long getI();", "long readLong();", "java.lang.String getError();" ]
[ "0.63377", "0.6171068", "0.6171068", "0.6171068", "0.6171068", "0.6171068", "0.6171068", "0.6171068", "0.6171068", "0.6171068", "0.6171068", "0.6171068", "0.6171068", "0.6171068", "0.6171068", "0.6171068", "0.6171068", "0.6171068", "0.6158076", "0.6153303", "0.6109856", "0.6109856", "0.6109856", "0.60857666", "0.60426253", "0.60240966", "0.60161227", "0.5996022", "0.599377", "0.599377", "0.5985187", "0.5952924", "0.5945734", "0.5938474", "0.5917999", "0.589846", "0.5886059", "0.58855623", "0.58773637", "0.58269936", "0.581655", "0.5803713", "0.5803713", "0.5800932", "0.57959753", "0.57926416", "0.5770532", "0.5737509", "0.57333106", "0.57314163", "0.572287", "0.57207793", "0.5703272", "0.5701634", "0.56856394", "0.56855917", "0.5682843", "0.56824243", "0.5664114", "0.5659855", "0.5654606", "0.5652149", "0.5640287", "0.5640287", "0.5640287", "0.5640287", "0.5640287", "0.5640287", "0.5640287", "0.5632596", "0.5632596", "0.5632573", "0.56115437", "0.56096286", "0.56067085", "0.5600405", "0.55982244", "0.55981755", "0.5597258", "0.55960846", "0.55849415", "0.55793065", "0.55756307", "0.556728", "0.55665594", "0.55504584", "0.5549373", "0.55398935", "0.5525542", "0.55234563", "0.5520663", "0.5520663", "0.5517056", "0.5517056", "0.55074877", "0.5504787", "0.5496645", "0.54949886", "0.5492965", "0.54895663", "0.5477523" ]
0.0
-1
Constructor. Initialize socket and file
public OutputFileTransfer(Socket socket, File file) { this.socket = socket; this.file = file; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public fileServer() {\n }", "public TestCaseSocket() {\n\t}", "public Mocket()\n throws IOException\n {\n init (null);\n }", "protected ServerSession(final Socket socket, final String filePath) throws IOException {\r\n\t\tsuper(filePath);\r\n\t\tSystem.out.printf(\"Serving files out of %s. %n\", fileBase);\r\n\t\tthis.socket = socket;\r\n\t\tsetUpIO();\r\n\t}", "public Mocket (String configFile)\n throws IOException\n {\n init (configFile);\n }", "public TCPServer() throws SocketException\n\t{\n\t\tsuper();\n\t\tsetCheck(null);\n\t}", "private void init() throws IOException {\n m_sock = new Socket(InetAddress.getByAddress(m_address), VIDEO_TO_PC_PORT);\n m_sock.setSoTimeout(READ_TIMEOUT_MS);\n m_sockistream = m_sock.getInputStream();\n m_daistream = new DataInputStream(m_sockistream);\n m_initialized = true;\n }", "public Server() throws IOException{\n\t\tsuper();\n\t\tthis.serversocket = new java.net.ServerSocket(DEFAULTPORT);\n\t\tif (DEBUG){\n\t\t\tSystem.out.println(\"Server socket created:\" + this.serversocket.getLocalPort());\n\t\t\tclient_list.add(String.valueOf(this.serversocket.getLocalPort()));\n\t\t}\n\t}", "private TcpClient()\n {\n socket = null;\n writer = null;\n connected = false;\n \n connect(\"localhost\", 7778);\n }", "public void initialize(BluetoothSocket socket) throws IOException {\n\t\tthis.socket = socket;\n\t\trfile = this.socket.getInputStream();\n\t\twfile = this.socket.getOutputStream();\n\t\t\n\t\tmessageSender.start();\n\t\tmessageReceiver.start();\n\t}", "public void init() {\n\t\ttry {\n\t\t\tthis.is = new ObjectInputStream(clientSocket.getInputStream());\n\t\t\tthis.os = new ObjectOutputStream(clientSocket.getOutputStream());\n\t\t\twhile (this.readCommand()) {}\n\t\t} \n\t\tcatch (IOException e) \n\t\t{\n\t\t\tSystem.out.println(\"XX. There was a problem with the Input/Output Communication:\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void initSocket(String host, String port) throws IOException {\n\t\t// check the validity of the host name\n\t\tif (host == null || host.isEmpty()) throw new IllegalArgumentException(\"host == null || host.isEmpty()\");\n\t\t// check the validity of the port number\n\t\tint p = 0;\n\t\ttry {\n\t\t\tp = Integer.parseInt(port);\n\t\t} catch (NumberFormatException e) {\n\t\t\tthrow new IllegalArgumentException(\"Illegal port argument\");\n\t\t}\n\t\tif (p <= 0) {\n\t\t\tthrow new IllegalArgumentException(\"Illegal port argument\");\n\t\t}\n\t\t// establish the network connection\n\t\ttry {\n\t\t\tthis.socket = new Socket(host, p);\n\t\t} catch (IOException e) {\n\t\t\tgetErrorManager().error(\"Failed to establish the network connection\", e,\n\t\t\t\tErrorManager.OPEN_FAILURE);\n\t\t\tthrow e;\n\t\t}\n\t\tsuper.internalSetOutputStream(new BufferedOutputStream(this.socket.getOutputStream()));\n\t}", "public void initialize() throws SocketException{\n defPortUsed = true;\n initializeReal(defPortNumber, defPacketSize);\n }", "public SocketIO(Socket nsocket)\n\t{\n\t\tsocket = nsocket;\n\t\ttry\n\t\t{\n\t\t\tinput = new DataInputStream(socket.getInputStream());\n\t\t\tout = new DataOutputStream(socket.getOutputStream());\n\t\t}\n\t\tcatch(UnknownHostException u)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tcatch(IOException i)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t}", "public SocketServer() {\n \n super();\n start();\n\n }", "public Server() throws IOException\n {\n socket = new ServerSocket(port);\n }", "public OOXXServer(){\n\t\ttry\n\t\t{\n\t\t\tserver = new ServerSocket(port);\n\t\t\t\n\t\t}\n\t\tcatch(java.io.IOException e)\n\t\t{\n\t\t}\n\t}", "public FileServ() {\n\t\tsuper();\n\t}", "public FileSenderThread(Socket socket, File transferFile, PrintWriter logWriter)\n {\n this.socket = socket;\n this.transferFile = transferFile;\n this.logWriter = logWriter;\n }", "void init() throws IOException {\n\t\tif (this.type==FILE){\n\t\t\tstream.init(new FileInputStream(name));\n\t\t}\n\t\telse{\n\t\t\tURL url = new URL(name);\n\t\t\tstream.init((url.openStream()));\n\t\t}\n\t}", "public ConnectionHandler(Socket conn, String path) {\n this.conn = conn;\n this.path = path;\n this.ldt = LocalDateTime.now();\n this.dtf = DateTimeFormatter.ofPattern(\"yyyy-MM-dd HH:mm:ss\");\n this.fldt = ldt.format(dtf);\n\n try {\n is = conn.getInputStream(); // Get data from client on this input stream\n os = conn.getOutputStream(); // Send data back to the client on this stream\n br = new BufferedReader(new InputStreamReader(is)); // Use buffered reader to read data\n // Open (and possibly create) a log file in specified directory according to Configuration.LOG_FILEPATH\n log = new BufferedWriter(new FileWriter(Configuration.LOG_FILEPATH, true));\n } catch (IOException ioe) {\n System.err.println(\"ConnectionHandler:constructor (error): \" + ioe.getMessage());\n }\n }", "public SocketParams() {\n init();\n }", "public Server() throws IOException {\n try {\n this.serverSocket = new ServerSocket(this.port,100, InetAddress.getByName(host));\n } catch (UnknownHostException e) {\n System.out.println(\"Erreur lors de la construction du serveur (Hôte inconnu) - Server Constructor Error\");\n e.printStackTrace();\n } catch(IOException e) {\n e.printStackTrace();\n }\n }", "LocalSocketImpl(FileDescriptor fd)\n {\n this.fd = fd;\n }", "public Handler(Socket socket) {\n this.socket = socket;\n }", "public Handler(Socket socket) {\n this.socket = socket;\n }", "public static void initSocketClient(){\r\n\r\n try{\r\n //connectToProfilingServer();\r\n //setupClientStreams();\r\n handleData();\r\n }catch (EOFException eofe){\r\n eofe.printStackTrace();\r\n //TODO - send error message to server, we won't handle it here\r\n }catch (java.io.IOException ioe){\r\n ioe.printStackTrace();\r\n //TODO - send error message to server, we won't handle it here\r\n }catch (ClassNotFoundException ccne){\r\n ccne.printStackTrace();\r\n //TODO - send error message to server, we won't handle it here\r\n }finally {\r\n //closeSocketClient();\r\n }\r\n }", "public ServerConnection()\n {\n //Initializing of the variables used in the constructor\n this.hostAddress = \"http://localhost\";\n this.port = 8882;\n }", "public WSocket() throws SocketException, UnknownHostException {\r\n\t\tthis.socket = new DatagramSocket();\r\n\t\tthis.port = socket.getLocalPort();\r\n\t\tthis.addr = InetAddress.getByName(\"localhost\");\r\n\t}", "public TCPCanSocket() throws IOException\n \t{\n \t\t// this(new ServerSocket(DEFAULT_PORT).accept());\n \t\tthis(new ServerSocket(DEFAULT_PORT, 100).accept());\n \t\tSystem.out.println( \"constructor: open server socket\" );\n \t}", "public FileServer(){\n\t\tfilePath = new ConcurrentHashMap<String, String>();\n\t}", "public ClientLogic(String host, String file) {\n\t\t\thostName = host;\n\t\t\tfileName = file;\n\t\t}", "public GameSocket() throws SocketException {\r\n\t\tsocket = new DatagramSocket(Main.localAddress);\r\n\t\tbufSize = socket.getReceiveBufferSize();\r\n\t\tMain.logger.info(\"Starting GameSocket at port \" + socket.getLocalPort() + \" ...\");\r\n\t}", "public UDPServidor(String filename, int port) {\n this.filename = filename;\n this.port = port;\n }", "private void connect() {\n\t\ttry {\n\t\t\tsocket = new Socket(Server.ADDRESS, Server.PORT_NUMBER);\n\t\t\tthis.oos = new ObjectOutputStream(socket.getOutputStream());\n\t\t\tthis.ois = new ObjectInputStream(socket.getInputStream());\n\t\t\tServerListener serverlistener = new ServerListener();\n\t\t\tserverlistener.start();\n\t\t\tRequest request = new Request(RequestCode.START_DOCUMENT_STREAM);\n\t\t\trequest.setUsername(user.getUsername());\n\t\t\toos.writeObject(request);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public Worker(Socket client, int dataPort) {\n super();\n this.controlSocket = client;\n this.dataPort = dataPort;\n this.currDirectory = System.getProperty(\"user.dir\") + \"/test\";\n this.root = System.getProperty(\"user.dir\");\n }", "public ClientHandler(Socket s){\r\n mySocket = s;\r\n }", "public cliente(String host, int portNumber, String dirDownload){\r\n \r\n if (dirDownload != null){\r\n this.dirDownload = dirDownload; \r\n \r\n }\r\n this.IP = host;\r\n try {\r\n InetAddress inet = InetAddress.getByName(host);\r\n socket = new Socket(inet, portNumber);\r\n System.out.println(\"Puerto del cliente: \" + socket);\r\n \r\n this.clientIn= new BufferedReader(new InputStreamReader(socket.getInputStream())); \r\n this.clientOut = new PrintWriter(socket.getOutputStream(), true);\r\n }\r\n catch (IOException e) {\r\n System.out.println(\"Excepcion de E/S : \" + e);\r\n }\r\n \r\n}", "public FileTransfer(int myPort){ //Receiver\n socket = new MySocket(ProtocolStack.getLocalhost().getLogicalID(),myPort);\n socket.bindServer();\n socket.accept();\n step = STEP_WAITING_TO_RECEIVE;\n }", "public BaseServerInputStream() {\n data = new ArrayDeque<IoBuffer>();\n marked = false;\n resetCache = null;\n }", "public Receiver(String file) {\n\t\ttry {\n\t\t\tinput = new InputDriver(file, true);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"The file, \" + file + \", isn't existed on the server.\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\timg = new ImageDriver(input);\n\t\t//initialize list as a new linked list\n\t\tlist = new PacketLinkedList<SimplePacket>();\n\t}", "private void initialize() throws IOException {\n // All of this node's files are kept in this directory.\n File dir = new File(localDir);\n if (!dir.exists()) {\n if (!dir.mkdirs()) {\n throw new IOException(\"Unable to create directory: \" +\n dir.toString());\n }\n }\n\n Collection<File> data = FileUtils.listFiles(dir,\n FileFilterUtils.trueFileFilter(),\n FileFilterUtils.trueFileFilter());\n String[] files = new String[data.size()];\n Iterator<File> it = data.iterator();\n for (int i = 0; it.hasNext(); i++) {\n files[i] = it.next().getPath().substring(dir.getPath().length() + 1);\n }\n\n StartupMessage msg = new StartupMessage(InetAddress.getLocalHost()\n .getHostName(), port, id, files);\n msg.send(nameServer, namePort);\n }", "public void init() {\r\n\t\ttry {\r\n\t\t\tmessages = new ConcurrentLinkedDeque<>();\r\n\t\t\tout = sock.getOutputStream();\r\n\t\t\tin = sock.getInputStream();\t\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tstartMessageThread();\r\n\t}", "public Communicator() throws SocketException\r\n {\r\n datagramSocket = new DatagramSocket();\r\n }", "public SocketWrapper(final Socket socket) throws IOException {\n this.host = socket.getInetAddress().getHostName();\n this.port = socket.getPort();\n this.socket = socket;\n initStreams();\n opened = true;\n }", "public SendFiles(String desIp) {\n this.init(desIp);\n }", "public IndexServer(int port, File fname) throws IOException {\n super(port, fname);\n }", "public Connection(Socket client_socket) {\r\n client = client_socket;\r\n try {\r\n in = new DataInputStream(client.getInputStream());\r\n out = new PrintStream(client.getOutputStream());\r\n }\r\n catch (IOException e) {\r\n try { client.close(); } catch (IOException e2) { ; }\r\n System.err.println(\"Exception while getting socket streams: \" + e);\r\n return;\r\n }\r\n this.start();\r\n }", "public Server() throws IOException {\n FileInputStream fistream = null;\n BufferedInputStream bistream = null;\n OutputStream ostream = null;\n ServerSocket ss = null;\n Socket socket = null;\n\n Scanner sc = new Scanner(System.in);\n System.out.println(\"Input file path\");\n filepath = sc.nextLine();\n\n try {\n ss = new ServerSocket(PORT);\n while (true) {\n System.out.println(\"Waiting...\");\n\n try {\n socket = ss.accept();\n System.out.println(\"Accepted connection : \" + socket);\n\n // send file\n File myFile = new File (filepath);\n byte [] mybytearray = new byte [(int)myFile.length()];\n\n fistream = new FileInputStream(myFile);\n bistream = new BufferedInputStream(fistream);\n bistream.read(mybytearray,0,mybytearray.length);\n ostream = socket.getOutputStream();\n\n System.out.println(\"Sending \" + filepath + \"(\" + mybytearray.length + \" bytes)\");\n\n ostream.write(mybytearray,0,mybytearray.length);\n ostream.flush();\n\n System.out.println(\"Done.\");\n }\n finally {\n if (bistream != null) bistream.close();\n if (ostream != null) ostream.close();\n if (socket!=null) socket.close();\n }\n }\n }\n finally {\n if (ss != null) ss.close();\n }\n }", "public ServerThread(Socket socket) {\r\n\t\tsoc = socket;\r\n\t}", "@Override\r\n\tpublic void start(Socket socket){}", "private void initializeIOStreams() {\n try {\n inputStream = new ObjectInputStream(new BufferedInputStream(socket.getInputStream()));\n outputStream = new ObjectOutputStream(new BufferedOutputStream(socket.getOutputStream()));\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public FileHandler(Socket client, int clientId, String currentDirectory) {\n socket = client;\n isActive = true;\n this.clientId = clientId;\n this.currentDirectory = currentDirectory;\n\n initializeAvailableCommandMap();\n initializeIOStreams();\n System.out.println(\"Nouvelle connexion etablie avec le client# \" + clientId + \" et le socket: \" + socket);\n }", "private void initServerSocket()\n\t{\n\t\tboundPort = new InetSocketAddress(port);\n\t\ttry\n\t\t{\n\t\t\tserverSocket = new ServerSocket(port);\n\n\t\t\tif (serverSocket.isBound())\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Server bound to data port \" + serverSocket.getLocalPort() + \" and is ready...\");\n\t\t\t}\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tSystem.out.println(\"Unable to initiate socket.\");\n\t\t}\n\n\t}", "public ClientTSap() {\n socketFactory = SocketFactory.getDefault();\n }", "public void init() throws IOException {\r\n try {\r\n serverSocket = new ServerSocket(PORT);\r\n this.running = true;\r\n } catch (IOException e) {\r\n System.out.println(e);\r\n }\r\n }", "protected void initChannel(SocketChannel ch) throws Exception {\n ch.pipeline().addLast(\"FileServerHandler\", new FileServerHandler(transferFile));\n }", "public Server() {\n\t\t\n\t\ttry {\n\t\t\tss= new ServerSocket(PORT);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace(); // Default\n\t\t}\n\t}", "public static void init(String filePath) {\n\t\t// Reading the created network for using its structure.\n\t\tnet = FileUtils.getNetwork(filePath);\n\t}", "public ServerConnecter() {\r\n\r\n\t}", "public NotcherSimulator() throws SocketException{}", "public Server(){\n\t\ttry {\n\t\t\t// initialize the server socket with the specified port\n\t\t\tsetServerSocket(new ServerSocket(PORT));\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"IO Exception while creating a server\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public ClientHandler(Socket s, PrintWriter out, String workingDirectory) {\r\n\t /**\r\n * assign to Socket\r\n */\r\n\t this.s = s;\r\n /**\r\n * assigning out to class PrintWriter object\r\n */\r\n this.out = out;\r\n /**\r\n * assign working directory argument to the workingDirectory variable\r\n */\r\n this.workingDirectory = workingDirectory;\r\n }", "public cliente(Socket socket) throws IOException {\r\n this.socket = socket;\r\n is = socket.getInputStream();\r\n os = socket.getOutputStream();\r\n\r\n }", "public FileServer(int port) throws IOException {\n serverThread = new Thread(new RunningService(port));\n }", "public ClientFTP() {\n }", "public NetworkSource(Socket socket) {\n try {\n comUtils = new ComUtils(socket);\n\n // TODO @alex disable timeout\n comUtils.setTimeout(0);\n\n } catch (Exception ex) {\n System.err.println(\"NETWORK SORUCE: Could not Open Socket\");\n ex.printStackTrace();\n }\n }", "private void openSocket(String host, int port) throws IOException {\n \t\t// Debug - attempting connection\n \n \t\tclientSocket = new Socket(InetAddress.getByName(host), port);\n \n \t\toutput = new BufferedWriter(new OutputStreamWriter(\n \t\t\t\tclientSocket.getOutputStream()));\n \t\toutput.flush();\n \n \t\tfileOutput = new BufferedOutputStream(clientSocket.getOutputStream());\n \n \t\tinput = new BufferedReader(new InputStreamReader(\n \t\t\t\tclientSocket.getInputStream()));\n \n \t\t// Debug - done\n \t}", "public MonitoringSocket() throws IOException {\r\n\r\n\t\tincrementNumberOfOpenSockets();\r\n\t\tprintMonitoringSocketStatus();\r\n\t}", "public ClientHandler(Socket cmdSocket, Socket fileSocket, FileTransferServer server) {\n // Set up a simple configuration that logs on the console.\n BasicConfigurator.configure();\n\n log = Logger.getLogger(ClientHandler.class.getName());\n\n this.cmdSocket = cmdSocket;\n this.fileSocket = fileSocket;\n this.server = server;\n\n prepareStreams();\n\n // Initialize handlers for each command\n handlers = new HashMap<>();\n handlers.put(\"DIR\", new DirRequestHandler(server));\n handlers.put(\"GET\", new GetRequestHandler(server, fileOutStream));\n handlers.put(\"PUT\", new PutRequestHandler(server, fileInStream));\n }", "public ServidorSocket() throws IOException {\n\t\tservidor = new ServerSocket(PUERTO);\n\t\tcliente = new Socket();\n\t}", "public ControlWorker(Socket socket) {\n \n }", "public void InitSocket(String server, int port) throws IOException {\n socket = new Socket(server, port);\n outputStream = socket.getOutputStream();\n\n Thread receivingThread = new Thread() {\n @Override\n public void run() {\n try {\n \n BufferedReader reader = new BufferedReader(\n new InputStreamReader(socket.getInputStream()));\n String line;\n while ((line = reader.readLine()) != null)\n notifyObservers(line);\n } catch (IOException ex) {\n notifyObservers(ex);\n }\n }\n };\n receivingThread.start();\n }", "public MockSocket () {\n state = UNBOUND;\n }", "public UDPEchoServer() throws SocketException {\r\n super(DEFAULT_PORT);\r\n }", "@Override\r\n \tpublic void initialize() {\n \t\tThreadRenamingRunnable.setThreadNameDeterminer(ThreadNameDeterminer.CURRENT);\r\n \r\n \t\tInetSocketAddress address;\r\n \r\n \t\tif (m_host == null) {\r\n \t\t\taddress = new InetSocketAddress(m_port);\r\n \t\t} else {\r\n \t\t\taddress = new InetSocketAddress(m_host, m_port);\r\n \t\t}\r\n \r\n \t\tm_queue = new LinkedBlockingQueue<ChannelBuffer>(m_queueSize);\r\n \r\n \t\tExecutorService bossExecutor = Threads.forPool().getCachedThreadPool(\"Cat-TcpSocketReceiver-Boss-\" + address);\r\n \t\tExecutorService workerExecutor = Threads.forPool().getCachedThreadPool(\"Cat-TcpSocketReceiver-Worker\");\r\n \t\tChannelFactory factory = new NioServerSocketChannelFactory(bossExecutor, workerExecutor);\r\n \t\tServerBootstrap bootstrap = new ServerBootstrap(factory);\r\n \r\n \t\tbootstrap.setPipelineFactory(new ChannelPipelineFactory() {\r\n \t\t\tpublic ChannelPipeline getPipeline() {\r\n \t\t\t\treturn Channels.pipeline(new MyDecoder(), new MyHandler());\r\n \t\t\t}\r\n \t\t});\r\n \r\n \t\tbootstrap.setOption(\"child.tcpNoDelay\", true);\r\n \t\tbootstrap.setOption(\"child.keepAlive\", true);\r\n \t\tbootstrap.bind(address);\r\n \r\n \t\tm_logger.info(\"CAT server started at \" + address);\r\n \t\tm_factory = factory;\r\n \t}", "private void initServerSock(int port) throws IOException {\n\tserver = new ServerSocket(port);\n\tserver.setReuseAddress(true);\n }", "public SingleService(Socket socket) throws IOException {\n this.socket = socket;\n output = new PrintWriter(\n new BufferedWriter(\n new OutputStreamWriter(\n socket.getOutputStream())), true);\n input = new BufferedReader(\n new InputStreamReader(\n socket.getInputStream()));\n }", "public RRCPConnectionHandler(Socket s) {\n this.s = s;\n try {\n dis = new DataInputStream(new BufferedInputStream(s.getInputStream()));\n dos = new DataOutputStream(new BufferedOutputStream(this.s.getOutputStream()));\n } catch (IOException ex) {\n System.err.println(\"Error making data streams on ConnectionHandler: \\\"\" + ex.getMessage() + \"\\\"\");\n }\n }", "public void init()\r\n {\n readFile(inputFile);\r\n writeInfoFile();\r\n }", "public UDPLayer() \n\t\tthrows SocketException\n\t{\n\t\tthis(0, true); // use any available port on the local host machine\n\t\t// TODO use -1 instead of 0?\n\t}", "public TCPSocketServer(){\n this.port=DEFAULT_SERVER_PORT;\n socketList = Collections.synchronizedList(new ArrayList<>());// Maintain a list of socket list. This uses synchronized list since\n // the terminate does not\n this.logWriter = new LogWriter(fileWriterQueue);\n log.info(\"Starting log writer..\");\n logWriter.start();\n this.periodicReportingService = new PeriodicReportingService();\n this.periodicReportingService.start();\n this.orderShutdown = new AtomicBoolean(false);\n Thread shutdownThread = new Thread(new ShutdownTask());\n log.info(\"Starting shutdown threads..\");\n shutdownThread.start();\n\n }", "public MonitoringSocket(String host, int port) throws IOException {\r\n\r\n\t\tsuper(host, port);\r\n\t\tincrementNumberOfOpenSockets();\r\n\t\tprintMonitoringSocketStatus();\r\n\t}", "private SocketMessage() {\n initFields();\n }", "public Server() {\n\t\tinit(new Config());\n\t}", "public void InitSocket(String server, int port) throws IOException {\r\n socket = new Socket(server, port);\r\n outputStream = socket.getOutputStream();\r\n\r\n Thread receivingThread = new Thread() {\r\n @Override\r\n public void run() {\r\n try {\r\n BufferedReader reader = new BufferedReader(\r\n new InputStreamReader(socket.getInputStream()));\r\n String line;\r\n while ((line = reader.readLine()) != null) {\r\n notifyObservers(line);\r\n }\r\n } catch (IOException ex) {\r\n notifyObservers(ex);\r\n }\r\n }\r\n };\r\n receivingThread.start();\r\n }", "public TCPCanSocket(Socket s) throws IOException\n \t{ \n \t System.out.println(s.getInetAddress() + \" \" + s.getPort());\n \t\tthis.s = s;\n \t\tSystem.out.println( \"constructor: open socket data streams\" );\n \t\tdin = new BufferedInputStream(s.getInputStream());\n \t\tdout = new BufferedOutputStream(s.getOutputStream());\n \t\t// dout.flush();\n \t}", "public TCPServer(int portNumber){\r\n\t\t// Abro el socket en el puerto dado y obtengo los stream\r\n\t\ttry {\r\n\t\t\tmServerSocket = new ServerSocket(portNumber);\r\n\t\t} catch (IOException e) { e.printStackTrace(); }\r\n\t}", "public Server(int port){\n\t\ttry {\n\t\t\tdatagramSocket = new DatagramSocket(port);\n\t\t\trequest = new byte[280];\n\t\t} catch (SocketException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\n\t}", "public void initServer(File fname) {\n // Do something!\n System.err.println(\"Init server with fname \" + fname);\n }", "public TCPSocketManager(String name, OutputStream os, Socket sock, InetAddress addr, String host, int port, int delay, boolean immediateFail, Layout<? extends Serializable> layout) {\n/* 77 */ super(name, os, addr, host, port, layout);\n/* 78 */ this.reconnectionDelay = delay;\n/* 79 */ this.socket = sock;\n/* 80 */ this.immediateFail = immediateFail;\n/* 81 */ this.retry = (delay > 0);\n/* 82 */ if (sock == null) {\n/* 83 */ this.connector = new Reconnector(this);\n/* 84 */ this.connector.setDaemon(true);\n/* 85 */ this.connector.setPriority(1);\n/* 86 */ this.connector.start();\n/* */ } \n/* */ }", "@Before\n public void setUp() throws IOException {\n serverSocket = new ServerSocket(0, 1);\n }", "public void init() throws IOException;", "private void initStreams() throws IOException {\n OutputStream os = socket.getOutputStream();\n InputStream is = socket.getInputStream();\n dos = new DataOutputStream(new BufferedOutputStream(os));\n dis = new DataInputStream(new BufferedInputStream(is));\n }", "protected TransformInputStream(T socket)\n {\n super(socket);\n }", "private void openInputStream() throws IOException {\n InputStreamReader isReader = new InputStreamReader(this.sock.getInputStream());\n reader = new BufferedReader(isReader);\n }", "public TCPServer(CheckInOut check) throws SocketException\n\t{\n\t\tsuper();\n\t\tsetCheck(check);\n\t}", "public ZwischenServer() throws IOException{\n\t\tFile paramfile = new File(\"/home/tobi/uniworks/netzwerke/UE2/Parameter.txt\");\n\t\tif(paramfile.canRead()){\n\t\t\tInputStream paramIs = new FileInputStream(paramfile);\n\t\t\tInputStreamReader paramIsr = new InputStreamReader(paramIs);\n\t\t\tBufferedReader paramBr = new BufferedReader(paramIsr);\n\t\t\tth = paramBr.readLine();\n\t\t\tcontent = th.substring(th.indexOf(' ', 0), th.length());\n\t\t\tth = th.substring(0, th.indexOf(' ', 0));\n\t\t\texchangeContent = content.substring(content.indexOf(';'), content.indexOf(')')-1);\n\t\t\tcontent = content.substring(content.indexOf('('), content.indexOf(';'));\n\t\t\tsocket8082 = new Socket(\"127.0.0.1\",8082);\n\t\t\tsocket80 = new Socket(th,80);\n\t\t}\n\t\telse\n\t\t\tSystem.out.println(\"Error file not found\");\n\t}", "public ServerTask(Socket sk)\r\n {\r\n this.sk=sk;\r\n }", "private void createSocket() throws Exception {\n try {\n socket = new Socket();\n socket.setTcpNoDelay(true);\n } catch (SocketException e) {\n throw new Exception();\n }\n }" ]
[ "0.6935238", "0.6751965", "0.6735925", "0.6699294", "0.6540334", "0.6529965", "0.6506958", "0.6478936", "0.6475349", "0.64547473", "0.64509475", "0.6450094", "0.64418554", "0.64127254", "0.638093", "0.63736206", "0.6345127", "0.63423187", "0.6321977", "0.6309639", "0.62716836", "0.6270889", "0.6267253", "0.62515205", "0.6242566", "0.6242566", "0.6233214", "0.6221173", "0.6214349", "0.6204221", "0.6184288", "0.61830735", "0.61819917", "0.618046", "0.6166705", "0.616006", "0.6132944", "0.61303663", "0.6120338", "0.61160195", "0.61144906", "0.6102154", "0.6095619", "0.609188", "0.6087882", "0.60876006", "0.60809493", "0.6060127", "0.6057643", "0.60545397", "0.6051836", "0.60500014", "0.6045892", "0.6042124", "0.60403156", "0.60399747", "0.6034624", "0.6017262", "0.5996194", "0.5993375", "0.5992887", "0.59862554", "0.59825665", "0.5982126", "0.59685075", "0.5966973", "0.59649986", "0.5960079", "0.59573317", "0.5940088", "0.59317887", "0.5923243", "0.59173894", "0.59130615", "0.59110254", "0.5908318", "0.59072524", "0.5904294", "0.59010154", "0.58960426", "0.58947897", "0.5886071", "0.5885286", "0.587376", "0.58676094", "0.5864802", "0.5848976", "0.5848201", "0.58471906", "0.58408606", "0.5835491", "0.58273613", "0.58164227", "0.5811539", "0.5804574", "0.5800547", "0.57935613", "0.57896596", "0.5784107", "0.5782132" ]
0.65483546
4
This method sends file object that contains information about sending data.
public void sendFileInfo(OutputStream outStream, File file) { try { ObjectOutputStream objOut = new ObjectOutputStream(outStream); objOut.writeObject(file); objOut.flush(); } catch (IOException e) { throw new RuntimeException("Can't send file", e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void sendFileContents() {\n\t\t// mostramos un log\n\t\tthis.getLogger().debug(\"Sending file (\" + this.getFile().getName() + \": \" + this.getFile().length() + \" bytes)..\");\n\t\t// iniciamos una bandera\n\t\tint bytesRead = 0;\n\t\ttry {\n\t\t\t// abrimos el fichero\n\t\t\tfinal FileInputStream inFile = new FileInputStream(this.getFile());\n\t\t\t// creamos un buffer para el envio\n\t\t\tfinal byte[] buff = new byte[this.getConnection().getSendBufferSize()];\n\t\t\t// leemos el fichero\n\t\t\twhile ((bytesRead = inFile.read(buff)) > 0) {\n\t\t\t\t// enviamos el buffer por el socket\n\t\t\t\tthis.getConnection().getOutputStream().write(buff, 0, bytesRead);\n\t\t\t\t// vaciamos el buffer\n\t\t\t\tthis.getConnection().getOutputStream().flush();\n\t\t\t}\n\t\t\t// cerramos el fichero\n\t\t\tinFile.close();\n\t\t\t// vaciamos el fichero enviado\n\t\t\tthis.file = null;\n\t\t\t// mostramos un log\n\t\t\tthis.getLogger().info(\"File sent\");\n\t\t} catch (final SocketException e) {\n\t\t\t// mostramos el trace de la excepcion\n\t\t\tthis.getLogger().error(e);\n\t\t} catch (final FileNotFoundException e) {\n\t\t\ttry {\n\t\t\t\t// enviamos -1 para finalizar\n\t\t\t\tthis.getConnection().getOutputStream().write(-1);\n\t\t\t} catch (final IOException ignored) {}\n\t\t} catch (final IOException e) {\n\t\t\t// mostramos el trace de la excepcion\n\t\t\tthis.getLogger().error(e);\n\t\t}\n\t}", "void sendFile() {\r\n\t\t// 특정 클라이언트에게 파일을 보냄\r\n\t}", "public void sendFile() throws Exception {\n\t\tthis.logger.info(\"Sender: sending file\");\n\t\tlong senderStartTime = System.nanoTime();\n\t\tboolean done = false;\n\t\tDatagramPacket dp;\n\t\twhile (!done) {\n\t\t\twhile (!this.pw.windowFull() && (dp = this.readyPacket()) != null) {\n\t\t\t\tthis.pw.appendPacket(this.packetNumber, dp); // add the packet to the window\n\t\t\t\tthis.logger.debug(\"Adding packet: \" + this.packetNumber);\n\t\t\t\tthis.packetNumber = (this.packetNumber + 1) % 128;\n\t\t\t}\n\t\t\tthis.pw.transmitWindow(this.socket);\n\t\t\tthis.lastSent = System.nanoTime();\n\t\t\tthis.receivePacket();\n\t\t\tdone = this.pw.doneYet(); // all packages have been acknowledged\n\t\t\tthis.logger.debug(\"Done yet: \" + done + \" \" + this.doneReading);\n\t\t\tif (done && !this.doneReading) {\n\t\t\t\tdone = this.doneReading; // still need to read some packets\n\t\t\t}\n\t\t}\n\t\tthis.signalFinished(); // signal done sending file\n\t\tlong senderEndTime = System.nanoTime();\n\t\tdouble seconds = (senderEndTime - senderStartTime) / NS_TO_S;\n\t\tthis.logger.info(\"Sender: file sending complete\");\n\t\tthis.logger.info(String.format(\"Total time to send file: %.3f seconds\", seconds));\n\t\tthis.logger.info(\"Total file size: \"+ this.totalBytesRead +\" bytes\");\n\t}", "protected final void sendFile(final File file) {\n\t\t// almacenamos el fichero a enviar\n\t\tthis.file = file;\n\t\t// cambiamos al modo transferencia\n\t\tthis.setLocalStage(Stage.FILE);\n\t\t// soliticamos el envio del fichero\n\t\tthis.send(Commands.FILE);\n\t}", "public void sendRequest(){\n fileServer.sendMessage(this.packet,new FileNode(ip,port));\n }", "public void sendFile(File file)\n {\n byte [] mybytearray = new byte [(int)file.length()];\n FileInputStream fis;\n try {\n \n fis = new FileInputStream(file);\n BufferedInputStream bis = new BufferedInputStream(fis);\n bis.read(mybytearray,0,mybytearray.length);\n OutputStream os = sock.getOutputStream();\n os.write(mybytearray,0,mybytearray.length);\n os.flush();\n \n } catch (Exception ex) {\n \n }\n\n }", "public void transferFile() {\n\t\t// create file event and set client and server path\n\t\tfileEvent = new FileEvent();\n\t\tfileEvent.setClientPath(clientPath);\n\t\tfileEvent.setServerPath(serverPath);\n\t\t\n\t\t// get client name and set filename\n\t\tFile file = new File(clientPath);\n\t\tString name = clientPath.substring(clientPath.lastIndexOf(\"/\") + 1, \n\t\t\t\t\t\tclientPath.length());\n\t\tfileEvent.setFilename(name);\n\t\t\n\t\t// checks if the file exists in the path mentioned or sets valid to No\n\t\tif (file.isFile()) {\n\t\t\t//creates input stream setup the data in byte arrays\n\t\t\tDataInputStream inStream = null;\n\t\t\ttry {\n\t\t\t\tinStream = new DataInputStream(new FileInputStream(file));\n\t\t\t\tlong length = (int) file.length();\n\t\t\t\tbyte[] byteArray = new byte[(int) length];\n\t\t\t\tint start = 0;\n\t\t\t\tint last = 0;\n\t\t\t\tint rest = inStream.read(byteArray, start, \n\t\t\t\t\t\t\t\t\t\t\tbyteArray.length - start);\n\t\t\t\twhile (start < byteArray.length && (last = rest) >= 0) {\n\t\t\t\t\tstart = start + last;\n\t\t\t\t}\n\t\t\t\tfileEvent.setFileSize(length);\n\t\t\t\tfileEvent.setFileData(byteArray);\n\t\t\t\tfileEvent.setValid(\"Yes\");\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tfileEvent.setValid(\"No\");\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.out.println(\"Path does not exist.\");\n\t\t\tfileEvent.setValid(\"No\");\n\t\t}\n\t\t// Start sending the data byte array\n\t\ttry {\n\t\t\toutStream.writeObject(fileEvent);\n\t\t\tSystem.out.println(\"Done...\");\n\t\t\tThread.sleep(5000);\n\t\t\tSystem.exit(0);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public boolean sendFile(String inKey, File inFile) throws NuxeoException;", "private void sendFile(String fileName) throws IOException {\n // Read file from disk\n //\n fileReader = new MyFileReader();\n byte[] data = fileReader.readFile(fileName);\n //\n // Send binary data over the TCP/IP socket connection\n //\n for (byte i : data) {\n this.socket.getOutputStream().write(i);\n }\n\n System.out.println(\"\\r\\nSent \" + data.length + \" bytes to server.\");\n }", "void fileSent(IMSession session, String requestId, String fileId);", "public void send(File file) throws IOException {\n\t\tsend(file, DefaultConfig.def_encoding);\n\t}", "public void sendFile(Type type, String file_name) {\n try {\n // Use this for reading the data.\n byte[] buffer = new byte[1000];\n\n FileInputStream inputStream = new FileInputStream(file_name);\n\n // read fills buffer with data and returns\n // the number of bytes read (which of course\n // may be less than the buffer size, but\n // it will never be more).\n int total = 0;\n int nRead = 0;\n while((nRead = inputStream.read(buffer)) != -1) {\n // Convert to String so we can display it.\n // Of course you wouldn't want to do this with\n // a 'real' binary file.\n System.out.println(new String(buffer));\n out.writeByte(nRead);\n total += nRead;\n }\n\n\n // Always close files.\n inputStream.close();\n\n System.out.println(\"Read \" + total + \" bytes\");\n }\n catch(FileNotFoundException ex) {\n System.out.println(\n \"Unable to open file '\" + file_name + \"'\");\n }\n catch(IOException ex) {\n System.out.println(\n \"Error reading file '\" + file_name + \"'\");\n // Or we could just do this:\n // ex.printStackTrace();\n }\n }", "public void sendFile(Socket sock, String path, ObjectOutputStream oos, ObjectInputStream ois) {\n\t\ttry {\n\t\t\tSystem.out.println(\"In send file\");\n\n\t\t\tString file_name = path;\n\t\t\tSystem.out.println(\"Inpyt path= \" + path);\n\t\t\tFile file = new File(file_name);\n\n\t\t\tSystem.out.println(\"Going to create output stream\");\n\n\t\t\tSystem.out.println(\"output Stream Created\");\n\t\t\toos.writeObject(file.getName()); // reads the name of file\n\t\t\tSystem.out.println(\"Writing object by oos\");\n\t\t\tFileInputStream fis = new FileInputStream(file);\n\t\t\tbyte[] buffer = new byte[BUFFER_SIZE];\n\t\t\tInteger bytesRead = 0;\n\t\t\tSystem.out.println(\"Sending file\");\n\t\t\twhile ((bytesRead = fis.read(buffer)) > 0) {\n\t\t\t\tSystem.out.println(\"BytesRead = \" + bytesRead);\n\t\t\t\toos.writeObject(bytesRead);\n\t\t\t\toos.writeObject(Arrays.copyOf(buffer, buffer.length));\n\t\t\t}\n\n\t\t\toos.flush();\n\t\t\tSystem.out.println(\"File sent\");\n\n\t\t} \n\t\tcatch (IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\n\t}", "public void fileTransferReq(Packet packet) {\r\n\t\tjava.util.Date date = new java.util.Date();\r\n\t\tSystem.out.println(date + \" \" + packet.packetSenderID + \" is requesting file \" + packet.fileName);\r\n\t\tSystem.out.println(peerNode.fileDir);\r\n\t\tFile reqFile = new File(\"./\"+peerNode.fileDir, packet.fileName);\r\n\t\tbyte[] buf = new byte [(int)reqFile.length()]; \r\n\t\t\r\n\t\ttry {\r\n\t\t\tjava.util.Date fileSendDate = new java.util.Date();\r\n\t\t\tSystem.out.println(fileSendDate + \": Sending the file \" + packet.fileName + \" to Peer Node \" + packet.packetSenderID);\r\n\t\t\tfileInStream = new FileInputStream(reqFile);\r\n\t\t\tbufInStream = new BufferedInputStream(fileInStream);\r\n\t\t\tbufInStream.read(buf, 0, buf.length);\r\n\r\n\t\t\tPacket fileTransPckt = new Packet();\r\n\t\t\tfor(int i = 0; i < buf.length; i++ ) {\r\n\t\t\t\tfileTransPckt.buf[i] = buf[i];\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfileTransPckt.eventCode = 6;\r\n\t\t\tfileTransPckt.packetSenderID = peerNode.peerClientID;\r\n\t\t\tfileTransPckt.packetRecipientID = packet.packetSenderID;\r\n\t\t\tfileTransPckt.totalFileSize = buf.length;\r\n\t\t\tfileTransPckt.fileName = packet.fileName;\r\n\t\t\tpeerNode.peer2Peer = new Socket(packet.peerClientIP, packet.peerClientListenPort);\r\n\t\t\tpeerNode.peer2PeerOutStream = new ObjectOutputStream(peerNode.peer2Peer.getOutputStream());\r\n\t\t\tpeerNode.peer2PeerInStream = new ObjectInputStream(peerNode.peer2Peer.getInputStream());\r\n\t\t\t\r\n\t\t\tpeerNode.peer2PeerOutStream.writeObject(fileTransPckt);\r\n\t\t\tpeerNode.peer2PeerOutStream.flush();\r\n\t\t\t\r\n\t\t\t// Close socket/connection\r\n\t\t\tfileInStream.close();\r\n\t\t\tbufInStream.close();\r\n\t\t\tcloseConnection();\r\n\t\t} \r\n\t\tcatch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch blo\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@Override\n public void run()\n {\n try\n {\n InputStream fis = new FileInputStream(transferFile);\n OutputStream sos = socket.getOutputStream();\n\n logWriter.println(\"Sending the file...\");\n\n byte [] buffer = new byte[1024];\n int readBytes;\n while((readBytes = fis.read(buffer)) > -1) {\n sos.write(buffer, 0, readBytes);\n sos.flush();\n }\n\n fis.close();\n sos.close();\n socket.close();\n\n logWriter.println(\"File: \" + transferFile.getName());\n logWriter.println(transferFile.length() + \" bytes sent.\");\n logWriter.println(\"Data Connection Closed.\");\n\n } catch (IOException e)\n {\n e.printStackTrace(logWriter);\n }\n }", "void sendFile(String fileName, String hostName, int port) throws IOException;", "private void handleRetr(String file) {\n File f = new File(currDirectory + fileSeparator + file);\n\n if (!f.exists()) {\n sendMsgToClient(\"550 File does not exist\");\n }\n\n else {\n\n // Binary mode\n if (transferMode == transferType.BINARY) {\n BufferedOutputStream fout = null;\n BufferedInputStream fin = null;\n\n sendMsgToClient(\"150 Opening binary mode data connection for requested file \" + f.getName());\n\n try {\n // create streams\n fout = new BufferedOutputStream(dataConnection.getOutputStream());\n fin = new BufferedInputStream(new FileInputStream(f));\n } catch (Exception e) {\n debugOutput(\"Could not create file streams\");\n }\n\n debugOutput(\"Starting file transmission of \" + f.getName());\n\n // write file with buffer\n byte[] buf = new byte[1024];\n int l = 0;\n try {\n while ((l = fin.read(buf, 0, 1024)) != -1) {\n fout.write(buf, 0, l);\n }\n } catch (IOException e) {\n debugOutput(\"Could not read from or write to file streams\");\n e.printStackTrace();\n }\n\n // close streams\n try {\n fin.close();\n fout.close();\n } catch (IOException e) {\n debugOutput(\"Could not close file streams\");\n e.printStackTrace();\n }\n\n debugOutput(\"Completed file transmission of \" + f.getName());\n\n sendMsgToClient(\"226 File transfer successful. Closing data connection.\");\n\n }\n\n // ASCII mode\n else {\n sendMsgToClient(\"150 Opening ASCII mode data connection for requested file \" + f.getName());\n\n BufferedReader rin = null;\n PrintWriter rout = null;\n\n try {\n rin = new BufferedReader(new FileReader(f));\n rout = new PrintWriter(dataConnection.getOutputStream(), true);\n\n } catch (IOException e) {\n debugOutput(\"Could not create file streams\");\n }\n\n String s;\n\n try {\n while ((s = rin.readLine()) != null) {\n rout.println(s);\n }\n } catch (IOException e) {\n debugOutput(\"Could not read from or write to file streams\");\n e.printStackTrace();\n }\n\n try {\n rout.close();\n rin.close();\n } catch (IOException e) {\n debugOutput(\"Could not close file streams\");\n e.printStackTrace();\n }\n sendMsgToClient(\"226 File transfer successful. Closing data connection.\");\n }\n\n }\n closeDataConnection();\n\n }", "@Override\n\t\t\t\tpublic int fileTransferSend(LinphoneCore lc, LinphoneChatMessage message,\n\t\t\t\t\t\tLinphoneContent content, ByteBuffer buffer, int size) {\n\t\t\t\t\treturn 0;\n\t\t\t\t}", "private void handleStor(String file) {\n if (file == null) {\n sendMsgToClient(\"501 No filename given\");\n } else {\n File f = new File(currDirectory + fileSeparator + file);\n\n if (f.exists()) {\n sendMsgToClient(\"550 File already exists\");\n }\n\n else {\n\n // Binary mode\n if (transferMode == transferType.BINARY) {\n BufferedOutputStream fout = null;\n BufferedInputStream fin = null;\n\n sendMsgToClient(\"150 Opening binary mode data connection for requested file \" + f.getName());\n\n try {\n // create streams\n fout = new BufferedOutputStream(new FileOutputStream(f));\n fin = new BufferedInputStream(dataConnection.getInputStream());\n } catch (Exception e) {\n debugOutput(\"Could not create file streams\");\n }\n\n debugOutput(\"Start receiving file \" + f.getName());\n\n // write file with buffer\n byte[] buf = new byte[1024];\n int l = 0;\n try {\n while ((l = fin.read(buf, 0, 1024)) != -1) {\n fout.write(buf, 0, l);\n }\n } catch (IOException e) {\n debugOutput(\"Could not read from or write to file streams\");\n e.printStackTrace();\n }\n\n // close streams\n try {\n fin.close();\n fout.close();\n } catch (IOException e) {\n debugOutput(\"Could not close file streams\");\n e.printStackTrace();\n }\n\n debugOutput(\"Completed receiving file \" + f.getName());\n\n sendMsgToClient(\"226 File transfer successful. Closing data connection.\");\n\n }\n\n // ASCII mode\n else {\n sendMsgToClient(\"150 Opening ASCII mode data connection for requested file \" + f.getName());\n\n BufferedReader rin = null;\n PrintWriter rout = null;\n\n try {\n rin = new BufferedReader(new InputStreamReader(dataConnection.getInputStream()));\n rout = new PrintWriter(new FileOutputStream(f), true);\n\n } catch (IOException e) {\n debugOutput(\"Could not create file streams\");\n }\n\n String s;\n\n try {\n while ((s = rin.readLine()) != null) {\n rout.println(s);\n }\n } catch (IOException e) {\n debugOutput(\"Could not read from or write to file streams\");\n e.printStackTrace();\n }\n\n try {\n rout.close();\n rin.close();\n } catch (IOException e) {\n debugOutput(\"Could not close file streams\");\n e.printStackTrace();\n }\n sendMsgToClient(\"226 File transfer successful. Closing data connection.\");\n }\n\n }\n closeDataConnection();\n }\n\n }", "public void broadcastfile(int size, String file_name, byte[] file){\r\n Server.getUsers().forEach((user) -> {\r\n if(!user.getName().equals(this.name)){\r\n user.sendfile(size, file_name, file);\r\n }\r\n \r\n });\r\n \r\n }", "@Override\n public void run(){\n int status = 0;\n try{\n FileWriter writer = new FileWriter(file);\n writer.append(data);\n writer.flush();\n writer.close();\n Log.d(\"MainActivity\",\"File saved to \"+file.getAbsolutePath());\n //Log.v(\"DataActivity\", data);\n status = 1;\n }catch (IOException e){\n Log.e(\"Exception\", \"File write failed: \" + e.toString());\n }\n Message msg = new Message();\n msg.what = status;\n msg.obj = file.getAbsolutePath();\n msg.arg1 = type;\n Log.d(\"File\", file.getAbsolutePath());\n if (writeToFileHandler != null){\n writeToFileHandler.sendMessage(msg);\n }\n }", "@Override\n\tpublic void run( ) {\n\t\tConnect();\n\t\tSendFile( filePath );\n\t\tDisconnect();\n\t}", "public void send() {\n try {\n String message = _gson.toJson(this);\n byte[] bytes = message.getBytes(\"UTF-8\");\n int length = bytes.length;\n\n _out.writeInt(length);\n _out.write(bytes);\n \n } catch (IOException ex) {\n Logger.getLogger(ResponseMessage.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@Override\n public void run() {\n FILEPREFIX = \".//files\"+serverID + \"//\";\n ClientMessage = (Message) socketRead();\n ServerMessage = getReturnMessage(ClientMessage);\n //System.out.println(\"client\"+ClientMessage.getFrom()+\"message : \"+ClientMessage.getContent());\n File file = new File(FILEPREFIX + ClientMessage.getFileName());\n switch (ClientMessage.getType()){\n case \"enquiry\"://return the list of file\n ServerMessage.setContent(ListAllFile());\n break;\n case \"read\"://read the last line\n System.out.println(ClientMessage.getFrom() + \": Reading...\");\n ServerMessage.setContent(\"Reading: \"+ReadLastLine(file));\n System.out.println(\"Reading \"+ClientMessage.getContent());\n break;\n case \"write\"://write to the end of file\n System.out.println(ClientMessage.getFrom() + \": writing...\");\n try{\n WriteLastLine(file,ClientMessage.getContent());\n }catch (IOException e) {\n System.out.println(\"write error\");\n }\n\n ServerMessage.setContent(\"writing: \"+ReadLastLine(file));\n System.out.println(\"Writing \"+ClientMessage.getContent());\n break;\n default://unknown command\n System.out.println(ClientMessage.getType());\n ServerMessage.setContent(\"Error\");\n System.out.println(ClientMessage.getFrom() + \": Wrong type\");\n break;\n }\n socketWrite(ServerMessage);\n\n try {//close the socket connection\n client.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void run()\n {\n try\n {\n // Load the manifest file\n File manifest = new File(UploaderMain.getManifestName());\n if (!manifest.exists())\n {\n ErrorPrinter.printError(ErrorCode.fileNotFound, \"manifest does not exist\");\n System.exit(0);\n }\n\n // Read names of files from manifest\n Map<String, File> files = new HashMap<String, File>();\n BufferedReader manifestReader = new BufferedReader(new FileReader(manifest));\n String line;\n long totalLength = 0;\n while ((line = manifestReader.readLine()) != null)\n {\n if (line.startsWith(\"//\") || line.trim().isEmpty()) continue; // ignore comments\n StringTokenizer token = new StringTokenizer(line, \"@\");\n String destinationName = token.nextToken();\n String localName = token.nextToken();\n File f = new File(localName);\n if (!f.exists())\n {\n \tErrorPrinter.printError(ErrorCode.fileNotFound, \"file \" + localName + \" not found\");\n \tcontinue;\n }\n totalLength += f.length();\n files.put(destinationName, f);\n }\n manifestReader.close();\n\n dOut.writeInt(files.size());\n dOut.writeLong(totalLength);\n\n for (String s : files.keySet())\n {\n File f = files.get(s);\n \n try\n {\n // Send the name and length of the file\n dOut.writeUTF(s);\n dOut.writeLong(f.length());\n\n // Send the file over the network\n FileInputStream reader = new FileInputStream(f);\n byte[] buffer = new byte[BUFFER_SIZE];\n int numRead;\n long numSent = 0;\n while (numSent < f.length())\n {\n numRead = reader.read(buffer);\n dOut.write(buffer, 0, numRead);\n numSent += numRead;\n }\n\n reader.close();\n }\n catch (Exception e)\n {\n System.out.println(\"Error sending file \" + f.getName());\n }\n }\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n }", "public sendFile_result(sendFile_result other) {\n }", "void sendToDestination(FileItem fileItem, String file_name){\n\n Resource res = new Resource();\n\n try {\n fileItem.write( new File(res.entry.getPathToDestination() + File.separator + file_name));\n logger.info(\"Successfully sent file to destination\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n }", "public void sendFile(SocketChannel socketChannel) throws IOException {\n int index = -1;\n RandomAccessFile aFile = null;\n try {\n File file = new File(\"C:\\\\Users\\\\ASUS\\\\Downloads\\\\Music\\\\Marshmello-One-Thing-Right-(Ft-Kane-Brown).mp3\");\n aFile = new RandomAccessFile(file, \"r\");\n FileChannel inChannel = aFile.getChannel();\n ByteBuffer buffer = ByteBuffer.allocate(1024);\n while (inChannel.read(buffer) > 0) {\n buffer.flip();\n socketChannel.write(buffer);\n buffer.clear();\n }\n Thread.sleep(1000);\n System.out.println(\"End of file reached..\");\n socketChannel.close();\n aFile.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n }", "public synchronized void receiveFile(byte[] passedByteArray){\n\n try {\n \n if( passedByteArray.length + fileByteCounter > fileSize ){\n int diff = (int) (fileSize - fileByteCounter);\n passedByteArray = Arrays.copyOf(passedByteArray, diff);\n }\n \n //Copy over the bytes\n aFileStream.write(passedByteArray);\n fileByteCounter += passedByteArray.length;\n// fileDigest.update(passedByteArray);\n// DebugPrinter.printMessage(this, \"Receiving file, bytes: \" + fileByteCounter);\n \n //If the byte count has passed the file size than send a finished message\n //so the socket can be closed\n if( fileSize >= 0 && fileByteCounter >= fileSize )\n finishFileTransfer(); \n\n } catch (IOException ex) {\n\n Log.log(Level.SEVERE, NAME_Class, \"receiveFile()\", ex.getMessage(), ex);\n\n //Clear all the file transfer variables\n cleanupFileTransfer();\n\n }\n\n }", "public Message sendDocumentFile(DocumentFileToSend dfs)\n\t{\n\t\tif(dfs == null)\n\t\t\treturn null;\n\t\treturn rm.sendDocumentFile(dfs);\n\t}", "public void sendFile(File theFile) throws TFTPException {\r\n\t\t\n\t\ttry {\r\n\t\t\tfileReader = new FileInputStream(theFile);\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tthrow new TFTPException(e.getMessage(), PacketUtil.ERR_FILE_NOT_FOUND);\r\n\t\t}\t\t\n\t\t\r\n\t\tint blockNum = 1;\n\t\tbyte[] sendBuf = new byte[512]; // need to make this exactly our block size so we only read that much\r\n\t\tDatagramPacket sendPacket = null;\r\n\t\t\r\n\t\tboolean done = false;\r\n\t\tdo\t\t\r\n\t\t{\r\n\t\t\t// zero the send buffer so no lingering data is sent\r\n\t\t\tArrays.fill(sendBuf, (byte)0);\r\n\t\t\t\r\n\t\t\t// if last ACK packet was a duplicate we don't read from file\r\n\t\t\tif (!duplicatePacket){\r\n\t\t\t\ttry {\r\n\t\t\t\t\tbytesRead = fileReader.read(sendBuf);\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\tthrow new TFTPException(\"Error reading data from file: \"+e.getMessage(), PacketUtil.ERR_UNDEFINED);\r\n\t\t\t\t}\r\n\t\t\t\tif (bytesRead == -1) {\r\n\t\t\t\t\tbytesRead = 0;\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tif (bytesRead < 512) {\r\n\t\t\t\t\tdone = true;\r\n\t\t\t\t}\r\n\t\t\t\t// send DATA\r\n\t\t\t\tsendPacket = packetUtil.formDataPacket(sendBuf, bytesRead, blockNum);\r\n\t\t\t\tPacketUtil.sendPacketToProcess(threadLabel, socket, sendPacket, receiverProcess, \"DATA\");\n\t\t\t}\r\n\t\t\t\r\n\t\t\tDatagramPacket reply = null;\r\n\t \r\n\t\t\tboolean packetReceived = false;\r\n\t int retransmission = 0;\n\t \r\n\t // expect ACK\t \r\n\t while (!packetReceived && retransmission <= PacketUtil.DEFAULT_RETRY_TRANSMISSION){\n\t \ttry {\r\n\t \t\treply = PacketUtil.receivePacketOrTimeout(threadLabel, socket, receiverProcess, \"ACK\");\r\n\t \t\tpacketReceived = true;\r\n\t \t\t\r\n\t \t} catch (SocketTimeoutException ex){\r\n\t \t\t//no response for last Data packet, Data packet maybe lost, resending...\r\n\t \t\tprintToConsole(\"Error: Timed out while waiting for ACK Packet\");\t \t\t\r\n\t \t\t\t\r\n \t\t\t\tif (retransmission == PacketUtil.DEFAULT_RETRY_TRANSMISSION){\r\n \t\t\t\t\t\r\n \t\t\t\t\tthrow new TFTPException(String.format(\"No response received after %d retries, aborting request\", \r\n \t\t\t\t\t\tretransmission), PacketUtil.ERR_UNDEFINED); \r\n \t\t\t\t} \t\t\t\t\r\n \t\t\t\t\r\n \t\t\t\tprintToConsole(\"possible DATA packet loss, resending...\");\r\n \t\t\t\tPacketUtil.sendPacketToProcess(threadLabel, socket, sendPacket, receiverProcess, \"DATA\");\r\n\t\t\t\t\tretransmission++;\r\n\t \t}\r\n\t }\r\n\t \r\n\t // parse ACK to ensure it is correct before continuing\r\n\t try {\n\t \tduplicatePacket = parser.parseAckPacket(reply, blockNum);\n\t } catch (ErrorReceivedException e) {\r\n\t \t// the other side sent an error packet, don't send a response\t\t\t\t\r\n\t \t// rethrow so the owner of this Sender knows whats up\r\n\t \tthrow e;\r\n\n\t } catch (TFTPException e) {\r\n\r\n\t \t// send error packet\r\n\t \tDatagramPacket errPacket = packetUtil.formErrorPacket(e.getErrorCode(), e.getMessage(),\r\n\t \t\t\treply.getAddress(), reply.getPort());\t\t\t\t\r\n\t \tPacketUtil.sendPacketToProcess(threadLabel, socket, errPacket, receiverProcess, \"ERROR\");\r\n\r\n\t \tif (e.getErrorCode() == PacketUtil.ERR_UNKNOWN_TID) {\r\n\t \t\tprintToConsole(\"received packet with unknown TID\");\r\n\t \t\t// consider unknown TID a duplicate packet so we still wait for the right ACK\r\n\t \t\tduplicatePacket = true;\r\n\t \t} else {\r\n\t \t\t// rethrow so the owner of this Sender knows whats up\r\n\t \t\tthrow e;\r\n\t \t}\r\n\t }\r\n\r\n\r\n\t\t\tif (!duplicatePacket) { blockNum++; }\r\n\n\t\t} while (!done);\r\n\t\t\n\t}", "public void sendFileMessage(String msg) throws IOException {\n\t\t\n\t\tif (!connectionActive()) {\n\t\t\tthrow new IllegalOperationException(\"Cannot send a message if you are not connected to a server!\\n\");\n\t\t}\n\t\t\n\t\tString[] tokens = msg.split(\"\\\\.(?=[^\\\\.]+$)\");\n\t\tMessage fileMessage = null;\n\t\ttry {\n\t\t\tfileMessage = Message.makeFileMessage(getUserName(), fileToByte(msg), tokens[1]);\n\t\t\t\n\t\t\t\n\t\t} catch (IOException e) {\n\n\t\t\te.printStackTrace();\n\t\t}\n\t\tsocketConnection.print(fileToByte(msg),getUserName(),msg);\n\t\t\n\t}", "public void run() {\n try {\n //first send the file name to the receiver\n out.flush();\n out.writeUTF(fileName);\n out.flush();\n //sends the destination folder name\n out.writeUTF(destFolder);\n out.flush(); //flushes the buffer\n //array of bytes that holds the file bytes\n byte[] file = readFile(srcFilePath +\"/\"+fileName);\n System.out.println(\"Sending file: \"+fileName+\" to folder: \"+destFolder);\n //sends the file\n out.write(file,0,file.length);\n out.flush();\n if(notifDownloader) {\n NodeInterface nodeStub = (NodeInterface) Naming.lookup(\"/\"+clientSocket.getInetAddress().toString()+\"/Node\");\n nodeStub.fileDownloaded(fileName);\n }\n } catch (IOException e) {\n System.out.println(\"readline: \" + e.getMessage());\n } catch (NotBoundException e) {\n //e.printStackTrace();\n System.err.println(\"There was an error notifying the downloader \"+e.getMessage());\n } finally{\n try{\n //closes the socket\n clientSocket.close();\n }catch(IOException e){\n System.out.println(\"problem closing the socket: \"+e.getMessage());\n }\n }\n }", "private void sendMusic(String path) {\n try {\n System.out.println(\"start sendMusic\");\n File myFile = new File(path);\n System.out.println(\"openFile\");\n byte[] mybytearray = new byte[(int) myFile.length()];\n FileInputStream fis = new FileInputStream(myFile);\n System.out.println(\"Sending...\");\n int count;\n if ((count = fis.read(mybytearray)) > 0) {\n output.write(mybytearray, 0, count);\n System.out.println(count);\n output.flush();\n }\n output.write(0);\n output.flush();\n fis.close();\n System.out.println(\"finish sending\");\n }catch (Exception e){\n System.out.println(\"sendMusic method\");\n System.err.println();\n }\n }", "private static void sendRequestUserTextUpload(Socket s, PrintWriter pw, String method, Boolean requestFileFlag, Boolean bodyFlag) throws IOException {\n pw.print(method + \" /\");\n if (requestFileFlag) {\n pw.print(\"UserTextUpload/\");\n }\n pw.print(\" HTTP/1.1\\r\\n\");\n //request headers formation.\n pw.print(\"Host: localhost\\r\\n\");\n pw.print(\"Content-Type: text/html\\r\\n\");\n\n //This is to add a new header with the size of the sent file.\n pw.print(\"Content-Size: \" + Files.size(Path.of(FILE_PATH)) + \"\\r\\n\");\n pw.print(\"\\r\\n\");\n pw.flush();\n\n //request body formation.\n if (bodyFlag) {\n //Change to your own txt file\n Files.copy(Path.of(FILE_PATH), s.getOutputStream());\n }\n pw.flush();\n }", "public void replyToClientBody(File file) {\r\n FileInputStream fis = null;\r\n try {\r\n /**\r\n * @see <a href=\"https://stackoverflow.com/questions/14169661/read-c\r\n * omplete-file-without-using-loop-in-java\">https://stackoverflow.co\r\n * m/questions/14169661/read-complete-file-without-using-loop-in-j\r\n * ava</a>\r\n */\r\n fis = new FileInputStream(file);\r\n byte[] data = new byte[(int) file.length()];\r\n fis.read(data);\r\n fis.close();\r\n outputBody.write(data);\r\n outputBody.flush();\r\n } catch (Exception ex) {\r\n Logger.getLogger(Server.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "@Override\n public IRemoteFileTransfer addSentFileTransfer(FileStructForBinder file)\n throws RemoteException {\n Logger.v(TAG, \"addSentFileTransfer() file = \" + file\n + \"fileTransferTag is \" + file.mFileTransferTag);\n PluginChatWindowFileTransfer pluginChatWindowFileTransfer =\n new PluginChatWindowFileTransfer(\n file, PluginUtils.OUTBOX_MESSAGE, mContactString);\n Long fileTransferIdInMms;\n if (mNewGroupCreate) {\n if (ThreadTranslater.tagExistInCache(mContactString)) {\n Logger.d(TAG, \"addSentMessage() Tag exists\" + mContactString);\n Long thread = ThreadTranslater.translateTag(mContactString);\n PluginUtils.insertThreadIDInDB(thread, mSubject);\n }\n mNewGroupCreate = false;\n }\n String fileTransferString = PluginUtils\n .getStringInRcse(R.string.file_transfer_title);\n int ipMsgId = PluginUtils.findFTIdInRcseDb(file.mFileTransferTag);\n fileTransferIdInMms = PluginUtils.insertDatabase(fileTransferString,\n mContactString, Integer.MAX_VALUE, PluginUtils.OUTBOX_MESSAGE);\n pluginChatWindowFileTransfer.initIpMessageInCache();\n pluginChatWindowFileTransfer.storeInCache(fileTransferIdInMms);\n Logger.d(TAG, \"addSentFileTransfer(), pluginChatWindowFileTransfer = \"\n + pluginChatWindowFileTransfer);\n return pluginChatWindowFileTransfer;\n }", "private static void SendFileToServer(String user, Object filename,Socket soc) {\r\n \r\n\t\tFile From = new File(\"C:/Users/harsh/Desktop/\"+user+\"/\"+filename); //path of client directory\r\n\t\tFile To = new File(\"C:/Users/harsh/Desktop/Server/\"+filename); //path of server directory\r\n\t\t\r\n\t\ttry {\r\n\r\n\t\t\tFileUtils.copyFile(From, To); //Apache File Utils library function to copy file from one location to another location\r\n\t\t\tSystem.out.println(\"File:\" +filename+ \" uploaded on server sucessfully !!\"); //let user know file has been uploaded to server\r\n\t\t\tSystem.out.println(\"------------------------------------------------------------------\");\r\n\t\t\t\r\n\t\t\tDataOutputStream dos=new DataOutputStream(soc.getOutputStream());\r\n\t\t\tdos.writeUTF(\"File: \"+filename+\" uploaded by user: \"+user);\r\n\t\t\tdos.writeUTF(user);\r\n \t\r\n\t\t\tWatchDirectory(user, soc); // function call to continue watching User directory\r\n\t\t} \r\n\t\tcatch (IOException e) {\r\n\t\t\t//print error (if any)\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "@Override\n\tpublic void transferFile() throws Exception {\n\t\tnew Thread(new Runnable() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\ttry {\n\t\t\t\t\tSystem.out.println(\"开始上传\");\n\t\t\t\t\tsocket=new Socket(ip,port);\n\t\t\t\t\tInputStream in=socket.getInputStream();\n\t\t\t\t\tOutputStream out=socket.getOutputStream();\n\t\t\t\t\tBufferedInputStream input=new BufferedInputStream(in);\n\t\t\t\t\twhile(true)\n\t\t\t\t\t{\n\t\t\t\t\t\tFileInputStream fis=new FileInputStream(file);\n\t\t\t\t\t\tDataInputStream dis=new DataInputStream(new BufferedInputStream(fis));\n\t\t\t\t\t\tbyte[] buf=new byte[8192];\n\t\t\t\t\t\tDataOutputStream ps=new DataOutputStream(out);\n\t\t\t\t\t\twhile(true)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tThread.sleep(100);\n\t\t\t\t\t\t\tint read=0;\n\t\t\t\t\t\t\tif(dis!=null){\n\t\t\t\t\t\t\t\tread=fis.read(buf);\n\t\t\t\t\t\t\t\tdownLoadFileSize+=read;\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(read==-1)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttimer.cancel();\n\t\t\t\t\t\t\t\tMessage msg=new Message();\n\t\t\t\t\t\t\t\tBundle bundle=new Bundle();\n\t\t\t\t\t\t\t\tbundle.putInt(\"percent\",100 );\n\t\t\t\t\t\t\t\tmsg.setData(bundle);\n\t\t\t\t\t\t\t\thandler.sendMessage(msg);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tps.write(buf,0,read);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tps.flush();\n\t\t\t\t\t\tout.flush();\n\t\t\t\t\t\tps.close();\n\t\t\t\t\t\tdis.close();\n\t\t\t\t\t\tsocket.close();\n\t\t\t\t\t\tSystem.out.println(\"上传完成\");\n\t\t\t\t\t\t \n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}).start();\n\t}", "@Override\n\tpublic void send(OutputStream stream) throws IOException {\n\t\tstream.write(this.data);\n\t}", "public FileTransfer sendMultimediaFile(File file)\n throws Exception {\n return null;\n }", "public static String sendFile(File file, String hostName) {\r\n\t\tbyte[] buffer = new byte[BUFFER_SIZE];\r\n\t\tSocket socket = null;\r\n\t\tSystem.out.println(\"start\");\r\n\r\n\t\tInputStream inputStream = null;\r\n\t\tOutputStream outputStream = null;\r\n\r\n\t\ttry {\r\n\r\n\t\t\tsocket = new Socket(hostName, PORT_NUMBER);\r\n\t\t\tsocket.setSoTimeout(Timeout);\r\n\t\t\tinputStream = new FileInputStream(file);\r\n\t\t\toutputStream = socket.getOutputStream();\r\n\r\n\t\t\tint fileLength = 0;\r\n\t\t\twhile ((fileLength = inputStream.read(buffer)) > 0) {\r\n\t\t\t\toutputStream.write(buffer, 0, fileLength);\r\n\t\t\t}\r\n\t\t\toutputStream.flush();\r\n\t\t\toutputStream.close();\r\n\t\t\tinputStream.close();\r\n\t\t\tsocket.close();\r\n\r\n\t\t} catch (IOException e) {\r\n\r\n\t\t\treturn ERROR_STATUS;\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tThread.sleep(NetworkConstants.WaitTime);\r\n\t\t} catch (InterruptedException e) {\r\n\r\n\t\t}\r\n\t\treturn SUCCESS_STATUS;\r\n\t}", "protected FileMessage(MessageWireType wireId) {\n super(wireId);\n }", "public static void sendFile2ecc(Context context, String fileNo\n ) throws FileNotFoundException {\n final File crashFile = new File(FileUtil.getPath(context) + \"CrashFile.log\");\n\n// File crashNoFile = new File(FileUtil.getPath(context) + fileNo + \".crash.log\");\n\n// crashFile.renameTo(crashNoFile);\n new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n RandomAccessFile accessFile = new RandomAccessFile(crashFile, \"rw\");\n byte[] bytes = new byte[(int) accessFile.length()];\n accessFile.read(bytes);\n HXLog.eForDeveloper(new String(bytes)+\"====================================\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n uploadFile(URL,crashFile.getAbsolutePath());\n }\n }).start();\n\n }", "public void downloadFile(FileDetails fileDetails) {\n DataOutputStream fileOut = null;\n try {\n DataOutputStream dataOutputStream =new DataOutputStream(this.clientSocket.getOutputStream());\n// sc = new Socket(hostIp, hostPort);\n System.out.println(\"Successfully connected(client) for file retrieval\");\n\n //Sending message to determining Upload/Download(0/1) request\n dataOutputStream.writeInt(1);\n// dataOutputStream.flush();\n //Sending Index of the file\n dataOutputStream.writeInt(fileDetails.getId());\n// dataOutputStream.flush();\n// this.clientSocket.shutdownOutput();\n\n\n DataInputStream dataInputStream = new DataInputStream(this.clientSocket.getInputStream());\n int hasFile = 1;\n // hasFile = dataInputStream.readInt();\n System.out.println(\"Does have file? : \" + hasFile);\n if (hasFile == 0) {\n System.out.println(\"Couldn't find the file\");\n } else {\n System.out.println(\"File started downloading in client-side...\");\n// int bufferSize = 8192;\n// byte[] buf = new byte[bufferSize];\n long passedlen = 0;\n long len = 0;\n\n\n// len = dataInputStream.readInt();\n len = fileDetails.getFileSize();\n System.out.println(\"The Length : \" + len);\n System.out.println(\"Staring receiving...\");\n\n int lengthInt = (int)len;\n byte[] fileByte = new byte[lengthInt];\n\n\n// ObjectInputStream objectInputStream = new ObjectInputStream(inputStreamObj);\n// String fileName =(String) objectInputStream.readObject();\n String fileName =(String) fileDetails.getFileName();\n\n// String fileName = (String) obj;\n String fileDir = downFileDir + fileName;\n System.out.println(\"Filepath : \" + fileDir);\n System.out.println(\"Filename receiving : \" + fileName);\n\n// File fileToDownload = new File(fileDir);\n// FileOutputStream fileOutputStream = new FileOutputStream(fileToDownload);\n DataOutputStream fileOutNew = new DataOutputStream(new FileOutputStream(fileDir));\n dataInputStream.readFully(fileByte,0,fileByte.length);\n fileOutNew.write(fileByte);\n// fileOutNew.close();\n\n// fileOutputStream.close();\n// fileOut = new DataOutputStream(new FileOutputStream(fileDir));\n// fileOut.write(fileByte);\n// fileOut.flush();\n// fileOut.close();\n// dataInputStream.close();\n// while (true) {\n// int read = 0;\n// if (dataInputStream != null) {\n// read = dataInputStream.read(buf);\n// }\n// passedlen += read;\n// if (read == -1) {\n// break;\n// }\n// fileOut.write(buf, 0, read);\n// }\n System.out.println(\"Receiving completed\");\n fetchFileListFromServer();\n// fileOut.close();\n }\n\n// dataOutputStream.close();\n// dataInputStream.close();\n// clientSocket.close();\n// new Client(\"127.0.0.1\",9908);\n// clientSocket.close();\n } catch (Exception e) {\n System.out.println(\"An Error has occurred in file retrieval(client)!\");\n e.printStackTrace();\n }\n }", "public void blockingSendSenderSide() throws OOBException {\n \t\tFileInputStream fis = null;\n \t\ttry {\n \t\t\tlog.debug(\"enter send scpmanager session is \" + session);\n \t\t\t// exec 'scp -t rfile' remotely\n \t\t\tString command = \"scp -p -t \" + rfile;\n \t\t\tChannel channel = session.openChannel(\"exec\");\n \t\t\t((ChannelExec) channel).setCommand(command);\n \t\t\t// get I/O streams for remote scp\n \t\t\tOutputStream out = channel.getOutputStream();\n \t\t\tInputStream in = channel.getInputStream();\n \t\t\tchannel.connect();\n \t\t\tif (checkAck(in) != 0) {\n \t\t\t\tSystem.exit(0);\n \t\t\t}\n \t\t\t// send \"C0644 filesize filename\", where filename should not include\n \t\t\t// '/'\n \t\t\tlog.debug(\"lfile value \" + lfile);\n \t\t\tlong filesize = (new File(lfile)).length();\n \t\t\tcommand = \"C0644 \" + filesize + \" \";\n \t\t\tif (lfile.lastIndexOf('/') > 0) {\n \t\t\t\tcommand += lfile.substring(lfile.lastIndexOf('/') + 1);\n \t\t\t} else {\n \t\t\t\tcommand += lfile;\n \t\t\t}\n \t\t\tcommand += \"\\n\";\n \t\t\tout.write(command.getBytes());\n \t\t\tout.flush();\n \t\t\tif (checkAck(in) != 0) {\n \t\t\t\tSystem.exit(0);\n \t\t\t}\n \n \t\t\t// send a content of lfile\n \t\t\tfis = new FileInputStream(lfile);\n \t\t\tbyte[] buf = new byte[1024];\n \t\t\twhile (true) {\n \t\t\t\tint len = fis.read(buf, 0, buf.length);\n \t\t\t\tif (len <= 0)\n \t\t\t\t\tbreak;\n \t\t\t\tout.write(buf, 0, len); // out.flush();\n \t\t\t}\n \t\t\tfis.close();\n \t\t\tfis = null;\n \t\t\t// send '\\0'\n \t\t\tbuf[0] = 0;\n \t\t\tout.write(buf, 0, 1);\n \t\t\tout.flush();\n \t\t\tif (checkAck(in) != 0) {\n \t\t\t\tSystem.exit(0);\n \t\t\t}\n \t\t\tout.close();\n \t\t\tchannel.disconnect();\n \t\t} catch (Exception e) {\n \t\t\te.printStackTrace();\n \t\t\ttry {\n \t\t\t\tif (fis != null)\n \t\t\t\t\tfis.close();\n \t\t\t} catch (Exception ee) {\n \t\t\t}\n \t\t}\n \t\tlog.debug(\"out send scpmanager\");\n \t}", "@Override\n public void run() {\n Send enoughPeers = new Send(Send.ENOUGH_NODES, replicationDegree);\n Send ret = enoughPeers.writeAndRead(enoughPeers, p, Peer.PROTOCOL, p.centralizedChordManagerAddress,\n p.centralizedChordManagerPort);\n // CHECK IF THERE ARE ENOUGH NODES\n if (ret.enough) {\n MessageDigest md3 = null;\n try {\n md3 = MessageDigest.getInstance(\"SHA1\");\n } catch (NoSuchAlgorithmException e2) {\n e2.printStackTrace();\n }\n md3.reset();\n md3.update(path.getBytes());\n byte[] hashBytes3 = md3.digest();\n BigInteger hashNum3 = new BigInteger(1, hashBytes3);\n int key3 = Math.abs(hashNum3.intValue()) % Peer.numDHT;\n System.out.println(\"Generated key \" + key3 + \" for file: \" + path);\n FileModel file = new FileModel(path, replicationDegree, p.me);\n file.loadFileContent();\n p.initiatorPeerFiles.add(file);\n if (file.fileData.length != 0) {\n Peer destination = null;\n try {\n destination = ChordManager.find_successor(key3);\n // if dest is myself then i increase the retries by 1 because I'm sending the\n // file to myself first\n if (destination.getSslEnginePort() == p.getSslEnginePort()) {\n file.retries += 1;\n }\n } catch (Exception e1) {\n e1.printStackTrace();\n }\n SendFileThread thread = new SendFileThread(p.initiatorPeerFiles.get(p.initiatorPeerFiles.indexOf(file)),\n p, destination);\n thread.start();\n\n try {\n thread.join();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n if (!file.replicationDegreeAchieved())\n System.out.println(\"File \" + path + \" was backed up with lower repDegree: \"\n + file.perceivedReplicationDegree + \" of: \" + file.perceivedReplicationDegree);\n else {\n System.out.println(\"File \" + path + \" was backed up with repDegree wanted\");\n }\n } else {\n System.err.println(\"File \" + path + \" was not backed up\");\n }\n } else {\n System.err.println(\"File \" + path + \" was not backed up replication degree of : \" + replicationDegree\n + \" could not be achived due to less number of peers available\");\n }\n }", "public static void sendFile(DataOutputStream dOut, String key) throws IOException{\n\t\t// Writes file name to stream\n\t\tSystem.out.println(key);\n\t\tdOut.writeUTF(key);\n\t\tdOut.flush();\n\t\t\n\t\t// Writes file size to stream\n\t\tFile file = new File(key);\n\t\tlong length = file.length();\n\t\tdOut.writeUTF(Long.toString(length));\n\t\tdOut.flush();\n\t\t\n\t\tFileInputStream fin = new FileInputStream(file);\n\t\t\n\t\t// Writes data to file\n\t\tint count;\n\t\tbyte[] buffer = new byte[(int) length];\n\t\t// read method returns number of bytes read, used to know how many bytes to write\n\t\twhile ((count = fin.read(buffer)) != -1){\n\t\t\tdOut.write(buffer, 0, count);\n\t\t\tdOut.flush();\n\t\t}\n\t\tSystem.out.println(\"File Sent\");\n\t}", "void fileReceived(IMSession session, String requestId, String fileId, String filePath);", "public void sendChunk(String fileName,ObjectOutputStream out)\n {\n FileInputStream fInput;\n BufferedInputStream bufInput;\n byte[] byteToSend = new byte[chunkSize];\n try\n {\n fInput = new FileInputStream(fileName);\n bufInput = new BufferedInputStream(fInput);\n int b;\n int i=0;\n b = bufInput.read(byteToSend,0,chunkSize);\n out.write(byteToSend,0,chunkSize);\n out.flush();\n bufInput.close();\n }\n catch(FileNotFoundException ex)\n {\n System.out.println(\"File Chunk Not found Exception: Some chunk missing.\");\n }\n catch(IOException ex)\n {\n System.out.println(\"IOException while reading from the chunk file.\");\n }\n }", "public Object sendSticker(File file, int chatType, FileSendConversation xferCon)\n throws Exception {\n return sendFile(file, chatType, xferCon);\n }", "protected File saveMessage(String path, String filename, String type) throws Exception {\n float rate = handler.getRate();\r\n if (rate != 1.0f) {\r\n Object[] options = {\"The original speed\",\r\n \"The adjusted speed\"};\r\n int answer = JOptionPane.showOptionDialog(NanoGong.this,\r\n \"You have changed the playback speed of the recording.\\nDo you want to save the recording in its original speed or the adjusted speed?\",\r\n \"Question\",\r\n JOptionPane.YES_NO_OPTION,\r\n JOptionPane.QUESTION_MESSAGE,\r\n null,\r\n options,\r\n options[1]);\r\n if (answer == JOptionPane.YES_OPTION) rate = 1.0f;\r\n }\r\n \r\n File file = new File(path, filename);\r\n \r\n handler.downloadData(null, true);\r\n \r\n AudioData data = handler.getData();\r\n AudioData target = null;\r\n \r\n if (type.equals(TYPE_WAV_ADPCM))\r\n target = new ImaADPCMData(data.getFormat());\r\n else if (type.equals(TYPE_WAV_PCM))\r\n target = new WavePCMAudioData(data.getFormat());\r\n else if (type.equals(TYPE_SPEEX)) {\r\n if (speexQuality == 0) speexQuality = 10;\r\n target = new SpeexData(data.getFormat(), true, speexQuality);\r\n } else if (type.equals(TYPE_FLV_PCM))\r\n target = new FlvPCMData(data.getFormat());\r\n else\r\n throw new Exception(\"Invalid file format.\");\r\n\r\n OlaBuffer olaBuffer = new OlaBuffer(data.getFormat(), rate);\r\n \r\n data.reset();\r\n while (data.isAvailable()) {\r\n olaBuffer.write(data.read());\r\n while (olaBuffer.isAvailable()) target.write(olaBuffer.read());\r\n }\r\n \r\n olaBuffer.drain();\r\n while (olaBuffer.isAvailable()) target.write(olaBuffer.read());\r\n \r\n FileOutputStream stream = new FileOutputStream(file);\r\n target.sendToStream(stream);\r\n stream.close();\r\n \r\n return file;\r\n }", "public static void sendFileResponse(Supplier<Pair<String,File>> message, MessageReceivedEvent event)\n {\n sendFileResponseWithAlternate(message, null, event);\n }", "public void enviarArchivo() {\r\n \t try {\r\n \t\t\t// TODO Auto-generated method stub\r\n \t \t File archivo = new File( nombre );\r\n \t \r\n \t // Obtenemos el tamaño del archivo\r\n \t int tamañoArchivo = ( int )archivo.length();\r\n \t \r\n \t // Creamos el flujo de salida, este tipo de flujo nos permite \r\n \t // hacer la escritura de diferentes tipos de datos tales como\r\n \t // Strings, boolean, caracteres y la familia de enteros, etc.\r\n \t //dos = new DataOutputStream( socket.getOutputStream() );\r\n \t \r\n \t System.out.println( \"Enviando Archivo: \"+archivo.getName() );\r\n \t \r\n \t // Enviamos el nombre del archivo \r\n \t dos.writeUTF( archivo.getName() );\r\n \t \r\n \t // Enviamos el tamaño del archivo\r\n \t dos.writeInt( tamañoArchivo );\r\n \t \r\n \t // Creamos flujo de entrada para realizar la lectura del archivo en bytes\r\n \t fis = new FileInputStream( nombre );\r\n \t bis = new BufferedInputStream( fis );\r\n \t \r\n \t // Creamos el flujo de salida para enviar los datos del archivo en bytes\r\n \t bos = new BufferedOutputStream( socket.getOutputStream() );\r\n \t \r\n \t // Creamos un array de tipo byte con el tamaño del archivo \r\n \t byte[] buffer = new byte[ tamañoArchivo ];\r\n \t \r\n \t // Leemos el archivo y lo introducimos en el array de bytes \r\n \t bis.read( buffer ); \r\n \t \r\n \t // Realizamos el envio de los bytes que conforman el archivo\r\n \t for( int i = 0; i < buffer.length; i++ )\r\n \t {\r\n \t bos.write( buffer[ i ] ); \r\n \t } \r\n \t \r\n \t System.out.println( \"Archivo Enviado: \"+archivo.getName() );\r\n \t // Cerramos socket y flujos\r\n \t bis.close();\r\n \t bos.close();\r\n \t socket.close(); \r\n \t }\r\n \t catch( Exception e )\r\n \t {\r\n \t System.out.println( e.toString() );\r\n \t }\r\n\t \t\r\n }", "public void send(Object line) throws Exception {\n oos.writeObject(line);\n if(line instanceof MessageDetail){\n MessageDetail m = (MessageDetail)line;\n txtContent.append(\"\\nMe:\" + m.getContent());\n }\n }", "public void send(FPFile file) throws Exception {\n\n\t\tException last = null;\n\t\tfor (int nTry = 0; nTry < nRetries; ++nTry) {\n\t\t\ttry {\n\t\t\t\tdoSend(file);\n\t\t\t} catch (Exception ex) {\n\t\t\t\tlast = ex;\n\t\t\t\tThread.sleep(timeout);\n\t\t\t}\n\t\t}\n\n\t\tthrow new Exception(\"Failed sending file after \" + nRetries + \" attempts, give up\", last);\n\t}", "public void sendFile(ByteString bs, String filename, int numOfChunks, int chunkId) {\n\t\tHeader.Builder hb = Header.newBuilder();\n\t\thb.setNodeId(999);\n\t\thb.setTime(System.currentTimeMillis());\n\t\thb.setDestination(-1);\n\t\t\n\t\tTask.Builder tb = Task.newBuilder();\n\t\ttb.setNoOfChunks(numOfChunks); //Num of chunks\n\t\ttb.setChunkNo(chunkId); //chunk id\n\t\ttb.setTaskType(Task.TaskType.WRITE);\n\t\ttry {\n\t\t\ttb.setSender(InetAddress.getLocalHost().getHostAddress());\n\t\t} catch (UnknownHostException e1) {\n\t\t\te1.printStackTrace();\n\t\t}\n\t\ttb.setFilename(filename);\n\t\ttb.setChunk(bs);\n\t\t\n\t\tCommandMessage.Builder rb = CommandMessage.newBuilder();\n\t\trb.setHeader(hb);\n\t\trb.setTask(tb);\n\t\trb.setMessage(filename);\n\t\t\n\t\ttry {\n\t\t\t// direct no queue\n\t\t\t// CommConnection.getInstance().write(rb.build());\n\n\t\t\t// using queue\n\t\t\tCommConnection.getInstance().enqueue(rb.build());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n\t\t\t\tpublic void fileTransferRecv(LinphoneCore lc, LinphoneChatMessage message,\n\t\t\t\t\t\tLinphoneContent content, byte[] buffer, int size) {\n\t\t\t\t\t\n\t\t\t\t}", "private void finishSendingEmail(File reportFile, File witnessesFile)\n\t{\n\t\tArrayList<String> paths = new ArrayList<String>();\n\t\t\n\t\t// Attach report CSV file\n\t\tpaths.add(reportFile.getAbsolutePath());\n\t\t\n\t\t// Attach witnesses CSV file if the are any \n\t\tif(!incident.getWitnesses().isEmpty())\n\t\t\tpaths.add(witnessesFile.getAbsolutePath());\n\t\t\n\t\t// Attach photo files if the are any\n\t\tfor(int i=0; i<photoFiles.size(); i++)\n\t\t\tpaths.add(photoFiles.get(i).getAbsolutePath());\n\t\t\n\t\t// Attach video if there is one\n\t\tif(videoFile != null)\n\t\t\tpaths.add(videoFile.getAbsolutePath());\n\t\t\n\t\tString recipient = ParseUser.getCurrentUser().getEmail();\n\t\tString subject = \"Your DriverConnex Incident Report\";\n\t\t\n\t\t// Send email\n\t\tUtilities.sendEmail(ReviewReportActivity.this, recipient, \"\", subject, \"\", paths);\n\t\t\n\t\tloading.setVisibility(View.INVISIBLE);\t\n\t}", "public MyFile getMyFile() {\r\n\t\tMyFile msg = new MyFile(path);\r\n\t\tString LocalfilePath = path;\r\n\r\n\t\ttry {\r\n\t\t\tFile newFile = new File(LocalfilePath);\r\n\t\t\tbyte[] mybytearray = new byte[(int) newFile.length()];\r\n\t\t\tFileInputStream fis = new FileInputStream(newFile);\r\n\t\t\tBufferedInputStream bis = new BufferedInputStream(fis);\r\n\r\n\t\t\tmsg.initArray(mybytearray.length);\r\n\t\t\tmsg.setSize(mybytearray.length);\r\n\r\n\t\t\tbis.read(msg.getMybytearray(), 0, mybytearray.length);\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"Error send (Files)msg) to Server\");\r\n\t\t}\r\n\t\treturn msg;\r\n\t}", "public void send(List<File> files) {\n SimpleDateFormat sdf = new SimpleDateFormat( \"yyyy-MM-dd HH:mm:ss.SSS\" );\n int numberOfFiles = files.size();\n LOG.info( \"Started uploading \" + numberOfFiles + \" file(s) at \"\n + sdf.format( System.currentTimeMillis() ) );\n ConnectionUtilities connections = new ConnectionUtilities();\n\n for ( File file : files )\n {\n ableToWrite = true;\n totalReceived.set( 0 );\n try ( InputStream is = new FileInputStream( file ) )\n {\n processIndividualFile( file, is, connections );\n } catch ( IOException | ClientWriteException | NumberFormatException e )\n {\n LOG.error( \"Unable to process the file \" + file.getName() + \". \"\n + e.getMessage() );\n try\n { // sleep to allow stale messages to be send before reading next file\n TimeUnit.SECONDS.sleep( 1 );\n } catch ( InterruptedException e0 )\n {\n LOG.error( e0.getMessage() );\n }\n --numberOfFiles;\n } catch ( InterruptedException e )\n {\n LOG.error( e.getMessage() );\n Thread.currentThread().interrupt();\n }\n }\n LOG.info( \"Finished uploading \" + numberOfFiles + \" file(s) at \"\n + sdf.format( System.currentTimeMillis() ) + \"\\n\" );\n connections.setAbleToClear( true );\n connections.closeCachedConnections();\n }", "private void getBinaryFileFromPeer(Host h, String nombre, ObjectOutputStream out) {\n\n log.info(\"Starting thread to download binary from peer in \" + h.getIp() + \":\" + h.getPort() );\n ClientDownloadThread c = new ClientDownloadThread(h,nombre,this.sharedFolder);\n c.start();\n try {\n c.join();\n\n Consulta c2 = new Consulta();\n c2.setFileName(c.getFileName());\n c2.setMethod(ADD_FILE);\n\n log.info(\"Updating server w new file downloaded\");\n\n out.writeObject(c2);\n\n log.info(\"Update sucessfuly\");\n\n } catch (InterruptedException | IOException e) {\n log.info(\"Error while joining download thread\",e);\n }\n\n\n }", "public void downloadFile(ObjectInputStream inputStream) {\r\n\t \tFileEvent fileEvent = null;\r\n\t \ttry {\r\n\t \tfileEvent = (FileEvent) inputStream.readObject();\r\n\t if (fileEvent.getStatus().equalsIgnoreCase(\"Error\")) {\r\n\t System.out.println(\"Error occurred ..So exiting\");\r\n\t System.exit(0);\r\n\t }\r\n\t String outputFile = fileEvent.getDestinationDirectory() + fileEvent.getFilename();\r\n\t if (!new File(fileEvent.getDestinationDirectory()).exists()) {\r\n\t new File(fileEvent.getDestinationDirectory()).mkdirs();\r\n\t }\r\n\t File dstFile = new File(outputFile);\r\n\t FileOutputStream fileOutputStream = new FileOutputStream(dstFile);\r\n\t fileOutputStream.write(fileEvent.getFileData());\r\n\t fileOutputStream.flush();\r\n\t fileOutputStream.close();\r\n\t System.out.println(\"Output file : \" + outputFile + \" is successfully saved \");\r\n\t Thread.sleep(3000);\r\n\t System.exit(0);\r\n\t \r\n\t } catch (ClassCastException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\tList<String> serverFiles = (List<String>) fileEvent;\r\n\t\t\t\tSystem.out.println(serverFiles);\r\n\t\t\t} catch (IOException e) {\r\n\t e.printStackTrace();\r\n\t } catch (ClassNotFoundException e) {\r\n\t e.printStackTrace();\r\n\t } catch (InterruptedException e) {\r\n\t e.printStackTrace();\r\n\t }\r\n\t }", "private void uploadFile(final File file) throws IOException {\n if (file != null) {\n Network.sendMsg(new FileMessage(Paths.get(file.getAbsolutePath())));\n }\n }", "private void sendObject(Object obj){\r\n try {\r\n out.reset();\r\n out.writeObject(obj);\r\n out.flush();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }", "private void saveFile(Socket socket) throws Exception {\n File file = new File(\"fileupload.txt\");\n file.createNewFile();\n PrintWriter fw = new PrintWriter(file);\n\n BufferedReader lnr = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n String line = null;\n while ((line = lnr.readLine()) != null) {\n System.out.println(\"line:\" + line);\n fw.println(line);\n }\n fw.close();\n\n // response result to client\n PrintWriter pw = new PrintWriter(socket.getOutputStream(), true);\n pw.println(\"上传成功\");\n\n // release resource\n System.out.println(\"server close socket: \" + socket.hashCode());\n socket.close();\n }", "public void processFile() throws IOException {\n\t\tsetContent(file.getBytes());\n\t\tsetMultipartFileContentType(file.getContentType());\n\t}", "public void getFile(byte[] data, String name,String server) throws RemoteException;", "public final Message sendPhotoFile(PhotoFileToSend pfs)\n\t{\n\t\tif(pfs == null)\n\t\t\treturn null;\n\t\treturn rm.sendPhotoFile(pfs);\n\t}", "public void run() {\n String fileName;\n DataInputStream in;\n byte[] arr = new byte[5000];\n try {\n //getting the file name from client\n in = new DataInputStream(clientSocket.getInputStream());\n fileName = in.readUTF();\n // calling the function to send the file back to the client\n sendDataToClient(s3, fileName);\n //read file from disk\n FileInputStream fis = new FileInputStream(\"/home/ubuntu/\" + fileName);\n BufferedInputStream bis = new BufferedInputStream(fis);\n //output stream for socket\n BufferedOutputStream out = new BufferedOutputStream(clientSocket.getOutputStream());\n // if the file is for getting RTT\n if ( !fileName.equals(\"RTTFile.txt\") )\n System.out.println(\"\\n Serving file: \" + fileName + \"\\n\");\n // writing to streams\n int count;\n while ((count = bis.read(arr)) > 0) {\n out.write(arr, 0, count);\n }\n // flushing and closing all the open streams\n out.flush();\n out.close();\n fis.close();\n bis.close();\n clientSocket.close();\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public OutputFileTransfer(Socket socket, File file) {\n this.socket = socket;\n this.file = file;\n }", "private void requestFile(NapFile file, Client fileOwner) {\r\n\t\ttry {\r\n\r\n\t\t\tFile localCopy = new File(\"./SharedFiles1/\" + file.FILE_NAME);\r\n\r\n\t\t\tif (localCopy.createNewFile()) {\r\n\t\t\t\tcmdDisplay.setText(cmdDisplay.getText() + \"\\n\" + \"Connecting to \" + fileOwner.IP.toString().substring(1)\r\n\t\t\t\t\t\t+ \":\" + fileOwner.PORT_NUM);\r\n\t\t\t\tSocket OwnerSocket = Net_Util.connectToServer(fileOwner.IP.toString().substring(1), fileOwner.PORT_NUM);\r\n\t\t\t\tNet_Util.send(OwnerSocket, file.FILE_NAME);\r\n\t\t\t\tString[] contents = Net_Util.recStrArr(OwnerSocket);\r\n\r\n\t\t\t\tBufferedWriter writer = new BufferedWriter(new FileWriter(localCopy));\r\n\t\t\t\tfor (String lineContent : contents) {\r\n\t\t\t\t\twriter.write(lineContent + \"\\n\");\r\n\t\t\t\t}\r\n\t\t\t\twriter.close();\r\n\t\t\t\twriter = new BufferedWriter(new FileWriter(\"./SharedFiles1/FileList.txt\", true));\r\n\t\t\t\twriter.newLine();\r\n\t\t\t\twriter.write(file.FILE_NAME + \"::\" + file.DESCRIPTION);\r\n\t\t\t\twriter.close();\r\n\r\n\t\t\t\tNet_Util.send(serverSocket, \"register \" + file.FILE_NAME);\r\n\r\n\t\t\t\tcmdDisplay.setText(cmdDisplay.getText() + \"\\n\" + \"File \" + file.FILE_NAME + \" retrieved sucessfully\");\r\n\t\t\t} else {\r\n\t\t\t\tcmdDisplay.setText(cmdDisplay.getText() + \"\\n\" + \"You already have a file with this name\");\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\tcmdDisplay.setText(cmdDisplay.getText() + \"\\n\" + \"Couldn't send connect to file owner\");\r\n\t\t}\r\n\t}", "public void sendRequest(SimpleChannelHandler handler){\n fileServer.sendMessage(this.packet,new FileNode(ip,port),handler);\n }", "private void send(Object o) {\n try {\n System.out.println(\"02. -> Sending an object...\");\n os.writeObject(o);\n os.flush();\n } catch (Exception e) {\n System.out.println(\"XX. Exception Occurred on Sending:\" + e.toString());\n }\n }", "public void recFile(Packet packet) {\r\n\t\tjava.util.Date recDate = new java.util.Date();\r\n\t\tSystem.out.println(recDate + \": Received file \" + packet.fileName + \" from Peer Node \" + packet.packetSenderID);\r\n\t\t// rec file\r\n\t\tbyte[] buf = new byte[packet.totalFileSize];\r\n\t\t\r\n\t\t// unpack buf byte array into file buf arr\r\n\t\tfor(int i = 0; i < buf.length; i++)\r\n\t\t\tbuf[i] = packet.buf[i];\r\n\t\t\r\n\t\t// write to file\r\n\t\tFile file = new File(\"./\"+peerNode.fileDir,packet.fileName);\r\n\t\ttry {\r\n\t\t\tfileOutStream = new FileOutputStream(file);\r\n\t\t\tbufOutStream = new BufferedOutputStream(fileOutStream);\r\n\t\t\tbufOutStream.write(buf, 0, buf.length);\r\n\t\t\t\r\n\t\t\tfileOutStream.close();\r\n\t\t\tbufOutStream.close();\r\n\t\t\tcloseConnection();\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\t\tupdateDHT(packet);\r\n\t}", "private String uploadFile() {\n\n int serverResponseCode = 0;\n String serverResponseMessage = null;\n HttpURLConnection connection;\n DataOutputStream dataOutputStream;\n String lineEnd = \"\\r\\n\";\n String twoHyphens = \"--\";\n String boundary = \"*****\";\n\n int bytesRead, bytesAvailable, bufferSize;\n byte[] buffer;\n int maxBufferSize = 1 * 1024 * 1024;\n File selectedFile = new File(selectedFilePath);\n double len = selectedFile.length();\n\n String[] parts = selectedFilePath.split(\"/\");\n final String fileName = parts[parts.length - 1];\n\n if (!selectedFile.isFile()) {\n dialog.dismiss();\n\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n// tvFileName.setText(\"Source File Doesn't Exist: \" + selectedFilePath);\n }\n });\n return \"\";\n } else {\n try {\n String id = PreferenceStorage.getUserMasterId(getApplicationContext());\n String serviceId = ongoingService.getServiceOrderId();\n\n\n FileInputStream fileInputStream = new FileInputStream(selectedFile);\n String SERVER_URL = SkilExConstants.BUILD_URL + SkilExConstants.UPLOAD_BILL_DOCUMENT + \"\" + id + \"/\" + serviceId + \"/\";\n URI uri = new URI(SERVER_URL.replace(\" \", \"%20\"));\n String baseURL = uri.toString();\n URL url = new URL(baseURL);\n connection = (HttpURLConnection) url.openConnection();\n connection.setDoInput(true);//Allow Inputs\n connection.setDoOutput(true);//Allow Outputs\n connection.setUseCaches(false);//Don't use a cached Copy\n connection.setRequestMethod(\"POST\");\n connection.setRequestProperty(\"Connection\", \"Keep-Alive\");\n connection.setRequestProperty(\"ENCTYPE\", \"multipart/form-data\");\n connection.setRequestProperty(\"Content-Type\", \"multipart/form-data;boundary=\" + boundary);\n connection.setRequestProperty(\"bill_copy\", selectedFilePath);\n// connection.setRequestProperty(\"user_id\", id);\n// connection.setRequestProperty(\"doc_name\", title);\n// connection.setRequestProperty(\"doc_month_year\", start);\n\n //creating new dataoutputstream\n dataOutputStream = new DataOutputStream(connection.getOutputStream());\n\n //writing bytes to data outputstream\n dataOutputStream.writeBytes(twoHyphens + boundary + lineEnd);\n dataOutputStream.writeBytes(\"Content-Disposition: form-data; name=\\\"document_file\\\";filename=\\\"\"\n + selectedFilePath + \"\\\"\" + lineEnd);\n\n dataOutputStream.writeBytes(lineEnd);\n\n //returns no. of bytes present in fileInputStream\n bytesAvailable = fileInputStream.available();\n //selecting the buffer size as minimum of available bytes or 1 MB\n bufferSize = Math.min(bytesAvailable, maxBufferSize);\n //setting the buffer as byte array of size of bufferSize\n buffer = new byte[bufferSize];\n\n //reads bytes from FileInputStream(from 0th index of buffer to buffersize)\n bytesRead = fileInputStream.read(buffer, 0, bufferSize);\n\n //loop repeats till bytesRead = -1, i.e., no bytes are left to read\n while (bytesRead > 0) {\n //write the bytes read from inputstream\n dataOutputStream.write(buffer, 0, bufferSize);\n bytesAvailable = fileInputStream.available();\n bufferSize = Math.min(bytesAvailable, maxBufferSize);\n bytesRead = fileInputStream.read(buffer, 0, bufferSize);\n }\n\n dataOutputStream.writeBytes(lineEnd);\n dataOutputStream.writeBytes(twoHyphens + boundary + twoHyphens + lineEnd);\n\n serverResponseCode = connection.getResponseCode();\n serverResponseMessage = connection.getResponseMessage();\n\n Log.i(TAG, \"Server Response is: \" + serverResponseMessage + \": \" + serverResponseCode);\n\n //response code of 200 indicates the server status OK\n if (serverResponseCode == 200) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n// tvFileName.setText(\"File Upload completed.\\n\\n You can see the uploaded file here: \\n\\n\" + \"http://coderefer.com/extras/uploads/\"+ fileName);\n// tvFileName.setText(\"File Upload completed.\\n\\n\"+ fileName);\n }\n });\n }\n\n //closing the input and output streams\n fileInputStream.close();\n dataOutputStream.flush();\n dataOutputStream.close();\n\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(getApplicationContext(), \"File Not Found\", Toast.LENGTH_SHORT).show();\n }\n });\n } catch (MalformedURLException e) {\n e.printStackTrace();\n Toast.makeText(getApplicationContext(), \"URL error!\", Toast.LENGTH_SHORT).show();\n\n } catch (IOException e) {\n e.printStackTrace();\n Toast.makeText(getApplicationContext(), \"Cannot Read/Write File!\", Toast.LENGTH_SHORT).show();\n } catch (URISyntaxException e) {\n e.printStackTrace();\n }\n dialog.dismiss();\n return serverResponseMessage;\n }\n\n }", "void sendData() throws IOException\n\t{\n\t}", "private void send(Object o) {\n\t\ttry {\n\t\t\tSystem.out.println(\"02. -> Sending (\" + o +\") to the client.\");\n\t\t\tthis.os.writeObject(o);\n\t\t\tthis.os.flush();\n\t\t} \n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"XX.\" + e.getStackTrace());\n\t\t}\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif(e.getSource()==send){\n\t\t\tif (inputArea.getText() != null || inputArea.getText() != \"\") {\n\t\t\t\tmessage = new Message();\n\t\t\t\t// message.setIp(adress.getText());\n\t\t\t\t// message.setPort(port.getText());\n\t\t\t\tmessage.setContain(inputArea.getText());\n\t\t\t\tmessage.setFlag(\"single_chat\");\n\t\t\t\tmessage.setIp(ip);\n\t\t\t\tmessage.setPort(\"\");\n\n\t\t\t\ttry {\n\t\t\t\t\tos = socket.getOutputStream();\n\t\t\t\t\toos = new MyObjectOutputStream(os);\n\t\t\t\t\toos.writeObject(message);\n\t\t\t\t\toos.flush();\n\n\t\t\t\t\tThread.sleep(200);\n\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t} catch (InterruptedException 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\tdlmClinetMessage.addElement(message.getContain());\n\t\t\t\tinputArea.setText(\"\");\n\t\t\t} else {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"发送消息不能为空!\", \"错误\",\n\t\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t\t}\n\t\t}else if(e.getSource()==sendFile){\n\t\t\tJFileChooser jfc = new JFileChooser();\n\t\t\tjfc.setFileSelectionMode(JFileChooser.FILES_ONLY);\n\t\t\tjfc.showDialog(new JLabel(), \"选择\");\n\t\t\tFile file = jfc.getSelectedFile();\n\n\t\t\tif (file != null) {\n\t\t\t\tname = ou.queryOnlineUserNameByIp(\"/\" + ip\n\t\t\t\t\t\t );\n\t\t\t\tsetTitle(\"与\" + name + \"聊天中\");\n\n\t\t\t\tmessage = new Message();\n\t\t\t\t// message.setIp(adress.getText());\n\t\t\t\t// message.setPort(port.getText());\n\t\t\t\tmessage.setFlag(\"send_File\");\n\t\t\t\tmessage.setContain(file.getName());\n\t\t\t\tSystem.out.println(file.getFreeSpace());\n\t\t\t\tSystem.out.println(file.getTotalSpace());\n\t\t\t\tSystem.out.println(file.getUsableSpace());\n\t\t\t\t\n\t\t\t\tmessage.setIp(ip);\n\t\t\t\tmessage.setPort(\"\");\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tos = socket.getOutputStream();\n\t\t\t\t\toos = new MyObjectOutputStream(os);\n\t\t\t\t\toos.writeObject(message);\n\t\t\t\t\toos.flush();\n\t\t\t\t\tDataInputStream dis=new DataInputStream(new FileInputStream(file)); \n\t\t DataOutputStream dos=new DataOutputStream(socket.getOutputStream()); \n\t\t //ObjectOutputStream oos=new ObjectOutputStream(s.getOutputStream()); \n\t\t //oos.writeObject(f); \n\t\t dos.writeLong(file.length()); \n\t\t dos.writeUTF(file.getName()); \n\t\t System.out.println(\"长度:\"+file.length()); \n\t\t int count=-1,sum=0;\n\t\t byte[] buffer=new byte[1024*1024]; \n\t\t while((count=dis.read(buffer))!=-1){ \n\t\t dos.write(buffer,0,count); \n\t\t sum+=count; \n\t\t System.out.println(\"以传输\"+sum+\"byte\"); \n\t\t } \n\t\t System.out.println(\"发送完毕!\"); \n\t\t dos.flush();\n\t\t\t\t} catch (IOException e2) {\n\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\te2.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n//\t\t\t\tbyte[] buffer = new byte[1024];\n//\t\t\t\tFileInputStream fis = null;\n//\n//\t\t\t\t// 这里要重新new一个os\n//\n//\t\t\t\ttry {\n//\t\t\t\t\tos = socket.getOutputStream();\n//\t\t\t\t\toos = new MyObjectOutputStream(os);\n//\t\t\t\t\toos.writeObject(message);\n//\t\t\t\t\toos.flush();\n//\n//\t\t\t\t\tfis = new FileInputStream(file);\n//\n//\t\t\t\t\twhile (fis.read(buffer) > 0) {\n//\t\t\t\t\t\tos.write(buffer);\n//\t\t\t\t\t\tos.flush();\n//\t\t\t\t\t}\n//\t\t\t\t\t\n//\t\t\t\t} catch (IOException e1) {\n//\t\t\t\t\t// TODO Auto-generated catch block\n//\t\t\t\t\te1.printStackTrace();\n//\t\t\t\t}\n//\t\t\t\tdlmClinetMessage.addElement(\"成功发送:\" + file.getName());\n\t\t\t}\n\t\t}else if(e.getSource()==snake){\n\t\t\tnew Thread(new Runnable() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tfor (int i = 0; i < 20; i++) {// 使用for循环让窗体震动20次\n\t\t\t\t\t\tint newPoint = (int) (100 + Math.pow(-1, i) * 10);// 根据循环次数计算新点的位置\n\t\t\t\t\t\tsetLocation(newPoint, newPoint);// 设置窗体的显示位置\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tThread.sleep(50);// 线程休眠0.05秒来实现动态效果\n\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t}).start();// 启动新线程\n\t\t\t\n\t\t\tmessage = new Message();\n\t\t\t// message.setIp(adress.getText());\n\t\t\t// message.setPort(port.getText());\n\t\t\tmessage.setContain(\"发送了一个抖动!\");\n\t\t\tmessage.setFlag(\"snake\");\n\t\t\tmessage.setIp(ip);\n\t\t\tmessage.setPort(\"\");\n\n\t\t\ttry {\n\t\t\t\tos = socket.getOutputStream();\n\t\t\t\toos = new MyObjectOutputStream(os);\n\t\t\t\toos.writeObject(message);\n\t\t\t\toos.flush();\n\n\t\t\t\tThread.sleep(200);\n\t\t\t} catch (IOException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t} catch (InterruptedException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t\tdlmClinetMessage.addElement(\"你发送了一个抖动!\");\n\t\t}\n\t}", "public void sendResponse(int dest, String file) throws UnknownHostException, SocketException, IOException {\n InetAddress IPAddress = InetAddress.getByName(\"127.0.0.1\");\n\n // Canal de comunicação não orientado à conexão\n //DatagramSocket serverSocket = new DatagramSocket();\n\n // Passa o caminho do arquivo\n final byte[] sendData = (this.home + file).getBytes();\n\n // Criando pacote com base no endereco do cliente\n DatagramPacket sendPacket\n = new DatagramPacket(sendData, sendData.length,\n IPAddress, dest);\n\n this.getServerSocket().send(sendPacket);\n }", "@Override\n public void doDataReceived(ResourceDataMessage dataMessage) {\n if(outputStream == null) return;\n if(startTime == 0) startTime = System.nanoTime();\n if (this.getTunnel() == null)\n this.setTunnel(dataMessage.getNetworkMessage().getTunnel());\n\n EventManager.callEvent(new ResourceTransferDataReceivedEvent(this, dataMessage));\n\n try {\n if (dataMessage.getResourceData().length != 0) {\n //Saving received chunks\n byte[] chunk = dataMessage.getResourceData();\n written += chunk.length;\n double speedInMBps = NANOS_PER_SECOND / BYTES_PER_MIB * written / (System.nanoTime() - startTime + 1);\n System.out.println();\n logger.info(\"Receiving file: {} | {}% ({}MB/s)\", this.getResource().attributes.get(1), ((float) written / (float) fileLength) * 100f, speedInMBps);\n\n //add to 4mb buffer\n System.arraycopy(chunk, 0, buffer, saved, chunk.length);\n saved += chunk.length;\n if (buffer.length - saved < BUFFER_SIZE || written >= fileLength) {\n //save and clear buffer\n outputStream.write(buffer, 0, saved);\n saved = 0;\n }\n\n\n if (written >= fileLength) {\n this.close();\n }\n } else {\n //Empty chunk, ending the transfer and closing the file.\n logger.info(\"Empty chunk received for: {}, ending the transfer...\", this.getResource().attributes.get(1));\n\n //File fully received.\n this.close();\n }\n } catch (Exception e) {\n callError(e);\n }\n }", "public void send() {\n\t}", "public static void sendFileOnce(File file, String servIpAddr)\n\t\t\tthrows UnknownHostException, IOException, InterruptedException {\n\t\t// Initialize string transfer module and send the string\n\t\tSendString clientStringTrans = new SendString(file.getName(), servIpAddr);\n\t\tclientStringTrans.sendString();\n\n\t\t// Allow enough time for the invocation to happen on the server\n\t\tThread.sleep(3000);\n\n\t\t// Initialize file transfer module and transfer the file\n\t\tSendFile clientFileTrans = new SendFile(file.getPath(), servIpAddr);\n\t\tclientFileTrans.sendFile();\n\t}", "private void sendData(String message) {\n\t\t\ttry {\n\t\t\t\toutput.writeObject(message);\n\t\t\t\toutput.flush(); // flush output to client\n\t\t\t} catch (IOException ioException) {\n\t\t\t\tSystem.out.println(\"\\nError writing object\");\n\t\t\t}\n\t\t}", "private void sendData() {\n\n Thread update = new Thread() {\n public void run() {\n while (opModeIsActive() && (tfod != null)) {\n path.updateTFODData(recognize());\n path.updateHeading();\n try {\n Thread.sleep(500);\n } catch (Exception e) {\n }\n if (isStopRequested() && tfod != null)\n tfod.shutdown();\n }\n }\n };\n update.start();\n }", "public synchronized void run() {\n try {\n String data = in.readUTF();\n String response = FileRequestService.handleRequest(data, sharedWriteQueueService);\n out.writeUTF(response);\n System.out.println(\"server wrote:\" + response);\n } catch(EOFException e) {\n System.out.println(\"EOF:\" + e.getLocalizedMessage() + \" \" + e);\n } catch(IOException e) {\n System.out.println(\"IO:\" + e.getLocalizedMessage() + \" \" + e);\n } finally { \n try {\n clientSocket.close();\n } catch (IOException e){\n System.out.println(\"close:\" + e.getMessage());\n }\n }\n }", "public Object sendFile(File file, int chatType, FileSendConversation xferCon)\n throws Exception {\n // If this chat transport does not support file transfer we do nothing and just return.\n if (!allowsFileTransfer())\n return null;\n\n return httpFileUpload(file, chatType, xferCon);\n // return MetaContactChatTransport.httpFileUpload(chatRoom, file, chatType, xferCon, httpFileUploadManager);\n }", "public void send(byte[] data) throws IOException {\n dataOutput.write(data);\n dataOutput.flush();\n }", "public String getReceiveFile() {\n return receiveFile;\n }", "private void send(Object o) {\r\n try {\r\n System.out.println(\"02. -> Sending (\" + o +\") to the client.\");\r\n this.os.writeObject(o);\r\n this.os.flush();\r\n } \r\n catch (Exception e) {\r\n System.out.println(\"XX.\" + e.getStackTrace());\r\n }\r\n }", "void fileSendFailed(IMSession session, String requestId, String fileId, ReasonInfo reason);", "public sendFile_args(sendFile_args other) {\n if (other.isSetT()) {\n this.t = new TFileAndStart(other.t);\n }\n }", "public void forwardResponse(int dest, String file) throws UnknownHostException, SocketException, IOException {\n InetAddress IPAddress = InetAddress.getByName(\"127.0.0.1\");\n\n // Canal de comunicação não orientado à conexão\n //DatagramSocket serverSocket = new DatagramSocket();\n\n // Montando a mensagem a ser enviada\n String msg = file + \"#\" + this.getClient() + \"#\" + this.getTtl();\n\n // Preenche o buffer de envio\n final byte[] sendData = msg.getBytes();\n\n // Montando o pacote com o offset do tamanho do nome do arquivo.\n DatagramPacket sendPacket \n = new DatagramPacket(sendData, sendData.length,\n IPAddress, dest);\n\n this.getServerSocket().send(sendPacket);\n\n // Reseta o ttl para o Peer em questao\n //this.setTtl(Peer.TTLREFERENCE);\n }", "public int send2FtpServer()\n\t{\n\t\tCoFile file = null;\n\t\tCoFile to = null;\n\t\tString filename = \"\";\n\t\tString dest_filename = \"\";\n\t\tString sum_line = \"\";\n\t\tboolean loadResult = false;\n\t\tboolean renameFileResult = false;\n\t\tfor (int i = 0; i < vFiles.size(); i++)\n\t\t{\n\t\t\tfilename = ((File) (vFiles.elementAt(i))).getName();\n\t\t\t/* source FtpFile remote file */\n\t\t\tfile = new LocalFile(FtpData.LOCAL_FOLDER, filename);\n\t\t\t// System.out.println(\"From: \" + file.toString());\n\t\t\t/* destination LocalFile home dir */\n\t\t\t// ---------------------count ftp file\n\t\t\t// site--------------------------------\n\t\t\tFile f = new File(FtpData.LOCAL_FOLDER + \"/\" + filename);\n\t\t\tString fileLength = String.valueOf(f.length());\n\t\t\t// System.out.println(\"file size: \" + fileLength);\n\t\t\t// ---------------------count ftp file\n\t\t\t// site--------------------------------\n\n\t\t\tto = new FtpFile(\"tmp_\" + filename, this.ftp);\n\n\t\t\t// System.out.println(\"To: \" + to.toString());\n\t\t\t/* download file */\n\t\t\tloadResult = CoLoad.copy(to, file);\n\t\t\tLogger.info(\"FTP-SIZE: \" + loadResult);\n\t\t\t// System.out.println(\"Load: \" + loadResult);\n\t\t\t// rename file sau khi ftp sang\n\t\t\t// System.out.print(\"Start rename file cdr: \" + \"tmp_\" + filename +\n\t\t\t// \"-->\" + filename);\n\t\t\trenameFileResult = this.ftp.mv( \"tmp_\" + filename, \"\" + filename);\n\t\t\t// System.out.println(\"Rename: \" + renameFileResult);\n\t\t\tLogger.info(\"FTP-RENAME: \" + renameFileResult);\n\t\t\tif (loadResult && renameFileResult)\n\t\t\t{ // ok -->delete file.\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tString sDateFolder = DateProc.Timestamp2YYYYMMDD(DateProc.createTimestamp(), \"\");\n\n\t\t\t\t\t// File dest_dir = new File(FtpData.SENT_FOLDER + \"\\\\\" +\n\t\t\t\t\t// sDateFolder);\n\t\t\t\t\tFile dest_dir = new File(FtpData.SENT_FOLDER_VMS + \"/\" + sDateFolder);\n\n\t\t\t\t\tboolean exists = dest_dir.exists();\n\t\t\t\t\tif (!exists)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Directory does not exist --> create it\n\t\t\t\t\t\tboolean success = dest_dir.mkdirs();\n\t\t\t\t\t}\n\t\t\t\t\t// fileTool.copy(FtpData.LOCAL_FOLDER + \"\\\\\" +\n\t\t\t\t\t// file.getName(),\n\t\t\t\t\t// FtpData.SENT_FOLDER + \"\\\\\" + sDateFolder + \"\\\\\" +\n\t\t\t\t\t// file.getName());\n\t\t\t\t\tfileTool.copy(FtpData.LOCAL_FOLDER + \"/\" + file.getName(), FtpData.SENT_FOLDER_VMS + \"/\" + sDateFolder + \"/\" + file.getName());\n\t\t\t\t\t\n\t\t\t\t\tLogger.info(\"backup file: from: \" + FtpData.LOCAL_FOLDER + \"/\" + file.getName() + \" to: \" + FtpData.SENT_FOLDER_VMS + \"/\" + sDateFolder\n\t\t\t\t\t\t\t+ \"/\" + file.getName());\n\t\t\t\t\tfile.delete();\n\t\t\t\t\tCdrFilename4vms.setNewFilenameVMS(filename);\n\t\t\t\t\tLogger.info(\"FTP : file name: \" + filename + \"# filesize: \" + fileLength + \" bytes\");\n\t\t\t\t}\n\t\t\t\tcatch (IOException ex)\n\t\t\t\t{\n\t\t\t\t\tex.printStackTrace();\n\t\t\t\t\tLogger.info(\"FTP\", ex.getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tif ((loadResult = false) && (renameFileResult = true))\n\t\t\t\t\t{\n\t\t\t\t\t\t// DBTools.log_alert(Preference.sourceAddressList.toString(),\n\t\t\t\t\t\t// \"CDR->FTP\",\n\t\t\t\t\t\t// \"<-\" + Preference.mobileOperator +\n\t\t\t\t\t\t// \"-> ERROR: Khong ftp duoc file cuoc sang telcos!\",\n\t\t\t\t\t\t// 1, Preference.alert_person,\n\t\t\t\t\t\t// Preference.alert_mobile);\n\t\t\t\t\t\tDBTools.log_alert(\"Billing system\", \"-> ERROR: Khong ftp duoc file cuoc sang telcos! \", 1, 0, \"serious\", Preference.alert_person);\n\t\t\t\t\t}\n\t\t\t\t\telse if ((loadResult = true) && (renameFileResult = false))\n\t\t\t\t\t{\n\t\t\t\t\t\t// DBTools.log_alert(Preference.sourceAddressList.toString(),\n\t\t\t\t\t\t// \"CDR->FTP\",\n\t\t\t\t\t\t// \"<-\" + Preference.mobileOperator +\n\t\t\t\t\t\t// \"-> ERROR: Khong rename duoc file cuoc sau khi ftp sang telcos!\",\n\t\t\t\t\t\t// 1, Preference.alert_person,\n\t\t\t\t\t\t// Preference.alert_mobile);\n\t\t\t\t\t\tDBTools.log_alert(\"Billing system\", \"-> ERROR: Khong rename duoc file cuoc sau khi ftp ! \", 1, 0, \"serious\", Preference.alert_person);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t// DBTools.log_alert(Preference.sourceAddressList.toString(),\n\t\t\t\t\t\t// \"CDR->FTP\",\n\t\t\t\t\t\t// \"<-\" + Preference.mobileOperator +\n\t\t\t\t\t\t// \"-> ERROR: Loi ftp file cuoc\",\n\t\t\t\t\t\t// 1, Preference.alert_person, Preference.alert_mobile);\n\t\t\t\t\t\tDBTools.log_alert(\"Billing system\", \"-> ERROR: Loi ftp file cuoc ! \", 1, 0, \"serious\", Preference.alert_person);\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tcatch (Exception e)\n\t\t\t\t{\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn this.vFiles.size();\n\t}", "private void saveFile(String filename, InputStream in) throws Exception {\r\n\r\n String dir = mReceiverInfo.getAttachmentDir();\r\n String separator = \"\";\r\n\r\n File storefile = new File(MimeUtility.decodeText(dir) +\r\n MimeUtility.decodeText(separator) +\r\n MimeUtility.decodeText(filename));\r\n BufferedOutputStream bos = null;\r\n BufferedInputStream bis = null;\r\n\r\n try {\r\n\r\n bos = new BufferedOutputStream(new FileOutputStream(storefile));\r\n bis = new BufferedInputStream(in);\r\n\r\n int c;\r\n\r\n while ((c = bis.read()) != -1) {\r\n bos.write(c);\r\n bos.flush();\r\n }\r\n }\r\n catch (Exception e) {\r\n e.printStackTrace();\r\n throw new Exception(\"Failed saving file!\");\r\n }\r\n finally {\r\n bos.close();\r\n bis.close();\r\n }\r\n }", "private void Upload(ByteBuffer packet) throws RuntimeException, IOException{\n\t\t// given packet w/no header!\n\t\t// (for uploading request c->s) [header | filesize(8) | filename(?)]\n\t\t// (for upload acknowledgement s->c) [header | already exists (1) | file id (4)]\n\t\t\n\t\t// parse the req\n\t\tif (packet.capacity() < 4)\n\t\t\tthrow new RuntimeException(\n\t\t\t\t\t\"filename not correctly uploaded\");\n\t\tlong buf_size = packet.getLong(0);\n\t\tString buf_name = \"\";\n\t\tfor (int i = 0; i < buf.capacity(); i++){\n\t\t\tif (buf.get(8 +i) == '\\0')\n\t\t\t\tbreak;\n\t\t\tbuf_name += (char)buf.get(8 + i);\n\t\t}\n\t\tif (buf_name.length() == 0)\n\t\t\tthrow new RuntimeException(\n\t\t\t\t\t\"filename not correctly uploaded\");\n\t\t\n\t\tint id = buf_name.hashCode() + (int)buf_size;\n\t\tboolean add = true;\n\t\tfor (ClientObj c : clients)\n\t\t\tif (c.hasFile(id)) // Check for duplicate id's, which would be problematic\n\t\t\t\tadd = false;\n\t\tbyte exists = 0;\n\t\tif (add)\n\t\t\tclient.addUpload(new ServerFile(buf_name, buf_size, id));\n\t\telse {\n\t\t\tfor (ServerFile f : totalFiles().keySet())\n\t\t\t\tif (f.id() == id)\n\t\t\t\t\tclient.addUpload(f);\n\t\t\texists = 1;\n\t\t}\n\t\tSystem.out.println(client.getAddress() + \": Correctly processed upload req for \" + buf_name \n\t\t\t\t+ \" with size \" + buf_size + \" bytes and id \" + id);\n\t\t\n\t\t//construct/send response\n\t\tbuf = Utility.addHeader(3, 5, client.getId());\n\t\tbuf.put(Constants.HEADER_LEN, exists);\n\t\tbuf.putInt(Constants.HEADER_LEN + 1, id);\n\t\tbyte[] sendData = buf.array();\n\t\t\n\t\t// send response\n\t\tout.write(sendData);\n\t\tout.flush();\n\t}", "public final Message sendAudioFile(AudioFileToSend afs)\n\t{\n\t\tif(afs == null)\n\t\t\treturn null;\n\t\treturn rm.sendAudioFile(afs);\n\t}", "public void send(Serializable msg) throws IOException;", "public void SerialWriteFile() {\r\n\r\n PrintWriter pwrite = null;\r\n File fileObject = new File(getName());\r\n QuizPlayer q = new QuizPlayer(getName(), getNickname(), getTotalScore());\r\n\r\n try {\r\n ObjectOutputStream outputStream =\r\n new ObjectOutputStream(new FileOutputStream(fileObject));\r\n\r\n outputStream.writeObject(q); //Writes the object to the serialized file.\r\n outputStream.close();\r\n\r\n\r\n } catch (IOException e) {\r\n System.out.println(\"Problem with file output.\");\r\n }\r\n\r\n }", "public void IntercambiarArchivos(byte[] archivoSinCifrar) {\r\n\t\ttry {\r\n\t\t\tString entry;\r\n\t\t\tServerSocket socketServidor = new ServerSocket();\r\n\t\t\tSocket client = socketServidor.accept();\r\n\t\t\t\r\n\t\t\tObjectOutputStream oos = new ObjectOutputStream(client.getOutputStream());\r\n\t ObjectInputStream ois = new ObjectInputStream(client.getInputStream());\r\n\t \t \r\n\t BufferedReader inFromClient = new BufferedReader(new InputStreamReader(client.getInputStream()));\r\n\t BufferedWriter OutFromServer = new BufferedWriter( new OutputStreamWriter(client.getOutputStream() ) );\r\n\t \r\n\t OutputStream in = client.getOutputStream();\r\n\t DataOutputStream dataOut = new DataOutputStream(in);\r\n\t \r\n\t OutFromServer.write(\"GENERAR DH\");\r\n\t entry = inFromClient.readLine();\r\n\t if(entry.equals(\"LISTO PARA GENERAR DH\")) {\r\n\t \t\r\n\t }\r\n\t \r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}" ]
[ "0.74889624", "0.73030704", "0.6981207", "0.6939952", "0.68943626", "0.6842085", "0.68238556", "0.682013", "0.6786539", "0.65551126", "0.6516379", "0.6508259", "0.6454971", "0.6420172", "0.63919365", "0.6361465", "0.63140553", "0.6166683", "0.61529785", "0.6145482", "0.61363065", "0.61221284", "0.6103089", "0.60981506", "0.6030734", "0.60127544", "0.60086447", "0.6008547", "0.59408957", "0.5940116", "0.59374905", "0.5909798", "0.59034336", "0.58956045", "0.58906233", "0.5877383", "0.58746237", "0.5867571", "0.5855226", "0.5849707", "0.5846542", "0.5825595", "0.5817259", "0.5815428", "0.5795213", "0.574471", "0.5707494", "0.5697919", "0.5694472", "0.5689897", "0.5674334", "0.56639326", "0.56432205", "0.5640585", "0.56290627", "0.5613115", "0.5603608", "0.5575258", "0.5544463", "0.5542772", "0.5530234", "0.55301744", "0.5518906", "0.55157226", "0.55123067", "0.5509458", "0.5507029", "0.549764", "0.5492881", "0.5486912", "0.54812515", "0.54794276", "0.5479", "0.5464084", "0.5462295", "0.54568636", "0.5454226", "0.5450067", "0.54450804", "0.5443096", "0.54423445", "0.5441713", "0.543281", "0.54161996", "0.54070514", "0.5395117", "0.53924406", "0.53877515", "0.5376707", "0.5376524", "0.5375785", "0.5374098", "0.5373393", "0.53649795", "0.5363991", "0.5349506", "0.53447163", "0.53303045", "0.53285235", "0.5328011" ]
0.63878
15
Um pra um Sem Chave Estrangeira
public boolean existeListaCategoriaLoja_Possui() { return listacategoriaLojaPossui!= null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void sacarPaseo(){\r\n\t\t\tSystem.out.println(\"Por las tardes me saca de paseo mi dueño\");\r\n\t\t\t\r\n\t\t}", "public int jogadorAtual() {\n return vez;\n }", "public void hora()\n {\n horaTotal = HoraSalida - HoraLlegada;\n\n }", "public DayOfWeek primeiroDiaSemanaAno(int ano);", "public void introducirhora(){\n int horadespertar; \n }", "public java.lang.String getHora_hasta();", "public boolean HayObstaculo(int avenida, int calle);", "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 }", "public String estadoAlum() {\n String informacion = \"\";\n if (getProm() >= 60) {\n setCad(\"USTED APRUEBA CON TOTAL EXITO\");\n } else {\n if (getProm() <= 59) {\n setCad(\"REPROBADO\");\n }\n }\n return getCad();\n }", "private String elaboraAvvisoScrittura() {\n String testo = VUOTA;\n\n if (usaHeadNonScrivere) {\n testo += TAG_NON_SCRIVERE;\n testo += A_CAPO;\n }// end of if cycle\n\n return testo;\n }", "public void hallarPerimetroEscaleno() {\r\n this.perimetro = this.ladoA+this.ladoB+this.ladoC;\r\n }", "public void estiloAcierto() {\r\n\t\t /**Bea y Jose**/\t\t\r\n \r\n\t}", "public Resposta(String palavraChave){\n this.palavraChave = palavraChave;\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 }", "public boolean HayPapelEnLaEsquina(int avenida, int calle);", "public static void atacar(){\n int aleatorio; //variables locales a utilizar\n Random numeroAleatorio = new Random(); //declarando variables tipo random para aleatoriedad\n int ataqueJugador;\n //acciones de la funcion atacar sobre vida del enemigo\n aleatorio = (numeroAleatorio.nextInt(20-10+1)+10);\n ataqueJugador= ((nivel+1)*10)+aleatorio;\n puntosDeVidaEnemigo= puntosDeVidaEnemigo-ataqueJugador;\n \n }", "public void pridejNovePivo ()\n\t{\n\t\n\t\tpivo = pivo + PRODUKCE;\n\t\t\n\t}", "public boolean fechaVigente(String fechafinal, String horafinal)\r\n\t{\r\n\t\tboolean vigente = true;\r\n\t\tGregorianCalendar calendario = new GregorianCalendar();\r\n\t\tint añoactual = calendario.get(Calendar.YEAR);\r\n\t\tint mesactual = (calendario.get(Calendar.MONTH)+1);\r\n\t\tint diaactual = calendario.get(Calendar.DAY_OF_MONTH);\r\n\t\tString fechaactual = añoactual+\"-\"+mesactual+\"-\"+diaactual;\r\n\t\tint horasactuales = calendario.get(Calendar.HOUR_OF_DAY);\r\n\t\tint minutosactuales = calendario.get(Calendar.MINUTE);\r\n\t\tint segundosactuales = calendario.get(Calendar.SECOND);\r\n\t\tString horaactual = horasactuales+\":\"+minutosactuales+\":\"+segundosactuales;\r\n\t\t\r\n\t\tint añofinal = 0;\r\n\t\tint mesfinal = 0;\r\n\t\tint diafinal = 0;\r\n\t\t\r\n\t\tint horasfinales = 0;\r\n\t\tint minutosfinales = 0;\r\n\t\tint segundosfinales = 0;\r\n\r\n\t\tString numerofecha = \"\";\r\n\t\tfor (int i = 0; i < (fechafinal.length()); i++) \r\n\t\t{\r\n\t\t\tchar digito = fechafinal.charAt(i);\r\n\t\t\tif(digito == '0' || digito == '1' || digito == '2' || digito == '3' || digito == '4' || digito == '5' || digito == '6' || digito == '7' || digito == '8' || digito == '9')\r\n\t\t\t{\r\n\t\t\t\tnumerofecha += digito;\r\n\t\t\t\tif((i+1) == (fechafinal.length()))\r\n\t\t\t\t{\r\n\t\t\t\t\tif(añofinal == 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tañofinal = Integer.parseInt(numerofecha);\r\n\t\t\t\t\t\tnumerofecha = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(mesfinal == 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tmesfinal = Integer.parseInt(numerofecha);\r\n\t\t\t\t\t\tnumerofecha = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(diafinal == 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tdiafinal = Integer.parseInt(numerofecha);\r\n\t\t\t\t\t\tnumerofecha = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tif(añofinal == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tañofinal = Integer.parseInt(numerofecha);\r\n\t\t\t\t\tnumerofecha = \"\";\r\n\t\t\t\t}\r\n\t\t\t\telse if(mesfinal == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tmesfinal = Integer.parseInt(numerofecha);\r\n\t\t\t\t\tnumerofecha = \"\";\r\n\t\t\t\t}\r\n\t\t\t\telse if(diafinal == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tdiafinal = Integer.parseInt(numerofecha);\r\n\t\t\t\t\tnumerofecha = \"\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tString numerohora = \"\";\r\n\t\tfor (int i = 0; i < (horafinal.length()); i++) \r\n\t\t{\r\n\t\t\tchar digito = horafinal.charAt(i);\r\n\t\t\tif(digito == '0' || digito == '1' || digito == '2' || digito == '3' || digito == '4' || digito == '5' || digito == '6' || digito == '7' || digito == '8' || digito == '9')\r\n\t\t\t{\r\n\t\t\t\tnumerohora += digito;\r\n\t\t\t\tif((i+1) == (horafinal.length()))\r\n\t\t\t\t{\r\n\t\t\t\t\tif(horasfinales == 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\thorasfinales = Integer.parseInt(numerohora);\r\n\t\t\t\t\t\tnumerohora = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(minutosfinales == 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tminutosfinales = Integer.parseInt(numerohora);\r\n\t\t\t\t\t\tnumerohora = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if(segundosfinales == 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tsegundosfinales = Integer.parseInt(numerohora);\r\n\t\t\t\t\t\tnumerohora = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tif(horasfinales == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\thorasfinales = Integer.parseInt(numerohora);\r\n\t\t\t\t\tnumerohora = \"\";\r\n\t\t\t\t}\r\n\t\t\t\telse if(minutosfinales == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tminutosfinales = Integer.parseInt(numerohora);\r\n\t\t\t\t\tnumerohora = \"\";\r\n\t\t\t\t}\r\n\t\t\t\telse if(segundosfinales == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\tsegundosfinales = Integer.parseInt(numerohora);\r\n\t\t\t\t\tnumerohora = \"\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tString fechafinal2 = añofinal+\"-\"+mesfinal+\"-\"+diafinal;\r\n\t\tString horafinal2 = horasfinales+\":\"+minutosfinales+\":\"+segundosfinales;\r\n\t\tif(añoactual >= añofinal)\r\n\t\t{\r\n\t\t\tif(mesactual >= mesfinal)\r\n\t\t\t{\r\n\t\t\t\tif(diaactual >= diafinal)\r\n\t\t\t\t{\r\n\t\t\t\t\tif(horasactuales >= horasfinales)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(minutosactuales >= minutosfinales)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tvigente = false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn vigente;\r\n\t}", "private void comerFantasma(Fantasma fantasma) {\n // TODO implement here\n }", "@Override\r\n public void hallarPerimetro() {\r\n this.perimetro = this.ladoA*3;\r\n }", "public void orina() {\n System.out.println(\"Que bien me quedé! Deposito vaciado.\");\n }", "public void anterior() {\n canalAtual--;\n televisao.mudarCanal(canalAtual);\n }", "public FaseDescartes faseJuego();", "public boolean HayFlorEnLaEsquina(int avenida, int calle);", "public void reagir(int hora) {\n if (hora < 12) {\n System.out.println(\"abanar\");\n } else {\n System.out.println(\"ignorar\");\n }\n }", "public static void dormir(){\n System.out.print(\"\\033[H\\033[2J\");//limpia pantalla\n System.out.flush();\n int restoDeMana; //variables locales a utilizar\n int restoDeVida;\n if(oro>=30){ //condicion de oro para recuperar vida y mana\n restoDeMana=10-puntosDeMana;\n puntosDeMana=puntosDeMana+restoDeMana;\n restoDeVida=150-puntosDeVida;\n puntosDeVida=puntosDeVida+restoDeVida;\n //descotando oro al jugador\n oro=oro-30;\n System.out.println(\"\\nrecuperacion satisfactoria\");\n }\n else{\n System.out.println(\"no cuentas con 'Oro' para recuperarte\");\n }\n }", "public Farbe fuehrendesKamel();", "public String vystiskniCestu(){\n\t\t\n\t\tString vypis = \"Euleruv tah : \" + cesta.get(cesta.size()-1);\n\t\tfor(int i = cesta.size()-2 ; i >= 0;i--){\n\t\t\tvypis += \" -> \" + cesta.get(i);\n\t\t}\n\t\t\n\t\treturn vypis;\n\t}", "public String annulerRv(){\n\t\t// Traitement ici ... \n\t\treturn AFFICHER;\n\t}", "public static void pocetniMeni() {\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"***********************************************\\n\"\r\n\t\t\t\t\t\t+ \"Unesite 1 ako zelite vidjeti kalendar(za dati mjesec i godinu)\\n\"\r\n\t\t\t\t\t\t+ \"Unesite 2 za pregled podsjetnika za dati mjesec i godinu\\n\"\r\n\t\t\t\t\t\t+ \"Unesite 3 da pregledate podsjetnik za datu godinu\\n\"\r\n\t\t\t\t\t\t+ \"Unesite 4 ako zelite da pogledate sve podsjetnike!\\n\"\r\n\t\t\t\t\t\t+ \"Unesite 5 ako zelite da upisete neki podsjetnik!\\n\"\r\n\t\t\t\t\t\t+ \":::::::::::::::::::::::::::::::::::::::::::::::\");\r\n\t}", "public void sueldo(){\n if(horas <= 40){\n sueldo = horas * cuota;\n }else {\n if (horas <= 50) {\n sueldo = (40 * cuota) + ((horas - 40) * (cuota * 2));\n } else {\n sueldo = ((40 * cuota) + (10 * cuota * 2)) + ((horas - 50) + (cuota * 3));\n }\n }\n\n }", "public static void main(String[] arhg) {\n\n Conta p1 = new Conta();\n p1.setNumConta(1515);\n p1.abrirConta(\"cp\");\n p1.setDono(\"wesley\");\n p1.deposita(500);\n // p1.saca(700); -> irá gera um erro pois o valor de saque especificado é superior ao valor que tem na conta\n\n p1.estadoAtual();\n }", "public void cumplirAños(){\n this.setEdad(((byte)(this.getEdad()+1)));\n }", "public int idade() {\n\t\treturn 2020 - anoNascimento;\n\t}", "Bicho evolucionar(int bicho);", "@Override\r\n public String AggiungiQualcosa() {\r\n// ritorna una stringa\r\n// perché qui ho informazioni in più\r\n return \"\\ne capace di friggere un uovo\";\r\n }", "int obtenerCapital(){\n int capital, valorPropiedades = 0, numEdificaciones = 0;\n \n //Calculamos el valor de todas las propiedades del jugador.\n for(TituloPropiedad propiedad: this.propiedades){\n \n //Obtenemos el número de edificacionesque tiene el titulo de propiedad. cada hotel equivale a cuatro casas mas coste edificación.\n numEdificaciones = propiedad.getCasilla().getNumCasas() + propiedad.getCasilla().getNumHoteles();\n \n //Valor total de la propiedad\n valorPropiedades = valorPropiedades + propiedad.getAlquilerBase() +(numEdificaciones * propiedad.getPrecioEdificar());\n \n if(propiedad.isHipotecada())\n valorPropiedades = valorPropiedades - propiedad.getHipotecaBase();\n }\n \n capital = valorPropiedades + this.saldo;\n \n return capital;\n }", "@Override\r\n\tpublic void hacerSonido() {\n\t\tSystem.out.print(\"miau,miau -- o depende\");\r\n\t\t\r\n\t}", "private void girar(int delta){\r\n\t\tang = angDestino;\r\n\t}", "public String getCalidad()\n {\n String cadenaADevolver = \"\";\n \n cadenaADevolver = (calidad >= FULLHD) ? \"FullHD\" : \"HD\";\n \n return cadenaADevolver;\n }", "private static void afisareSubsecventaMaxima() {\n afisareSir(citireSir().SecvMax());\n }", "static void cetak_data(String nama, int usia) {\n int tahun_sekarang = 2020, tahun_lahir = tahun_sekarang - usia;\r\n System.out.println(\"---------\\nNama Saya : \" + nama + \"\\nUsia Saya : \" + usia + \"\\nTahun Lahir : \" + tahun_lahir);\r\n }", "public void VaciarPila()\n {\n this.tope = 0;\n }", "public String saludoCastellano () {\n\t\treturn \"hola\";\n\t}", "@Override\n public void subida(){\n // si es mayor a la eperiencia maxima sube de lo contrario no\n if (experiencia>(100*nivel)){\n System.out.println(\"Acabas de subir de nivel\");\n nivel++;\n System.out.println(\"Nievel: \"+nivel);\n }else {\n\n }\n }", "public 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 }", "@Override\n\tpublic void teclaCorrigeDigitada() {\n\t\t\n\t}", "private void asignaNombre() {\r\n\r\n\t\tswitch (this.getNumero()) {\r\n\r\n\t\tcase 1:\r\n\t\t\tthis.setNombre(\"As de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 2:\r\n\t\t\tthis.setNombre(\"Dos de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 3:\r\n\t\t\tthis.setNombre(\"Tres de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 4:\r\n\t\t\tthis.setNombre(\"Cuatro de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 5:\r\n\t\t\tthis.setNombre(\"Cinco de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 6:\r\n\t\t\tthis.setNombre(\"Seis de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 7:\r\n\t\t\tthis.setNombre(\"Siete de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 10:\r\n\t\t\tthis.setNombre(\"Diez de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 11:\r\n\t\t\tthis.setNombre(\"Once de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\tcase 12:\r\n\t\t\tthis.setNombre(\"Doce de \" + this.getPalo());\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}", "@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 }", "public void setObstaculo(int avenida, int calle);", "@Override\n public void cantidad_Ataque(){\n ataque=5+2*nivel+aumentoT;\n }", "public int elimiarAlInicio(){\n int edad = inicio.edad;\n if(inicio==fin){\n inicio=fin=null;\n }else{\n inicio=inicio.siguiente;\n }\n return edad;\n }", "public void daiMedicina() {\n System.out.println(\"Vuoi curare \" + nome + \" per 200 Tam? S/N\");\n String temp = creaturaIn.next();\n if (temp.equals(\"s\") || temp.equals(\"S\")) {\n puntiVita += 60;\n soldiTam -= 200;\n }\n checkStato();\n }", "public Fecha () {\n\t\tthis.ahora = Calendar.getInstance();\n\t\tahora.set(2018, 3, 1, 15, 15, 0);\t \n\t\taño = ahora.get(Calendar.YEAR);\n\t\tmes = ahora.get(Calendar.MONTH) + 1; // 1 (ENERO) y 12 (DICIEMBRE)\n\t\tdia = ahora.get(Calendar.DAY_OF_MONTH);\n\t\thr_12 = ahora.get(Calendar.HOUR);\n\t\thr_24 = ahora.get(Calendar.HOUR_OF_DAY);\n\t\tmin = ahora.get(Calendar.MINUTE);\n\t\tseg = ahora.get(Calendar.SECOND);\n\t\tam_pm = v_am_pm[ahora.get(Calendar.AM_PM)]; //ahora.get(Calendar.AM_PM)=> 0 (AM) y 1 (PM)\n\t\tmes_nombre = v_mes_nombre[ahora.get(Calendar.MONTH)];\n\t\tdia_nombre = v_dia_nombre[ahora.get(Calendar.DAY_OF_WEEK) - 1];\n\n\t}", "@RequiresApi(api = Build.VERSION_CODES.O)\n private String obtenerSegundos(){\n try{\n this.minutos = java.time.LocalDateTime.now().toString().substring(17,19);\n }catch (StringIndexOutOfBoundsException sioobe){\n this.segundos = \"00\";\n }\n return this.minutos;\n }", "@Override\r\n\tpublic double obliczCenePoRabacie(double cena){\n\t\tcena = cena - kwotaRabatu;\r\n\t\treturn cena;\r\n\t\t\r\n\t}", "private static void cajas() {\n\t\t\n\t}", "public void aumentarMinas(){\n\r\n if(espM==false){\r\n minascerca++;\r\n }\r\n }", "public void fechahoy(){\n Date fecha = new Date();\n \n Calendar c1 = Calendar.getInstance();\n Calendar c2 = new GregorianCalendar();\n \n String dia = Integer.toString(c1.get(Calendar.DATE));\n String mes = Integer.toString(c2.get(Calendar.MONTH));\n int mm = Integer.parseInt(mes);\n int nmes = mm +1;\n String memes = String.valueOf(nmes);\n if (nmes < 10) {\n memes = \"0\"+memes;\n }\n String anio = Integer.toString(c1.get(Calendar.YEAR));\n \n String fechoy = anio+\"-\"+memes+\"-\"+dia;\n \n txtFecha.setText(fechoy);\n \n }", "public static void main (String[]args){\n \r\n char AMayuscula = 'A', AMinuscula = 'a';\r\n // cast explicito de tipo - (AMayuscula + 1) el resultado es int\r\n char BMayuscula = (char) (AMayuscula + 1);\r\n \r\n System.out.println('\\n');\r\n System.out.println(BMayuscula);\r\n\t}", "protected String decrisToi(){\r\n return \"\\t\"+this.nomVille+\" est une ville de \"+this.nomPays+ \", elle comporte : \"+this.nbreHabitants+\" habitant(s) => elle est donc de catégorie : \"+this.categorie;\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}", "@Override\n\tpublic int horas_trabajo() {\n\t\treturn 1000;\n\t}", "public int getFlores(int avenida, int calle);", "@Override\n public int altura() {\n return altura(this.raiz);\n }", "public int precioFinal(){\r\n int monto=super.PrecioFinal();\r\n\t \t \r\n\t if (pulgadas>40){\r\n\t monto+=precioBase*0.3;\r\n\t }\r\n\t if (sintonizador){\r\n\t monto+=50;\r\n\t }\r\n\t \r\n\t return monto;\r\n\t }", "public int usaAtaque() {\n\t\treturn dano;\n\t}", "@Override\n\tpublic int sacameVida(ElementoPiedra a) {\n\t\treturn 20;\n\t}", "public CouleurFeu suivant() {\r\n // on choisit ici un algo très basique (je l'avais d'abord fait\r\n // en utisant la liste des valeurs, mais ça n'est pas très lisible.\r\n switch (this) {\r\n case VERT:\r\n return ORANGE;\r\n case ORANGE:\r\n return ROUGE;\r\n case ROUGE:\r\n return VERT;\r\n default:\r\n throw new RuntimeException(\"couleur inconnue ?? (impossible normalement)\");\r\n }\r\n }", "public int verifierHoraire(String chaine){\r\n\t\t//System.out.println(\"chaine : \"+chaine);\r\n\t\tString tabHoraire[] = chaine.split(\":\");\r\n\t\t\r\n\t\tif((Integer.parseInt(tabHoraire[0]) < AUTO_ECOLE_OUVERTURE ) || (Integer.parseInt(tabHoraire[0])> AUTO_ECOLE_FERMETURE)){\r\n\t\t\treturn -6;\r\n\t\t}\r\n\t\tif((Integer.parseInt(tabHoraire[1]) < 0 ) || (Integer.parseInt(tabHoraire[1]) >= 60 )){\r\n\t\t\treturn -7;\r\n\t\t}\r\n\t\t\r\n\t\t return 0;\r\n\t}", "public Personnage attaqueSurPersonnage() {\n\t\tdouble rand = Math.random();\n\t\t\tif (rand >= 0.85){\n\t\t\t\tfrappeMonstre = monstre.getCaracter().getForce() * 2;\n\t\t\t\tjoueur.setDiminutionPV(frappeMonstre);\n\t\t\t\tsetVictimeKO(joueur);\n\t\t\t\tetatAttaque = 'C';\n\t\t\t\treturn joueur;\n\t\t\t}\n\t\t\telse if ((rand < 0.85) && (rand >= 0.15)){\n\t\t\t\tfrappeMonstre = monstre.getCaracter().getForce();\n\t\t\t\tjoueur.setDiminutionPV(frappeMonstre);\n\t\t\t\tsetVictimeKO(joueur);\n\t\t\t\tetatAttaque = 'N';\n\t\t\t\treturn joueur;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tetatAttaque = 'F';\n\t\t\t\tfrappeMonstre = 0;\n\t\t\t\treturn joueur;\n\t\t\t}\n\t\t}", "public String estado(){\r\n if(promedio > 27){\r\n estado = \"Aprobado\";\r\n }else{\r\n estado = \"Supletorios\";\r\n }\r\n return estado;\r\n }", "public static void miedo(){\n int aleatorio; //variables locales a utilizar\n Random numeroAleatorio = new Random(); //declarando variables tipo random para aleatoriedad\n aleatorio = (numeroAleatorio.nextInt(10-5+1)+5);\n \n if(oro>aleatorio){//condicion de finalizar battalla y sus acciones\n oroPerdido= (nivel*2)+aleatorio;\n oro= oro-oroPerdido;\n System.out.println(\"Huiste de la batalla!!!\");\n\t\t System.out.println(\"oro perdido:\"+oroPerdido);\n opcionMiedo=1; //finalizando battalla por huida del jugador \n }\n else{\n System.out.println(\"No pudes huir de la batalla\");\n } \n }", "private void atualizarTela() {\n\t\tif(this.primeiraJogada == true) {//SE FOR A PRIMEIRA JOGADA ELE MONTA O LABEL DOS NUMEROS APOS ESCOLHER A POSICAO PELA PRIMEIRA VEZ\r\n\t\t\tthis.primeiraJogada = false;\r\n\t\t\tthis.montarLabelNumeros();\r\n\t\t}\r\n\r\n\t\tthis.esconderBotao();\r\n\t\t\r\n\t\tthis.acabarJogo();\r\n\t}", "public void quemaRueda() {\n System.out.println(\"¡Huele a plástico quemado de tanto quemar ruedas!\");\n }", "public boolean Vacia (){\n return cima==-1;\n \n }", "HorarioAcademico findHorarioByAsistencia(Asistencia asistencia);", "public void faiLavoro(){\n System.out.println(\"Scrivere 1 per Consegna lunga\\nSeleziona 2 per Consegna corta\\nSeleziona 3 per Consegna normale\");\n\n switch (creaturaIn.nextInt()) {\n case 1 -> {\n soldiTam += 500;\n puntiVita -= 40;\n puntiFame -= 40;\n puntiFelicita -= 40;\n }\n case 2 -> {\n soldiTam += 300;\n puntiVita -= 20;\n puntiFame -= 20;\n puntiFelicita -= 20;\n }\n case 3 -> {\n soldiTam += 100;\n puntiVita -= 10;\n puntiFame -= 10;\n puntiFelicita -= 10;\n }\n }\n checkStato();\n }", "public static void NumeroCapicua(){\n\t\tint numero,resto,falta,invertido;\n\t\tString tomar;\n\t\tScanner reader = new Scanner(System.in);\n\t\tSystem.out.println(\"Ingrese un numero\");\n\t\tnumero=reader.nextInt();\n\t\tfalta=numero;\n\t\tinvertido=0;\n\t\tresto=0;\n\t\twhile(falta!=0){\n\t\t\tresto=(falta%10);\n\t\t\tinvertido=(invertido*10)+resto;\n\t\t\tfalta=(int)(falta/10);\n\t\t}\n\t\tif(invertido==numero){\n\t\t\tSystem.out.println(\"Es Capicua\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No es Capicua\");\n\t\t}\n\t\tSystem.out.println(\"Desea regresar al menu anterior?\");\n\t\treader.nextLine();\n\t\ttomar=reader.nextLine();\n\t\tif(tomar.equals(\"si\")){\n\t\t\trepetidor=true;\n\t\t}else{\n\t\t\trepetidor=false;\n\t\t}\n\t}", "void verEnPantalla() {\r\n\t\tSystem.out.println( numEnPantalla );\r\n\t}", "private void trocaFase() {\n\n\t\tif (score == mudaFase && fase == 1) {\n\t\t\tfase++;\n\t\t\tmudaFase += valorDeFase;\n\t\t\tcriaBlocos();\n\t\t\tpaddle.paddleInicio();\n\t\t\tbola.bolaInicio();\n\t\t\tmove = false;\n\t\t\tJOptionPane.showMessageDialog(null, \"Round \" + (fase));\n\t\t} else if (score == mudaFase && fase == 2) {\n\t\t\tfase++;\n\t\t\tmudaFase += valorDeFase;\n\t\t\tcriaBlocos();\n\t\t\tpaddle.paddleInicio();\n\t\t\tbola.bolaInicio();\n\t\t\tmove = false;\n\t\t\tJOptionPane.showMessageDialog(null, \"Round \" + (fase));\n\t\t} else if (score == mudaFase && fase == 3) {\n\t\t\tJOptionPane.showMessageDialog(null, \"VOCÊ VENCEU, PARABÉNS!\");\n\t\t\tint continuar;\n\t\t\tcontinuar = JOptionPane.showConfirmDialog(null, \"Deseja jogar novamente?\", \"Game Over\",\n\t\t\t\t\tJOptionPane.YES_NO_OPTION);\n\t\t\tif (continuar == 0) {\n\t\t\t\tfase = 1;\n\t\t\t\tvida += 3;\n\t\t\t\tmudaFase += valorDeFase;\n\t\t\t\tpaddle.paddleInicio();\n\t\t\t\tbola.bolaInicio();\n\t\t\t\tmove = false;\n\t\t\t\tcriaBlocos();\n\t\t\t} else {\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t} // fecha else if\n\t}", "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}", "public void calculoSalarioBruto(){\n salarioBruto = hrTrabalhada * valorHr;\n }", "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 }", "@Override\r\n public String AggiungiQualcosa() {\r\n// ritorna una stringa\r\n// perché qui ho informazioni in più\r\n return \"\\ne capace di cuocere il pollo\";\r\n }", "public int obtenerSegundo() { return segundo; }", "public static void main(String[] args) throws ParseException {\t\t\n\t int mes, ano, diaDaSemana, primeiroDiaDoMes, numeroDeSemana = 1;\n\t Date data;\n\t \n\t //Converter texto em data e data em texto\n\t SimpleDateFormat sdf\t = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t //Prover o calendario\n\t GregorianCalendar gc\t = new GregorianCalendar();\n\t \n\t String mesesCalendario[] = new String[12];\n\t\tString mesesNome[]\t\t = {\"Janeiro\", \"Fevereiro\", \"Marco\", \"Abri\", \"Maio\", \"Junho\", \"Julho\", \"Agosto\", \"Setembro\", \"Outubro\", \"Novembro\", \"Dezembro\"};\n\t\tint mesesDia[]\t\t\t = {31,28,31,30,31,30,31,31,30,31,30,31};\n\t\t\n\t\t//Errado? e pra receber apenas o \"dia da semana\" do \"primeiro dia do mes\" na questao\n\t //Recebendo mes e ano\n\t mes = Entrada.Int(\"Digite o mes:\", \"Entrada de dados\");\n\t ano = Entrada.Int(\"Digite o ano:\", \"Entrada de dados\");\n\t \n\t //Errado? e pra ser o dia inicial do mes na questao\n\t // Dia inicial do ano\n data = sdf.parse(\"01/01/\" + ano);\n gc.setTime(data);\n diaDaSemana = gc.get(GregorianCalendar.DAY_OF_WEEK);\n \n //Nao sei se e necessario por causa da questao\n //*Alteracao feita||| Ano bissexto tem +1 dia em fevereiro\n if(ano % 4 == 0) {\n \tmesesDia[1] = 29;\n \tmesesNome[1] = \"Ano Bissexto - Fevereiro\";\n }\n \n \n //Meses \n for(int mesAtual = 0; mesAtual < 12; mesAtual++) {\n\t int diasDoMes\t= 0;\n\t String nomeMesAtual = \"\";\n\n\n\t nomeMesAtual = mesesNome[mesAtual]; \n diasDoMes\t = mesesDia[mesAtual]; \n\n\n mesesCalendario[mesAtual] = \"\\n \" + nomeMesAtual + \" de \" + ano + \"\\n\";\n mesesCalendario[mesAtual] += \"---------------------------------------------------------------------|\\n\";\n mesesCalendario[mesAtual] += \" Dom Seg Ter Qua Qui Sex Sab | Semanas\\n\";\n mesesCalendario[mesAtual] += \"---------------------------------------------------------------------|\\n \";\n\t\n\t \n\t // Primeira semana comeca em\n\t data = sdf.parse( \"01/\" + (mesAtual+1) + \"/\" + ano );\n gc.setTime(data);\n primeiroDiaDoMes = gc.get(GregorianCalendar.DAY_OF_WEEK);\n\t for (int space = 1; space < primeiroDiaDoMes; space++) {\n\t \tmesesCalendario[mesAtual] += \" \";\n\t }\n\t \n\t //Dias\t \n\t for (int diaAtual = 1; diaAtual <= diasDoMes; diaAtual++)\n\t {\n\t \t// Trata espaco do dia\n\t \t\t//Transforma o diaAtuel em String\n\t String diaTratado = Integer.toString(diaAtual);\n\t if (diaTratado.length() == 1)\n\t \tdiaTratado = \" \" + diaAtual + \" \";\n\t else\n\t \tdiaTratado = \" \" + diaAtual + \" \";\n\t \n\t // dia\n\t mesesCalendario[mesAtual] += diaTratado;\n\t \t\n\t \t// Pula Linha no final da semana\n\t data = sdf.parse( diaAtual + \"/\" + (mesAtual+1) + \"/\" + ano );\n\t gc.setTime(data);\n\t diaDaSemana = gc.get(GregorianCalendar.DAY_OF_WEEK);\n\t if (diaDaSemana == 7) {\n\t \tmesesCalendario[mesAtual] += (\"| \" + numeroDeSemana++);\n\t \tmesesCalendario[mesAtual] += \"\\n |\";\n\t \tmesesCalendario[mesAtual] += \"\\n \";\n\t }\n\t }\n\t mesesCalendario[mesAtual] += \"\\n\\n\\n\\n\";\n\t }\n\t \n //Imprime mes desejado\n\t System.out.println(mesesCalendario[mes-1]);\n\n\t}", "public double sacarDinero(double platita){\r\n if (getMonto() >= platita){\r\n setMonto(getMonto() - platita);\r\n return platita;\r\n }\r\n return 0;\r\n }", "public static void main(String [] args){//inicio del main\r\n\r\n Scanner sc= new Scanner(System.in); \r\n\r\nSystem.out.println(\"ingrese los segundos \");//mesaje\r\nint num=sc.nextInt();//total de segundos\r\nint hor=num/3600;//total de horas en los segundos\r\nint min=(num-(3600*hor))/60;//total de min en las horas restantes\r\nint seg=num-((hor*3600)+(min*60));//total de segundo sen los miniutos restantes\r\nSystem.out.println(\"Horas: \" + hor + \" Minutos: \" + min + \" Segundos: \" + seg);//salida del tiempo\r\n\r\n}", "@Override\n public double perimetro() {\n return 4 * this.lado;\n }", "public void anazitisiSintagisVaseiHmerominias() {\n\t\tDate firstDt = null, lastDt = null;\n\t\ttmp_2 = 0;\n\t\tif(numOfPrescription != 0)\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\" STOIXEIA SYNTAGWN\");\n\t\t\t// Emfanizw oles tis syntages\n\t\t\tfor(int j = 0; j < numOfPrescription; j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\n \" + j + \". STOIXEIA SYNTAGHS: \");\n\t\t\t\tprescription[j].print();\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\t// Zitaw apo ton xrhsth to xroniko euros kata to opoio exei graftei sintagh\n\t\t\tfirstDt = sir.readDate(\"DWSTE ARXIKH HMEROMHNIA: \");\n\t\t\tlastDt = sir.readDate(\"DWSTE TELIKH HMEROMHNIA: \");\n\t\t\tSystem.out.println();\n\t\t\tfor(i = 0; i < numOfPrescription; i++)\n\t\t\t{\n\t\t\t\t// An h hmeromhnia eggrafhs ths syntaghs einai anamesa sta xronika oria pou exei dwsei o xrhsths ektypwnetai\n\t\t\t\tif(firstDt.before(prescription[i].getDate()) && (lastDt.after(prescription[i].getDate()))) \n\t\t\t\t{\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\tSystem.out.println(\"VRETHIKE SYNTAGH!\");\n\t\t\t\t\tprescription[i].print();\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\ttmp_2++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(tmp_2 == 0)\n\t\t\t{\n\t\t\t\tSystem.out.println();\n\t\t\t\tSystem.out.println(\"DEN YPARXEI SYNTAGH METAKSY:\" + firstDt + \" KAI: \" + lastDt);\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"DEN YPARXOUN DIATHESIMES SYNTAGES!\");\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public void muere() {\n System.out.println(\"Ugh... Llegó mi hora... Adios.\");\n }", "public void kast() {\n\t\t// vaelg en tilfaeldig side\n\t\tdouble tilfaeldigtTal = Math.random();\n\t\tvaerdi = (int) (tilfaeldigtTal * 6 + 1);\n\t}", "public void venceuRodada () {\n this.pontuacaoPartida++;\n }", "public int promossaDama(int pezzo)\n {\n switch (pezzo)\n {\n case PEDINA_NERA: case DAMA_NERA: return DAMA_NERA;\n case PEDINA_BIANCA: case DAMA_BIANCA: return DAMA_BIANCA;\n }\n return VUOTA;\n }", "public Farbe letztesKamel();", "public String ocurrencia() {\n String palabra = \"\";\n int retorno = 0;\n for (int i = 0; i < getCadena().length(); i++) {\n\n if ((getCadena().charAt(i) == ' ') || (i > getCadena().length() - 2)) {\n if (palabra.equals(getBuscar())) {\n retorno++;\n palabra = \"\";\n } else {\n palabra = \"\";\n }\n\n } else {\n palabra += getCadena().charAt(i);\n\n }\n }\n return (\"La cantida de ocurrencias son de:\" + '\\n' + retorno);\n }", "Groepen maakGroepsindeling(Groepen aanwezigheidsGroepen);", "public void correr(int km){\r\n\t\tdouble pesoPerdido = 0.05*km;\r\n\t\tthis.peso = this.peso - pesoPerdido;\r\n\t\tSystem.out.println(\"He corrido \" + km + \" y he perdido \" + pesoPerdido + \" kg-s\");\r\n\t}", "public int getIntHora(int antelacio)\n {\n int hsel = 1;\n //int nhores = CoreCfg.horesClase.length;\n \n Calendar cal2 = null;\n Calendar cal = null;\n \n for(int i=1; i<14; i++)\n {\n cal = Calendar.getInstance();\n cal.setTime(cfg.getCoreCfg().getIesClient().getDatesCollection().getHoresClase()[i-1]);\n cal.set(Calendar.YEAR, m_cal.get(Calendar.YEAR));\n cal.set(Calendar.MONTH, m_cal.get(Calendar.MONTH));\n cal.set(Calendar.DAY_OF_MONTH, m_cal.get(Calendar.DAY_OF_MONTH));\n\n cal2 = Calendar.getInstance();\n cal2.setTime(cfg.getCoreCfg().getIesClient().getDatesCollection().getHoresClase()[i]);\n cal2.set(Calendar.YEAR, m_cal.get(Calendar.YEAR));\n cal2.set(Calendar.MONTH, m_cal.get(Calendar.MONTH));\n cal2.set(Calendar.DAY_OF_MONTH, m_cal.get(Calendar.DAY_OF_MONTH));\n\n cal.add(Calendar.MINUTE, -antelacio);\n cal2.add(Calendar.MINUTE, -antelacio);\n\n if(cal.compareTo(m_cal)<=0 && m_cal.compareTo(cal2)<=0 )\n {\n hsel = i;\n break;\n }\n }\n\n if(m_cal.compareTo(cal2)>0) {\n hsel = 14;\n }\n\n \n return hsel;\n }", "public void hallarPerimetroIsosceles() {\r\n this.perimetro = 2*(this.ladoA+this.ladoB);\r\n }" ]
[ "0.6676253", "0.6454343", "0.6194205", "0.6070118", "0.60521495", "0.6044155", "0.5982128", "0.59792775", "0.5947682", "0.5947572", "0.5933003", "0.59214526", "0.5851596", "0.5847497", "0.58135015", "0.5812611", "0.58013153", "0.5788944", "0.57727", "0.57724166", "0.57669604", "0.57618475", "0.5747974", "0.57470983", "0.57429934", "0.5739483", "0.5727994", "0.57106245", "0.5703954", "0.5695561", "0.5691545", "0.56915236", "0.5668269", "0.5662101", "0.5660101", "0.5653731", "0.56481206", "0.56472546", "0.56467605", "0.5646727", "0.564512", "0.56368804", "0.56363654", "0.5629168", "0.5627221", "0.5626303", "0.5607875", "0.560756", "0.560499", "0.55996525", "0.55990523", "0.55844927", "0.55807126", "0.55789006", "0.55686295", "0.5565176", "0.55589557", "0.555819", "0.5547322", "0.55463386", "0.5544615", "0.5537412", "0.5532802", "0.5523595", "0.5517183", "0.5502047", "0.54995507", "0.54990226", "0.5490154", "0.54802966", "0.54781723", "0.54777575", "0.54761386", "0.5475704", "0.54752403", "0.54699194", "0.54682916", "0.5467813", "0.54637367", "0.54593116", "0.54580903", "0.5455441", "0.54553545", "0.54534143", "0.5448607", "0.54454964", "0.54443586", "0.54403573", "0.54373044", "0.543605", "0.54274416", "0.54214144", "0.54187155", "0.54156905", "0.5412536", "0.5410175", "0.54092795", "0.5402482", "0.53979397", "0.5397002", "0.5395828" ]
0.0
-1
TODO Autogenerated method stub
@Override public String foodName() { 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
If sign in fails, display a message to the user. If sign in succeeds the auth state listener will be notified and logic to handle the signed in user can be handled in the listener.
@Override public void onComplete(@NonNull Task<AuthResult> task) { <<<<<<< HEAD:Increment-3/Source/ufo/app/src/main/java/com/example/rust/ufo/LoginActivity.java progressBar.setVisibility(View.GONE); ======= // progressBar.setVisibility(View.GONE); >>>>>>> 5d99259722ed85eb1569d51feee4d1cb7fa6cf5b:Increment - 2/Source/ufo/app/src/main/java/com/example/rust/ufo/LoginActivity.java if (!task.isSuccessful()) { // there was an error if (password.length() < 6) { Password.setError(getString(R.string.minimum_password)); } else { <<<<<<< HEAD:Increment-3/Source/ufo/app/src/main/java/com/example/rust/ufo/LoginActivity.java //Log.w(TAG, "signInWithEmailAndPassword", task.getException()); ======= // Log.w(TAG, "signInWithEmailAndPassword", task.getException()); >>>>>>> 5d99259722ed85eb1569d51feee4d1cb7fa6cf5b:Increment - 2/Source/ufo/app/src/main/java/com/example/rust/ufo/LoginActivity.java Toast.makeText(LoginActivity.this, getString(R.string.auth_failed), Toast.LENGTH_LONG).show(); } } else { Intent intent = new Intent(LoginActivity.this, HomepageActivity.class); startActivity(intent); finish(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void handleSignInResult(GoogleSignInResult result) {\n if (result.isSuccess()) {\n // Signed in successfully, show authenticated UI.\n GoogleSignInAccount acct = result.getSignInAccount();\n// mStatusTextView.setText(getString(R.string.signed_in_fmt, acct.getDisplayName()));\n// updateUI(true);\n }\n }", "private void signIn(String email, String password){\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 textViewStatus.setText(\"Signed In\");\n } else {\n // If sign in fails, display a message to the user.\n Toast.makeText(MainActivity.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n textViewStatus.setText(\"Signed Out\");\n }\n\n // ...\n }\n });\n }", "private void handleSignInResult(GoogleSignInResult result) {\n if (result.isSuccess()) {\n // Signed in successfully, show authenticated UI.\n GoogleSignInAccount acct = result.getSignInAccount();\n assert acct != null;\n personName = acct.getDisplayName();\n personEmail = acct.getEmail();\n //mStatusTextView.setText(getString(R.string.signed_in_fmt, acct.getDisplayName()));\n updateUI(true);\n } else {\n // Signed out, show unauthenticated UI.\n updateUI(false);\n }\n }", "@Override\n\tpublic void onSignInSucceeded() {\n\n\t}", "private void onSignInResult(FirebaseAuthUIAuthenticationResult result) {\n IdpResponse response = result.getIdpResponse();\n if (result.getResultCode() == RESULT_OK) {\n // Successfully signed in\n FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\n // ...\n } else {\n // Sign in failed. If response is null the user canceled the\n // sign-in flow using the back button. Otherwise check\n // response.getError().getErrorCode() and handle the error.\n // ...\n }\n }", "@Override\n\tpublic void onSignInFailed() {\n\n\t}", "@Override\n public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {\n FirebaseUser user = firebaseAuth.getCurrentUser();\n if (user != null) {\n // User is signed in\n // Log.d(TAG, \"onAuthStateChanged:signed_in:\" + user.getUid());\n // toastMessage(\"Successfully signed in with: \" + user.getEmail());\n } else {\n // User is signed out\n // Log.d(TAG, \"onAuthStateChanged:signed_out\");\n // toastMessage(\"Successfully signed out.\");\n }\n // ...\n }", "void signInComplete();", "private void handleSignInResult(GoogleSignInResult result) {\n if (result.isSuccess()) {\n // Signed in successfully, show authenticated UI.\n GoogleSignInAccount acct = result.getSignInAccount();\n test = (TextView) findViewById(R.id.tvTest);\n //ImageView prof = (ImageView) findViewById(R.id.iv_profile_icon);\n String personName = acct.getDisplayName();\n String personEmail = acct.getEmail();\n String personId = acct.getId();\n Uri personPhoto = acct.getPhotoUrl();\n\n test.setText(\"Logged in as: \" + personName);\n\n currentUser = new User(personName);\n if(currentUser == null) {\n Snackbar snackbar = Snackbar.make(\n coordinatorLayout, \"Logged in as \"+personName+\", but User class is NULL\",\n Snackbar.LENGTH_LONG);\n snackbar.show();\n }else{\n Snackbar snackbar = Snackbar.make(\n coordinatorLayout, \"Logged in as \"+personName+\". Welcome!\",\n Snackbar.LENGTH_LONG);\n snackbar.show();\n if (service != null) {\n service.setUserID(currentUser.getName());\n }\n }\n\n //mStatusTextView.setText(getString(R.string.signed_in_fmt, acct.getDisplayName()));\n //updateUI(true);\n } else {\n test = (TextView) findViewById(R.id.tvTest);\n test.setText(\"Please login with Google Login\");\n }\n }", "@Override\r\n public void onComplete(@NonNull Task<AuthResult> task) {\n Toast.makeText(loginActivity.this, \"login successful\",\r\n Toast.LENGTH_SHORT).show();\r\n // If sign in fails, display a message to the user. If sign in succeeds\r\n // the auth state listener will be notified and logic to handle the\r\n // signed in user can be handled in the listener.\r\n if (!task.isSuccessful()) {\r\n //Log.w(TAG, \"signInWithEmail:failed\", task.getException());\r\n Toast.makeText(loginActivity.this, \"login failed\",\r\n Toast.LENGTH_SHORT).show();\r\n }\r\n\r\n // ...\r\n }", "private void onSignInClicked() {\n mState.enableConnection();\n mState.mShouldResolve = true;\n mState.mSignInClicked = true;\n mState.connectGoogleGames();\n\n // Show a message to the user that we are signing in.\n status.setText(\"Connecting...\");\n }", "@Override\n public void onSignInSucceeded() {\n\n if (ACCESS_ACHIEVEMENT) {\n\n //if we just came from achievements button and are now signed in, display ui\n displayAchievementUI();\n\n //flag back false\n ACCESS_ACHIEVEMENT = false;\n }\n\n //don't bypass auto login\n BYPASS_LOGIN = false;\n }", "public void checkLogin() {\n String username = ((EditText) findViewById(R.id.Username)).getText().toString();\n String password = ((EditText) findViewById(R.id.Password)).getText().toString();\n final TextView feedback = (TextView) findViewById(R.id.feedback);\n mAuth.signInWithEmailAndPassword(username, 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 Log.d(\"LOG IN\", \"signInWithEmail:success\");\n FirebaseUser user = mAuth.getCurrentUser();\n startActivity(new Intent(LoginActivity.this, HomeScreen.class));\n } else {\n // If sign in fails, display a message to the user.\n Log.w(\"LOGIN\", \"signInWithEmail:failure\", task.getException());\n Toast.makeText(LoginActivity.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n feedback.setText(\"FAIL!\");\n }\n\n // ...\n }\n });\n\n\n }", "@Override\n public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {\n user = firebaseAuth.getCurrentUser();\n if (user != null) {\n // User is signed in\n Log.d(\"LoginActivity\", \"onAuthStateChanged:signed_in:\" + user.getUid());\n jump_main();\n } else {\n // User is signed out\n Log.d(\"LoginActivity\", \"onAuthStateChanged:signed_out\");\n //signOut();\n tv_name.setText(\"\");\n tv_email.setText(\"\");\n boolean_google = false;\n }\n // [START_EXCLUDE]\n updateUI(user);\n // [END_EXCLUDE]\n }", "@Override\n public void onSignInClicked() {\n Prefs.setSignedIn(true);\n // Proceed to Main and finish\n proceedToMainActivityAndFinish();\n }", "private void signIn() {\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 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 }", "@Override\n public void onRegistrationAccomplished() {\n Prefs.setSignedIn(true);\n // Proceed to Main\n proceedToMainActivityAndFinish();\n }", "@Override\n public void onClick(View v) {\n if (!validate(\"\" + username.getText())) {\n// Toast.makeText(activity, \"Email nn valid\", Toast.LENGTH_LONG).show();\n Log.w(\"EMAIL_PASS\", \"Email nn valid\");\n }\n else if (password.getText().length() < 6){\n Log.w(\"ERROR_PASS\", \"password must be > 6\");\n } else{\n mFirebaseAuth.signInWithEmailAndPassword(\"\" + username.getText(), \"\" + password.getText())\n .addOnCompleteListener(activity, task -> {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n Log.d(\"signInWithEmail\", \"signInWithEmail:success\");\n FirebaseUser user = mFirebaseAuth.getCurrentUser();\n startActivity(new Intent(activity, home.class));\n finish();\n// updateUI(user);\n } else {\n // If sign in fails, display a message to the user.\n Log.w(\"FAILER AUTH\", \"signInWithEmail:failure\", task.getException());\n Toast.makeText(MainActivity.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n// updateUI(null);\n // ...\n }\n//\n });\n // Log.w(\"FIREBASE\", String.valueOf(mFirebaseAuth.getCurrentUser()));\n // Toast.makeText(getApplicationContext(), \"\" + mFirebaseAuth.getUid(),Toast.LENGTH_LONG).show();\n }\n }", "@Override\n public void onSignInFailed() {\n BYPASS_LOGIN = true;\n }", "@Override\r\n public void onSign(SignEvent event){\n if (event.getAction().equals(SignEvent.Action.SIGNED_IN)) {\r\n //write cookies if keep signed in\r\n if (event.getAccountKey() != null && !event.getAccountKey().isEmpty()) {\r\n cookie.setAccountKey(Shared.MY_SESSION, event.getAccountKey());\r\n }\r\n //already signed in, load workspace\r\n RootPanel.get().clear();\r\n Widget workspace = new Workspace().asWidget();\r\n RootPanel.get().add(workspace); \r\n Info.display(\"Welcome\", \"Signed in as \" + Shared.MY_SESSION.getAccount().getFullName());\r\n }\r\n //process sign_out\r\n if (event.getAction().equals(SignEvent.Action.SIGN_OUT)){\r\n String accountKey = cookie.getAccountKey(Shared.MY_SESSION);\r\n Shared.RPC.signOutAndDetachSession(Shared.MY_SESSION, accountKey, new AsyncCallback<Session>() {\r\n @Override\r\n public void onSuccess(Session s) {\r\n if (s != null) {\r\n Shared.MY_SESSION = s;\r\n //sign out seems OK on server side, dispatch SIGNED_OUT event\r\n Shared.EVENT_BUS.fireEvent(new SignEvent(SignEvent.Action.SIGNED_OUT)); //WARN: don't dispatch SIGN_OUT avoiding deadlock call\r\n } else {\r\n Info.display(\"Error\", \"Account is already signed out or database error\");\r\n }\r\n }\r\n\r\n @Override\r\n public void onFailure(Throwable caught) {\r\n Info.display(\"Error\", caught.getMessage());\r\n }\r\n });\r\n }\r\n //process signed_out\r\n if (event.getAction().equals(SignEvent.Action.SIGNED_OUT)){\r\n //delete cookies\r\n cookie.discardCookie(Shared.MY_SESSION); \r\n //return UI to welcome status\r\n RootPanel.get().clear();\r\n RootPanel.get().add(new LoginPage()); \r\n Info.display(\"See you\", \"You are now signed out!\");\r\n }\r\n }", "private void handleSignInFailure( String statusMessage ) {\n\t\tgpAccessToken = null;\n\t\tString msg = \"Unsuccessful login.\\nStatus message:\\n\" + statusMessage;\n\t\tsocialAccountInfo.setTextColor(getColor(android.R.color.holo_red_dark));\n\t\tsocialAccountInfo.setText(msg);\n\t\tisLoggedInGoogle = false;\n\t}", "private void signInResultHandler(GoogleSignInResult result) {\n if (result.isSuccess()) {\n acct = result.getSignInAccount();\n m_tvStatus.setText(R.string.status_signedin);\n try {\n m_tvDispName.setText(acct.getDisplayName());\n m_tvEmail.setText(acct.getEmail());\n }\n catch (NullPointerException e) {\n Log.d(TAG, \"Error retrieving some account information\");\n Toast.makeText(MainActivity.this, \"Oops! Please double check your account info.\", Toast.LENGTH_SHORT).show();\n }\n\n checkAGWALoginStatus(acct);\n Account_Email = acct.getEmail();\n\n }\n else {\n Status status = result.getStatus();\n int statusCode = status.getStatusCode();\n\n // Constant Value: 12501 (API)\n if (statusCode == GoogleSignInStatusCodes.SIGN_IN_CANCELLED) {\n m_tvStatus.setText(R.string.status_signincancelled);\n }\n\n // Constant Value: 12500 (API)\n else if (statusCode == GoogleSignInStatusCodes.SIGN_IN_FAILED) {\n m_tvStatus.setText(R.string.status_signinfail);\n }\n else {\n m_tvStatus.setText(R.string.status_nullresult);\n }\n }\n }", "@Override\n public void onSuccess(AuthResult authResult) {\n if(!mAuth.getCurrentUser().isEmailVerified()){\n PopupEmailVerification popupEmailVerification = new PopupEmailVerification(StartPage.this);\n popupEmailVerification.show();\n }\n else{\n //User found & ready for next page\n Toast.makeText(StartPage.this, \"Sign in successful\", Toast.LENGTH_LONG).show();\n startActivity(new Intent(StartPage.this, CenterPage.class));\n finish();\n }\n\n }", "private void handleSignInResult(Task<GoogleSignInAccount> completedTask) {\n try {\n GoogleSignInAccount account = completedTask.getResult(ApiException.class);\n\n // Signed in successfully, show authenticated UI.\n accountEmail = account.getEmail();\n updateUI(account.toString());\n } catch (ApiException e) {\n // The ApiException status code indicates the detailed failure reason.\n updateUI(\"not Signed In\");\n }\n }", "@Override\n public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {\n FirebaseUser user = firebaseAuth.getCurrentUser();\n if (user != null) {\n Log.d(TAG, \"user.isEmailVerified():\" + user.isEmailVerified());\n Log.d(TAG, \"onAuthStateChanged:signed_in:\" + user.getUid());\n signInAlready(user);\n } else {\n // User is signed out//\n Log.d(TAG, \"onAuthStateChanged:signed_out\");\n signOut();\n }\n }", "@Override\n public void onAuthenticationError(FirebaseError error) {\n EventBus.getDefault().post(new LoginResultEvent(error.getCode()));\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 }", "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 }", "@Override\n public void onAuthenticationError(FirebaseError firebaseError) {\n Log.d(\"LOGIN\", \"Error logging in after creating user\");\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == RC_SIGN_IN) {\n GoogleSignInResult result = Auth.GoogleSignInApi.getSignInResultFromIntent(data);\n\n System.out.println(\"result status code\" + result.getStatus());\n if (result.isSuccess()) {\n onSucessGoogleLogin(result);\n\n } else {\n // Google Sign In failed, update UI appropriately\n Utility.logData(\"Login unsuccessful\");\n Utility.showShortToast(\"Login unsuccessful\");\n }\n\n }\n super.onActivityResult(requestCode, resultCode, data);\n }", "public F.Promise<Result> handleSignIn() {\n final Form<LogIn> filledForm = logInForm.bindFromRequest();\n if (customerService().isLoggedIn()) {\n return asPromise(redirect(controllers.routes.HomeController.home()));\n } else if (filledForm.hasErrors()) {\n flash(\"error\", \"Login form contains missing or invalid data.\");\n return asPromise(badRequest(loginView.render(data().build(), filledForm)));\n } else {\n return handleSignInWithValidForm(filledForm);\n }\n }", "private void userIsAuthenticated() {\n this.setResult(RC_USER_LOGGED_IN, null);\n this.finish();\n }", "@Override\n public void onStart(){\n super.onStart();\n //Check if user is signed in and update UI accordingly\n FirebaseUser currentUser = mAuth.getCurrentUser();\n\n if (currentUser != null){\n //User is signed in\n updateUI(\"User Signed In\");\n }\n else {\n // User is signed out\n updateUI(\"User Signed Out\");\n }\n\n // Check for existing Google Sign In account, if the user is already signed in\n // the GoogleSignInAccount will be non-null.\n GoogleSignInAccount account = GoogleSignIn.getLastSignedInAccount(this);\n if(account != null) {\n accountEmail = account.getEmail();\n updateUI(account.toString());\n }\n }", "public void authenticate(View view) {\n String email = email_tf.getText().toString();\n String password = password_tf.getText().toString();\n\n // validating if email and password has been entered in the required data fields\n if (!validateInputs(email, password))\n return;\n\n Log.d(TAG, \"loginAccount:\" + email);\n\n // creating instance of prompt for showing prompts to user\n final Prompt prompt = new Prompt(this);\n\n // prompt user for login in\n prompt.showProgress(\"Sign In\", \"Login in...\");\n\n // authenticating email and password\n FirebaseController.getAuthInstance().signInWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n prompt.hideProgress();\n\n // if login was successful\n if (task.isSuccessful()) {\n Log.d(TAG, \"loginWithEmail:success\");\n\n // show short wait prompt for login successful\n prompt.showSuccessMessagePrompt(\"Login successful\");\n SASTools.wait(SASConstants.PROMPT_DISPLAY_WAIT_SHORT, new Runnable() {\n @Override\n public void run() {\n prompt.hidePrompt();\n\n // starting main activity\n startActivity(new Intent(EmailLoginActivity.this, MainActivity.class)\n .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK));\n\n // finishing this email login activity\n EmailLoginActivity.this.finish();\n }\n }\n );\n }\n\n // if login was not successful\n else {\n Log.w(TAG, \"loginWithEmail:failure\", task.getException());\n\n // show long wait prompt to user about login failure and provide the reason\n prompt.showFailureMessagePrompt(\"Login not successful\\n\" + Objects.requireNonNull(task.getException()).getMessage());\n SASTools.wait(SASConstants.PROMPT_DISPLAY_WAIT_LONG, new Runnable() {\n @Override\n public void run() {\n prompt.hidePrompt();\n }\n });\n }\n }\n });\n }", "public void createAccount (String email, String password) {\n mAuth.createUserWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n\n if (!task.isSuccessful()) {\n Toast.makeText(Login.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(Login.this, \"Registration Successful\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n //Sign in existing users\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\", task.getException());\n Toast.makeText(Login.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n }\n\n // ...\n }\n });\n }", "private void handleSignInResult(GoogleSignInResult result) {\n Log.v(\"SIGNIN STATUS\", \"SIGNIN RESULT: \" + result.getStatus().getStatusMessage());\n Log.v(\"SIGNIN STATUS\", \"SIGNIN CODE: \" + result.getStatus().getStatusCode());\n if (result.isSuccess()) {\n // Signed in successfully\n GoogleSignInAccount acct = result.getSignInAccount();\n IlliniBusApplication myApplication = (IlliniBusApplication) getApplication();\n myApplication.signIn(acct);\n Intent intent = new Intent(StartActivity.this, MainActivity.class);\n startActivity(intent);\n } else {\n Toast.makeText(getApplicationContext(), \"Failed to Login!\",\n Toast.LENGTH_LONG).show();\n }\n }", "public void signIn( final View view){\n progressBar.setVisibility (View.VISIBLE);\n view2.setVisibility (View.VISIBLE);\n if(username.getText () != null && password.getText () != null) {\n auth = FirebaseAuth.getInstance ( );\n auth.signInWithEmailAndPassword (username.getText ( ).toString ( ), password.getText ( ).toString ( )).addOnCompleteListener (new OnCompleteListener <AuthResult> ( ) {\n @Override\n public void onComplete( @NonNull Task<AuthResult> task ) {\n\n if(task.isSuccessful ()){\ntry {\n progressBar.setVisibility ( View.INVISIBLE );\n view2.setVisibility ( View.INVISIBLE );\n DatabaseReference reference = FirebaseDatabase.getInstance ( ).getReference ( ).child ( auth.getCurrentUser ( ).getUid ( ) );\n reference.addListenerForSingleValueEvent ( new ValueEventListener ( ) {\n @Override\n public void onDataChange( @NonNull DataSnapshot dataSnapshot ) {\n DataModel.typeOfUser = ( String ) dataSnapshot.getValue ( );\n Toast.makeText ( LogInActivity.this , DataModel.typeOfUser , Toast.LENGTH_SHORT ).show ( );\n if(DataModel.typeOfUser.equals ( \"govW\" )) {\n\n\n Intent intent = new Intent ( LogInActivity.this , complainSHow.class );\n startActivity ( intent );\n\n }else{\n\n Intent intent = new Intent ( LogInActivity.this , Main2Activity.class );\n startActivity ( intent );\n\n\n }\n\n\n }\n\n @Override\n public void onCancelled( @NonNull DatabaseError databaseError ) {\n\n }\n } );\n\n\n}catch (Exception e){\n\n Toast.makeText (LogInActivity.this,\"LogIn Failed\",Toast.LENGTH_SHORT).show ();\n progressBar.setVisibility (View.INVISIBLE);\n view2.setVisibility (View.INVISIBLE);\n\n\n}\n\n\n }else{\n\n Toast.makeText (LogInActivity.this,\"LogIn Failed\",Toast.LENGTH_SHORT).show ();\n progressBar.setVisibility (View.INVISIBLE);\n view2.setVisibility (View.INVISIBLE);\n\n }\n\n }\n });\n\n\n }else{\n\n Toast.makeText (LogInActivity.this,\"Please Enter Password and Username!\",Toast.LENGTH_SHORT).show ();\n\n\n }\n\n }", "@Override\n public void showSignInScreen() {\n Toast.makeText(this, \"Taking user to the sign in screen\", Toast.LENGTH_SHORT).show();\n }", "public void signIn(View view) {\n requestSignIn();\n }", "private void signIn() {\n Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);\n startActivityForResult(signInIntent, RC_SIGN_IN);\n finish();\n }", "@Override\n public void onAuthenticationError(FirebaseError firebaseError) {\n Log.d(TAG, \"Login attempt failed\");\n }", "@Override\n public void onAuthenticationError(FirebaseError firebaseError) {\n Log.d(TAG, \"Login attempt failed\");\n }", "@Override\n public void onFailure(Exception exception) {\n System.out.println(\"Sign-In Failure: \"+exception);\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (!task.isSuccessful()) {\n Toast.makeText(MainActivity.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n }\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 }", "@Override public void onAuthenticationError(FirebaseError error) {\n Log.e(\"logged user\", \"Error al logged user\");\n manageErrorFirebase(error);\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 }", "@Override\n public void onPreAuthentication() {\n // Clear any messages\n this.clearMessages();\n // Show a progress indicator\n if (this.mAuthenticationTaskFragment != null\n && this.mAuthenticationTaskFragment.isTaskRunning()) {\n this.mProgressDialog.show();\n }\n }", "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 }", "@Override\n public void onAuthenticated(AuthData authData) {\n Log.d(TAG, \"Google user authenticated: \" + authData.getUid());\n mFirebaseAuthCallback.onReceivedFirebaseAuth(authData, null);\n }", "private void signUp() {\n if (mAuthTask != null) {\n return;\n }\n\n // Reset errors.\n mEmailView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for a valid password, if the user entered one.\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\n mPasswordView.setError(getString(R.string.error_invalid_password));\n focusView = mPasswordView;\n cancel = true;\n }\n\n // Check for a valid email address.\n if (TextUtils.isEmpty(email)) {\n mEmailView.setError(getString(R.string.error_field_required));\n focusView = mEmailView;\n cancel = true;\n } else if (!isEmailValid(email)) {\n mEmailView.setError(getString(R.string.error_invalid_email));\n focusView = mEmailView;\n cancel = true;\n }\n\n if (cancel) {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n showProgress(true);\n mAuthTask = new UserLoginTask(email, password, true);\n mAuthTask.execute((Void) null);\n }\n }", "@Override\n public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {\n FirebaseUser mFirebaseUser = mFirebaseAuth.getCurrentUser();\n if( mFirebaseUser != null){\n Toast.makeText(LogInActivity.this,\"You are logged in\",Toast.LENGTH_SHORT).show();\n Intent move = new Intent(LogInActivity.this,HomeActivity.class);\n startActivity(move);\n }\n else{\n Toast.makeText(LogInActivity.this,\"Please Log In\",Toast.LENGTH_SHORT).show();\n }\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 callSignIn(String email, String password) {\n\n // progress bar\n\n\n\n progress = new ProgressDialog(LoginActivity.this);\n progress.setTitle(\"Sign In !!\");\n progress.setMessage(\"Please Wait !!\");\n progress.setCancelable(true);\n progress.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n progress.show();\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(\"TESTING\", \"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\n\n\n if (!task.isSuccessful()) {\n progress.dismiss();\n Log.w(\"TESTING\", \"signInWithEmail:failed\", task.getException());\n Toast.makeText(LoginActivity.this, \"Signin Failed\",\n Toast.LENGTH_SHORT).show();\n } else {\n\n Intent signInIntent = new Intent(LoginActivity.this,AppoinmentBookingProfile.class);\n startActivity(signInIntent);\n finish();\n }\n\n // ...\n }\n });\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 }", "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 }", "@Override\n public void onAuthenticationFailed() {\n }", "public void userSignIn(){\n String email=signInEmailEditText.getText().toString().trim();\n String password=signInPasswordEditText.getText().toString().trim();\n\n //input validation**\n if(TextUtils.isEmpty(email)){\n signInEmailEditText.setError(\"Please enter your account email address.\");\n return;\n }\n if(TextUtils.isEmpty(password)){\n signInPasswordEditText.setError(\"please enter your password.\");\n return;\n }\n if(password.length()<6){\n signInPasswordEditText.setError(\"please enter correct password.\");\n return;\n }\n\n\n progressDialog.setMessage(\"Please wait...\");\n progressDialog.show();\n\n //sign in with email and password\n mAuth.signInWithEmailAndPassword(email,password).addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()){\n //check verified email or not\n if(mAuth.getCurrentUser().isEmailVerified()){\n startActivity(new Intent(SignInActivity.this,AppMainActivity.class));\n finish();\n Toast.makeText(SignInActivity.this,\"Welcome \"+mAuth.getCurrentUser().getEmail(), Toast.LENGTH_SHORT).show();\n }else{\n alertDialogBuilder(SignInActivity.this);\n Toast.makeText(SignInActivity.this,\"Please verify your email address.\",Toast.LENGTH_LONG).show();\n }\n }else{\n Toast.makeText(SignInActivity.this,task.getException().getLocalizedMessage(),Toast.LENGTH_LONG).show();\n }\n progressDialog.dismiss();\n }\n });\n }", "private void authFailed() {\n Toast.makeText(LoginActivity.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n }", "private void signIn(){\n // get text and email strings from fields\n String email = mEmailField.getText().toString();\n String password = mPasswordField.getText().toString();\n\n if(TextUtils.isEmpty(email) || TextUtils.isEmpty(password)) { // is pass/user empty?\n // if so alert user via toast\n Toast.makeText(LoginActivity.this,\n getResources().getString(R.string.empty_field_error)\n , Toast.LENGTH_LONG).show();\n }\n\n else { // else sign in via auth\n mFirebaseAuth.signInWithEmailAndPassword(email, password).addOnCompleteListener(\n new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n // alert user on complete if combination is wrong\n if (!task.isSuccessful()) {\n Toast.makeText(LoginActivity.this,\n getResources().getString\n (R.string.login_wrong_combination_error)\n ,Toast.LENGTH_LONG).show();\n }\n\n else {\n // else check if a profile exists for the user, if not create one\n\n // get current user\n final FirebaseUser user = mFirebaseAuth.getCurrentUser();\n\n // Attach a listener to read the data\n databaseReference.child(user.getUid())\n .addListenerForSingleValueEvent(\n new ValueEventListener() {\n\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n User userInfo = dataSnapshot.getValue(User.class);\n\n // null make a new one\n if (userInfo == null)\n {\n userInfo = new User();\n\n // update database using user id\n databaseReference.child\n (user.getUid()).setValue(userInfo);\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n Toast.makeText(LoginActivity.this,\n getResources().getString(R.string.db_error_text)\n + databaseError.getCode(),\n Toast.LENGTH_LONG).show();\n }\n });\n }\n }\n });\n }\n }", "@Override\n public void onAuthenticationFailed() {\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n Log.d(\"check\", \"in onActivityResult\");\n // Result returned from launching the Intent from GoogleSignInApi.getSignInIntent(...);\n if (requestCode == RC_SIGN_IN) {\n Log.d(\"sign in\", \"1\");\n GoogleSignInResult result = Auth.GoogleSignInApi.getSignInResultFromIntent(data);\n if (result.isSuccess()) {\n // session.setLogin(true);\n\n // Google Sign In was successful, authenticate with Firebase\n GoogleSignInAccount account = result.getSignInAccount();\n firebaseAuthWithGoogle(account);\n } else {\n Log.d(\"failed to google signin\", \"10\");\n // Google Sign In failed, update UI appropriately\n // [START_EXCLUDE]\n // updateUI(null);\n // [END_EXCLUDE]\n }\n }\n }", "private void authUser(String email, String password){\n firebaseAuth.signInWithEmailAndPassword(email, password).addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()){\n Log.d(TAG, \"onComplete: user logged in successfully\");\n Snackbar.make(view, \"User has logged in\", Snackbar.LENGTH_LONG).show();\n goToMainActivity();\n }\n if(!task.isSuccessful()){\n Log.d(TAG, \"onComplete: user's credentials're incorrect\");\n Snackbar.make(view, \"Login or password is incorrect\", Snackbar.LENGTH_LONG).show();\n }\n }\n });\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (!task.isSuccessful()) {\n //Log.w(TAG, \"signInWithEmail\", task.getException());\n Toast.makeText(Login.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n }\n\n // ...\n }", "protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n Util.Log.i(TAG, \"onActivityResult: requestCode: %b resultCode: %b\", requestCode == RC_SIGN_IN,\n resultCode==Activity.RESULT_OK);\n if (requestCode == RC_SIGN_IN) {\n// IdpResponse response = IdpResponse.fromResultIntent(data);\n GoogleSignInResult response = Auth.GoogleSignInApi.getSignInResultFromIntent(data);\n // Successfully signed in\n if (resultCode == Activity.RESULT_OK) {\n Task<GoogleSignInAccount> task = GoogleSignIn.getSignedInAccountFromIntent(data);\n try {\n // Google Sign In was successful, authenticate with Firebase\n account = task.getResult(ApiException.class);\n AuthCredential credential = GoogleAuthProvider.getCredential(account.getIdToken()\n , null);\n mAuth.signInWithCredential(credential).addOnCompleteListener(this);\n\n } catch (ApiException e) {\n Util.Log.d(TAG, \"sign in attempt failed\");\n progressMsg.setText(getString(R.string.progress_failed_signin));\n }\n } else {\n // Sign in failed\n\n progressBar.setVisibility(View.GONE);\n if (response == null) {\n Log.d(TAG, \"null response object\");\n progressMsg.setText(getString(R.string.progress_null_response));\n return;\n }\n int gStatusCode = response.getStatus().getStatusCode();\n Log.d(TAG, String.format(\"failed sign-in in response:(%d) %s\",gStatusCode, response.toString()));\n switch (gStatusCode) {\n case CommonStatusCodes.NETWORK_ERROR:\n case CommonStatusCodes.TIMEOUT:\n progressMsg.setText(getString(R.string.progress_no_internet));\n break;\n default:\n progressMsg.setText(GoogleSignInStatusCodes\n .getStatusCodeString(gStatusCode));\n }\n }\n }\n super.onActivityResult(requestCode, resultCode, data);\n }", "private void setUpFirebaseAuthentication() {\n authentication = FirebaseAuth.getInstance();\n authStateListener = firebaseAuth -> {\n currentUser = firebaseAuth.getCurrentUser();\n if (currentUser != null) {\n Log.d(TAG, \"Success\");\n Intent intent = new Intent(SignInActivity.this, HomePageActivity.class);\n startActivity(intent);\n\n } else {\n Log.d(\"HIRHEFOIH\", \"signed out\");\n }\n };\n }", "@Override\n public void onError(AuthError ae) {\n System.out.println(\"Error \" + ae);\n // Inform the user of the error\n }", "@Override\n public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {\n if(firebaseAuth.getCurrentUser() != null){\n // go to home screen via intent\n startActivity(\n new Intent(LoginActivity.this, NavigationActivity.class));\n }\n }", "void onSignInButtonClicked();", "private void signIn() {\n Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);\n startActivityForResult(signInIntent, SIGN_IN_CODE);\n }", "@Override\n public void onLogin() {\n toast(\"You are logged in\");\n }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n // Result returned from launching the Intent from GoogleSignInApi.getSignInIntent(...);\n if (requestCode == RC_SIGN_IN) {\n Task<GoogleSignInAccount> task = GoogleSignIn.getSignedInAccountFromIntent(data);\n try {\n // Google Sign In was successful, authenticate with Firebase\n GoogleSignInAccount account = task.getResult(ApiException.class);\n firebaseAuthWithGoogle(account);\n\n } catch (ApiException e) {\n // Google Sign In failed, update UI appropriately\n Log.w(TAG, \"Google sign in failed\", e);\n // [START_EXCLUDE]\n updateUI(null);\n // [END_EXCLUDE]\n }\n }else {\n mCallbackManager.onActivityResult(requestCode, resultCode, data);\n }\n }", "@Override\n public void onClick(View v) {\n String username = mTextUsername.getText().toString().trim(); //set username and password values\n String password = mTextPassword.getText().toString().trim();\n\n if (TextUtils.isEmpty(username)) {\n mTextUsername.setError(\"Username is Required\");\n return;\n }\n if (TextUtils.isEmpty(password)) {\n mTextUsername.setError(\"Password is required\");\n return;\n }\n if (password.length() < 6) {\n mTextPassword.setError(\"Password must be 6 or more characters\");\n return;\n }\n\n progressBar.setVisibility(View.VISIBLE); //progress bar appears\n fAuth.signInWithEmailAndPassword(username,password).addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) { //attempt to sign in with email and password\n if(task.isSuccessful()){\n Toast.makeText(LoginActivity.this, \"Login Succesful\", Toast.LENGTH_SHORT).show();\n startActivity(new Intent(LoginActivity.this,HomeActivity.class));\n }\n else{\n Toast.makeText(LoginActivity.this, \"Error \" + task.getException().getMessage(), Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "private void signIn() {\n mGoogleSignInClient = buildGoogleSignInClient();\n startActivityForResult(mGoogleSignInClient.getSignInIntent(), REQUEST_CODE_SIGN_IN);\n }", "public void loggedInSuccessful() {\n\t\tIntent intent = new Intent(this, MainActivity.class);\n\t\tstartActivity(intent);\n\t\tthis.finish();\n\t}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == RC_SIGN_IN) {\n // The Task returned from this call is always completed, no need to attach\n // a listener.\n Task<GoogleSignInAccount> task = GoogleSignIn.getSignedInAccountFromIntent(data);\n handleSignInResult(task);\n } else {\n callbackManager.onActivityResult(requestCode, resultCode, data);\n }\n\n super.onActivityResult(requestCode, resultCode, data);\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 }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n\n if (!task.isSuccessful()) {\n //Log.d(\"Memorization Game\", \"Problem signing in: \" + task.getException());\n showErrorDialog(\"There was a problem signing in\");\n } else {\n //SharedPreferences mpreference = getSharedPreferences(\"user_email\", Context.MODE_PRIVATE);\n //mpreference.edit().putString(\"email\",email).apply();\n Intent intent = new Intent(Activity_login.this, Home.class);\n finish();\n startActivity(intent);\n }\n\n }", "@Override\n\t\t\tpublic void onClick(View v)\n\t\t\t{\n\t\t\t\tToast.makeText(getApplicationContext(), \"Please Sign in to continue.\", Toast.LENGTH_SHORT).show();\n\t\t\t}", "@Override\n public void onAuthenticated(AuthData authData) {\n\n Context context = getApplicationContext();\n CharSequence text = \"Logged in\";\n int duration = Toast.LENGTH_SHORT;\n\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n //save uid\n //remove uid\n SharedPreferences sharedPref = getApplicationContext().getSharedPreferences(\n getString(R.string.preference_file_key), Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPref.edit();\n editor.putString(\"uid\", authData.getUid().toString());\n editor.commit();\n\n Intent goToNextActivity = new Intent(getApplicationContext(), MainActivity.class);\n startActivity(goToNextActivity);\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 }", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n // Result returned from launching the Intent from GoogleSignInApi.getSignInIntent(...);\n if (requestCode == RC_SIGN_IN) {\n GoogleSignInResult result = Auth.GoogleSignInApi.getSignInResultFromIntent(data);\n if (result.isSuccess()) {\n // Google Sign In was successful, authenticate with Firebase\n GoogleSignInAccount account = result.getSignInAccount();\n firebaseAuthWithGoogle(account);\n } else {\n // Google Sign In failed, update UI appropriately\n // [START_EXCLUDE]\n Log.d(\"FAILED\", \"FAILED\");\n // [END_EXCLUDE]\n }\n }\n }", "@Override\n public void onAuthenticationError(FirebaseError firebaseError) {\n Log.i(\"lt\",\"auth failed\");\n }", "private void DoAttemptSignon(View SignonButton)\n\t {\n\t \t\n\t \tClearOldErrors();\n\t \t\n\t \t// Validate Email address\n\t \tEditText EmailView = (EditText)findViewById(R.id.signonemail_edit);\n\t \tEmailAddress = EmailView.getText().toString();\n\t \t\n\t \tif(EmailAddress.length()==0)\n\t \t{\n\t \t\tDisplayError(R.id.signonemail_error,R.string.error_email_cannot_be_empty);\n\t \t\treturn;\n\t \t}\n\t \t\n\t \t// Validate password non-empty\n\t \tEditText PasswordView = (EditText)findViewById(R.id.signonpassword_edit);\n\t \tPassword = PasswordView.getText().toString();\n\t \tif(Password.length()==0)\n\t \t{\n\t \t\tDisplayError(R.id.signonpassword_error,R.string.error_password_cannot_be_empty);\n\t \t\treturn;\n\t \t}\n\t \t\n\t \tif(FreewayCoffeeXMLHelper.CheckPasswordStrength(Password)!=true)\n\t \t{\n\t \t\tshowDialog(PASSWORD_NOT_STRONG_DIALOG);\n\t \t\treturn;\n\t \t}\n\t \t// Auto signin\n\t \t//CheckBox AutoSigninView = (CheckBox)findViewById(R.id.signon_loginautomatically);\n\t \t//LoginAutomatically = AutoSigninView.isChecked();\n\t \tLoginAutomatically = true;\n\t \tDoLogin();\n\t \t\n\t \t\n\t }", "@Override\n\t\t\t\t\t\tpublic void onSyncErr() {\n\t\t\t\t\t\t\tnotifyLoginEvent(true);\n\t\t\t\t\t\t}", "@Override\n public void onStart() {\n super.onStart();\n // Check if user is signed in (non-null) and update UI accordingly.\n currentUser = firebaseAuth.getCurrentUser();\n firebaseAuth.addAuthStateListener(authStateListener);\n\n\n }", "boolean isSignedIn();", "@Override\r\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\tloading.dismiss();\r\n\t\t\t\t\t\t\t\tif(result.equals(\"0\"))\r\n\t\t\t\t\t\t\t\t\tT.mToast(SignUpActivity.this, \"Error\");\r\n\t\t\t\t\t\t\t\tif(result.equals(\"1\"))\r\n\t\t\t\t\t\t\t\t\tT.mToast(SignUpActivity.this,\r\n\t\t\t\t\t\t\t\t\t\t\t\"Sign in successfully\");\r\n\t\t\t\t\t\t\t\tif(result.equals(\"2\"))\r\n\t\t\t\t\t\t\t\t\tT.mToast(SignUpActivity.this, \"This user exists\");\r\n\t\t\t\t\t\t\t\tif(result.equals(\"3\"))\r\n\t\t\t\t\t\t\t\t\tT.mToast(SignUpActivity.this, \"Error\");\r\n\t\t\t\t\t\t\t}", "private void userLogin() {\n mLoginButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n String email = mEditTextEmail.getText().toString().trim();\n String password = mEditTextPassword.getText().toString().trim();\n\n if (email.isEmpty()) {\n mEditTextEmail.setError(\"Email is required\");\n mEditTextEmail.requestFocus();\n return;\n }\n\n if (!Patterns.EMAIL_ADDRESS.matcher(email).matches()) {\n mEditTextEmail.setError(\"Please enter a valid email\");\n mEditTextEmail.requestFocus();\n return;\n }\n\n if (password.isEmpty()) {\n mEditTextPassword.setError(\"Password is required\");\n mEditTextPassword.requestFocus();\n return;\n }\n\n if (password.length() < 6) {\n mEditTextPassword.setError(\"Minimum length of password should be 6\");\n mEditTextPassword.requestFocus();\n return;\n }\n if (mRememberCheckBox.isChecked()) {\n mPrefs.edit().putBoolean(\"rememberMe\", true).apply();\n mPrefs.edit().putString(\"rememberedEmail\", email).apply();\n mPrefs.edit().putString(\"rememberedPass\", password).apply();\n } else if (!mRememberCheckBox.isChecked()) {\n mPrefs.edit().putBoolean(\"rememberMe\", false).apply();\n }\n mProgressBar.setVisibility(View.VISIBLE);\n\n mAuth.signInWithEmailAndPassword(email, password).addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n mProgressBar.setVisibility(View.GONE);\n if (task.isSuccessful()) {\n if (mAuth.getCurrentUser().isEmailVerified()) {\n Intent mainMenu = new Intent(LoginActivity.this, MainMenu.class);\n startActivity(mainMenu);\n finish();\n } else {\n Toast.makeText(LoginActivity.this, \"Your email is not verified. Please go to your email to verify it.\", Toast.LENGTH_SHORT).show();\n }\n\n } else {\n Toast.makeText(LoginActivity.this, \"Invalid details or no connection. Please Try Again\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }\n });\n }", "@Override\n public void onPostAuthentication(JsonResponse response) {\n if (response != null) {\n if (response.isError()) {\n // Show messages\n this.setMessages(response.getMessages());\n } else {\n this.handleAuthenticationResponse(response);\n }\n }\n // Hide the progress indicator\n this.mProgressDialog.hide();\n }", "@Override\n\t\t\tpublic void onClick(View v)\n\t\t\t{\n\t\t\t\tToast.makeText(getApplicationContext(), \"Please Sign in to continue.\", Toast.LENGTH_SHORT).show();\n\n\t\t\t}", "@Override\n\tpublic void onAuthenticationError(FirebaseError error)\n\t{\n\t\tSystem.out.println(error.getMessage());\n\t}", "@Override\n\tpublic void onAuthenticated(AuthData authData)\n\t{\n\t\tSystem.out.println(\"Authenticated\");\n\t\tthis.isDone = true;\n\t}", "@Override\n public void onSuccess(AuthResult authResult) {\n Toast.makeText(Login1.this, \"Successfully Login\", Toast.LENGTH_SHORT).show();\n\n }" ]
[ "0.72032535", "0.7016239", "0.7005896", "0.6990961", "0.69405305", "0.6915852", "0.6841412", "0.6803573", "0.6788327", "0.67010736", "0.66398394", "0.6556806", "0.65196633", "0.6457884", "0.6453988", "0.64529425", "0.6404992", "0.637629", "0.6371218", "0.6364685", "0.6359339", "0.63591784", "0.6345565", "0.6331873", "0.6314938", "0.6304228", "0.6282921", "0.6267579", "0.6193189", "0.6184371", "0.6148325", "0.6125538", "0.6059447", "0.60520685", "0.6050794", "0.6048277", "0.6038426", "0.60303783", "0.6016413", "0.6009002", "0.59774894", "0.597458", "0.5971262", "0.5971262", "0.5969375", "0.59666073", "0.5959318", "0.5959318", "0.5959318", "0.5956973", "0.5954783", "0.5949051", "0.5939064", "0.5931904", "0.5930225", "0.5927176", "0.59259874", "0.59226274", "0.59081954", "0.59081954", "0.59081954", "0.59081954", "0.59024847", "0.5898798", "0.5891805", "0.58908015", "0.5886375", "0.5884414", "0.5882836", "0.5881203", "0.5868819", "0.58646595", "0.58645594", "0.58588916", "0.5836476", "0.5836315", "0.5820293", "0.5815294", "0.58097726", "0.58071405", "0.5800792", "0.5797775", "0.5795933", "0.579537", "0.578521", "0.5778374", "0.5768706", "0.57683957", "0.5767255", "0.57662755", "0.5763855", "0.5763677", "0.57557625", "0.57308376", "0.5730723", "0.57286114", "0.57228404", "0.57134235", "0.5707719", "0.5706436", "0.5703412" ]
0.0
-1
Called when submit button is clicked
void submitScore(View view){ calculateScore(); calculateRating(); displayMessage(); sendMail(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tbtnSubmit_click(e);\n\t\t\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n if (e.getSource() == submit) {\n int score = answerCheck();\n try {\n Submit submitButton = new Submit(userid, user.getText(), totalScore.getText(), score);\n setVisible(false);\n } catch (SQLException ex) {\n Logger.getLogger(Play.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }", "public void onClick(ClickEvent event) {\r\n System.out.println(\"Submit Button geklickt\");\r\n handleEvent();\r\n }", "public void submit() {\n driver.findElement(SUBMIT_SELECTOR).click();\n }", "public static void pressSubmit(){\n DriverManager.driver.findElement(Constans.SUBMIT_BUTTON_LOCATOR).click();\n }", "@Override\n public void Submit() {\n }", "public Submit_Button()\n\t\t\t{\n\t\t\t\tsuper(\"Submit\");\n\n\t\t\t\taddActionListener(new ActionListener()\n\t\t\t\t{\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t\t\t{\n\t\t\t\t\t\tloadText();\n\n\t\t\t\t\t\t// pass ssn input into patient instance to lookup tuple\n\t\t\t\t\t\tPatient p = new Patient(ssn);\n \n String result = p.search(selected_record_type);\n \n String[] values = result.split(\"\\n\");\n \n\t\t\t\t\t\t// create new instance of output panel to display result\n\t\t\t\t\t\tdisplayNewRecordOutput(new Patient_Record_Output(values));\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}", "public void submit()\n\t{\n\t\tString trackCsv = trackCsvInput.getText();\n\t\tString trackName = trackNameInput.getText();\n\t\t\n\t\tRadioButton selectedButton = (RadioButton) toggleColors.getSelectedToggle();\n\t\tString color = selectedButton.getText().toUpperCase();\n\t\t\n\t\tif (addTrack(trackName, trackCsv, color)) \n\t\t{\n\t\t\tStage currStage = (Stage) trackCsvInput.getScene().getWindow();\n\t\t\tcurrStage.close();\n\t\t\tCTC.ctcController.displayTrack();\n\t\t\tCTC.ctcController.displayLegend();\n\t\t}\n\t\telse\n\t\t\terrorMessage.setVisible(true);\n\t}", "public static void click_SubmitButton() {\n\t\tboolean bstatus;\n\n\t\tbstatus = clickElement(btn_Submit);\n\t\tReporter.log(bstatus, \"Submit Button is clicked\", \"Submit Button not clicked\");\n\n\t\t\n\t}", "private void btnSubmit_click(ActionEvent e) {\n\t\tString subjectName=txtSubjectName.getText();\n\t\tString STATUS=txtSTATUS.getText();\n\n\t\t//为空判断\n\t\tif(SysFun.isNullOrEmpty(subjectName)) {\n\t\t\tlblMsg.setText(\"提示:用户名不得为空!\");\n\t\t\treturn;\n\t\t}\n\t\tif(STATUS==null || STATUS.isEmpty()) {\n\t\t\tlblMsg.setText(\"提示:教室号不得为空!\");\n\t\t\treturn;\n\t\t}\n\t\t\n//\t\tLong or=0L;\n//\t\tif(rdoNo.isSelected()) {\n//\t\t\tor=0L;\n//\t\t}else if(rdoYes.isSelected()) {\n//\t\t\tor=1L;\n//\t\t}\n\n\t\tSubject item=subjectService.loadByName(subjectName);\n\t\t\n\t\tif(item!=null) {\n\t\t\tlblMsg.setText(\"提示:该管理员账号已存在!\");\n\t\t\treturn;\n\t\t}\n\t\tSubject bean=new Subject();\n\t\tbean.setSubjectName(subjectName);\n\t\tbean.setSTATUS(STATUS);\n\t\t\n\t\tLong result=0L;\n\t\tString errMsg=null;\n\t\ttry {\n\t\tresult=subjectService.insert(bean);\n\t\t}catch(Exception ex) {\n\t\t\terrMsg=ex.getMessage();\n\t\t}\n\t\t\n\t\tif(result>0) {\n\t\t\tJOptionPane.showMessageDialog(null, \"添加成功!\");\n\t\t\tif(subjectListFrm!=null) {\n\t\t\t\tsubjectListFrm.btnReset_click(null);\n\t\t\t\tsubjectListFrm.setVisible(true);\n\t\t\t}\n\t\t\tthis.dispose();\n\t\t}else {\n\t\t\tJOptionPane.showMessageDialog(null, \"添加失败!\");\n\t\t}\n\n\t\t\n\t\tif(subjectListFrm!=null) {\n\t\t\tsubjectListFrm.btnReset_click(null); \n\t\t\tsubjectListFrm.setVisible(true);\n\t\t}\n\t\tthis.dispose();\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tSubmit();\n\t\t\t\tfinish(); \n\t\t\t}", "public void clickOnSubmit() {\r\n\r\n\t\treportStep(\"About to click on Submit button \", \"INFO\");\r\n\r\n\t\tif(clickAfterWait(submitButton)) {\r\n\r\n\t\t\treportStep(\"Successfully clicked on the Submit button \", \"PASS\");\r\n\r\n\t\t}else {\r\n\t\t\tclickAfterWait(submitButton);\r\n\t\t\treportStep(\"Failed to click on the Submit button \", \"INFO\");\r\n\r\n\t\t}\r\n\t}", "public void clickSubmitButton(){\n actionsWithOurElements.clickOnElement(buttonSubmit);\n }", "@Step\r\n\tpublic void clickSubmit() {\r\n\t\tLOGGER.info(\"Clicking submit\");\r\n\t\tspeedoSubmit.click();\r\n\t}", "public String submitText();", "private void setupSubmitButton() {\n\t\tImageIcon submit_button_image = new ImageIcon(parent_frame.getResourceFileLocation() + \"submit.png\");\n\t\tJButton submit_button = new JButton(\"\", submit_button_image);\n\t\tsubmit_button.setBorderPainted(false);\n\t\tsubmit_button.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t//only enable submitting if festival has finished to avoid delayed voice prompts\n\t\t\t\tif(parent_frame.getFestival().isLocked()){\n\t\t\t\t\tfeedback_display.append(\"\\tPlease submit after voice prompt has finished.\\n\");\n\t\t\t\t} else {\n\t\t\t\t\tprocessAttempt(input_from_user.getText());\n\t\t\t\t}\n\t\t\t\tinput_from_user.requestFocusInWindow();//gets focus back to the spell here field\n\t\t\t}\n\t\t});\n\t\tsubmit_button.addMouseListener(new VoxMouseAdapter(submit_button,null));\n\t\tadd(submit_button);\n\t\tsubmit_button.setBounds(32, 598, 177, 100);\n\t}", "public void buttonClick(ClickEvent event) {\n fireEvent(new SubmitEvent(doneButton, SubmitEvent.SUBMITTED));\n \n // close popup window\n close();\n }", "public void submitText() {\r\n \t\tthis.dialog.clickOK();\r\n \t}", "private void submitBtnActionPerformed(java.awt.event.ActionEvent evt) {\n correctQuiz();\n JOptionPane.showMessageDialog(null, \"You scored \" + score + \"/5\");\n f.saveScores(name, score);\n new Menu().setVisible(true);\n this.setVisible(false);\n this.dispose();\n }", "public void submit(ActionEvent actionEvent) {\n if(checkFields()) {\n try {\n newStudent = new Student(firstName.getText(), lastName.getText(),birthday.getValue(),selectImage.getImage());\n activities();\n System.out.println(\"new student: \" + newStudent);\n studentList.add(newStudent);\n viewStudent(actionEvent);\n } catch (IllegalArgumentException | IOException e){\n errorDisplay.setText(e.getMessage());\n }\n }\n }", "@Override\n public void onClick(View view) {\n if ( checkValidation () )\n submitForm();\n \n }", "@When(\"^Click's on Submit Button$\")\n\tpublic void click_s_on_Submit_Button() throws Throwable {\n\t\treviewPageObjects.clickonsubmit();\n\t}", "@FXML\n\tprivate void submitForm()\n\t{\n \tSystem.out.println(\"submitted\");\n \tsubmit.setDisable(true);\n \tif ( file_path.getText().isEmpty() )\n \t{\n \t\tfinal DirectoryChooser fileChooser = new DirectoryChooser(); \n \t\tStage stage = new Stage();\n \t\tstage.setTitle(\"Choose Directory\");\n \t\t\n \t\tFile folder = fileChooser.showDialog(stage);\n \t\toutput.openFile(folder.toString() + \"\\\\OverwatchGames.csv\");\n \t\tfile_path.setText(folder.toString() + \"\\\\OverwatchGames.csv\");\n \t}\n \telse\n \t{\n \t\tSystem.out.println(\"File Path: \" + file_path.getText());\n \t}\n \toutput.outputResults( mainApp.getPlayers(),\n \t\t\tmainApp.getHeros(), \n \t\t\tmainApp.getMap(), \n \t\t\tmainApp.getTimerList());\n \tsubmit.setDisable(false);\n\t}", "@Override\n\tprotected final void onSubmit()\n\t{\n\t}", "public void clickOnSubmitButton() throws FileNotFoundException, IOException, ParseException, InterruptedException\n\t{\n\t\twaitForVisibility(sbmnit);\n\t\tsbmnit.click();\n\t}", "public void clickSubmitOnly() {\r\n\t\tutilities.clickOnElement(btnSubmit);\r\n\t}", "private void submit_attendance() {\n }", "private void btnSubmit_click(ActionEvent e) {\n\t\tString stuAnswer = \"\";\r\n\t\tif (rdoItemA.isSelected()) {\r\n\t\t\tstuAnswer = \"A\";\r\n\t\t}\r\n\t\tif (rdoItemB.isSelected()) {\r\n\t\t\tstuAnswer = \"B\";\r\n\t\t}\r\n\t\tif (rdoItemC != null) {\r\n\t\t\tif (rdoItemC.isSelected()) {\r\n\t\t\t\tstuAnswer = \"C\";\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (rdoItemD != null) {\r\n\t\t\tif (rdoItemD.isSelected()) {\r\n\t\t\t\tstuAnswer = \"D\";\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (!stuAnswer.isEmpty()) {\r\n\t\t\tExamItem bean = eiList.get(questionNO - 1);\r\n\r\n\t\t\tif (bean.getStuAnswer() == null || !bean.getStuAnswer().equalsIgnoreCase(stuAnswer)) {\r\n\t\t\t\tbean.setStuAnswer(stuAnswer);\r\n\t\t\t\tif (bean.getStdAnswer().equalsIgnoreCase(stuAnswer)) {\r\n\t\t\t\t\tbean.setMarkResult(1l);\r\n\t\t\t\t\tbean.setGainScore(bean.getStdScore());\r\n\t\t\t\t} else {\r\n\t\t\t\t\tbean.setMarkResult(0l);\r\n\t\t\t\t\tbean.setGainScore(0l);\r\n\t\t\t\t}\r\n\t\t\t\texamItemService.update(bean);\r\n\t\t\t}\r\n\t\t}\r\n\t\tLong result = examItemService.countNull(pk.longValue());\r\n\t\tString message = \"\";\r\n\t\tif ((questionNum - result) > 0) {\r\n\t\t\tmessage = \"还有\" + (questionNum - result) + \"道题未写,确认交卷?\";\r\n\t\t} else {\r\n\t\t\tmessage = \"确认交卷?\";\r\n\t\t}\r\n\t\tint option = JOptionPane.showConfirmDialog(null, message, \"系统提示\", JOptionPane.YES_NO_OPTION);\r\n\t\tif (option == JOptionPane.YES_OPTION) {\r\n\t\t\tLong trueItem = examItemService.countTrue(pk.longValue());\r\n\t\t\tLong totalScore = eiList.get(0).getStdScore() * trueItem;\r\n\t\t\tExam exam = examService.load(pk.longValue());\r\n\t\t\texam.setTotalScore(totalScore);\r\n\t\t\texamService.update(exam);\r\n\t\t\tJOptionPane.showMessageDialog(null, \"考试结束,\" + totalScore + \"分\");\r\n\t\t\tif (listFrm != null) {\r\n\t\t\t\tlistFrm.setVisible(true);\r\n\t\t\t\tthis.dispose();\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}", "public void selectSubmitButton() {\n\t\tel = Browser.getDriver().findElement(element_submit_button);\n\t\tuihelper.click(el);\n\t}", "public void ClickLogin()\n\t{\n\t\t\n\t\tbtnLogin.submit();\n\t}", "private void onClickSaveButton() {\n // Validate and save form\n if (mDynamicForm.validate()) {\n triggerSubmitForm(mDynamicForm.getForm().getAction(), mDynamicForm.save());\n }\n }", "void SubmitButton() {\r\n\t\tint checker = Accounts.checkUser(username.getText(), password.getText());\r\n\t\tif(checker == -1) {\r\n\t\t\tsetVisible(false);\r\n\t\t\tdispose();\r\n\t\t\tAdminScreen adminScreen = new AdminScreen();\r\n\t\t}\r\n\t\telse if(checker >= 0) {\r\n\t\t\tsetVisible(false);\r\n\t\t\tdispose();\r\n\t\t\tStudentScreen studentScreen = new StudentScreen(checker);\r\n\t\t}\r\n\t\telse {\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Error: username \"\r\n\t\t\t\t\t+ \"and/or password is incorrect.\");\r\n\t\t\tpassword.setText(\"\");\r\n\t\t\tusername.setText(\"\");\r\n\t\t}\r\n\t\t\r\n\t}", "private void submitForm() {\n Toast.makeText(this, \"Registering...\", Toast.LENGTH_LONG).show();\n }", "private void addSubmitListener() {\n\t\tview.addSubmitListener(new SubmitListener());\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n if (e.getSource() == submit) {\n createDog();\n } else if (e.getSource() == goBack) {\n doggyDayCareGui.returnFromMakeDog();\n }\n }", "public void submitButtonPushed() throws IOException {\n\n if (vehicleRegistration.getText().isEmpty() || driverLicense.getText().isEmpty()\n || insuranceProvider.getText().isEmpty() || insuranceNumber.getText().isEmpty()) {\n\n Validator.errorBox(\"Incorrect Info\",\n \"Please Enter Valid Information\");\n\n } else {\n\n Stage stage = main.MainLogin.getPrimaryStage();\n\n Parent signInParent = FXMLLoader.load(getClass()\n .getResource(\"/backgroundcheck/BackGroundCheck.fxml\"));\n\n stage.setScene(new Scene(signInParent));\n\n stage.show();\n }\n }", "public void onSubmitRating(View view) {\n Toast.makeText(this, \"Rating Submitted.\", Toast.LENGTH_SHORT).show();\n finish();\n }", "private void displaySubmitButton() {\n RegularButton submitButton = new RegularButton(\"SUBMIT\", 1000, 600);\n submitButton.setOnAction(e -> handleSubmit());\n\n sceneNodes.getChildren().add(submitButton);\n }", "@Override\n public void onClick(View v) {\n if(checkEmptyFields()){\n //submit not successful\n }else {\n //add to database\n Toast.makeText(getApplicationContext(), \"Submit Successful\", Toast.LENGTH_SHORT).show();\n }\n }", "public void submit_intsatpos(View button) {\n }", "@Override\n\t\t\tpublic void onSubmitComplete(FormSubmitCompleteEvent event) {\n\n\t\t\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}", "private void submitForm() {\n final Dialog dialog = new Dialog(context);\n\t\t dialog.setContentView(R.layout.dialogbox);\n\t\t dialog.setTitle(\"Sucess!\");\n\t\t dialog.setCancelable(false);\n\t dialog.setCanceledOnTouchOutside(false);\n\t\t TextView txt = (TextView) dialog.findViewById(R.id.errorlog);\n\t\t txt.setText(\"Registration Successfull.\");\n\t\t Button dialogButton = (Button) dialog.findViewById(R.id.release);\n\t\t dialogButton.setOnClickListener(new OnClickListener() {\n\t\t\t public void onClick(View vd) {\n\t\t\t\t change.setEnabled(true);\n\t\t\t\t dialog.dismiss();\n\t\t\n\t\t}\n\t\t});\n\t\t dialog.show();\n}", "private void submit() {\r\n\t\tassignTracked();\r\n\t\tBkitPoma.startLoading(constants.BkitPoma_startLoading_wating());\r\n\t\tpostSubmit();\r\n\t}", "public void actionPerformed (ActionEvent ae)\n {\n if (ae.getActionCommand().equals (\"Submit\"))\n {\n String name = nameField.getText();\n if (name.length() > 0)\n {\n HighScoreManager.scores.add (location,new HighScore (name,GameEngine.getLayoutAsString(),score));\n HighScoreManager.scores.remove (10);\n ((ActionListener)parent).actionPerformed (new ActionEvent (this, ActionEvent.ACTION_PERFORMED,\"Submit\"));\n }\n else\n {\n JOptionPane.showMessageDialog (this, \"You must input a name\", \"Name Error\", JOptionPane.ERROR_MESSAGE);\n }\n }\n }", "@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}", "public SelenideElement submitButton() {\n return formPageRoot().$(By.xpath (\"//button[@type='submit']\")); \n }", "@Override\n\t\t\tpublic void onSuccess() {\n\t\t\t\tToast.makeText(MainActivity.this, \"submit success\", Toast.LENGTH_LONG).show();\n\t\t\t}", "@Override public void actionPerformed(java.awt.event.ActionEvent arg0) {\n\t\tJButton jb=new JButton();\n\t\t\n\t\tjb=(JButton) arg0.getSource();\n\t\t\n\t\t//TypeOfJob=jtxp1a.getText();\n\t\t\n\t\tif(jb==Submit)\n\t\t{\n\t\tTypeOfJob=(String) Kindofjobs.getSelectedItem();\n\t\tDescription=jtxp1b.getText();\n\t\t\n\t\tDatess=(String) Dates.getSelectedItem();\n\t\tMonthh=(String) Months.getSelectedItem();\n\t\t\n\t\n\t\tKindofjobs.setEnabled(false);\n\t\tjtxp1b.setEnabled(false);\n\t\tDates.setEnabled(false);\n\t\tMonths.setEnabled(false);\n\t\t\n\t\tAdd_Client(this);\n\n\n\t\tif(count==0)\n\t\t{\n\t\t\tcount++;\n\t\t\tcm1.Make_managerp();\n\t\t}\t\n\t\n\n\t}\n\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tif(parent_frame.getFestival().isLocked()){\n\t\t\t\t\tfeedback_display.append(\"\\tPlease submit after voice prompt has finished.\\n\");\n\t\t\t\t} else {\n\t\t\t\t\tprocessAttempt(input_from_user.getText());\n\t\t\t\t\tinput_from_user.requestFocusInWindow(); //gets focus back on the field\n\t\t\t\t}\n\t\t\t}", "public void toggleSubmitButton(){\n switch (mSubmitButton.getText().toString()){\n case \"Submit\":\n mSubmitButton.setText(\"Next\");\n mSubmitButton.setOnClickListener(view -> recreate());\n break;\n case \"Next\":\n mSubmitButton.setText(\"Submit\");\n mSubmitButton.setOnClickListener(view -> mGameController.checkGuess());\n break;\n }\n }", "public MainPage submitForm() {\n LOGGER.info(\"Clicked the button 'LOGIN'\");\n clickOnElement(loginButtonLocator);\n return MainPage.Instance;\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tuploadButton.setLabel(\"Uploading...\");\n\t\t\t\tsubmitConfiguration();\n\t\t\t\tuploadButton.setLabel(\"Upload\");\n\t\t\t}", "public void performSubmit() {\n\t\tgetWrappedElement().submit();\n\t}", "private void onClickSignIn(){\n if(checkValidation()){\n //if Validation is ok\n submitForm();\n }\n else{\n //Something went wrong...\n Toast.makeText(LauncherActivity.this, \"Form contains error!\", Toast.LENGTH_LONG).show();\n }\n }", "@FXML\n private void _submitAnswer(ActionEvent _event) {\n Game currentGame = GameFactory.getCurrentGameInstance();\n currentGame.processAnswer(_answerInput.getText());\n Map<String, Object> data = currentGame.createMap();\n updateView(data);\n this._answerInput.setText(\"\");\n if (!currentGame.gameOver) {\n this._submitBtn.setDisable(true);\n this._nxtQuestion.setDisable(false);\n } else {\n this._submitBtn.setDisable(true);\n this._nxtQuestion.setDisable(true);\n }\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 actionPerformed(ActionEvent e) \r\n\t{\r\n\t\t//Checks which button is pressed and calls the relevant method\r\n\t\tif (e.getSource() == nextQuestionButton)\r\n\t\t{\r\n\t\t\tfetchNewQuestion();\r\n\t\t}\r\n\t\telse if (e.getSource() == submitAnswerButton)\r\n\t\t{\r\n\t\t\tcheckAnswer();\r\n\t\t}\r\n\t}", "@Override\n\t\t\tpublic void onPreSubmit() {\n\t\t\t}", "@Override\n\t\t\tpublic void onPreSubmit() {\n\t\t\t}", "@Override\n public void actionPerformed(ActionEvent actionEvent) {\n String playerName=nameTextField.getText();\n String playerNumber=numberTextField.getText();\n String message=\"\";\n\n if(playerName.equals(\"\"))\n {\n message=\"the name field is empty! \\n\";\n }\n if(playerNumber.equals(\"\")||(Integer.parseInt(playerNumber)!=2&&(Integer.parseInt(playerNumber))!=3))\n {\n message+=\"Remember a game is composed by 2 or 3 players\";\n }\n if (actionEvent.getActionCommand().equals(\"submit\"))\n {\n Choice c=new PlayerNumberChoice(playerName,Integer.parseInt(playerNumber));\n view.setPlayerName(playerName);\n view.notify(c);\n submitButton.setEnabled(false);\n }\n else\n {\n JOptionPane.showMessageDialog(lobbyWindowFrame,message);\n }\n }", "public String OnSubmit() {\n\t\tFacesContext context = FacesContext.getCurrentInstance();\r\n\t\tUser user1 = context.getApplication().evaluateExpressionGet(context, \"#{user}\", User.class);\r\n\t\t\r\n\t\t// test purposes, log results to console\r\n\t\tSystem.out.println(\"First Name is: \" + user1.getFirstName());\r\n\t\tSystem.out.println(\"Last Name: \" + user1.getLastName());\r\n\t\t\r\n\t\t// prints message to console to tell us which business service selected in beans.xml\r\n\t\tservice.test();\r\n\t\t\r\n\t\t// start timer when log is clicked\r\n\t\t\r\n\t\ttimer.setTimer(5000);\r\n\t\t\r\n\t\t// put user back in context\r\n\t\tFacesContext.getCurrentInstance().getExternalContext().getRequestMap().put(\"user\", user1);\r\n\t\t\r\n\t\t// show next page\r\n\t\treturn \"Response.xhtml\";\r\n\t}", "@FXML\n\t private void loadsubmit(ActionEvent event) {\n\t \t if (!isReadyForSubmission) {\n\t Alert alert = new Alert(Alert.AlertType.ERROR);\n\t alert.setTitle(\"Failed\");\n\t alert.setHeaderText(null);\n\t alert.setContentText(\"Please select a book to submit\");\n\t alert.showAndWait();\n\t return;\n\t }\n\n\t Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\n\t alert.setTitle(\"Confirm Submission Operation\");\n\t alert.setHeaderText(null);\n\t alert.setContentText(\"Are you sure want to return the book ?\");\n\n\t Optional<ButtonType> response = alert.showAndWait();\n\t if (response.get() == ButtonType.OK) {\n\t String id = Bookid.getText();\n\t String ac1 = \"DELETE FROM ISSUE_LMS WHERE BOOKID = '\" + id + \"'\";\n\t String ac2 = \"UPDATE BOOK_LMS SET ISAVAIL = TRUE WHERE ID = '\" + id + \"'\";\n\n\t if (dbhandler.execAction(ac1) && dbhandler.execAction(ac2)) {\n\t Alert alert1 = new Alert(Alert.AlertType.INFORMATION);\n\t alert1.setTitle(\"Success\");\n\t alert1.setHeaderText(null);\n\t alert1.setContentText(\"Book Has Been Submitted\");\n\t alert1.showAndWait();\n\t } else {\n\t Alert alert1 = new Alert(Alert.AlertType.ERROR);\n\t alert1.setTitle(\"Failed\");\n\t alert1.setHeaderText(null);\n\t alert1.setContentText(\"Submission Has Been Failed\");\n\t alert1.showAndWait();\n\t }\n\t } else {\n\t Alert alert1 = new Alert(Alert.AlertType.INFORMATION);\n\t alert1.setTitle(\"Cancelled\");\n\t alert1.setHeaderText(null);\n\t alert1.setContentText(\"Submission Operation cancelled\");\n\t alert1.showAndWait();\n\t }\n\t }", "public void setSubmit(String submit) {\n this.submit = submit;\n }", "public abstract void onSubmit(String text);", "void okButtonClicked();", "private void submitBtnClicked() {\n\n clearIncomplete(locationComboBox);\n clearIncomplete(avTypeComboBox);\n clearIncomplete(avDate);\n clearIncomplete(avDesc);\n clearIncomplete(avEmployeeComboBox);\n\n if (locationComboBox.getValue() == null\n || !locationComboBox.getItems().contains(locationComboBox.getValue())\n || avTypeComboBox.getValue() == null\n || avDesc.getText().equals(\"\")\n || avDate.getValue() == null\n || (Settings.getSettings().getCurrentPermissions() == 3\n && ((avEmployeeComboBox.getValue() == null)\n || !avEmployeeComboBox.getItems().contains(avEmployeeComboBox.getValue())))) {\n if (locationComboBox.getValue() == null\n || !locationComboBox.getItems().contains(locationComboBox.getValue())) {\n incomplete(locationComboBox);\n }\n if (avTypeComboBox.getValue() == null) {\n incomplete(avTypeComboBox);\n }\n if (avDesc.getText().equals(\"\")) {\n incomplete(avDesc);\n }\n if (avDate.getValue() == null) {\n incomplete(avDate);\n incomplete(avDate);\n }\n if (avEmployeeComboBox.getValue() == null\n || !avEmployeeComboBox.getItems().contains(avEmployeeComboBox.getValue())) {\n incomplete(avEmployeeComboBox);\n }\n nonCompleteForm(stackPane);\n } else {\n Service service = new Service(DataOperations.generateUniqueID(\"AV\"), \"Audio Visual\");\n\n service.setCategory((String) avTypeComboBox.getValue());\n service.setLocation(locationComboBox.getValue().toString());\n service.setDate(avDate.getValue().toString());\n service.setDescription(avDesc.getText());\n service.setRequester(settings.getCurrentUsername());\n if (settings.getCurrentPermissions() == 3) {\n service.setEmployee((String) avEmployeeComboBox.getValue());\n } else {\n service.setEmployee(\"admin\");\n }\n\n try {\n DataOperations.saveService(service);\n } catch (SQLException throwables) {\n throwables.printStackTrace();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n }\n\n submittedPopUp(stackPane);\n parent.loadCenterSubPage(\"ServiceRequestNavigator.fxml\");\n clearButton();\n }\n }", "private void btnIngresarActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void btnIngresarActionPerformed(java.awt.event.ActionEvent evt) {\n }", "public boolean submitPerformed(SubmitEvent e) throws Exception {\r\n\t\tif (e.getComponent() == _addButton)\r\n\t\t\ttryAdd();\r\n\t\telse if (e.getComponent() == _saveButton)\r\n\t\t\tdoSave();\r\n\t\telse if (e.getComponent() == _cancelButton) {\r\n\t\t\ttryCancel();\r\n\t\t} else if (e.getComponent() == _deleteButton) {\r\n\t\t\ttryDelete();\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public void performSubmit(Action action) {\n performSubmit(action, true);\n }", "protected void onSubmit() {\n\n Building b = new Building(c.BuildingTypeId, c.StyleId, c.CityId,\n c.Architectural_element_Id, c.Agesid, c.Latitude, c.Longtitude,\n c.buildingname, c.Address);\n BuildingCollection bc = new BuildingCollection();\n bc.AddBuilding(b);\n this.setResponsePage(new BuildingListWithPropertiesPage());\n\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tSave();\n\t\t\t}", "private void submitForm() {\n this.setDisable(true);\n clearErrorMessage();\n if(validateForm()) {\n CharSequence chars = passwordField.getCharacters();\n String username = usernameField.getText();\n this.controller.validateLoginCredentials(username, chars);\n }\n this.setDisable(false);\n }", "@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\tlogger.info(\"click rootstage's submit button\");\n\n\t\t\t\tScreensContainer container = new ScreensContainer();\n\t\t\t\tcontainer.registerScreen(ID_SHOWPROBLEM, file_showproblem);\n\t\t\t\tcontainer.registerScreen(ID_SUBMITCODE, file_submitcode);\n\n\t\t\t\tStage dialogStage = new Stage();\n\t\t\t\tdialogStage.setTitle(\"在线提交\");\n\t\t\t\tdialogStage.initModality(Modality.WINDOW_MODAL);\n\t\t\t\tdialogStage.initOwner(rootLayout.getScene().getWindow());\n\n\t\t\t\tScene scene = new Scene(container);\n\t\t\t\tdialogStage.setScene(scene);\n\t\t\t\tcontainer.setScreen(ID_SHOWPROBLEM);\n\n\t\t\t\tdialogStage.showAndWait();\n\n\t\t\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tJOptionPane.showMessageDialog(null, \"保存成功\");\n\t\t}", "public SubmitPage(final PageParameters parameters) {\n\n Form form = new Form(\"form\");\n orgLabel = new TextField<String>(\"orgLabel\", new Model<String>(\"\"));\n message = new TextArea<String>(\"message\", new Model<String>(\"\"));\n form.add(orgLabel);\n form.add(message);\n form.add(new Button(\"button\")\n {\n @Override\n public void onSubmit()\n {\n String orgLabelString = orgLabel.getModelObject();\n String messageString = message.getModelObject();\n \n SessionFactory factory = OrganizationManager.getSessionFactory();\n Session session = factory.openSession();\n Transaction tx = session.beginTransaction();\n Query query = session.createQuery(\"from Organization where orgLabel = ?\");\n query.setParameter(0, orgLabelString);\n List<Organization> organizations = query.list();\n Organization organization;\n if (organizations.size() == 0)\n {\n organization = new Organization();\n organization.setParentOrganization((Organization)session.get(Organization.class, 1));\n organization.setOrgLabel(orgLabelString);\n session.save(organization);\n }\n else\n {\n organization = organizations.get(0);\n }\n SubmitterProfile submitterProfile = organization.getPrimaryProfile();\n if (submitterProfile == null)\n {\n submitterProfile = new SubmitterProfile();\n submitterProfile.setProfileLabel(\"HL7\");\n submitterProfile.setProfileStatus(SubmitterProfile.PROFILE_STATUS_TEST);\n submitterProfile.setOrganization(organization);\n submitterProfile.setDataFormat(SubmitterProfile.DATA_FORMAT_HL7V2);\n submitterProfile.setTransferPriority(SubmitterProfile.TRANSFER_PRIORITY_NORMAL);\n session.save(submitterProfile);\n organization.setPrimaryProfile(submitterProfile);\n }\n tx.commit();\n StringWriter stringWriter = new StringWriter();\n PrintWriter out = new PrintWriter(stringWriter);\n try \n {\n // TODO IncomingServlet.processStream(false, out, session, submitterProfile, messageString);\n }\n catch (Exception e)\n {\n e.printStackTrace(out);\n }\n out.close();\n results = stringWriter.toString();\n }\n });\n add(new Label(\"results\"));\n add(form);\n }", "public void submit(View v) {\n switch (climb.getCheckedRadioButtonId()) {\n case R.id.climbNoAttempt:\n MainActivity.db.climb = 1;\n break;\n case R.id.climbSuccess:\n MainActivity.db.climb = 2;\n break;\n case R.id.climbFail:\n MainActivity.db.climb = 3;\n break;\n default:\n MainActivity.db.climb = 0;\n break;\n }\n MainActivity.db.comment = comments.getText().toString();\n MainActivity.db.catchTime = catchTimeValue;\n MainActivity.db.climbTime = climbTimeValue;\n Intent submit = new Intent(this, submit.class);\n startActivity(submit);\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t}", "private void handleSubmitOnPre() {\n }", "@SuppressLint(\"ShowToast\")\n @Override\n public void handleOnSubmitButtonClick() {\n if(locationSelectorPresenter.getSelectedLocation().getLatLng() != null){\n Intent output = new Intent();\n output.putExtra(StringConstants.INTENT_LOCATION_SELECTOR_LAT, locationSelectorPresenter.getSelectedLocation().getLatLng().latitude);\n output.putExtra(StringConstants.INTENT_LOCATION_SELECTOR_LNG, locationSelectorPresenter.getSelectedLocation().getLatLng().longitude);\n setResult(RESULT_OK, output);\n finish();\n }else{\n Log.d(\"print\", \"No location\");\n Toast.makeText(getApplicationContext(), \"No location selected.\", Toast.LENGTH_LONG).show();\n }\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tfetchButton.setLabel(\"Fetching...\");\n\t\t\t\tsubmitConfigSubmissionRequest();\n\t\t\t\tfetchButton.setLabel(\"Fetch\");\n\t\t\t}", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n if (request.getParameter(\"signUpButton\") != null) {\n response.sendRedirect(\"SignUpView\");\n } else {\n loginFormValidation(request, response);\n }\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\ttry {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tinputListenerForLoginButton();\n\t\t\t\t\t} catch (ParseException e1) {\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}", "public ComplaintSubmitted() {\n initComponents();\n dtm = (DefaultTableModel) cTable.getModel();\n this.showContent(\"Waiting For Approval\");\n this.setLocationRelativeTo(null);\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\n\t\t\t}", "private void submitForm() {\n // Build list params\n List<NameValuePair> list = new ArrayList<>();\n list.add(new BasicNameValuePair(\"tag\", AppConfig.TAG_LOGIN));\n list.add(new BasicNameValuePair(\"username\", editTextLogin.getText().toString()));\n list.add(new BasicNameValuePair(\"password\", editTextPassword.getText().toString()));\n\n ConnectionTask connectionTask = new ConnectionTask(this, list);\n connectionTask.execute();\n }", "@Override\r\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tsaveChanges();\r\n\t\t\t\t\t\r\n\t\t\t\t}", "@When(\"^click the submit button$\")\n public void click_the_submit_button() throws Throwable {\n \tSystem.out.println(\"click the button\");\n //throw new PendingException();\n }", "private void jButtonOkActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonOkActionPerformed\n \n }", "@WebElementLocator(webDesktop = \"//input[@type='submit']\",webPhone = \"//input[@type='submit']\")\n private static WebElement buttonSubmit() {\n return getDriver().findElement(By.xpath(new WebElementLocatorFactory().getLocator(LoginPage.class, \"buttonSubmit\")));\n }", "@Override\n public void onClick(View view) {\n if (view.getId() == R.id.btnSubmit) {\n tableNum = String.valueOf(textInput.getText());\n Intent intent = new Intent(this, PizzeriaMainActivity.class);\n intent.putExtra(CLE_DONNEES, tableNum);\n startActivity(intent);\n }\n }", "private void handleSubmit(){\n // Check if the fields are the properly inserted (no label displayed and no empty fields)\n if (!invalidBirthdayLabel.isVisible() && !invalidConfirmPasswordLabel.isVisible() &&\n !invalidEmailLabel.isVisible() && !invalidNameLabel.isVisible() && !invalidPasswordLabel.isVisible() &&\n !invalidSurnameLabel.isVisible() && !surnameTF.getText().equals(\"\") && !usernameTF.getText().equals(\"\") &&\n !passwordTF.getText().equals(\"\") && !nameTF.getText().equals(\"\") && !emailTF.getText().equals(\"\") &&\n !confirmPasswordTF.getText().equals(\"\") && !country.getValue().toString().equals(\"\")\n ) {\n InvalidFormEntryLabel resultLabel;\n // Get the Date\n LocalDate localDate = birthdayDP.getValue();\n Instant instant = Instant.from(localDate.atStartOfDay(ZoneId.systemDefault()));\n Date date = Date.from(instant);\n\n User user = new User(\n false,\n surnameTF.getText(),\n nameTF.getText(),\n usernameTF.getText(),\n passwordTF.getText(),\n emailTF.getText(),\n date,\n country.getValue().toString());\n\n // Create a connection to MongoDB and insert the user\n UserManager userManager = UserManagerFactory.buildManager();\n\n resultLabel = new InvalidFormEntryLabel(\"\", 800, 600, false);\n try {\n if(userManager.register(user)) {\n resultLabel.setText(\"Sign up successfully done\");\n resultLabel.setVisible(true);\n resultLabel.setStyle(\"-fx-background-color: green;\");\n\n // ADD IT ALSO IN NEO4J\n UserNetworkManager userNetworkManager = UserNetworkManagerFactory.buildManager();\n userNetworkManager.addUser(user);\n }\n } catch (Exception e) {\n resultLabel.setText(\"Username already exists\");\n resultLabel.setVisible(true);\n }\n\n\n sceneNodes.getChildren().add(resultLabel);\n }\n\n }", "public void actionPerformed(ActionEvent arg0) {\n\t\t\t\tnew UserData(Username,true,\"Verification\");\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t}" ]
[ "0.79526126", "0.76400995", "0.7509606", "0.7448749", "0.72709715", "0.7242681", "0.70422304", "0.70274925", "0.70155567", "0.6999863", "0.6963435", "0.6922909", "0.68819106", "0.6834754", "0.67873657", "0.6768584", "0.6746616", "0.67332715", "0.6694187", "0.6654655", "0.662141", "0.6616399", "0.65967685", "0.65691435", "0.65508413", "0.6531249", "0.6503489", "0.64962536", "0.64951617", "0.64919084", "0.6444246", "0.64154106", "0.6390282", "0.63802344", "0.6357227", "0.63409543", "0.6319806", "0.62952393", "0.62732244", "0.62713724", "0.6247504", "0.6238186", "0.62343216", "0.62109894", "0.618867", "0.6180328", "0.61797804", "0.6176048", "0.61617386", "0.6150712", "0.6139762", "0.6139602", "0.6136164", "0.6134576", "0.61245435", "0.6074962", "0.60691464", "0.60588336", "0.6041378", "0.6041378", "0.6034421", "0.60338676", "0.6023936", "0.6002224", "0.59871906", "0.59766805", "0.59533405", "0.5951438", "0.5951438", "0.59505415", "0.59448934", "0.59343904", "0.5923916", "0.59194773", "0.5890422", "0.5889181", "0.58696294", "0.5865693", "0.5857005", "0.5857005", "0.58565086", "0.58565086", "0.58565086", "0.58565086", "0.5848618", "0.5848038", "0.58439714", "0.5830586", "0.58305675", "0.5826138", "0.58200216", "0.5819118", "0.5817695", "0.5811914", "0.5810443", "0.5807714", "0.5807493", "0.5800889", "0.57985157", "0.57970506" ]
0.593531
71
Calculates the score based on given answers
void calculateScore(){ playerScore = 0; for(int i = 1; i<=10; i++) { scoreQuestion(i); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "double scoreAnswer(Question question, Answer answer);", "private int computeScore() {\n int score = 0;\n for (int i = 0; i < MainActivity.DEFAULT_SIZE; i++) {\n TextView answerView = (TextView) findViewById(MainActivity.NAME_VIEWS[i]);\n String answer = answerView.getText().toString();\n String solution = getQuizCountries().get(i).getName();\n if (answer.equals(solution)) {\n score++;\n }\n }\n return score;\n }", "public abstract void scoreAnswer(Question q, Answer answer, JCas jcas);", "private double getScore() {\n double score = 0;\n score += getRBAnswers(R.id.radiogroup1, R.id.radiobutton_answer12);\n score += getRBAnswers(R.id.radiogroup2, R.id.radiobutton_answer21);\n score += getRBAnswers(R.id.radiogroup3, R.id.radiobutton_answer33);\n score += getRBAnswers(R.id.radiogroup4, R.id.radiobutton_answer41);\n score += getCBAnswers();\n score += getTextAns();\n score = Math.round(score / .0006);\n score = score / 100;\n return score;\n }", "private void calculateScore() {\n EditText editText1 = (EditText) findViewById(R.id.edit_text1);\n String answer1 = editText1.getText().toString().toLowerCase().trim();\n if (answer1.equals( getResources().getText(R.string.answer1))) {\n score += 3;\n } else {\n //show false\n }\n\n RadioGroup radioGroup2 = (RadioGroup) findViewById(R.id.radio_group2);\n int checkedRadioButtonId2 = radioGroup2.getCheckedRadioButtonId();\n if (checkedRadioButtonId2 == R.id.rb21) {\n score += 1;\n } else {\n //show false\n }\n\n CheckBox checkBox3b = (CheckBox) findViewById(R.id.cb32);\n CheckBox checkBox3d = (CheckBox) findViewById(R.id.cb34);\n if (checkBox3b.isChecked() && checkBox3d.isChecked()) {\n score += 2;\n } else {\n //show false\n }\n\n RadioGroup radioGroup4 = (RadioGroup) findViewById(R.id.radio_group4);\n int checkedRadioButtonId4 = radioGroup4.getCheckedRadioButtonId();\n if (checkedRadioButtonId4 == R.id.rb41) {\n score += 1;\n } else {\n //show false\n }\n }", "public long getScoreEssay(Essay essay, String answer)\n {\n return 0;\n }", "private int calculateScore(boolean answerOne, boolean answerTwo, boolean answerThree, boolean answerFour, boolean answerFiveA, boolean answerFiveB, boolean answerFiveC, boolean answerFiveD, boolean answerSix, boolean answerSeven, boolean answerEight, boolean answerNine, String answerTen) {\n int score = 0;\n\n if (answerOne) {\n score += 10;\n Log.v(\"MainActivity\", \"1\");\n }\n\n if (answerTwo) {\n score += 10;\n Log.v(\"MainActivity\", \"2\");\n }\n\n if (answerThree) {\n score += 10;\n Log.v(\"MainActivity\", \"3\");\n }\n\n if (answerFour) {\n score += 10;\n Log.v(\"MainActivity\", \"4\");\n }\n\n if (answerFiveA && !answerFiveB && !answerFiveC && answerFiveD) {\n score += 10;\n Log.v(\"MainActivity\", \"5\");\n }\n\n if (answerSix) {\n score += 10;\n Log.v(\"MainActivity\", \"6\");\n }\n\n if (answerSeven) {\n score += 10;\n Log.v(\"MainActivity\", \"7\");\n }\n\n if (answerEight) {\n score += 10;\n Log.v(\"MainActivity\", \"8\");\n }\n\n if (answerNine) {\n score += 10;\n Log.v(\"MainActivity\", \"9\");\n }\n\n if (answerTen.equals(\"Norbert\")) {\n score += 10;\n Log.v(\"MainActivity\", \"10\");\n }\n\n return score;\n }", "private void calculateScoreForRadioButtons(boolean question2_option3, boolean question6_option2,\n boolean question7_option1) {\n\n\n // if user picks option 3 in question 2, add 1 to score.\n if (question2_option3) {\n score += 1;\n }\n\n\n\n // if user picks option 1 in question 6, add 1 to score.\n if (question6_option2) {\n score += 1;\n }\n\n\n // if user picks option 1 in question 7, add 1 to score.\n if (question7_option1) {\n score += 1;\n }\n\n // calculate the total value of score\n }", "public void checkAnswer(int answer) {\n int correctAns = Integer.MIN_VALUE;\n \n switch (currentOperator) {\n case PLUS: correctAns = leftNumPanel.num + rightNumPanel.num; break;\n case MINUS: correctAns = leftNumPanel.num - rightNumPanel.num; break;\n case TIMES: correctAns = leftNumPanel.num * rightNumPanel.num; break;\n case DIVIDE: correctAns = leftNumPanel.num / rightNumPanel.num;\n }\n \n boolean gotItRight = (answer == correctAns);\n feedbackPanel.showFeedback(gotItRight);\n if (gotItRight) {\n setNewNumbers();\n score++;\n \n switch (currentOperator) {\n case PLUS: correctCount[0]++; break;\n case MINUS: correctCount[1]++; break;\n case TIMES: correctCount[2]++; break;\n case DIVIDE: correctCount[3]++; break;\n }\n \n if (inGame) {\n clockPanel.giveBonusTime();\n }\n \n } else {\n // got it wrong\n if (inGame) {\n clockPanel.takeOffTime();\n }\n }\n }", "private int getScoreMultiple(MMObjectNode questionNode, MMObjectNode givenAnswer) {\n Vector givenAnswers = givenAnswer.getRelatedNodes(\"mcanswers\");\n Vector goodAnswers = questionNode.getRelatedNodes(\"mcanswers\");\n\n // First check if all the given answers are correct\n for (int i=0; i<givenAnswers.size(); i++) {\n if (((MMObjectNode)givenAnswers.get(i)).getIntValue(\"correct\") != 1) {\n return 0;\n }\n }\n\n // Secondly check if all the correct answers are given\n for (int i=0; i<goodAnswers.size(); i++) {\n if (((MMObjectNode)goodAnswers.get(i)).getIntValue(\"correct\") == 1) {\n if (!givenAnswers.contains(goodAnswers.get(i))) {\n return 0;\n }\n }\n }\n\n // ALl tests succeeded: answer is correct\n return 1;\n }", "public interface AnswerScoring {\n /**\n * Scores the answer to the given question.\n *\n * @param question The current question.\n * @param answer The candidate answer to score for the given question.\n * @return double valued score of the answer to the given question.\n */\n double scoreAnswer(Question question, Answer answer);\n}", "private void calculateScoreForEditTextAnswers(String questionOne, String questionFive , String questionNine) {\n // Get the real answer of questions 1, 5 and 9 stored in strings.xml\n String answer1 = getString(R.string.answer1);\n String answer5 = getString(R.string.answer5);\n String answer9 = getString(R.string.answer9);\n\n // if answer entered for question 1 is correct, update the value of score and add 3.\n\n if(questionOne.trim().equalsIgnoreCase(answer1)) {\n score +=5;\n }\n // if answer entered for question 5 is correct, update the value of score and add 3.\n if (questionFive.trim().equalsIgnoreCase(answer5)) {\n score += 5;\n }\n // if answer entered for question 9 is correct, update the value of score and add 3..\n if (questionNine.trim().equalsIgnoreCase(answer9)) {\n score += 5;\n }\n\n // calculate the total value of score\n }", "@Override\n\tpublic int getScore(ArrayList<String> ansList) {\n\t\tString ans = ansList.get(0);\n\t\tif (ans.matches(answer)) {\n\t\t\treturn score;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "public void checkScore(View view) {\n //Question Nr. 1 radio button\n RadioButton true1AnswerOne = (RadioButton) findViewById(R.id.q1a1);\n Boolean is1OneTrue = true1AnswerOne.isChecked();\n if (is1OneTrue) {\n\n }\n\n RadioButton true1AnswerTwo = (RadioButton) findViewById(R.id.q1a2);\n Boolean is1TwoTrue = true1AnswerTwo.isChecked();\n if (is1TwoTrue) {\n\n }\n\n RadioButton true1AnswerThree = (RadioButton) findViewById(R.id.q1a3);\n Boolean is1ThreeTrue = true1AnswerThree.isChecked();\n if (is1ThreeTrue) {\n score = score + 2;\n }\n\n RadioButton true1AnswerFour = (RadioButton) findViewById(R.id.q1a4);\n Boolean is1FourTrue = true1AnswerFour.isChecked();\n if (is1FourTrue) {\n score++;\n }\n\n //Question Nr. 2 radio button\n RadioButton true2AnswerOne = (RadioButton) findViewById(R.id.q2a1);\n Boolean is2OneTrue = true2AnswerOne.isChecked();\n if (is2OneTrue) {\n\n }\n\n RadioButton true2AnswerTwo = (RadioButton) findViewById(R.id.q2a2);\n Boolean is2TwoTrue = true2AnswerTwo.isChecked();\n if (is2TwoTrue) {\n\n }\n\n RadioButton true2AnswerThree = (RadioButton) findViewById(R.id.q2a3);\n Boolean is2ThreeTrue = true2AnswerThree.isChecked();\n if (is2ThreeTrue) {\n score++;\n }\n\n RadioButton true2AnswerFour = (RadioButton) findViewById(R.id.q2a4);\n Boolean is2FourTrue = true2AnswerFour.isChecked();\n if (is2FourTrue) {\n score = score + 2;\n }\n\n //Question Nr. 3 radio button\n RadioButton true3AnswerOne = (RadioButton) findViewById(R.id.q3a1);\n Boolean is3OneTrue = true3AnswerOne.isChecked();\n if (is3OneTrue) {\n\n }\n\n RadioButton true3AnswerTwo = (RadioButton) findViewById(R.id.q3a2);\n Boolean is3TwoTrue = true3AnswerTwo.isChecked();\n if (is3TwoTrue) {\n\n }\n\n RadioButton true3AnswerThree = (RadioButton) findViewById(R.id.q3a3);\n Boolean is3ThreeTrue = true3AnswerThree.isChecked();\n if (is3ThreeTrue) {\n score++;\n }\n\n RadioButton true3AnswerFour = (RadioButton) findViewById(R.id.q3a4);\n Boolean is3FourTrue = true3AnswerFour.isChecked();\n if (is3FourTrue) {\n score = score + 2;\n }\n\n //Question Nr. 4 radio button\n RadioButton true4AnswerOne = (RadioButton) findViewById(R.id.q4a1);\n Boolean is4OneTrue = true4AnswerOne.isChecked();\n if (is4OneTrue) {\n\n }\n\n RadioButton true4AnswerTwo = (RadioButton) findViewById(R.id.q4a2);\n Boolean is4TwoTrue = true4AnswerTwo.isChecked();\n if (is4TwoTrue) {\n\n }\n\n RadioButton true4AnswerThree = (RadioButton) findViewById(R.id.q4a3);\n Boolean is4ThreeTrue = true4AnswerThree.isChecked();\n if (is4ThreeTrue) {\n score++;\n }\n\n RadioButton true4AnswerFour = (RadioButton) findViewById(R.id.q4a4);\n Boolean is4FourTrue = true4AnswerFour.isChecked();\n if (is4FourTrue) {\n score = score + 2;\n }\n\n //Question Nr. 5 radio button\n RadioButton true5AnswerOne = (RadioButton) findViewById(R.id.q5a1);\n Boolean is5OneTrue = true5AnswerOne.isChecked();\n if (is5OneTrue) {\n\n }\n\n RadioButton true5AnswerTwo = (RadioButton) findViewById(R.id.q5a2);\n Boolean is5TwoTrue = true5AnswerTwo.isChecked();\n if (is5TwoTrue) {\n score = score + 2;\n }\n\n RadioButton true5AnswerThree = (RadioButton) findViewById(R.id.q5a3);\n Boolean is5ThreeTrue = true5AnswerThree.isChecked();\n if (is5ThreeTrue) {\n score++;\n }\n\n RadioButton true5AnswerFour = (RadioButton) findViewById(R.id.q5a4);\n Boolean is5FourTrue = true5AnswerFour.isChecked();\n if (is5FourTrue) {\n\n }\n\n //Question Nr. 6 radio button\n RadioButton true6AnswerOne = (RadioButton) findViewById(R.id.q6a1);\n Boolean is6OneTrue = true6AnswerOne.isChecked();\n if (is6OneTrue) {\n score = score + 2;\n }\n\n RadioButton true6AnswerTwo = (RadioButton) findViewById(R.id.q6a2);\n Boolean is6TwoTrue = true6AnswerTwo.isChecked();\n if (is6TwoTrue) {\n score++;\n }\n\n RadioButton true6AnswerThree = (RadioButton) findViewById(R.id.q6a3);\n Boolean is6ThreeTrue = true6AnswerThree.isChecked();\n if (is6ThreeTrue) {\n\n }\n\n RadioButton true6AnswerFour = (RadioButton) findViewById(R.id.q6a4);\n Boolean is6FourTrue = true6AnswerFour.isChecked();\n if (is6FourTrue) {\n\n }\n\n //Question Nr. 7 check box\n CheckBox trueAnswerSeven1 = (CheckBox) findViewById(R.id.trueq7a1);\n Boolean isSeven1True = trueAnswerSeven1.isChecked();\n CheckBox trueAnswerSeven2 = (CheckBox) findViewById(R.id.trueq7a2);\n Boolean isSeven2True = trueAnswerSeven2.isChecked();\n CheckBox trueAnswerSeven3 = (CheckBox) findViewById(R.id.trueq7a3);\n Boolean isSeven3True = trueAnswerSeven3.isChecked();\n CheckBox trueAnswerSeven4 = (CheckBox) findViewById(R.id.trueq7a4);\n Boolean isSeven4True = trueAnswerSeven4.isChecked();\n if (isSeven1True) {\n score++;\n }\n\n if (isSeven2True) {\n score++;\n }\n\n if (isSeven3True) {\n score++;\n }\n\n if (isSeven4True) {\n score++;\n }\n\n //Question Nr. 8 edit text\n EditText trueAnswerEight = (EditText) findViewById(R.id.q8a1);\n String isEightTrue = trueAnswerEight.getText().toString();\n if (isEightTrue.equals(\"Love You\")) {\n score++;\n }\n\n //Text of the message after the Check your score button is clicked.\n if (score < 6) {\n Toast.makeText(this, \"You scored \" + score + \" points out of 17. One of you might be caught in so called \\\"Passion trap\\\" (search for it in the internet). You both need to work on your relationships to improve the balance.\", Toast.LENGTH_LONG).show();\n } else if (score < 12) {\n Toast.makeText(this, \"Good! You scored \" + score + \" points out of 17! Your relationship probably needs a bit of work to take it from good to great. Search for \\\"Relationship balance or Passion trap in the internet.\", Toast.LENGTH_LONG).show();\n } else {\n Toast.makeText(this, \"Congratulations! You scored \" + score + \" points out of 17! You seem to have a good and balanced relationship with your partner.\", Toast.LENGTH_LONG).show();\n }\n score = 0;\n }", "public long getScoreMultipleChoices(MultipleChoices multipleChoices, String answer)\n {\n if(multipleChoices.getRealAnswer() == answer){\n return multipleChoices.getMaxScore();\n }else return 0;\n }", "private void calculateScoreForCheckBoxes(boolean question3_option1, boolean question3_option3,\n boolean question3_option4, boolean question4_option1,\n boolean question4_option2, boolean question4_option4,\n boolean question8_option1, boolean question8_option3) {\n // if user picks option 1 in question 3, add 1 to score.\n if (question3_option1) {\n score += 1;\n }\n\n // if user picks option 3 in question 3, add 1 to score.\n if (question3_option3) {\n score += 1;\n }\n\n // if user picks option 4 in question 3, add 1 to score.\n if (question3_option4) {\n score += 1;\n }\n\n // if user picks option 1 in question 4, add 1 to score.\n if (question4_option1) {\n score += 1;\n }\n\n // if user picks option 2 in question 4, add 1 to score.\n if (question4_option2) {\n score += 1;\n }\n\n // if user picks option 4 in question 4, add 1 to score.\n if (question4_option4) {\n score += 1;\n }\n // if user picks option 2 in question 4, add 1 to score.\n if (question8_option1) {\n score += 1;\n }\n // if user picks option 2 in question 4, add 1 to score.\n if (question8_option3) {\n score += 1;\n }\n\n }", "private Double computeRate(Double score,List<FyQuestion> questions) {\n\t\tDouble total=0.0;\r\n\t\tfor(FyQuestion q:questions) {\r\n\t\t\ttotal+=(q.getScore()*(100-q.getDifficulty()))/score;\r\n\t\t}\r\n\t\treturn total/100;\r\n\t}", "int score();", "int score();", "protected abstract void calcScores();", "private void checkAnswer()\r\n\t{\r\n\t\t//Submission to the model and getting 'true' if correct and 'false' otherwise\r\n\t\tboolean response = quizModel.isCorrect(group.getSelection().getActionCommand());\r\n\t\t\r\n\t\t//Updating score label based on result\r\n\t\tif (response == true)\r\n\t\t{\r\n\t\t\tscoreLabel.setText(\"<html><div style='text-align: center;'>\" + \"Score = \" + quizModel.getScore() + \"<br>Correct answer!\" + \"</div></html>\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tscoreLabel.setText(\"<html><div style='text-align: center;'>\" + \"Score = \" + quizModel.getScore() + \"<br>Incorrect answer!\" + \"</div></html>\");\r\n\t\t}\r\n\t}", "public double getBestScore();", "protected void checkScore () {\n if (mCurrentIndex == questions.length-1) {\n NumberFormat pct = NumberFormat.getPercentInstance();\n double result = (double) correct/questions.length;\n Toast res = new Toast(getApplicationContext());\n res.makeText(QuizActivity.this, \"Your score: \" + pct.format(result), Toast.LENGTH_LONG).show();\n correct = 0; // resets the score when you go back to first question.\n }\n }", "int getWrongAnswers();", "public void quiz() {\n\t\t\t\t\tcorrectans = 0;\n\t\t\t\t\tint k = 0;\n\t\t\t\t\tint j = 0;\n\t\t\t\t\tint M = 0;\n\t\t\t\t\tj = readDifficulty();\n\t\t\t\t\tM = readProblemType();\n\t\t\t\t\t//ask the student to solve 10 different problems, as determined by the problem type\n\t\t\t for(int i = 0; i < 10; i++ ) {\n\t\t\t \t//contain two numbers sampled from a uniform random distribution with bounds determined by the problem difficulty\n\t\t\t \tint x = rand.nextInt(j); \n\t\t\t\t int y = rand.nextInt(j);\n\t\t\t\t int O = askquestion(j, M,x,y);\n\t\t\t\t if(M == 4) {\n\t\t\t\t \t float floatans = readdivision();\n\t\t\t\t \tk = divisionsol(floatans, x, y);\n\t\t\t\t }\n\t\t\t\t else {\n\t\t\t int userin = readResponse();\n\t\t\t k = isnanswercorrect(O , userin);\n\t\t\t }\n\t\t\t if(k == 1) {\n\t\t\t \t correctans++;\n\t\t\t }\n\t\t\t }\n\t\t\t int L = 0;\n\t\t\t L = displayCompletionMessage(correctans);\n\t\t\t if ( L == 1) {\n\t\t\t \tquiz();\n\t\t\t }\n\t\t\t else {\n\t\t\t \treturn;\n\t\t\t }\n\t\t\t \n\t\t\t\t}", "public double testQuiz(Quiz quiz) {\n\t\t// System.out.println(\"Testing quiz: \" + quiz + \"\\n\" +\n\t\t// quiz.display() + \"\\nwith QuizTester: \" + id\n\t\t// + \" SearchString: \" + searchString);\n\t\tdouble score = 0;\n\t\tfor (Question question : quiz.getQuestionList()) {\n\t\t\tboolean guess = question.getPrompt().contains(searchString);\n\t\t\tif (question.isAnswer() == guess) {\n\t\t\t\t++score;\n\t\t\t}\n\t\t}\n\t\t// System.out.println(\"Completed testing quiz: \" + quiz + \"\\nFinal Score: \" +\n\t\t// score + \" / \" + quiz.getQuestionList().size() + \" AKA: \" + (score /\n\t\t// quiz.getQuestionList().size()) );\n\t\treturn score / quiz.getQuestionList().size();\n\t}", "protected abstract List<Double> calcScores();", "protected int checkIfCorrect(String answer, String correctAns)\r\n {\r\n if (correctAns.equals(answer))\r\n {\r\n System.out.println(\"Awsome job!\");\r\n return score++;\r\n }\r\n else \r\n { \r\n System.out.println(\"opps\"); \r\n return score;\r\n }\r\n \r\n }", "public static void main(String[] args) {\n\t\tint score = 0;\n\t\t// 2. Ask the user a question\n\t\tString q1 = JOptionPane.showInputDialog(\"what is the square root of nine ?\");\n\t\tif (q1.equals(\"three\") || q1.equals(\"3\")) {\n\t\t\tJOptionPane.showMessageDialog(null, \"you got it right!!\");\n\t\t\tscore++;\n\t\t} else {\n\t\t\tJOptionPane.showMessageDialog(null, \"sorry you were wrong\");\n\t\t}\n\t\tString q2 = JOptionPane.showInputDialog(\"12 x 12\");\n\t\tif (q2.equals(\"144\")) {\n\t\t\tJOptionPane.showMessageDialog(null, \"you got it right!!\");\n\t\t\tscore++;\n\t\t} else {\n\t\t\tJOptionPane.showMessageDialog(null, \"sorry you were wrong\");\n\t\t}\n\t\tString q3 = JOptionPane.showInputDialog(\"what is 1+2+3+4+5+6+7+8+9+10 ?\");\n\t\tif (q3.equals(\"55\")) {\n\t\t\tJOptionPane.showMessageDialog(null, \"you got it right!!\");\n\t\t\tscore++;\n\t\t} else {\n\t\t\tJOptionPane.showMessageDialog(null, \"sorry you were wrong\");\n\t\t}\n\t\tString q4 = JOptionPane.showInputDialog(\"what is the strongest substance on earth ?\");\n\t\tif (q4.equals(\"diamond\")) {\n\t\t\tJOptionPane.showMessageDialog(null, \"you got it right!!\");\n\t\t\tscore++;\n\t\t} else {\n\t\t\tJOptionPane.showMessageDialog(null, \"sorry you were wrong\");\n\t\t}\n\t\t// 3. Use an if statement to check if their answer is correct\n\n\t\t// 4. if the user's answer is correct\n\n\t\t// -- add one to their score\n\n\t\t// 5. Create more questions by repeating steps 1, 2, and 3 below.\n\n\t\t// 6. After all the questions have been asked, print the user's score\n\t\tJOptionPane.showMessageDialog(null, \"you got \" + score + \" out of 4, great job!\");\n\t}", "public void submitAnswers(View view) {\n\n //Initializing the correct answers in RadioGroups\n questionOneAnswerThree = findViewById(R.id.questionOneAnswerThreeButton);\n questionTwoAnswerFour = findViewById(R.id.questionTwoAnswerFourButton);\n questionThreeAnswerOne = findViewById(R.id.questionThreeAnswerOneButton);\n questionFourAnswerTwo = findViewById(R.id.questionFourAnswerTwoButton);\n questionFiveAnswerFour = findViewById(R.id.questionFiveAnswerFourButton);\n questionSixAnswerTwo = findViewById(R.id.questionSixAnswerTwoButton);\n questionSevenAnswerOne = findViewById(R.id.questionSevenAnswerOneButton);\n\n //Calculating score questions 1-7\n if (questionOneAnswerThree.isChecked()) {\n score++;\n }\n\n if (questionTwoAnswerFour.isChecked()) {\n score++;\n }\n\n if (questionThreeAnswerOne.isChecked()) {\n score++;\n }\n\n if (questionFourAnswerTwo.isChecked()) {\n score++;\n }\n\n if (questionFiveAnswerFour.isChecked()) {\n score++;\n }\n\n if (questionSixAnswerTwo.isChecked()) {\n score++;\n }\n\n if (questionSevenAnswerOne.isChecked()) {\n score++;\n }\n\n // +1 for correct answer\n if (questionEightAnswer.getText().toString().equals(\"1999\")) {\n score++;\n }\n\n //Calculating score if 3 correct answers are checked and 1 incorrect answer is unchecked\n if (questionNineAnswerOne.isChecked() && questionNineAnswerTwo.isChecked() && !questionNineAnswerThree.isChecked() && questionNineAnswerFour.isChecked()) {\n score++;\n }\n\n if (!questionTenAnswerOne.isChecked() && questionTenAnswerTwo.isChecked() && questionTenAnswerThree.isChecked() && questionTenAnswerFour.isChecked()) {\n score++;\n }\n\n //Toast message with score\n Toast.makeText(this, \"Your score: \" + score + \" out of 10 correct!\", Toast.LENGTH_LONG).show();\n\n score = 0;\n }", "public void calculateFinalPoints() {\n int finalPoints = 0;\n for (final Entry<Question, ExamResultAnswers> entry : submittedAnswers.entrySet()) {\n final Question question = entry.getKey();\n double partialPoint = 0;\n final double pointStep = (double) question.getPoints() / question.getAnswers().size();\n final Iterator<Answer> correctAnswers = question.getAnswers().iterator();\n final Iterator<Answer> studentAnswers = entry.getValue().getAnswers().iterator();\n while (correctAnswers.hasNext() && studentAnswers.hasNext()) {\n final Answer studentAnswer = studentAnswers.next();\n final Answer correctAnswer = correctAnswers.next();\n if (question.getType() == QuestionType.FILL_IN_THE_BLANK) {\n if (studentAnswer.getText().trim().equalsIgnoreCase(correctAnswer.getText().trim())) {\n partialPoint += pointStep;\n } else {\n if (exam.getEvaluationMethod() == WrongAnswerEvaluationMethod.SUBTRACTION) {\n partialPoint -= pointStep;\n }\n }\n } else if (question.getType() == QuestionType.SINGLE_CHOICE) {\n // A single choice brings only points if the ONE correct one is chosen, otherwise always zero points\n if (studentAnswer.isRightAnswer() == correctAnswer.isRightAnswer()\n && correctAnswer.isRightAnswer()) {\n partialPoint += question.getPoints();\n break;\n } else if (studentAnswer.isRightAnswer() && !correctAnswer.isRightAnswer()) {\n partialPoint = 0;\n break;\n }\n } else if (question.getType() == QuestionType.MULTIPLE_CHOICE) {\n if (studentAnswer.isRightAnswer() == correctAnswer.isRightAnswer()) {\n partialPoint += pointStep;\n } else {\n if (exam.getEvaluationMethod() == WrongAnswerEvaluationMethod.SUBTRACTION) {\n partialPoint -= pointStep;\n }\n }\n }\n }\n if (partialPoint < 0) {\n partialPoint = 0;\n }\n finalPoints += (int) Math.round(partialPoint);\n }\n points = finalPoints;\n final int maxPoints = exam.getMaxPoints();\n passed = (finalPoints / (double) maxPoints) * 100 >= exam.getMinPoints();\n }", "private int calculateScore() {\n int total;\n int score = getGameScore();\n int correct = getCorrectGuesses();\n int wrong = getWrongGuesses();\n GameDifficulty difficulty = Hangman.getGameDifficulty();\n\n // Calculate points\n switch (difficulty) {\n case EASY : total = score; break;\n case NORMAL : total = (2 * score) + correct - wrong; break;\n case HARD : total = (3 * score) + (2 * correct) - (2 * wrong); break;\n default : total = score;\n }\n\n return total;\n }", "private void getCorrectAnswers() {\n\t\tfor(int i = 0; i < numberAmt; i++) {\n\t\t\tif(randomNumbers.get(i).equals(answers.get(i)))\n\t\t\t\tcorrectAnswers++;\n\t\t}\n\t}", "public float averageAnswers() {\n\t\tfloat out = 0;\n\t\t\n\t\tIterator<SolveResult> iter = super.iterator();\n\t\t\n\t\twhile(iter.hasNext()) {\n\t\t\tSolveResult thisResult = iter.next();\n\t\t\tfloat clues = ResultSet.clueCount(thisResult.puzzle);\n\t\t\tfloat cardinality = thisResult.puzzle.getCardinality();\n\t\t\tfloat conflicts = thisResult.puzzle.conflictCount();\n\t\t\t\n\t\t\tif(!(cardinality - clues - conflicts < 0)) {\n\t\t\t\tout += ((cardinality - clues - conflicts) / (81 - clues));\n\t\t\t}\n\t\t}\n\t\treturn out / super.size();\n\t}", "private void validateQuiz() {\n int score = 0;\n String answer1 = answerOne.getText().toString();\n int answer2 = answerTwo.getCheckedRadioButtonId();\n boolean answer3 = answerThreeOptionA.isChecked() && answerThreeOptionD.isChecked() && !answerThreeOptionB.isChecked() && !answerThreeOptionC.isChecked();\n String answer4 = answerFour.getText().toString();\n int answer5 = answerFive.getCheckedRadioButtonId();\n boolean answer6 = answerSixOptionA.isChecked() && answerSixOptionB.isChecked() && answerSixOptionD.isChecked() && !answerSixOptionC.isChecked();\n if (answer1.equalsIgnoreCase(getString(R.string.answerOne))) {\n score++;\n }\n if (answer2 == answerTwoOptionA.getId()) {\n score++;\n }\n if (answer3) {\n score++;\n }\n if (answer4.equalsIgnoreCase(getString(R.string.answerFour))) {\n score++;\n }\n if (answer5 == answerFiveOptionD.getId()) {\n score++;\n }\n if (answer6) {\n score++;\n }\n String result = getString(R.string.result, score, questionList.size());\n Toast.makeText(this, result, Toast.LENGTH_SHORT).show();\n }", "public void checkAnswers(View view){\n int result = 0;\n\n if (checkRadioButtonAnswer(R.id.first_answer, R.id.first_answer3)){\n result = result + 1;\n }\n\n if (checkTextViewAnswer(R.id.second_answer, \"lions\")){\n result = result + 1;\n }\n\n if (checkRadioButtonAnswer(R.id.third_answer, R.id.third_answer1)){\n result = result + 1;\n }\n\n if (checkRadioButtonAnswer(R.id.fourth_answer, R.id.fourth_answer3)){\n result = result + 1;\n }\n\n if (checkRadioButtonAnswer(R.id.fifth_answer, R.id.fifth_answer3)){\n result = result + 1;\n }\n\n if (checkRadioButtonAnswer(R.id.sixth_answer, R.id.sixth_answer2)){\n result = result + 1;\n }\n\n if (checkCheckBoxAnswer(R.id.seventh_answer1, true) &&\n checkCheckBoxAnswer(R.id.seventh_answer2, true) &&\n checkCheckBoxAnswer(R.id.seventh_answer3, true) &&\n checkCheckBoxAnswer(R.id.seventh_answer4, false)){\n result = result + 1;\n }\n\n /**\n * A toast message is shown which represents the scored points out of the total 7.\n */\n Toast.makeText(this, \"Result: \" + Integer.toString(result) + \"/7\", Toast.LENGTH_SHORT).show();\n }", "public void submitAnswers(View view) {\n\n // Question one\n // Get String given in the first EditText field and turn it into lower case\n EditText firstAnswerField = (EditText) findViewById(R.id.answer_one);\n Editable firstAnswerEditable = firstAnswerField.getText();\n String firstAnswer = firstAnswerEditable.toString().toLowerCase();\n\n // Check if the answer given in the first EditText field is correct and if it is, add one\n // point\n if (firstAnswer.contains(\"baltic\")) {\n points++;\n }\n\n // Question two\n // Get String given in the second EditText field and turn it into lower case\n EditText secondAnswerField = (EditText) findViewById(R.id.answer_two);\n Editable secondAnswerEditable = secondAnswerField.getText();\n String secondAnswer = secondAnswerEditable.toString().toLowerCase();\n\n // Check if the answer given in the second EditText field is correct and if it is, add one\n // point\n if (secondAnswer.contains(\"basketball\")) {\n points++;\n }\n\n // Question three\n // Check if the correct answer is given\n RadioButton thirdQuestionCorrectAnswer = (RadioButton)\n findViewById(R.id.question_3_radio_button_3);\n boolean isThirdQuestionCorrectAnswer = thirdQuestionCorrectAnswer.isChecked();\n // If the correct answer is given, add one point\n if (isThirdQuestionCorrectAnswer) {\n points++;\n }\n\n // Question four\n // Check if the correct answer is given\n RadioButton fourthQuestionCorrectAnswer = (RadioButton)\n findViewById(R.id.question_4_radio_button_2);\n boolean isFourthQuestionCorrectAnswer = fourthQuestionCorrectAnswer.isChecked();\n\n // If the correct answer is given, add one point\n if (isFourthQuestionCorrectAnswer) {\n points++;\n }\n\n // Question five\n // Find check boxes\n CheckBox fifthQuestionCheckBoxOne = (CheckBox) findViewById(R.id.question_5_check_box_1);\n\n CheckBox fifthQuestionCheckBoxTwo = (CheckBox) findViewById(R.id.question_5_check_box_2);\n\n CheckBox fifthQuestionCheckBoxThree = (CheckBox) findViewById(R.id.question_5_check_box_3);\n\n CheckBox fifthQuestionCheckBoxFour = (CheckBox) findViewById(R.id.question_5_check_box_4);\n\n // If correct answers are given, add one point,\n // if incorrect answers are given, do not add points\n\n if (fifthQuestionCheckBoxThree.isChecked() && fifthQuestionCheckBoxFour.isChecked()\n && !fifthQuestionCheckBoxOne.isChecked() && !fifthQuestionCheckBoxTwo.isChecked()){\n points++;\n }\n\n // Question six\n // Find check boxes\n CheckBox sixthQuestionCheckBoxOne = (CheckBox) findViewById(R.id.question_6_check_box_1);\n\n CheckBox sixthQuestionCheckBoxTwo = (CheckBox) findViewById(R.id.question_6_check_box_2);\n\n CheckBox sixthQuestionCheckBoxThree = (CheckBox) findViewById(R.id.question_6_check_box_3);\n\n CheckBox sixthQuestionCheckBoxFour = (CheckBox) findViewById(R.id.question_6_check_box_4);\n\n // If correct answers are given, add one point,\n // if incorrect answers are given, do not add points\n if (sixthQuestionCheckBoxOne.isChecked() && sixthQuestionCheckBoxTwo.isChecked()\n && sixthQuestionCheckBoxFour.isChecked() && !sixthQuestionCheckBoxThree.isChecked()){\n points++;\n }\n\n // If the user answers all questions correctly, show toast message with congratulations\n if (points == 6){\n Toast.makeText(this, \"Congratulations! You have earned 6 points.\" +\n \"\\n\" + \"It is the maximum number of points in this quiz.\",\n Toast.LENGTH_SHORT).show();\n }\n\n // If the user does not answer all questions correctly, show users's points, total points\n // possible and advise to check answers\n else {\n Toast.makeText(this, \"Your points: \" + points + \"\\n\" + \"Total points possible: 6\" +\n \"\\n\" + \"Check your answers or spelling again.\", Toast.LENGTH_SHORT).show();\n }\n\n // Reset points to 0\n points = 0;\n }", "private void countAnswers(){\n\t\tfor(Student student: students){\n\t\t\tif(isCorrectAnswer(student.getAnswers())){\n\t\t\t\tcorrectAnswers+=1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\twrongAnswers+=1;\n\t\t\t}\n\t\t}\n\t}", "private int calculateScore(){\n int score = 0;\n for(Card card : hand){\n score += card.getScore();\n }\n return score;\n }", "float getScore();", "float getScore();", "public boolean scoreThisWith(SortingQuiz q) {\r\n boolean succesfullyScored = false;\r\n int answrCount = 0;\r\n \r\n for(int i=1; i<8; i++) {\r\n try {\r\n Answer a = q.answers.get(this.answers.get(i));\r\n this.getScoring().weightAnswer(a);\r\n answrCount += 1;\r\n } catch (NullPointerException e) {\r\n }\r\n }\r\n \r\n if(answrCount == 7) {\r\n succesfullyScored = true;\r\n }\r\n \r\n return succesfullyScored;\r\n }", "public int score() {\n int sum = 0;\n for (Candidate c : chosen) {\n sum += c.score(compatibilityScoreSet);\n }\n return sum;\n }", "@Override\r\n\tpublic void checkAnswer() {\n\t\t\r\n\t}", "private String submitAnswersScore(int calculatedScore) {\n String totalMessagePerfect = \"Great Job! You finished with a score of \" + calculatedScore + \" out of 6!\";\n totalMessagePerfect += \"\\nYou really know your Bears history!\";\n totalMessagePerfect += \"\\nThanks for taking my quiz!\";\n\n String totalMessageAlmost = \"Great Try! You finished with a score of \" +calculatedScore + \" out of 6.\";\n totalMessageAlmost += \"\\nThanks for taking my quiz!\";\n\n if (calculatedScore == 6) {\n return totalMessagePerfect;\n }\n else {\n return totalMessageAlmost;\n }\n }", "private double gradeQuiz() {\n int numCorrect = getNumberCorrect();\n double percentage = (numCorrect / numQuestions) * 100;\n return percentage;\n }", "public static void displayScore(final Quiz quiz) {\n\t\tint qNumber = 0;\n\t\tint totScore = 0;\n\t\tfor (question q : quiz.getQList()) {\n\t\t\tSystem.out.println(q.qText);\n\t\t\tif (q.corrChoice.equals(quiz.getAnswers(qNumber))) {\n\t\t\t\tSystem.out.println(\" Correct Answer! - Marks Awarded: \" + q.maxMarks);\n\t\t\t\ttotScore += Integer.parseInt(q.maxMarks);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\" Wrong Answer! - Penalty: \" + q.penalty);\n\t\t\t\ttotScore += Integer.parseInt(q.penalty);\n\t\t\t}\n\t\t\tqNumber += 1;\n\t\t}\n\t\tSystem.out.println(\"Total Score: \" + totScore);\n\t}", "public float calculateGrade() {\r\n\t\t// Creating variables for correct answers, total questions and the grade itself.\r\n\t\tint correct = 0;\r\n\t\tint total = correctAnswers.size();\r\n\t\tfloat grade = 0;\r\n\t\t// Loop that goes around the list with user's answers and correct answers.\r\n\t\tfor (int i = 0; i < correctAnswers.size(); i++) {\r\n\t\t\t// Creating variable result which compare the elements from the two list index\r\n\t\t\t// by index.\r\n\t\t\tint result = (userAnswers.get(i).compareTo(correctAnswers.get(i)));\r\n\t\t\t// Condition that increments the variable correct with one every time when there\r\n\t\t\t// is match between the lists' elements by index.\r\n\t\t\tif (result == 0) {\r\n\t\t\t\tcorrect++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Calculating the grade of the student.\r\n\t\tgrade = (float) ((double) correct / total * 100);\r\n\t\treturn grade;\r\n\t}", "@Override\n public void onClick(View view) {\n\n //Getting the answer to question 4 radio button 1\n boolean isRadioButton1Q4 = radioButton1Q4.isChecked();\n\n //Calculate Question 4 score\n int resultQ4 = calculateResultQ4(isRadioButton1Q4);\n\n //Calculate the quiz score\n int result = resultQ1 + resultQ2 + resultQ3 + resultQ4;\n\n //Display the quiz result in the Toast message\n Toast.makeText(Question4Activity.this, \"Congrats! Your score is \" + result + \". Thank you for taking the quiz!\", Toast.LENGTH_LONG).show();\n }", "public void checkAnswer(){\n int selectedRadioButtonId = radioTermGroup.getCheckedRadioButtonId();\n\n // find the radiobutton by returned id\n RadioButton radioSelected = findViewById(selectedRadioButtonId);\n\n String term = radioSelected.getText().toString();\n String definition = tvDefinition.getText().toString();\n\n if (Objects.equals(termsAndDefinitionsHashMap.get(term), definition)) {\n correctAnswers += 1;\n Toast.makeText(ActivityQuiz.this, \"Correct\", Toast.LENGTH_SHORT).show();\n }\n else {\n Toast.makeText(ActivityQuiz.this, \"Incorrect\", Toast.LENGTH_SHORT).show();\n }\n\n tvCorrectAnswer.setText(String.format(\"%s\", correctAnswers));\n }", "public static void grade(int size)\n {\n int score = 0;\n for(int i = 0; i<size;i++)\n {\n if(answer[i] == nb1[i] + nb2[i])\n {\n score+=10;\n }\n }\n System.out.println(\"Votre score est \" + score+\"/100\");\n }", "public static void takeTest(Question [] questions) {\n int score = 0;\n Scanner keyboardInput = new Scanner(System.in);\n for(int i = 0; i < questions.length; i++){\n System.out.println(questions[i].prompt);\n String answer = keyboardInput.nextLine();\n if(answer.equals(questions[i].answer)) {\n score++;\n }\n\n }\n System.out.println(\"Voce conseguiu \" + score + \"/\" + questions.length + \"pontos\");\n\n }", "public static int[] calculateScores(String[] resultsToCheck)\n\t{\n\t\tint[] scores = new int[entrants.length];\n\t\t//results = checkResults(preResults);\n\t\tfor(int i = 0; i < resultsToCheck.length; i++)\n\t\t{\n\t\t\tif(!resultsToCheck[i].equals(\"\"))\n\t\t\t{\n\t\t\t\t//for each player\n\t\t\t\tfor(int j = 0; j < entrants.length; j++)\n\t\t\t\t{\n\t\t\t\t\t//if the player's pick for the match is equal to the result\n\t\t\t\t\tif(allPicks.get(j)[i].equals(resultsToCheck[i]))\n\t\t\t\t\t{\n\t\t\t\t\t\t//increase their points by the value of the match\n\t\t\t\t\t\tscores[j] += values[i];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn scores;\n\t}", "public static double calcW2Wsentencesimilarity(String question, String answer) {\n\t \t \n\t double Lamda = 2000;\n\t double Beta = 0.2;\n\t String[] answerwords=answer.split(\"\\\\s+\");\n\t String[] questionwords=question.split(\"\\\\s+\");\n\t int CountAwords = answerwords.length;\n\t double PbUV = 0.0;\n\t \n\t for ( String questionword: questionwords)\n\t {\n\t\t//String QACorpus = GetQACorpus(\"file1\",\"file2\");\n\t\t \n\t\tString QACorpus = GetQACorpus(\"/Tarun Malhotra/codechef/answers.txt\",\"/Tarun Malhotra/codechef/questions.txt\");\n\t\t \n\t\t\n\t\tint CountQWordinCorpus=WordFrequencyInSentence(questionword,QACorpus);\n\t\tString trimmed = QACorpus.trim();\n\t\tint CorpusWordCount = trimmed.isEmpty() ? 0 : trimmed.split(\"\\\\s+\").length;\n\t\t\n\t\tdouble PbmlWbyV = WordFrequencyInSentence(questionword,answer)/answerwords.length;\n\t\t\n\t\tdouble PbmxWbyV = (1-Beta)*PbmlWbyV+Beta*CalculatedProbability\n\t\t\t\t(QACorpus,questionword,answer );\n\t\t\n\t\tdouble PbmlWbyC = CountQWordinCorpus/CorpusWordCount;\n\t\tdouble PbWbyV= (CountAwords/(CountAwords+Lamda))*PbmxWbyV +\n\t\t\t\t(Lamda/(CountAwords+Lamda))*PbmlWbyC;\n\n\t\t PbUV +=PbWbyV; \n\n\t }\n\t \n\treturn PbUV;\n\t}", "protected AnswerScore() {/* intentionally empty block */}", "public abstract AnswerStatus checkAnswer(String answer) throws SyntaxException;", "protected final void calcScore()\n {\n\n m_score = SCORE_OTHER;\n\n if (null == m_targetString)\n calcTargetString();\n }", "public static ArrayList<ArrayList<ArrayList<Double>>> assignScoreToQueries() {\r\n\t\t\r\n\t\tArrayList<ArrayList<ArrayList<Double>>> allQueries = Queries.createQueries();\r\n\t\tArrayList<ArrayList<String>> dataset = ReadInDataset.finalDataset;\r\n\t\tint Counter = 0;\r\n\t\tDouble Score = 0.0;\r\n\t\tDecimalFormat df = new DecimalFormat(\"#.####\");\r\n\t\tdf.setRoundingMode(RoundingMode.CEILING); // round up to 4 decimal places\r\n\t\t\r\n\t\t\r\n\t\t// initially assign to each query a score of 0\r\n\t\t\r\n\t\tfor (int i = 0; i < allQueries.size(); i++) {\r\n\t\t\tArrayList<Double> zero = new ArrayList<Double>();\r\n\t\t\tzero.add(0.0);\r\n\t\t\tallQueries.get(i).add(zero);}\r\n\t\t\r\n\t\t// go through each query and check how many entries of the dataset it matches\r\n\t\t// with each match increase the score\r\n\t\t\r\n\t\tfor (int i = 0; i < allQueries.size(); i++) { // for each query\r\n\t\t\tfor(int b=0; b < dataset.size(); b++) { // for each dataset\r\n\t\t\t\tCounter = 0; \r\n\t\t\t\tfor (int a=0; a < allQueries.get(i).size()-1; a++) { // for each query clause\r\n\t\t\t\t//check if the query criteria match the dataset and increase the Score accordingly\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t //this counter ensures that all query requirements are met in order to increase the score\r\n\t\t\t\t\tif (a != allQueries.get(i).size() - 1) {\t\t\t\t\t\t // ensure that Score entry is not involved in Query Matching\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// take min and max from query along with an entry from the dataset, convert to a double of 4 decimal places\r\n\t\t\t\t\t\tdouble minPoint1 = allQueries.get(i).get(a).get(0);\r\n\t\t\t\t\t\tString minPoint2 = df.format(minPoint1);\r\n\t\t\t\t\t\tdouble minPoint = Double.parseDouble(minPoint2);\r\n\t\t\t\t\t\tdouble maxPoint1 = allQueries.get(i).get(a).get(1);\r\n\t\t\t\t\t\tString maxPoint2 = df.format(maxPoint1);\r\n\t\t\t\t\t\tdouble maxPoint = Double.parseDouble(maxPoint2);\r\n\t\t\t\t\t\tdouble dataPoint1 = Double.parseDouble(dataset.get(b).get(a+1));\r\n\t\t\t\t\t\tString dataPoint2 = df.format(dataPoint1);\r\n\t\t\t\t\t\tdouble dataPoint = Double.parseDouble(dataPoint2);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ( dataPoint<= maxPoint && dataPoint >= minPoint) { Counter++; \r\n\t\t\t\t\t//\tSystem.out.println(\"min:\" + minPoint+\" max: \"+maxPoint+\" data: \"+dataPoint+ \" of Query: \" + b+ \"| Query Match!\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {//System.out.println(minPoint+\" \"+maxPoint+\" \"+dataPoint+ \" of \" + b);\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\tif (Counter==(Queries.getDimensions())/2) { // if counter equals the dimensions of the query then increase score\r\n\t\t\t\t\tScore = allQueries.get(i).get(allQueries.get(i).size()-1).get(0);\r\n\t\t\t\t\tallQueries.get(i).get(allQueries.get(i).size()-1).set(0, Score+1.00); \r\n\t\t\t\t\t}}\r\n\t\t\t\t \r\n\t\t\t\t}\r\n\t\t//\tSystem.out.println(\"Score = \" + allQueries.get(i).get(allQueries.get(i).size()-1).get(0));\r\n\t\t}\t\r\n\t\treturn allQueries;\r\n\t}", "abstract void handleTheScore(ArrayList<Player> players, Question question);", "Float getScore();", "protected abstract double relevantScore(Tweet tweet);", "public void countScore(TechnicalTest technicalTest)\n {\n long maxScore=0;\n long score=0;\n\n String scoreEachAnswer = \"\";\n List<Problem> problems = technicalTest.getProblems();\n\n String applicantAnswer = technicalTest.getApplicantAnswer();\n\n List<String> answerList = helper.parseAnswer(applicantAnswer);\n\n for(int i=0; i<problems.size();i++){\n long tmpScore;\n maxScore = maxScore + problems.get(i).getMaxScore();\n if(problems.get(i) instanceof MultipleChoices){\n tmpScore = getScoreMultipleChoices((MultipleChoices) problems.get(i), answerList.get(i));\n score = score + tmpScore;\n if(i!=problems.size()-1)\n scoreEachAnswer = scoreEachAnswer + String.valueOf(tmpScore) + \"|\";\n else scoreEachAnswer = scoreEachAnswer + String.valueOf(tmpScore);\n }\n else if(problems.get(i) instanceof ProblemGenerator){\n tmpScore = getScoreMultipleChoices((MultipleChoices) problems.get(i), answerList.get(i));\n score = score + tmpScore;\n if(i!=problems.size()-1)\n scoreEachAnswer = scoreEachAnswer + String.valueOf(tmpScore) + \"|\";\n else scoreEachAnswer = scoreEachAnswer + String.valueOf(tmpScore);\n }\n else{\n tmpScore = getScoreEssay((Essay) problems.get(i), answerList.get(i));\n score = score + tmpScore;\n if(i!=problems.size()-1)\n scoreEachAnswer = scoreEachAnswer + String.valueOf(tmpScore) + \"|\";\n else scoreEachAnswer = scoreEachAnswer + String.valueOf(tmpScore);\n }\n\n }\n\n long persen = score*100/maxScore;\n\n technicalTest.setScore(persen);\n technicalTest.setScoreEachAnswer(scoreEachAnswer);\n\n technicalTestRepository.save(technicalTest);\n\n }", "public static void main(String[] args) {\n Scanner input = new Scanner(System.in);\n float[] score = new float[7];\n\n System.out.println(\"Enter score for judge 1:\");\n score [0] = input.nextFloat();\n System.out.println(\"Enter score for judge 2:\");\n score [1] = input.nextFloat();\n System.out.println(\"Enter score for judge 3:\");\n score [2] = input.nextFloat();\n System.out.println(\"Enter score for judge 4:\");\n score [3] = input.nextFloat();\n System.out.println(\"Enter score for judge 5:\");\n score [4] = input.nextFloat();\n System.out.println(\"Enter score for judge 6:\");\n score [5] = input.nextFloat();\n System.out.println(\"Enter score for judge 7:\");\n score [6] = input.nextFloat();\n System.out.println(\"Enter difficulty:\");\n float difficulty = input.nextFloat();\n\n float max = 0;\n float min = 0;\n\n Arrays.sort(score);\n\n float totalScore = ((score[1] + score[2] + score[3] + score[4] + score[5]) * difficulty * 0.6f);\n\n System.out.println(\"Total: \" + totalScore);\n }", "public float evaluate(PhraseInfo p) {\n int numChords = p.gen.prog.get(p.gen.progIndex).size();\n int tn = Math.min(phraseLen, (int)Math.round(targetNotes * ((numChords + 1) / 3.0))); // not directly proportional.\n // scores: 50, 49, 46, 41, 34, 25 etc.\n int score = Math.max(0, 50 - (int)Math.round(Math.pow(Math.abs(p.noteCount - tn), 2)));\n return (float)Math.min(1.0f, score/50.0f);\n }", "double calculateScore(String documentId);", "public void calcScore(int score) {\r\n\t\tif (initFinish)\r\n\t\t\tthis.score += score * this.multy;\r\n\t\t// TODO delete\r\n//\t\tSystem.out.println(\"score: \" + this.score + \"multy: \" + this.multy);\r\n\t}", "public int getScore(MMObjectNode questionNode, MMObjectNode givenAnswer) {\n int score = givenAnswer.getIntValue(\"score\");\n if (score != -1) {\n return score;\n }\n\n int type = questionNode.getIntValue(\"type\");\n switch(type) {\n case 0:\n // only 1 answer selected\n score = getScoreSingle(questionNode, givenAnswer); \n givenAnswer.setValue(\"score\", score);\n givenAnswer.commit();\n return score;\n case 1:\n // multiple answers selected\n score = getScoreMultiple(questionNode, givenAnswer);\n givenAnswer.setValue(\"score\", score);\n givenAnswer.commit();\n return score;\n default:\n break;\n }\n return 1;\n }", "@Override\n\t public String solve() {\n\t if (count == 0) {\n\t answer1 = getVariable2()*getVariable3();\n\t setAnswer(answer1 + \"\");\n\t } else if (count == 1) {\n\t answer1 = getVariable1()/getVariable2();\n\t setAnswer(answer1 + \"\");\n\t }else if (count == 2) {\n\t answer1 = getVariable1()/getVariable3();\n\t setAnswer(answer1 + \"\");\n\t }\n\t return getAnswer();\n\t }", "public static void main(String[] args) {\n\t\tint score = 0;\n\t\t// 2. Ask the user a question\n\t\tString input = JOptionPane.showInputDialog(null, \"What is a?: 2a-18=-4a:\");\n\t\t// 3. Use an if statement to check if their answer is correct\n\t\tif (input.equals(\"3\")) {\n\t\t\tJOptionPane.showMessageDialog(null, \"You are correct, good job!\");\n\n\t\t\tscore++;\n\n\t\t} else {\n\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\"You are incorrect, sorry. But don't worry, every mistake is a learning experience!\");\n\t\t}\n\t\t// 4. if the user's answer was correct, add one to their score\n\n\t\t// 5. Create more questions by repeating steps 1, 2, and 3 below.\n\t\tString answer = JOptionPane.showInputDialog(null, \"Which side of the Roman Empire fell? A: Eastern B: Western\");\n\t\tif (answer.equals(\"B\")) {\n\t\t\tJOptionPane.showMessageDialog(null, \"Congrants, you got it correct!\");\n\t\t\tscore++;\n\n\t\t} else {\n\t\t\tJOptionPane.showMessageDialog(null, \"Sorry, but wrong answer. Nice try though!\");\n\t\t}\n\t\tJOptionPane.showMessageDialog(null,\"You have now completed the quiz, good job!\");\n\t\t// 6. After all the questions have been asked, print the user's score\n\t\tSystem.out.println(score);\n\t}", "private int getScoreSingle(MMObjectNode questionNode, MMObjectNode givenAnswer) {\n Vector relatedAnswers = givenAnswer.getRelatedNodes(\"mcanswers\");\n if (relatedAnswers.size() != 1) {\n return 0;\n }\n\n MMObjectNode mcanswer = (MMObjectNode)relatedAnswers.get(0);\n if (mcanswer.getIntValue(\"correct\") == 1) {\n return 1;\n } else {\n return 0;\n }\n }", "public void calculateScore() {\n\n turnScore();\n\n if (turn == 1) {\n p1.setScore(p1.getScore() - turnScore);\n\n } else if (turn == 2) {\n p2.setScore(p2.getScore() - turnScore);\n\n }\n\n\n }", "@Test\n void adjectivesScoring() {\n NLPAnalyser np = new NLPAnalyser();\n List<CoreMap> sentences = np.nlpPipeline(\"RT This made my day; glad @JeremyKappell is standing up against #ROC’s disgusting mayor. \"\n + \"Former TV meteorologist Jeremy Kappell suing Mayor Lovely Warren\"\n + \"https://t.co/rJIV5SN9vB (Via NEWS 8 WROC)\");\n HashMap<String, Double> as = np.adjectivesScoring(sentences);\n for (String key : as.keySet()) {\n Double value = as.get(key);\n assertTrue(value >= 0 && value <= 4);\n }\n }", "public int calculScore(Deck deck)\n {\n return 0;\n }", "public void checkAnswer() {\n }", "void scoreQuestion(int questionNumber){\r\n switch(questionNumber){\r\n case 1:\r\n RadioButton radioButtonQ1 = (RadioButton) findViewById(R.id.soccer_question_1_correct_answer);\r\n if (radioButtonQ1.isChecked()){\r\n playerScore += 10;\r\n }\r\n break;\r\n case 2:\r\n CheckBox checkBoxQ2 = (CheckBox) findViewById(R.id.soccer_question_2_wrong_answer_1);\r\n if(checkBoxQ2.isChecked()){\r\n return;\r\n }\r\n checkBoxQ2 = (CheckBox) findViewById(R.id.soccer_question_2_wrong_answer_2);\r\n if(checkBoxQ2.isChecked()){\r\n return;\r\n }\r\n checkBoxQ2 = (CheckBox) findViewById(R.id.soccer_question_2_correct_answer_1);\r\n if(checkBoxQ2.isChecked()){\r\n playerScore += 5;\r\n }\r\n checkBoxQ2 = (CheckBox) findViewById(R.id.soccer_question_2_correct_answer_2);\r\n if(checkBoxQ2.isChecked()){\r\n playerScore += 5;\r\n }\r\n break;\r\n case 3:\r\n RadioButton radioButtonQ3 = (RadioButton) findViewById(R.id.soccer_question_3_correct_answer);\r\n if (radioButtonQ3.isChecked()){\r\n playerScore += 10;\r\n }\r\n break;\r\n case 4:\r\n RadioButton radioButtonQ4 = (RadioButton) findViewById(R.id.basketball_question_1_correct_answer);\r\n if (radioButtonQ4.isChecked()){\r\n playerScore += 10;\r\n }\r\n break;\r\n case 5:\r\n RadioButton radioButtonQ5 = (RadioButton) findViewById(R.id.basketball_question_2_correct_answer);\r\n if (radioButtonQ5.isChecked()){\r\n playerScore += 10;\r\n }\r\n break;\r\n case 6:\r\n EditText editTextQ6 = (EditText) findViewById(R.id.basketball_question_3);\r\n String answerQ6 = getString(R.string.basketball_question_3_correct_answer);\r\n if(answerQ6.equalsIgnoreCase(editTextQ6.getText().toString())){\r\n playerScore += 10;\r\n }\r\n break;\r\n case 7:\r\n RadioButton radioButtonQ7 = (RadioButton) findViewById(R.id.volleyball_question_1_correct_answer);\r\n if (radioButtonQ7.isChecked()){\r\n playerScore += 10;\r\n }\r\n break;\r\n case 8:\r\n RadioButton radioButtonQ8 = (RadioButton) findViewById(R.id.volleyball_question_2_correct_answer);\r\n if (radioButtonQ8.isChecked()){\r\n playerScore += 10;\r\n }\r\n break;\r\n case 9:\r\n RadioButton radioButtonQ9 = (RadioButton) findViewById(R.id.tenis_question_1_correct_answer);\r\n if (radioButtonQ9.isChecked()){\r\n playerScore += 10;\r\n }\r\n break;\r\n case 10:\r\n EditText editTextQ10 = (EditText) findViewById(R.id.boxe_question_1);\r\n String answerQ10 = getString(R.string.boxe_question_1_correct_answer);\r\n if(answerQ10.equalsIgnoreCase(editTextQ10.getText().toString())){\r\n playerScore += 10;\r\n }\r\n break;\r\n default:\r\n break;\r\n }\r\n }", "public void submitAnswers(View view) {\n boolean oneAnswer = oneCorrectAnswer1985.isChecked();\n boolean twoAnswer = twoCorrectAnswerWalterPayton.isChecked();\n boolean threeAnswer = threeCorrectAnswerMike.isChecked();\n boolean fourAnswer = fourCorrectAnswerJay.isChecked();\n String fiveAnswer = fiveCorrectAnswerDecatur.getText().toString().trim();\n boolean sixAnswer = !sixWrongAnswerGeorge.isChecked() && !sixWrongAnswerLovie.isChecked() && sixCorrectAnswerJohn.isChecked() && sixCorrectAnswerMarc.isChecked();\n\n\n score = calculateTotal(oneAnswer, twoAnswer, threeAnswer, fourAnswer, fiveAnswer, sixAnswer);\n String totalMessage = submitAnswersScore(score);\n\n Context context = getApplicationContext();\n CharSequence text = totalMessage;\n int duration = Toast.LENGTH_LONG;\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n }", "int score(OfcHandMatrix matrix);", "@Test\n void studentMCQTotalScoreTest(){\n Student student = new Student(\"Lim\");\n student.setNumCorrectAns(8); // Set Total Number Question(s) Answered Correctly\n student.setNumQuestionAns(10); // Set Total Number Question(s) Answered Correctly\n\n\n double expectedResult = 80; // Input for testing\n // Calculate total score and set it\n student.setCalculatedScore(student.getNumCorrectAns(), student.getNumQuestionAns());\n System.out.println(\"Test Case #5\");\n System.out.println(\"\\tExpected Result: \" + expectedResult); // print expected result\n double actualResult = student.getTotalScore(); // Actual Result\n System.out.println(\"\\tActual Result: \" + actualResult); // Print actual result\n assertEquals(expectedResult, actualResult); // Compare the expected result (True) & Actual Result\n }", "public void submitAnswers(View view) {\n\n int points = 0;\n\n //Question 1\n RadioButton radioButton_q1 = findViewById (R.id.optionB_q1);\n boolean firstQuestionCorrect = radioButton_q1.isChecked ();\n if (firstQuestionCorrect) {\n points += 1;\n }\n //Question 2\n RadioButton radioButton_q2 = findViewById (R.id.optionC_q2);\n boolean secondQuestionCorrect = radioButton_q2.isChecked ();\n if (secondQuestionCorrect) {\n points += 1;\n }\n\n //Question 3 - in order to get a point in Question 3, three particular boxes has to be checked\n CheckBox checkAns1_q3 = findViewById (R.id.checkbox1_q3);\n boolean thirdQuestionAnswer1 = checkAns1_q3.isChecked ();\n CheckBox checkAns2_q3 = findViewById (R.id.checkbox2_q3);\n boolean thirdQuestionAnswer2 = checkAns2_q3.isChecked ();\n CheckBox checkAns3_q3 = findViewById (R.id.checkbox3_q3);\n boolean thirdQuestionAnswer3 = checkAns3_q3.isChecked ();\n CheckBox checkAns4_q3 = findViewById (R.id.checkbox4_q3);\n boolean thirdQuestionAnswer4 = checkAns4_q3.isChecked ();\n CheckBox checkAns5_q3 = findViewById (R.id.checkbox5_q3);\n boolean thirdQuestionAnswer5 = checkAns5_q3.isChecked ();\n CheckBox checkAns6_q3 = findViewById (R.id.checkbox6_q3);\n boolean thirdQuestionAnswer6 = checkAns6_q3.isChecked ();\n CheckBox checkAns7_q3 = findViewById (R.id.checkbox7_q3);\n boolean thirdQuestionAnswer7 = checkAns7_q3.isChecked ();\n if (thirdQuestionAnswer2 && thirdQuestionAnswer3 && thirdQuestionAnswer6 && !thirdQuestionAnswer1 && !thirdQuestionAnswer4 && !thirdQuestionAnswer5 && !thirdQuestionAnswer7) {\n points = points + 1;\n }\n\n //Question 4\n RadioButton radioButton_q4 = findViewById (R.id.optionC_q4);\n boolean forthQuestionCorrect = radioButton_q4.isChecked ();\n if (forthQuestionCorrect) {\n points += 1;\n }\n\n //Question 5\n EditText fifthAnswer = findViewById (R.id.q5_answer);\n String fifthAnswerText = fifthAnswer.getText ().toString ();\n if (fifthAnswerText.equals (\"\")) {\n Toast.makeText (getApplicationContext (), getString (R.string.noFifthAnswer), Toast.LENGTH_LONG).show ();\n return;\n } else if ((fifthAnswerText.equalsIgnoreCase (getString (R.string.pacific))) || (fifthAnswerText.equalsIgnoreCase (getString (R.string.pacificOcean)))) {\n points += 1;\n }\n\n //Question 6\n RadioButton radioButton_q6 = findViewById (R.id.optionA_q6);\n boolean sixthQuestionCorrect = radioButton_q6.isChecked ();\n if (sixthQuestionCorrect) {\n points += 1;\n }\n\n //Showing the result to the user\n displayScore (points);\n }", "private void calculateStPointScore() {\n\t\tint total = 0;\n\t\tint maxAnswerSize = 0;\n\t\tfor (QueryInfo oneQ : this.maxQueries) {\n\t\t\ttotal += oneQ.getFrequency() * oneQ.getGapCount();\n\t\t\tint tempSize = oneQ.getSupport() * oneQ.getGapCount();\n\t\t\tif (tempSize > maxAnswerSize)\n\t\t\t\tmaxAnswerSize = tempSize;\n\t\t}\n\t\ttotal += maxAnswerSize;\n\t\tthis.stPointScore = total;\n\t}", "public void scoresForGameModes() {\r\n \tCalculateScore myScore = new CalculateScore();\r\n \tthis.score = myScore.giveScore();\r\n \tif (gamemode == 1) {\r\n \t\treturn;\r\n \t}\r\n \tif (gamemode ==2 ) {\r\n \t\tthis.score = this.score - (10 * (currentGraph.getCNumber() - set.size()));\r\n \t}\r\n \tif (gamemode ==3) {\r\n \t\tthis.score = this.score - (10 * (currentGraph.getCNumber() -set.size()));\r\n \t}\r\n }", "int getScore();", "public int answerCheck() {\n int score = -36; // 36 squares already filled in game.\n char[][] userAnswer = new char[9][9];\n \n for (int i = 0; i < 9; i++) {\n for (int j = 0; j < 9; j++) {\n userAnswer[i][j] = index[i][j].getText().charAt(0);\n }\n }\n \n for (int i = 0; i < 9; i++) {\n for (int j = 0; j < 9; j++) {\n if(answer[i][j] == userAnswer[i][j]){\n score++;\n }\n }\n }\n return score;\n }", "public void scoring(){\n for (int i=0; i< players.size(); i++){\n Player p = players.get(i);\n p.setScore(10*p.getTricksWon());\n if(p.getTricksWon() < p.getBid() || p.getTricksWon() > p.getBid()){\n int diff = Math.abs(p.getTricksWon() - p.getBid());\n p.setScore(p.getScore() - (10*diff));\n }\n if(p.getTricksWon() == p.getBid()){\n p.setScore(p.getScore() + 20);\n }\n }\n }", "@Override\n public void onClick(View v) {\n\n if (radio_g.getCheckedRadioButtonId() == -1) {\n Toast.makeText(getApplicationContext(), \"Please select one choice\", Toast.LENGTH_SHORT).show();\n return;\n }\n RadioButton uans = (RadioButton) findViewById(radio_g.getCheckedRadioButtonId());\n String ansText = uans.getText().toString();\n// String sup[]=ansText.split(\" \");\n// int m = Integer.parseInt(sup[0]);\n int m=0;\n for (int i = 0; i < opt.length ; i++)\n {\n if(ansText.equals(opt[i])){\n m=i+1;\n break;\n }\n }\n\n ans[flag++]=m;\n// CT[pos[flag]]= CT[pos[flag]] + answers[flag];\n// c++;\n// if(pos[flag] != j)\n// {\n// j++;\n// CT[flag-1]= CT[flag-1]/(c*1.0f);\n// CS= CS + CT[flag-1];\n// c=0;\n// }\n// Toast.makeText(getApplicationContext(), ansText, Toast.LENGTH_SHORT).show();\n// if(ansText.equals(answers[flag])) {\n// correct++;\n// Toast.makeText(getApplicationContext(), \"Correct\", Toast.LENGTH_SHORT).show();\n// }\n// else {\n// wrong++;\n// Toast.makeText(getApplicationContext(), \"Wrong\", Toast.LENGTH_SHORT).show();\n// }\n\n// flag++;\n//\n// if (score != null)\n// score.setText(\"\"+m);\n\n if (flag < questions.length) {\n tv.setText(questions[flag]);\n rb1.setText(opt[0]);\n rb2.setText(opt[1]);\n rb3.setText(opt[2]);\n rb4.setText(opt[3]);\n rb5.setText(opt[4]);\n\n } else {\n for (int i = x; i < 30 ; i++)\n {\n CS = CS + ans[i];\n }\n CS = CS /y;\n// for (i = 0; i < pos.length; i++) {\n// if (pos[i] == j) {\n// CT[j] = CT[j] + ans[i];\n// c++;\n// } else {\n// CT[j] = (CT[j++]*1.0f)/ (c * 1.0f);\n// c = 0;\n// i--;\n// }\n// }\n// CT[j]=CT[j]/((c)*1.0f);\n// for (i = 0; i < 13; i++) {\n// DecimalFormat df = new DecimalFormat(\"###.##\");\n//// Login.ct = Login.ct + df.format(CT[i]) + \" \";\n// CS = Double.valueOf(df.format(CT[i])) + CS;\n// }\n// Login.ct = Login.ct + \"_\";\n// DecimalFormat df = new DecimalFormat(\"###.##\");\n// String st = \" \"+ df.format(CS);\n// Login.cs = Login.cs + \" \" + st;\n i= 0; j =0; //CS = 0;\n Intent into = new Intent(getApplicationContext(), QuizResult.class);\n startActivity(into);\n }\n radio_g.clearCheck();\n }", "public void calcMatch() {\n if (leftResult == null || rightResult == null) {\n match_score = 0.0f;\n } else {\n match_score = FaceLockHelper.Similarity(leftResult.getFeature(), rightResult.getFeature(), rightResult.getFeature().length);\n match_score *= 100.0f;\n tvFaceMatchScore1.setText(Float.toString(match_score));\n llFaceMatchScore.setVisibility(View.VISIBLE);\n\n }\n }", "public void setAnswers(int answers) {\n this.answers = answers;\n }", "public void submitQuiz(View view) {\n /**\n * The following variables check to see if the correct answer was selected by the user. True if selected, false if not\n */\n boolean questionOneRightAnswer = questionOneRadioButtonC.isChecked();\n boolean questionTwoRightAnswer = questionTwoRadioButtonB.isChecked();\n boolean questionThreeRightAnswer = questionThreeRadioButtonC.isChecked();\n boolean questionFourRightAnswer = questionFourRadioButtonB.isChecked();\n boolean questionFiveRightAnswerOne = questionFiveCheckBoxA.isChecked();\n boolean questionFiveWrongAnswerOne = questionFiveCheckBoxB.isChecked();\n boolean questionFiveWrongAnswerTwo = questionFiveCheckBoxC.isChecked();\n boolean questionFiveRightAnswerTwo = questionFiveCheckBoxD.isChecked();\n boolean questionSixRightAnswer = questionSixRadioButtonC.isChecked();\n boolean questionSevenRightAnswer = questionSevenRadioButtonA.isChecked();\n boolean questionEightRightAnswer = questionEightRadioButtonB.isChecked();\n boolean questionNineRightAnswer = questionNineRadioButtonA.isChecked();\n String questionTenAnswer = questionTenEditText.getText().toString();\n\n /**\n * Declaring a score variable to store the user's score from the calculateScore method\n */\n int score = calculateScore(questionOneRightAnswer, questionTwoRightAnswer, questionThreeRightAnswer, questionFourRightAnswer, questionFiveRightAnswerOne, questionFiveWrongAnswerOne, questionFiveWrongAnswerTwo, questionFiveRightAnswerTwo, questionSixRightAnswer, questionSevenRightAnswer, questionEightRightAnswer, questionNineRightAnswer, questionTenAnswer);\n\n /**\n * If the user scores a perfect 100, the following toast will appear on screen\n */\n if (score == 100) {\n Toast toast = Toast.makeText(getApplicationContext(), \"You scored a \" + score + \"\\nCongratulations Muggle!\", Toast.LENGTH_LONG);\n toast.show();\n }\n /**\n * If the user scores >= 70 < 100, the following toast will appear on screen\n */\n else if (score >= 70) {\n Toast toast = Toast.makeText(getApplicationContext(), \"You scored a \" + score + \"\\nNot bad!\", Toast.LENGTH_LONG);\n toast.show();\n }\n /**\n * If the user scores <= 70, the following toast will appear on screen\n */\n else {\n Toast toast = Toast.makeText(getApplicationContext(), \"You scored a \" + score + \"\\nTry again Mudblood.\", Toast.LENGTH_LONG);\n toast.show();\n }\n\n /**\n * Share your score with an external app\n */\n Intent sharingIntent = new Intent();\n sharingIntent.setAction(Intent.ACTION_SEND);\n sharingIntent.setType(\"text/plain\");\n sharingIntent.putExtra(Intent.EXTRA_TEXT,\"I scored \" + score + \" on the Harry Potter Quiz App!\");\n startActivity(Intent.createChooser(sharingIntent,\"Share your score!\"));\n\n clearQuizQuestions();\n }", "public static void main(String[] args) {\n\t\tint score = 0;\n\t\t// 2. Ask the user a question \n\t\tString answer = JOptionPane.showInputDialog(\"Who is the greatest basketball player of all time?\");\n\t\t// 3. Use an if statement to check if their answer is correct\n\t\tif (answer.equalsIgnoreCase(\"Michael Jordan\") || answer.equalsIgnoreCase(\"Jordan\") ) {\n\t\t// 4. if the user's answer was correct, add one to their score \n\t\t\tscore = score + 1; }\n\t\t// 5. Create more questions by repeating steps 1, 2, and 3 below. \n\t\tanswer = JOptionPane.showInputDialog(\"How many rings does Michael Jordan have?\");\n\t\tif (answer.equalsIgnoreCase(\"6\") || answer.equalsIgnoreCase(\"six\") ) {\n\t\tscore = score + 1; \n\t\t}\n\t\tanswer = JOptionPane.showInputDialog(\"What player scored the most points in one game?\");\n\t\tif (answer.equalsIgnoreCase(\"Wilt Chamberlain\")) {\n\t\tscore = score + 1;\n\t\t}\n\t\tanswer = JOptionPane.showInputDialog(\"Who won the most career NBA championships as a player?\");\n\t\tif (answer.equalsIgnoreCase(\"Bill Russell\")) {\n\t\tscore = score + 1;\n\t\t}\n\t\tanswer = JOptionPane.showInputDialog(\"What team drafted Kobe Brayant?\");\n\t\tif (answer.equalsIgnoreCase(\"Charlotte Hornets\") || answer.equalsIgnoreCase(\"Hornets\") ) {\n\t\tscore = score + 1;\n\t\t}\n\t\tanswer = JOptionPane.showInputDialog(\"Who is the shortest player of all-time?\");\n\t\tif (answer.equalsIgnoreCase(\"Muggsy Bogues\") || answer.equalsIgnoreCase(\"Tyrone Bogues\") ) {\n\t\tscore = score + 1;\n\t\t}\n\t\t// 6. After all the questions have been asked, print the user's score\n\t\tJOptionPane.showMessageDialog(null, \"You scored \" + score + \".\");\n\t\t\n\t}", "public static int villa(int... result) {\n\n int score = nSame(3, 6, result);\n int firstPairVal = score/3;\n\n result = IntStream.of(result).filter(val -> val != firstPairVal).toArray();\n score = nSame(3, 6, result);\n int secondPairVal = score/3;\n\n if (firstPairVal*secondPairVal > 0) {\n score = 3*firstPairVal + 3*secondPairVal;\n } else {\n score = 0;\n }\n\n return score;\n }", "void printScore(double sum[]){\n \n if((sum[1] > sum [4]) && (sum[1] > sum[5]) ){\n System.out.println(\"among 1 4 5 => 1\");\n }\n if((sum[4] > sum [1]) && (sum[4] > sum[5]) ){\n System.out.println(\"among 1 4 5 => 4\");\n }\n if((sum[5] > sum [1]) && (sum[5] > sum[4]) ){\n System.out.println(\"among 1 4 5 => 5\");\n }\n if((sum[2] > sum [6]) && (sum[2] > sum[8]) ){\n System.out.println(\"among 2 6 8 => 2\");\n }\n if((sum[6] > sum [2]) && (sum[6] > sum[8]) ){\n System.out.println(\"among 2 6 8 => 6\");\n }\n if((sum[8] > sum [2]) && (sum[8] > sum[6]) ){\n System.out.println(\"among 2 6 8 => 8\");\n }\n if((sum[3] > sum [0]) && (sum[3] > sum[7]) ){\n System.out.println(\"among 3 0 7 => 3\");\n }\n if((sum[0] > sum [3]) && (sum[0] > sum[7]) ){\n System.out.println(\"among 3 0 7 => 0\");\n }\n if((sum[7] > sum [3]) && (sum[7] > sum[0]) ){\n System.out.println(\"among 3 0 7 => 7\");\n }\n }", "public void calculateScore() {\n for (Sequence seq: currentSeq) {\n double wordWeight = Retriever.getWeight(seq);\n String token = seq.getToken();\n int size = seq.getRight() - seq.getLeft() + 1;\n int titleCount = getCount(token.toLowerCase(), title.toLowerCase());\n if (titleCount != 0) {\n setMatch(size);\n setTitleContains(true);\n }\n int lowerCount = getCount(token.toLowerCase(), lowerContent);\n if (lowerCount == 0) {\n// scoreInfo += \"Token: \" + token + \" Original=0 Lower=0 WordWeight=\" + wordWeight + \" wordTotal=0\\n\";\n continue;\n }\n int originalCount = getCount(token, content);\n lowerCount = lowerCount - originalCount;\n if (lowerCount != 0 || originalCount != 0) {\n setMatch(size);\n }\n double originalScore = formula(wordWeight, originalCount);\n double lowerScore = formula(wordWeight, lowerCount);\n final double weight = 1.5;\n double addedScore = weight * originalScore + lowerScore;\n// scoreInfo += \"Token: \" + token + \" Original=\" + originalScore + \" Lower=\" + lowerScore +\n// \" WordWeight=\" + wordWeight + \" wordTotal=\" + addedScore + \"\\n\";\n dependencyScore += addedScore;\n }\n currentSeq.clear();\n }", "public float computePhraseScore(int dl, int tf, GlobalStats stats);", "public static int greedy(int[] dice){\n int[] count = new int[5];\n // so inversely the variable for each score => count[score-1]\n // I handled the count process with a foreach loop\n // it iterates the values of the given array, checks scores and assigns count using a switch case\n for (int score: dice) {\n switch (score){\n case 1 -> count[0]++;\n case 2 -> count[1]++;\n case 3 -> count[2]++;\n case 4 -> count[3]++;\n case 5 -> count[4]++;\n case 6 -> count[5]++;\n }\n } \n\n // > CHECKING IF THERE'S A COUNT OF 3 AND ASSIGNING POINTS\n // A variable to hold the points is needed\n int points = 0;\n //check if there is a count of 3 in the count array, using a fori loop to keep track of the score value being iterated\n for (int i = 0, score = i+1 ; i < count.length; i++) {\n //if found\n if(count[i] > 2){\n // assign points\n // * points system for 3 occurrences\n // Three 1's => 1000 points\n // Three 6's => 600 points\n // Three 5's => 500 points\n // Three 4's => 400 points\n // Three 3's => 300 points\n // - score 1's point is a special case\n // - for the rest, points awarded = score*100\n if(score == 1){\n points += 1000;\n count[i] -= 3;\n }else{\n points += (score *100);\n count[i] -= 3;\n }\n }\n }\n\n // > CHECKING IF THE SCORE 1 AND 5 HAVE OCCURRENCES > 0 AND ASSIGNING POINTS IF TRUE\n //if true\n if(count[0] > 0)\n points += (100* count[0]);\n if(count[4] > 0)\n points += (50 * count[4]);\n return points;\n }", "public double getAnswer() {\n return answer;\n }", "public int getAnswers() {\n return answers;\n }", "long getScore();", "long getScore();", "long getScore();", "long getScore();" ]
[ "0.8336629", "0.7440958", "0.7207757", "0.71951413", "0.71143013", "0.6975082", "0.6958351", "0.69311947", "0.68912417", "0.6825937", "0.677449", "0.6753844", "0.67354673", "0.67160606", "0.6706627", "0.6695139", "0.66912043", "0.6666831", "0.6666831", "0.65821064", "0.65669394", "0.6534909", "0.65302867", "0.65283555", "0.65241647", "0.65102684", "0.644351", "0.6432603", "0.64321655", "0.6427253", "0.6422639", "0.6417835", "0.6413259", "0.6367432", "0.63652235", "0.63622886", "0.63598716", "0.63558644", "0.6334046", "0.6313687", "0.6313687", "0.6288622", "0.6279439", "0.6272033", "0.6250939", "0.62476236", "0.62448573", "0.62063664", "0.6192488", "0.619123", "0.6187326", "0.6186081", "0.61836964", "0.61724526", "0.61703527", "0.6156522", "0.6149729", "0.6146571", "0.6137354", "0.61274356", "0.61216724", "0.61146456", "0.6103557", "0.609722", "0.6086261", "0.6084098", "0.6082435", "0.6073448", "0.6071219", "0.6069657", "0.6066265", "0.6065112", "0.6063555", "0.6063217", "0.60629094", "0.60626876", "0.60602915", "0.60601085", "0.6051517", "0.60365343", "0.603342", "0.6032474", "0.6023658", "0.6013452", "0.6009083", "0.5998055", "0.5990361", "0.5989885", "0.5988752", "0.5987918", "0.5979722", "0.5975694", "0.5964753", "0.59611255", "0.5960115", "0.5955478", "0.595362", "0.595362", "0.595362", "0.595362" ]
0.6510422
25
Adds points to the score according to the question
void scoreQuestion(int questionNumber){ switch(questionNumber){ case 1: RadioButton radioButtonQ1 = (RadioButton) findViewById(R.id.soccer_question_1_correct_answer); if (radioButtonQ1.isChecked()){ playerScore += 10; } break; case 2: CheckBox checkBoxQ2 = (CheckBox) findViewById(R.id.soccer_question_2_wrong_answer_1); if(checkBoxQ2.isChecked()){ return; } checkBoxQ2 = (CheckBox) findViewById(R.id.soccer_question_2_wrong_answer_2); if(checkBoxQ2.isChecked()){ return; } checkBoxQ2 = (CheckBox) findViewById(R.id.soccer_question_2_correct_answer_1); if(checkBoxQ2.isChecked()){ playerScore += 5; } checkBoxQ2 = (CheckBox) findViewById(R.id.soccer_question_2_correct_answer_2); if(checkBoxQ2.isChecked()){ playerScore += 5; } break; case 3: RadioButton radioButtonQ3 = (RadioButton) findViewById(R.id.soccer_question_3_correct_answer); if (radioButtonQ3.isChecked()){ playerScore += 10; } break; case 4: RadioButton radioButtonQ4 = (RadioButton) findViewById(R.id.basketball_question_1_correct_answer); if (radioButtonQ4.isChecked()){ playerScore += 10; } break; case 5: RadioButton radioButtonQ5 = (RadioButton) findViewById(R.id.basketball_question_2_correct_answer); if (radioButtonQ5.isChecked()){ playerScore += 10; } break; case 6: EditText editTextQ6 = (EditText) findViewById(R.id.basketball_question_3); String answerQ6 = getString(R.string.basketball_question_3_correct_answer); if(answerQ6.equalsIgnoreCase(editTextQ6.getText().toString())){ playerScore += 10; } break; case 7: RadioButton radioButtonQ7 = (RadioButton) findViewById(R.id.volleyball_question_1_correct_answer); if (radioButtonQ7.isChecked()){ playerScore += 10; } break; case 8: RadioButton radioButtonQ8 = (RadioButton) findViewById(R.id.volleyball_question_2_correct_answer); if (radioButtonQ8.isChecked()){ playerScore += 10; } break; case 9: RadioButton radioButtonQ9 = (RadioButton) findViewById(R.id.tenis_question_1_correct_answer); if (radioButtonQ9.isChecked()){ playerScore += 10; } break; case 10: EditText editTextQ10 = (EditText) findViewById(R.id.boxe_question_1); String answerQ10 = getString(R.string.boxe_question_1_correct_answer); if(answerQ10.equalsIgnoreCase(editTextQ10.getText().toString())){ playerScore += 10; } break; default: break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void addPointsToScore(int points) {\n score += points;\n }", "public void addPoints(int earnedPoints) {score = score + earnedPoints;}", "public void addScore(int pointsToAdd) {\n\t\tthis.score = this.score + pointsToAdd;\n\t}", "public void addToScore(int points) {\n\t\tassert points >= 0 : \"Cannot add negative points\";\n\t\tscore += points;\n\t}", "public void awardPoints(int points)\n {\n score += points ;\n }", "public void setScore(int pointsToAdd) {\n\n\t\t//Add the additional points to the existing score\n\t\tthis.score = this.score + pointsToAdd;\n\t}", "public void addToScore(TextView scoreTextView, int points) {\n int score = Integer.parseInt(scoreTextView.getText().toString());\n scoreTextView.setText(String.valueOf(score + points));\n }", "public void addQuiz(double score){\n quizzes.add(score);\n quizTotal += score;\n}", "public void addRating(double points) {\n rating += points;\n }", "void awardPoints(){\n if (currentPoints <= 100 - POINTSGIVEN) {\n currentPoints += POINTSGIVEN;\n feedback = \"Your current rating is: \" + currentPoints + \"%\";\n }\n }", "private void addPoint(){\n\n userList.addUserCorrect();\n userList.addUserAttempt();\n\n\n //This if levels up the user if they have reached the number of points needed\n if (userList.findCurrent().getNumPointsNeeded()\n <= userList.findCurrent().getNumQuestionsCorrect()) {\n\n userList.addUserPointsNeeded();//increment points needed to level up\n userList.levelUpUser();\n }\n }", "public void addScore(int score);", "public void calculateFinalPoints() {\n int finalPoints = 0;\n for (final Entry<Question, ExamResultAnswers> entry : submittedAnswers.entrySet()) {\n final Question question = entry.getKey();\n double partialPoint = 0;\n final double pointStep = (double) question.getPoints() / question.getAnswers().size();\n final Iterator<Answer> correctAnswers = question.getAnswers().iterator();\n final Iterator<Answer> studentAnswers = entry.getValue().getAnswers().iterator();\n while (correctAnswers.hasNext() && studentAnswers.hasNext()) {\n final Answer studentAnswer = studentAnswers.next();\n final Answer correctAnswer = correctAnswers.next();\n if (question.getType() == QuestionType.FILL_IN_THE_BLANK) {\n if (studentAnswer.getText().trim().equalsIgnoreCase(correctAnswer.getText().trim())) {\n partialPoint += pointStep;\n } else {\n if (exam.getEvaluationMethod() == WrongAnswerEvaluationMethod.SUBTRACTION) {\n partialPoint -= pointStep;\n }\n }\n } else if (question.getType() == QuestionType.SINGLE_CHOICE) {\n // A single choice brings only points if the ONE correct one is chosen, otherwise always zero points\n if (studentAnswer.isRightAnswer() == correctAnswer.isRightAnswer()\n && correctAnswer.isRightAnswer()) {\n partialPoint += question.getPoints();\n break;\n } else if (studentAnswer.isRightAnswer() && !correctAnswer.isRightAnswer()) {\n partialPoint = 0;\n break;\n }\n } else if (question.getType() == QuestionType.MULTIPLE_CHOICE) {\n if (studentAnswer.isRightAnswer() == correctAnswer.isRightAnswer()) {\n partialPoint += pointStep;\n } else {\n if (exam.getEvaluationMethod() == WrongAnswerEvaluationMethod.SUBTRACTION) {\n partialPoint -= pointStep;\n }\n }\n }\n }\n if (partialPoint < 0) {\n partialPoint = 0;\n }\n finalPoints += (int) Math.round(partialPoint);\n }\n points = finalPoints;\n final int maxPoints = exam.getMaxPoints();\n passed = (finalPoints / (double) maxPoints) * 100 >= exam.getMinPoints();\n }", "public void addPoints(int addP){\n this.points += addP;\n }", "public void addScore()\n {\n score += 1;\n }", "public void addPoint() {\n points += 1;\n }", "public void addToScore(int score)\n {\n this.score += score;\n }", "public void addPoints(int point){\n\t\tthis.points += point;\n\t}", "public void addScore(int score) {\n currentScore += score;\n }", "public int getScore()\n {\n return points + extras;\n }", "public void addTestScore(int score){\n test_score.add(test_count,score);\n test_count++;\n }", "public void addOneToScore() {\r\n score++;\r\n }", "public void countPoints() {\n points = 0;\n checkAnswerOne();\n checkAnswerTwo();\n checkAnswerThree();\n checkAnswerFour();\n checkAnswerFive();\n checkAnswerSix();\n checkAnswerSeven();\n checkAnswerEight();\n checkAnswerNine();\n checkAnswerTen();\n }", "public void addPoint(int points){\n\t\tthis.fidelityCard.point += points;\t\t\n\t}", "private void updateScore(int point){\n sScore.setText(\"\" + mScore + \"/\" + mQuizLibrary.getLength());\n\n }", "public void incrementScore(int scoreToAdd) {\n this.score += scoreToAdd;\n }", "@Test\n public void addScoreTest() {\n assertTrue(enemyGameBoard.getScore() == 0); //Check if initial value of points = 0\n\n enemyGameBoard.addScore(false, false); //Did not hit a ship\n assertTrue(enemyGameBoard.getScore() == 0);\n\n enemyGameBoard.addScore(true, false); //Hit a ship, but the ship did not sink\n assertTrue(enemyGameBoard.getScore() == 1); \n\n enemyGameBoard.addScore(false, false); //Did not hit a ship, so points should stay 1\n assertTrue(enemyGameBoard.getScore() == 1); \n\n enemyGameBoard.addScore(true, true); //Hit a ship, and ship has been sunk\n assertTrue(enemyGameBoard.getScore() == 3);\n\n enemyGameBoard.addScore(false, false); //Did not hit a ship, so points should stay 3 after a ship has been sunk\n assertTrue(enemyGameBoard.getScore() == 3);\n\n enemyGameBoard.addScore(false, true); //Did not hit a ship, but did sunk the ship. This should not add any points to the score\n assertTrue(enemyGameBoard.getScore() == 3);\n }", "public void givePlayerPoints(int pointsToAdd) {\n this.points = this.points + pointsToAdd;\n }", "public void addReview(double score){\n totalReviews++;\n totalScore += score;\n }", "public void submitAnswers(View view) {\n\n // Question one\n // Get String given in the first EditText field and turn it into lower case\n EditText firstAnswerField = (EditText) findViewById(R.id.answer_one);\n Editable firstAnswerEditable = firstAnswerField.getText();\n String firstAnswer = firstAnswerEditable.toString().toLowerCase();\n\n // Check if the answer given in the first EditText field is correct and if it is, add one\n // point\n if (firstAnswer.contains(\"baltic\")) {\n points++;\n }\n\n // Question two\n // Get String given in the second EditText field and turn it into lower case\n EditText secondAnswerField = (EditText) findViewById(R.id.answer_two);\n Editable secondAnswerEditable = secondAnswerField.getText();\n String secondAnswer = secondAnswerEditable.toString().toLowerCase();\n\n // Check if the answer given in the second EditText field is correct and if it is, add one\n // point\n if (secondAnswer.contains(\"basketball\")) {\n points++;\n }\n\n // Question three\n // Check if the correct answer is given\n RadioButton thirdQuestionCorrectAnswer = (RadioButton)\n findViewById(R.id.question_3_radio_button_3);\n boolean isThirdQuestionCorrectAnswer = thirdQuestionCorrectAnswer.isChecked();\n // If the correct answer is given, add one point\n if (isThirdQuestionCorrectAnswer) {\n points++;\n }\n\n // Question four\n // Check if the correct answer is given\n RadioButton fourthQuestionCorrectAnswer = (RadioButton)\n findViewById(R.id.question_4_radio_button_2);\n boolean isFourthQuestionCorrectAnswer = fourthQuestionCorrectAnswer.isChecked();\n\n // If the correct answer is given, add one point\n if (isFourthQuestionCorrectAnswer) {\n points++;\n }\n\n // Question five\n // Find check boxes\n CheckBox fifthQuestionCheckBoxOne = (CheckBox) findViewById(R.id.question_5_check_box_1);\n\n CheckBox fifthQuestionCheckBoxTwo = (CheckBox) findViewById(R.id.question_5_check_box_2);\n\n CheckBox fifthQuestionCheckBoxThree = (CheckBox) findViewById(R.id.question_5_check_box_3);\n\n CheckBox fifthQuestionCheckBoxFour = (CheckBox) findViewById(R.id.question_5_check_box_4);\n\n // If correct answers are given, add one point,\n // if incorrect answers are given, do not add points\n\n if (fifthQuestionCheckBoxThree.isChecked() && fifthQuestionCheckBoxFour.isChecked()\n && !fifthQuestionCheckBoxOne.isChecked() && !fifthQuestionCheckBoxTwo.isChecked()){\n points++;\n }\n\n // Question six\n // Find check boxes\n CheckBox sixthQuestionCheckBoxOne = (CheckBox) findViewById(R.id.question_6_check_box_1);\n\n CheckBox sixthQuestionCheckBoxTwo = (CheckBox) findViewById(R.id.question_6_check_box_2);\n\n CheckBox sixthQuestionCheckBoxThree = (CheckBox) findViewById(R.id.question_6_check_box_3);\n\n CheckBox sixthQuestionCheckBoxFour = (CheckBox) findViewById(R.id.question_6_check_box_4);\n\n // If correct answers are given, add one point,\n // if incorrect answers are given, do not add points\n if (sixthQuestionCheckBoxOne.isChecked() && sixthQuestionCheckBoxTwo.isChecked()\n && sixthQuestionCheckBoxFour.isChecked() && !sixthQuestionCheckBoxThree.isChecked()){\n points++;\n }\n\n // If the user answers all questions correctly, show toast message with congratulations\n if (points == 6){\n Toast.makeText(this, \"Congratulations! You have earned 6 points.\" +\n \"\\n\" + \"It is the maximum number of points in this quiz.\",\n Toast.LENGTH_SHORT).show();\n }\n\n // If the user does not answer all questions correctly, show users's points, total points\n // possible and advise to check answers\n else {\n Toast.makeText(this, \"Your points: \" + points + \"\\n\" + \"Total points possible: 6\" +\n \"\\n\" + \"Check your answers or spelling again.\", Toast.LENGTH_SHORT).show();\n }\n\n // Reset points to 0\n points = 0;\n }", "public void addScore(int n){\n\t\tscore += n;\n\t}", "public void nextQuestion(View view) {\n\n int points = calculatePoints();\n //Retrieve the variable \"total_points\" from the previous activity\n Bundle extras = getIntent().getExtras();\n if (extras != null) {\n points = points + extras.getInt(\"total_points\");\n }\n\n boolean validatedAnswer = validateAnswer();\n\n if (validatedAnswer == true) {\n\n Intent startNextQuestion = new Intent(this, ScoreActivity.class);\n startNextQuestion.putExtra(\"total_points\", points);\n startActivity(startNextQuestion);\n }\n }", "public void addQuiz(int score) {\n\t\tif (score < 0 || score > 100) {\n\t\t\tscore = 0;\n\t\t}\n\t\telse {\n\t\t\ttotalScore = totalScore + score;\n\t\t\tquizCount++;\n\t\t}\n\t\t}", "public void addScore(int s) {\n setScore(getScore() + s);\n }", "public void addA(View view) {\n int points = Integer.parseInt(view.getTag().toString());\n scoreA += points;\n TextView sa = (TextView) findViewById(R.id.scoreA);\n sa.setText(String.valueOf(scoreA));\n\n }", "public void addPoints(int turnTotal)\n {\n currentScore += turnTotal;\n \n if (currentScore >= PigGame.GOAL)\n {\n gamesWon++;\n }\n }", "@Test\n public void testAddPoints() {\n System.out.println(\"addPoints\");\n int points = ScoreBoard.HARD_DROP_POINTS_PER_ROW * 4 + ScoreBoard.POINTS_PER_LINE;\n instance.addPoints(points);\n int result = instance.getPoints();\n int expResult = 108;\n assertEquals(result, expResult);\n }", "public void score() {\n\t\tif (Integer.parseInt(px.getPosition()) != Integer.parseInt(getCurrentPositionX()))\n\t\t{\n\t\t\tpx.addObserver(Obsx);\n\t\t\tpx.setPosition(getCurrentPositionX());\n\t\t}\n\t\tif (Integer.parseInt(py.getPosition()) != Integer.parseInt(getCurrentPositionY()))\n\t\t{\n\t\t\tpy.addObserver(Obsy);\n\t\t\tpy.setPosition(getCurrentPositionY());\n\t\t}\n\t}", "double scoreAnswer(Question question, Answer answer);", "void calculateScore(){\r\n playerScore = 0;\r\n for(int i = 1; i<=10; i++) {\r\n scoreQuestion(i);\r\n }\r\n }", "public void add_to_score(int num){\n score+=num;\n }", "private void calculateStPointScore() {\n\t\tint total = 0;\n\t\tint maxAnswerSize = 0;\n\t\tfor (QueryInfo oneQ : this.maxQueries) {\n\t\t\ttotal += oneQ.getFrequency() * oneQ.getGapCount();\n\t\t\tint tempSize = oneQ.getSupport() * oneQ.getGapCount();\n\t\t\tif (tempSize > maxAnswerSize)\n\t\t\t\tmaxAnswerSize = tempSize;\n\t\t}\n\t\ttotal += maxAnswerSize;\n\t\tthis.stPointScore = total;\n\t}", "public void addPointForTeamA(View view) {\n teamA_score = teamA_score + 1;\n if (ADVANTAGE == 1) {\n advantageMode(teamA_score, teamB_score);\n } else\n checkScore(teamA_score, teamB_score);\n }", "public int returnPoints()\n {\n return score ;\n }", "public boolean addScoreTeamOne(int points) throws ByeMatchException\r\n\t{\r\n\t\tif (isByeMatch)\r\n\t\t{\r\n\t\t\tthrow new ByeMatchException();\r\n\t\t}\r\n\t\tscore1 = score1 + points;\r\n\t\treturn true;\r\n\t}", "private void updateScore(int point){\n mScoreView.setText(\"\" + mScore);\n }", "abstract void handleTheScore(ArrayList<Player> players, Question question);", "public void addScore(){\n\n // ong nuoc 1\n if(birdS.getX() == waterPipeS.getX1() +50){\n bl = true;\n }\n if (bl == true && birdS.getX() > waterPipeS.getX1() + 50){\n score++;\n bl = false;\n }\n\n //ong nuoc 2\n if(birdS.getX() == waterPipeS.getX2() +50){\n bl = true;\n }\n if (bl == true && birdS.getX() > waterPipeS.getX2() + 50){\n score++;\n bl = false;\n }\n\n // ong nuoc 3\n if(birdS.getX() == waterPipeS.getX3() +50){\n bl = true;\n }\n if (bl == true && birdS.getX() > waterPipeS.getX3() + 50){\n score++;\n bl = false;\n }\n\n }", "void addQuestionAnswer(Answer answer);", "void addScore(LocusScore ls) {\n double weight = 1;\n final float score = ls.getScore();\n weightedSum += weight * score;\n nPts++;\n\n max = score > max ? score : max;\n }", "public void addScore(String addCourseName, int addScore, String addDate, double addCourseRating, int addCourseSlope)\n {\n int z = 0;\n Score temp = new Score(addCourseName, addScore, addDate, addCourseRating, addCourseSlope);\n for(int i = 0; i < scores.length; i++)\n {\n if(scores[i] != null)\n {\n z++;\n }\n }\n Score[] copy = new Score[z + 1];\n for(i = 0; i < z; i++)\n {\n copy[i] = scores[i];\n }\n copy[z] = temp;\n this.scores = copy;\n }", "private void addPointsToPlayer(Player player, int marbleNum) {\n Long score = player.getScore();\n score += marbleNum;\n\n // add the score for the marble 7 places before\n Long value = (Long) placement.get(getMarbel7());\n score += value;\n\n player.setScore(score);\n }", "public void addPoints(final int points) {\n\t\tPoints.addPoints(this.player, points);\n\t}", "public void generateScore(String qName)\n\t{\n\t\t((ViewQuizScoreView) VIEW).setQuizName(((ViewQuizScoreModel) MODEL).getQuizName());\n\t\t((ViewQuizScoreView) VIEW).setInstructions(((ViewQuizScoreModel) MODEL).getInstructions());\n\t\t\n\t\tfor(int i=0; i < ((ViewQuizScoreModel)MODEL).getTotalPoints(); ++i)\n\t\t{\n\t\t\t((ViewQuizScoreView) VIEW).setQuestionNumber(i+1);\n\n\t\t\t//((ViewQuizScoreView) VIEW).setQuestion(((ViewQuizScoreModel) MODEL).getQuestion(i+1));\n\n\n\t\t\t((ViewQuizScoreView) VIEW).setQuestion(((ViewQuizScoreModel) MODEL).getQuestion(i+1));\n\n\t\t\t\n//\t\t\t((ViewQuizScoreView)VIEW).setAstr(\"a) \" + ((ViewQuizScoreModel) MODEL).getAnswerChoice(i));\t\n//\t\t\t((ViewQuizScoreView)VIEW).setAstr(\"b) \" + ((ViewQuizScoreModel) MODEL).getAnswerChoice(i));\t\n//\t\t\t((ViewQuizScoreView)VIEW).setAstr(\"c) \" + ((ViewQuizScoreModel) MODEL).getAnswerChoice(i));\n//\t\t\t((ViewQuizScoreView)VIEW).setAstr(\"d) \" + ((ViewQuizScoreModel) MODEL).getAnswerChoice(i));\n\t\t}\n\t\t\n\t\t\n//\t\t((ViewQuizScoreView)VIEW).showReport();\n\t}", "void increaseScore(){\n\t\t currentScore = currentScore + 10;\n\t\t com.triviagame.Trivia_Game.finalScore = currentScore;\n\t }", "void addScore(double score){\n\t\tsumScore+=score;\n\t\tnumScores++;\n\t\taverage = sumScore/numScores;\n\t}", "public void setRevisedPoints(int thePoints)\r\n {\r\n points = points + thePoints;\r\n }", "public void updateScore(){\r\n if (this.isArtist || winners.contains(this)) {\r\n this.score += pointsGainedLastRound;\r\n }\r\n pointsGainedLastRound = 0;\r\n placeLastRound = 0;\r\n }", "public void addPoints(String playerName, Integer pointsToAdd) {\r\n if (points.containsKey(playerName)) {\r\n points.put(playerName, points.get(playerName) + pointsToAdd);\r\n } else {\r\n points.put(playerName, pointsToAdd);\r\n }\r\n }", "public void calculatePoints() {\n /*\n for (int i = 0; i < getRacers().size(); i++) {\n String username = getRacers().get(i).getUsername();\n int total = 0;\n for (int j = 0; j < getRounds().size(); j++) {\n Slot slot = getRounds().get(j).findRacerInRound(username);\n if (slot != null) {\n total = total + slot.getPoints();\n }\n }\n getRacers().get(i).setPoints(total);\n }*/\n }", "public void addScore(String name, int score) {\n loadScoreFile();\n scores.add(new Score(name, score));\n updateScoreFile();\n }", "@FXML\r\n private void addPoints() {\r\n if (diffPoint > 0) {\r\n int f1 = Integer.parseInt(strength.getText());\r\n int f2 = f1 + 1;\r\n strength.setText(String.valueOf(f2));\r\n diffPoint--;\r\n point.setText(\"You have \" + diffPoint + \" points\");\r\n }\r\n }", "public void addQuestion(Question question);", "public void submitQuiz(View view) {\n\n if(parentKiller()) {\n question1 = 1;\n } else{\n question1 = 0;\n }\n\n if(jokerKills()) {\n question2 = 1;\n } else {\n question2 = 0;\n }\n\n if (batCity()) {\n question3 = 1;\n } else {\n question3 = 0;\n }\n\n if (checkboxQuestion()) {\n question4 = 1;\n } else {\n question4 = 0;\n }\n\n if (nameEntry()) {\n question5 = 1;\n } else {\n question5 = 0;\n }\n\n correctPoints = question1 + question2 + question3 + question4 + question5;\n\n Toast toastScore = Toast.makeText(getApplicationContext(), \"You scored \" + correctPoints + \" points!\", Toast.LENGTH_SHORT);\n toastScore.show();\n }", "public static void incrementScore() {\n\t\tscore++;\n\t}", "void addAnswer(Answer answer);", "public void hitAlienScore() {\r\n //Add 5 to the score\r\n score += 5;\r\n System.out.println(\"Current Score = \"+score);\r\n }", "public void addScore(Pair<String, Integer> score) {\n if (!this.list.isPresent()) {\n this.readScores();\n }\n final List<Pair<String, Integer>> list = this.list.get();\n list.add(score);\n this.sortScores(list);\n this.cutScores(list);\n this.list = Optional.of(list);\n\n this.toSave = true;\n }", "public void increaseScore(int p) {\n score += p;\n //Minden novelesnel megnezzuk, hogy elertuk-e a gyozelem szukseges pandaszamot.\n if(score >= 25 && game.getSelectedMode() == Game.GameMode.FinitPanda){\n //Ha elertuk, szolunk a jateknak hogy vege.\n game.SaveHighScore(score);\n game.gameOver();\n }\n }", "@FXML\r\n private void addPointsIn() {\r\n if (diffPoint > 0) {\r\n int f1 = Integer.parseInt(intelligence.getText());\r\n int f2 = f1 + 1;\r\n intelligence.setText(String.valueOf(f2));\r\n diffPoint--;\r\n point.setText(\"You have \" + diffPoint + \" points\");\r\n }\r\n }", "SpeechAwardPoints(int rating){\n\n currentPoints = rating;\n feedback = \"Your current rating is: \" + currentPoints + \"%\";\n }", "public void updateQ4scoreAndGoToNext(View view){\r\n EditText q1Correct;\r\n q1Correct = (EditText) findViewById(R.id.q1Answer);\r\n String inputText = q1Correct.getText().toString();\r\n String rightAnswer = \"TextView\";\r\n\r\n if (inputText.equals(rightAnswer)) {\r\n q1Score = q1Score + 1;\r\n Toast toast = Toast.makeText(this, \"Great Job! 1 point added.\", Toast.LENGTH_SHORT);\r\n toast.show();\r\n } else {\r\n q1Score = 0;\r\n Toast toast = Toast.makeText(this, \"Better luck next time, 0 points added.\", Toast.LENGTH_SHORT);\r\n toast.show();\r\n }\r\n\r\n Intent i = new Intent(this, Question2Activity.class);\r\n startActivity(i);\r\n }", "public void addNegativePoints(int pts) {\r\n\t\t negativePoints=(negativePoints + pts);\r\n }", "public void updatescore() {\n scorelabel.setText(\"\" + score + \" points\");\n if (100 - score <= 10) win();\n }", "public void setScore(int score)\n\t{\n\t\tthis.score += score;\n\t}", "public static void takeTest(Question [] questions) {\n int score = 0;\n Scanner keyboardInput = new Scanner(System.in);\n for(int i = 0; i < questions.length; i++){\n System.out.println(questions[i].prompt);\n String answer = keyboardInput.nextLine();\n if(answer.equals(questions[i].answer)) {\n score++;\n }\n\n }\n System.out.println(\"Voce conseguiu \" + score + \"/\" + questions.length + \"pontos\");\n\n }", "public void addTwoPointsToTeamA(View view)\n {\n scoreTeamA = scoreTeamA + 2;\n displayTeamAScore(scoreTeamA);\n }", "@Test\n\tpublic void addScoreTest() {\n\t\tassertEquals(\"80.0 75.0 \", g1.toString());\n\t\tassertEquals(\"64.0 90.0 72.0 \", g2.toString());\n\t\tassertEquals(\"82.0 52.0 92.0 72.0 \", g3.toString());\n\t}", "public void submitAnswers(View view) {\n\n int points = 0;\n\n //Question 1\n RadioButton radioButton_q1 = findViewById (R.id.optionB_q1);\n boolean firstQuestionCorrect = radioButton_q1.isChecked ();\n if (firstQuestionCorrect) {\n points += 1;\n }\n //Question 2\n RadioButton radioButton_q2 = findViewById (R.id.optionC_q2);\n boolean secondQuestionCorrect = radioButton_q2.isChecked ();\n if (secondQuestionCorrect) {\n points += 1;\n }\n\n //Question 3 - in order to get a point in Question 3, three particular boxes has to be checked\n CheckBox checkAns1_q3 = findViewById (R.id.checkbox1_q3);\n boolean thirdQuestionAnswer1 = checkAns1_q3.isChecked ();\n CheckBox checkAns2_q3 = findViewById (R.id.checkbox2_q3);\n boolean thirdQuestionAnswer2 = checkAns2_q3.isChecked ();\n CheckBox checkAns3_q3 = findViewById (R.id.checkbox3_q3);\n boolean thirdQuestionAnswer3 = checkAns3_q3.isChecked ();\n CheckBox checkAns4_q3 = findViewById (R.id.checkbox4_q3);\n boolean thirdQuestionAnswer4 = checkAns4_q3.isChecked ();\n CheckBox checkAns5_q3 = findViewById (R.id.checkbox5_q3);\n boolean thirdQuestionAnswer5 = checkAns5_q3.isChecked ();\n CheckBox checkAns6_q3 = findViewById (R.id.checkbox6_q3);\n boolean thirdQuestionAnswer6 = checkAns6_q3.isChecked ();\n CheckBox checkAns7_q3 = findViewById (R.id.checkbox7_q3);\n boolean thirdQuestionAnswer7 = checkAns7_q3.isChecked ();\n if (thirdQuestionAnswer2 && thirdQuestionAnswer3 && thirdQuestionAnswer6 && !thirdQuestionAnswer1 && !thirdQuestionAnswer4 && !thirdQuestionAnswer5 && !thirdQuestionAnswer7) {\n points = points + 1;\n }\n\n //Question 4\n RadioButton radioButton_q4 = findViewById (R.id.optionC_q4);\n boolean forthQuestionCorrect = radioButton_q4.isChecked ();\n if (forthQuestionCorrect) {\n points += 1;\n }\n\n //Question 5\n EditText fifthAnswer = findViewById (R.id.q5_answer);\n String fifthAnswerText = fifthAnswer.getText ().toString ();\n if (fifthAnswerText.equals (\"\")) {\n Toast.makeText (getApplicationContext (), getString (R.string.noFifthAnswer), Toast.LENGTH_LONG).show ();\n return;\n } else if ((fifthAnswerText.equalsIgnoreCase (getString (R.string.pacific))) || (fifthAnswerText.equalsIgnoreCase (getString (R.string.pacificOcean)))) {\n points += 1;\n }\n\n //Question 6\n RadioButton radioButton_q6 = findViewById (R.id.optionA_q6);\n boolean sixthQuestionCorrect = radioButton_q6.isChecked ();\n if (sixthQuestionCorrect) {\n points += 1;\n }\n\n //Showing the result to the user\n displayScore (points);\n }", "public MatcherScores addScore(String intent, Double score)\n {\n scores.computeIfAbsent(score, k -> new TreeSet<>()).add(intent);\n return this;\n }", "private void addQuestion() {\n if (modifiable()) {\n try {\n this.questions.add(Question.fromInput(gradeable()));\n } catch (UserInputException e) {\n System.err.println(e.getMessage());\n }\n } else {\n System.err.println(\"Can not modify this by add a question.\");\n }\n }", "public abstract void scoreAnswer(Question q, Answer answer, JCas jcas);", "public void checkAnswerOne() {\n RadioGroup ans1 = findViewById(R.id.radio_gr_q1);\n int radioButtonId = ans1.getCheckedRadioButtonId();\n\n if (radioButtonId == R.id.a2_q1) {\n points++;\n }\n }", "private void sketchScore() {\r\n View.sketch(score, this.getSize().width + 15, 0);\r\n }", "public void showScore(int points) {\n sb.replace(0, sb.length() - 1, \"Score: \" + points);\n score.setText(sb.toString());\n }", "public void addThreePointsToTeamA(View view)\n {\n scoreTeamA = scoreTeamA + 3;\n displayTeamAScore(scoreTeamA);\n }", "public void addToScore(final int theScoreAddition) {\n this.myCurrentScoreInt += theScoreAddition;\n \n if (this.myCurrentScoreInt > this.myHighScoreInt) {\n this.myHighScoreInt = this.myCurrentScoreInt; \n this.persistHighScore();\n } \n }", "public void addToScore(int ammount){\n\t\tscore+=ammount;\n\t}", "@Override\n\tpublic void inputScore() {\n\n\t}", "public static ArrayList<ArrayList<ArrayList<Double>>> assignScoreToQueries() {\r\n\t\t\r\n\t\tArrayList<ArrayList<ArrayList<Double>>> allQueries = Queries.createQueries();\r\n\t\tArrayList<ArrayList<String>> dataset = ReadInDataset.finalDataset;\r\n\t\tint Counter = 0;\r\n\t\tDouble Score = 0.0;\r\n\t\tDecimalFormat df = new DecimalFormat(\"#.####\");\r\n\t\tdf.setRoundingMode(RoundingMode.CEILING); // round up to 4 decimal places\r\n\t\t\r\n\t\t\r\n\t\t// initially assign to each query a score of 0\r\n\t\t\r\n\t\tfor (int i = 0; i < allQueries.size(); i++) {\r\n\t\t\tArrayList<Double> zero = new ArrayList<Double>();\r\n\t\t\tzero.add(0.0);\r\n\t\t\tallQueries.get(i).add(zero);}\r\n\t\t\r\n\t\t// go through each query and check how many entries of the dataset it matches\r\n\t\t// with each match increase the score\r\n\t\t\r\n\t\tfor (int i = 0; i < allQueries.size(); i++) { // for each query\r\n\t\t\tfor(int b=0; b < dataset.size(); b++) { // for each dataset\r\n\t\t\t\tCounter = 0; \r\n\t\t\t\tfor (int a=0; a < allQueries.get(i).size()-1; a++) { // for each query clause\r\n\t\t\t\t//check if the query criteria match the dataset and increase the Score accordingly\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t //this counter ensures that all query requirements are met in order to increase the score\r\n\t\t\t\t\tif (a != allQueries.get(i).size() - 1) {\t\t\t\t\t\t // ensure that Score entry is not involved in Query Matching\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// take min and max from query along with an entry from the dataset, convert to a double of 4 decimal places\r\n\t\t\t\t\t\tdouble minPoint1 = allQueries.get(i).get(a).get(0);\r\n\t\t\t\t\t\tString minPoint2 = df.format(minPoint1);\r\n\t\t\t\t\t\tdouble minPoint = Double.parseDouble(minPoint2);\r\n\t\t\t\t\t\tdouble maxPoint1 = allQueries.get(i).get(a).get(1);\r\n\t\t\t\t\t\tString maxPoint2 = df.format(maxPoint1);\r\n\t\t\t\t\t\tdouble maxPoint = Double.parseDouble(maxPoint2);\r\n\t\t\t\t\t\tdouble dataPoint1 = Double.parseDouble(dataset.get(b).get(a+1));\r\n\t\t\t\t\t\tString dataPoint2 = df.format(dataPoint1);\r\n\t\t\t\t\t\tdouble dataPoint = Double.parseDouble(dataPoint2);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\tif ( dataPoint<= maxPoint && dataPoint >= minPoint) { Counter++; \r\n\t\t\t\t\t//\tSystem.out.println(\"min:\" + minPoint+\" max: \"+maxPoint+\" data: \"+dataPoint+ \" of Query: \" + b+ \"| Query Match!\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {//System.out.println(minPoint+\" \"+maxPoint+\" \"+dataPoint+ \" of \" + b);\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\tif (Counter==(Queries.getDimensions())/2) { // if counter equals the dimensions of the query then increase score\r\n\t\t\t\t\tScore = allQueries.get(i).get(allQueries.get(i).size()-1).get(0);\r\n\t\t\t\t\tallQueries.get(i).get(allQueries.get(i).size()-1).set(0, Score+1.00); \r\n\t\t\t\t\t}}\r\n\t\t\t\t \r\n\t\t\t\t}\r\n\t\t//\tSystem.out.println(\"Score = \" + allQueries.get(i).get(allQueries.get(i).size()-1).get(0));\r\n\t\t}\t\r\n\t\treturn allQueries;\r\n\t}", "public void setScore(int score) { this.score = score; }", "private int calculatePoints() {\n //Variable que tiene la vista\n CheckBox checkbox1 = findViewById(R.id.checkbox_1);\n CheckBox checkbox2 = findViewById(R.id.checkbox_2);\n CheckBox checkbox3 = findViewById(R.id.checkbox_3);\n\n //Variable de puntos ganados\n int questionPoints = 0;\n\n //Condicion para calcular puntaje\n if(checkbox1.isChecked() && checkbox3.isChecked() && !checkbox2.isChecked()){\n questionPoints = 2;\n }\n else{\n questionPoints = 0;\n }\n\n //Devolver puntaje obtenido\n return questionPoints;\n\n }", "public void addToScore(int id, int bonus){\n scores.set(id,scores.get(id) + bonus);\n }", "public void addAnswer(Answer ans) {\n // TODO implement here\n }", "public void test(int studyReq, int points) {\r\n\t\tdouble score = 0;\r\n\t\ttotalPoints+=points;\r\n\t\tif(testReadiness >= studyReq) {\r\n\t\t\tscore = points;\r\n\t\t\tcurrentPoints+=points;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tcurrentPoints+=points - (studyReq - testReadiness);\r\n\t\t\tscore = points - (studyReq - testReadiness);\r\n\t\t}\r\n\t\t\r\n\t\tgrade = currentPoints/totalPoints;\r\n\t\tif(grade < 0) {\r\n\t\t\tgrade = 0;\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"You took the test today and got \" + ((score/points) * 100) + \"%\");\r\n\t\tSystem.out.println(\"hours needed: \" + studyReq + \"\\nhours Studied: \" + testReadiness);\r\n\t\ttestReadiness = 0;\r\n\t}", "@FXML\r\n private void addPointsAG() {\r\n if (diffPoint > 0) {\r\n int f1 = Integer.parseInt(agility.getText());\r\n int f2 = f1 + 1;\r\n agility.setText(String.valueOf(f2));\r\n diffPoint--;\r\n point.setText(\"You have \" + diffPoint + \" points\");\r\n }\r\n }", "public void actionPerformed(ActionEvent e) {\n String your_answer = JOptionPane.showInputDialog(Que);\n JOptionPane.showMessageDialog(null, \"Reference and yours: \"+ Right_Answer +\" Vs \" + your_answer);\n JButton source = (JButton) e.getSource();\n source.setEnabled(false);\n System.out.println(Right_Answer.length());\n System.out.println(your_answer.length());\n\n //adds point if your right\n if (your_answer.equalsIgnoreCase(Right_Answer.trim())) {\n source.setBackground(Color.GREEN);\n score1++;\n text.setText(\"Correct:\"+score1);\n }\n //add point if your wrong \n else {\n source.setBackground(Color.red);\n score2++;\n text1.setText(\"Wrong:\"+score2);\n }\n //adds all points \n total=score1+score2;\n text2.setText(\"Total:\"+total);\n }", "private void updateScore(int point) {\n SharedPreferences preferences = getSharedPreferences(SHARED_PREFERENCES, MODE_PRIVATE);\n SharedPreferences.Editor editor = preferences.edit();\n editor.putInt(SCORE_KEY, mScore);\n\n }", "public void calculateScore() {\n\n turnScore();\n\n if (turn == 1) {\n p1.setScore(p1.getScore() - turnScore);\n\n } else if (turn == 2) {\n p2.setScore(p2.getScore() - turnScore);\n\n }\n\n\n }", "public int getScorePoints() {\n/* 75 */ return this.scorePoints;\n/* */ }", "public final static int pointsToAdd(TemporaryChar temp)\n\t{\n\t\tint randomIndex;\n\t\tchar charAnswer;\n\t\tint intAnswer;\n\t\tif (temp.symbol == GameConstants.easyQuestionsSymbol)\n\t\t{\n\t\t\trandomIndex=Global.rand.nextInt(Database.EASYQUESTIONS.length);\n\t\t\twhile (Database.EASYQUESTIONS[randomIndex].haveBeenUsed() == true)\n\t\t\t{\n\t\t\t\trandomIndex = Global.rand.nextInt(Database.EASYQUESTIONS.length);\n\t\t\t}\n\t\t\tSystem.out.println(Database.EASYQUESTIONS[randomIndex].toString());\n\t\t\tDatabase.EASYQUESTIONS[randomIndex].setToUsed();\n\t\t\tcharAnswer=Global.sc.next(\".\").charAt(0);\n\t\t\tif (Database.EASYQUESTIONS[randomIndex].isTrue(charAnswer))\n\t\t\t{\n\t\t\t\treturn GameConstants.easyQuestionsPoints;\n\t\t\t}\n\t\t}\n\n\t\tif (temp.symbol == GameConstants.mediumQuestionsSymbol)\n\t\t{\n\t\t\trandomIndex=Global.rand.nextInt(Database.MEDIUMQUESTIONS.length);\n\t\t\twhile (Database.MEDIUMQUESTIONS[randomIndex].haveBeenUsed() == true)\n\t\t\t{\n\t\t\t\trandomIndex = Global.rand.nextInt(Database.MEDIUMQUESTIONS.length);\n\t\t\t}\n\t\t\tSystem.out.println(Database.MEDIUMQUESTIONS[randomIndex].toString());\n\t\t\tDatabase.MEDIUMQUESTIONS[randomIndex].setToUsed();\n\t\t\tcharAnswer=Global.sc.next(\".\").charAt(0);\n\t\t\tif (Database.MEDIUMQUESTIONS[randomIndex].isTrue(charAnswer))\n\t\t\t{\n\t\t\t\treturn GameConstants.mediumQuestionsPoints;\n\t\t\t}\n\t\t}\n\n\n\t\tif (temp.symbol == GameConstants.hardQuestionsSymbol)\n\t\t{\n\n\t\t\trandomIndex=Global.rand.nextInt(Database.HARDQUESTIONS.length);\n\t\t\twhile (Database.HARDQUESTIONS[randomIndex].haveBeenUsed() == true)\n\t\t\t{\n\t\t\t\trandomIndex = Global.rand.nextInt(Database.HARDQUESTIONS.length);\n\t\t\t}\n\t\t\tSystem.out.println(\"Please enter an integer: \");\n\t\t\tSystem.out.println(Database.HARDQUESTIONS[randomIndex].toString());\n\t\t\tDatabase.HARDQUESTIONS[randomIndex].setToUsed();\n\t\t\tintAnswer=Global.sc.nextInt();\n\t\t\tif (Database.HARDQUESTIONS[randomIndex].isTrue(intAnswer))\n\t\t\t{\n\t\t\t\treturn GameConstants.hardQuestionsPoints;\n\t\t\t}\n\t\t\t/**\n\t\t\t * If the answer is wrong checks if it is at least 10% close to the real answer. \n\t\t\t * */\n\t\t\telse \n\t\t\t{\n\t\t\t\tif (Database.HARDQUESTIONS[randomIndex].isCloseToAnswer(intAnswer))\n\t\t\t\t{\n\t\t\t\t\treturn GameConstants.hardQuestionsNotFullPoints;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\n\n\n\n\n\t}" ]
[ "0.7958602", "0.7603148", "0.74956125", "0.7469904", "0.72933054", "0.7245118", "0.71035874", "0.7048451", "0.69141924", "0.6891388", "0.6890784", "0.6864097", "0.6690937", "0.66784865", "0.65346146", "0.6522497", "0.651277", "0.6473234", "0.6472926", "0.64725125", "0.6466774", "0.6451348", "0.6427297", "0.6403282", "0.63652784", "0.6360111", "0.63248867", "0.63096976", "0.6304292", "0.63039416", "0.6297764", "0.6288837", "0.627316", "0.6267922", "0.6258553", "0.6254019", "0.62098837", "0.61670756", "0.6162706", "0.6162634", "0.61601835", "0.6153887", "0.61449504", "0.6141196", "0.6127503", "0.61247647", "0.6114309", "0.61106", "0.61090183", "0.61037904", "0.6076799", "0.60505426", "0.6044142", "0.60413516", "0.60272694", "0.6008749", "0.6007218", "0.59976745", "0.5973324", "0.5964483", "0.5961935", "0.5952193", "0.5944066", "0.5942425", "0.5940889", "0.59314007", "0.59283173", "0.5926755", "0.5903895", "0.59031826", "0.58843046", "0.58795536", "0.5877683", "0.5865739", "0.5856545", "0.585069", "0.58406866", "0.5838424", "0.582156", "0.58178556", "0.5811912", "0.58096373", "0.5805457", "0.5805444", "0.580446", "0.58032656", "0.58030397", "0.58023316", "0.58000886", "0.5769959", "0.5769344", "0.57508016", "0.5749524", "0.5742691", "0.5723085", "0.5720238", "0.57152075", "0.57139295", "0.57131493", "0.5711517", "0.57015777" ]
0.0
-1
Calculates the player's rating based on his score
void calculateRating(){ if(playerScore <= 30){ playerRating = getString(R.string.rating_message_bad); } else if(playerScore <= 70){ playerRating = getString(R.string.rating_message_regular); } else if(playerScore <= 90){ playerRating = getString(R.string.rating_message_good); } else{ playerRating = getString(R.string.rating_message_excelent); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void scoring(){\n for (int i=0; i< players.size(); i++){\n Player p = players.get(i);\n p.setScore(10*p.getTricksWon());\n if(p.getTricksWon() < p.getBid() || p.getTricksWon() > p.getBid()){\n int diff = Math.abs(p.getTricksWon() - p.getBid());\n p.setScore(p.getScore() - (10*diff));\n }\n if(p.getTricksWon() == p.getBid()){\n p.setScore(p.getScore() + 20);\n }\n }\n }", "public int getPlayerScore();", "public float getUserRatingScore() {\n float scorePercent = Float.valueOf(userRating) * 10;\n\n return ((5 * scorePercent) / 100);\n }", "@Override\n\tprotected int calculateScore() {\n\t\treturn Math.abs(playerScore[0] - playerScore[1]);\n\t}", "Float getScore();", "public void updatePlayerScore()\n\t{\n\t\tthis.score = (int)(getBalance() - 500) - (getNumberOfLoans()*500); \n\t}", "float getScore();", "float getScore();", "double getRating();", "public float calculateRating(Date createdAt, long score){\n float downSet = new Float(0.000003);\n long diff = createdAt.getTime() - new Date().getTime();\n long diffSeconds = TimeUnit.SECONDS.convert(diff,TimeUnit.MILLISECONDS);\n float rating = score + downSet * ((float) diffSeconds) ;\n return rating;\n }", "Float getAutoScore();", "public void calculateScore() {\n\n turnScore();\n\n if (turn == 1) {\n p1.setScore(p1.getScore() - turnScore);\n\n } else if (turn == 2) {\n p2.setScore(p2.getScore() - turnScore);\n\n }\n\n\n }", "int score(Player player)\n\t{\n\t\treturn IntStream.range(0, state.size())\n\t\t\t.map(i -> state.get(i) == player.getId() ? (int) Math.pow(2, i) : 0)\n\t\t\t.reduce(0, (a, b) -> a + b);\n\t}", "public abstract float getScore();", "private double getScore() {\n double score = 0;\n score += getRBAnswers(R.id.radiogroup1, R.id.radiobutton_answer12);\n score += getRBAnswers(R.id.radiogroup2, R.id.radiobutton_answer21);\n score += getRBAnswers(R.id.radiogroup3, R.id.radiobutton_answer33);\n score += getRBAnswers(R.id.radiogroup4, R.id.radiobutton_answer41);\n score += getCBAnswers();\n score += getTextAns();\n score = Math.round(score / .0006);\n score = score / 100;\n return score;\n }", "public int score(){\r\n\t\t//to be implemented: should return game score \r\n\t\tfor(int i=0; i<10; i++)\r\n\t\t{\r\n\t\t\tscore= frames.get(i).score();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\treturn score + bonusGame;\r\n\t}", "public void calculateScores()\r\n {\r\n for(int i = 0; i < gameBoard.getBoardRows(); i++)\r\n for(int j = 0; j < gameBoard.getBoardCols(); j++)\r\n {\r\n if(gameBoard.tilePlayer(i,j) == 0)\r\n currentRedScore = currentRedScore + gameBoard.tileScore(i,j);\r\n if(gameBoard.tilePlayer(i,j) == 1)\r\n currentBlueScore = currentBlueScore + gameBoard.tileScore(i,j);\r\n }\r\n }", "public int getScore(){\n\t\treturn playerScore;\n\t}", "public int updateRating(int ra, int rb, double score) {\n double expected = expectedScore(ra, rb);\n double k = 32;\n return (int) (ra + k*(score-expected));\n }", "public int getPlayerScore(){\n\t\treturn playerScore;\n\t}", "public void updateScore(){\r\n if (this.isArtist || winners.contains(this)) {\r\n this.score += pointsGainedLastRound;\r\n }\r\n pointsGainedLastRound = 0;\r\n placeLastRound = 0;\r\n }", "public double calculateOverallRating() {\n Rating[] ratingArray = this.ratings;\n double sum = 0.0;\n for(int i = 0; i < ratingArray.length; i++) {\n if (ratingArray[i] != null) { // Making sure it has a rating\n sum = sum + ratingArray[i].getScore();\n } else {\n sum = sum + 0.0;\n }\n }\n return sum;\n }", "private Double computeRate(Double score,List<FyQuestion> questions) {\n\t\tDouble total=0.0;\r\n\t\tfor(FyQuestion q:questions) {\r\n\t\t\ttotal+=(q.getScore()*(100-q.getDifficulty()))/score;\r\n\t\t}\r\n\t\treturn total/100;\r\n\t}", "public int scoreSpec(){\n List<Player> players = state.getPlayers();\n int currentBonusScore = 0;\n int otherBonus = 0;\n for(int i = 0; i < players.size(); i++){\n if( i == state.getCurrentPlayerId()){\n currentBonusScore += bonusScore(players.get(i));\n }\n else{\n otherBonus += bonusScore(players.get(i));\n }\n }\n return currentBonusScore-otherBonus;\n }", "int getScore();", "public static int getPlayerScore()\r\n\t{\r\n\t\treturn playerScore;\r\n\t}", "public float getScore(){return score;}", "public void updateScore(int playerScore){\n\t\tscore += playerScore;\n\t\tscoreTotalLabel.setText(\"\" + score);\n\t}", "public abstract double calcAvRating();", "private void calculateRating() {\n\t\tVisitor[] visitors = getVisitors();\n\t\tint max = 0;\n\t\tint act = 0;\n\t\tfor (Visitor visitor : visitors) {\n\t\t\tif(validRating(visitor)) {\n\t\t\t\tmax += 5;\n\t\t\t\tact += visitor.getRating();\n\t\t\t}\n\t\t}\n\t\tif(max != 0) {\n\t\t\trating = (1f*act)/(1f*max);\n\t\t}\n\t}", "public void score(){\r\n\t\tint playerLocation = player.getLocationX();\r\n\t\tint obstacleX = obstacle.getLocationX();\r\n\t\tint obstacleY = obstacle.getLocationY();\r\n\r\n\r\n\t\tstr =\"\" + countCoins;\r\n\r\n\t\t//if you hit a coin, the number of points goes up by one.\r\n\t\tif(obstacleY == 280 && obstacleX==300 && playerLocation == 250){\r\n\t\t\tcountCoins++;\r\n\t\t}\r\n\t\tif(obstacleY== 450 && obstacleX==300 && playerLocation ==450){\r\n\t\t\tcountCoins++;\r\n\t\t}\r\n\r\n\t\t//if you hit the green monster, you lose one point.\r\n\t\tif((obstacleX-50) == 250 && (obstacleY-240) == 250 && playerLocation ==250){\r\n\t\t\tcountCoins--;\r\n\t\t}\r\n\r\n\t\t//if you hit the blue monster, you lose 3 points.\r\n\t\tif((obstacleX+180) == 480 && (obstacleY+180) == 250 && playerLocation ==450){\r\n\t\t\tcountCoins-=3;\r\n\t\t}\r\n\t}", "public int getPlayerScore(){\n return this.playerScore;\n }", "public static void score() {\n\t\tSystem.out.println(\"SCORE: \");\n\t\tSystem.out.println(player1 + \": \" + score1);\n\t\tSystem.out.println(player2 + \": \" + score2);\n\t}", "@Override\n public void updateScore(int winner)\n {\n if (winner == 0)\n {\n playerOneScore++;\n }\n else\n {\n playerTwoScore++;\n }\n }", "public int getScore() {return score;}", "public double getScore() {\r\n return score;\r\n }", "private int calculateScore(){\n int score = 0;\n for(Card card : hand){\n score += card.getScore();\n }\n return score;\n }", "public int getScore() { return score; }", "protected abstract void calcScores();", "public int incrementScore(int player) {\n switch (player) {\n case PLAYER_A:\n return ++scoreA;\n case PLAYER_B:\n return ++scoreB;\n }\n return -1;\n }", "@Override\n public int getScore(String username) throws RemoteException {\n Player p = getPlayer(username);\n return p != null ? p.getScore() : -1;\n }", "public int getRoundScore() {\n return score;\n }", "public int getScore()\n {\n // put your code here\n return score;\n }", "public int getScore() {\n return getStat(score);\n }", "public static double playerScore(Player player, State state) {\n\t\tdouble playerScore = 0;\n\t\tfor(int row = 0; row < state.getGrid().length; row++) {\n\t\t\tfor(int col = 0; col < state.getGrid()[row].length; col++) {\n\t\t\t\tif(state.getGrid()[row][col] == player.getPiece()) {\n\t\t\t\t\tplayerScore += score(player.getPiece(), state, row, col);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn playerScore;\n\t}", "int score();", "int score();", "public static int getScore()\n {\n return score;\n }", "public int score() {\n return score;\n }", "public ScoreValues getScore(int player) {\n switch (player) {\n case PLAYER_A:\n return scoreA;\n case PLAYER_B:\n return scoreB;\n }\n return -1;\n }", "public int getScore()\n {\n return points + extras;\n }", "public void updatescore() {\n scorelabel.setText(\"\" + score + \" points\");\n if (100 - score <= 10) win();\n }", "public Double getScore() {\n return this.score;\n }", "public Double getScore() {\n return this.score;\n }", "int getScoreValue();", "void calculateScore(){\r\n playerScore = 0;\r\n for(int i = 1; i<=10; i++) {\r\n scoreQuestion(i);\r\n }\r\n }", "public int score()\n {\n if (this.score != Integer.MIN_VALUE)\n return this.score;\n\n this.score = 0;\n if (!this.safe)\n return 0;\n\n // End game bonus\n int bonus = this.d.size() * Math.max(0, (this.L - 3 * this.b.shots)) * 3;\n this.score = (this.d.size() * 100) + ((this.NE - this.e.size()) * 10) + (this.e.size() == 0 ? bonus : 0);\n\n // value:\n return this.score;\n }", "public static int getScore()\r\n\t{\r\n\t\treturn score;\r\n\t}", "public float getScore() {\n return score;\n }", "public int bonusScore(Player p){\n int score = p.getBombRange() + p.getNumberBombRemaining() + p.getNumberMoveRemaining();\n return score;\n }", "public Float getScore() {\n return score;\n }", "public static double evaluate(Player player, State state) {\n\t\treturn Value.playerScore(player, state) - Value.playerScore(player.getOpponent(), state);\n\t}", "private void increaseScore() {\n this.game.getPlayers().values().forEach(ship -> {\n ship.increaseScore();\n if (ship.getScore() % 5 == 0) {\n this.asteroidsLimit++;\n }\n });\n }", "long getScore();", "long getScore();", "long getScore();", "long getScore();", "public int getScore()\n {\n return currentScore;\n }", "public static int getScore(){\n return score;\n }", "public static int getScore()\n\t{\n\t\treturn score;\n\t}", "private void updateScoreRatios(IGame game, boolean addToTotal) {\n int player1Score = getScore(game, game.getPlayer1());\n int player2Score = getScore(game, game.getPlayer2());\n int difference = Math.abs(player1Score - player2Score);\n\n IPlayer player1 = game.getPlayer1();\n IPlayer player2 = game.getPlayer2();\n\n logger.info(player1 + \" has scored \" + player1Score + \" in total\");\n logger.info(player2 + \" has scored \" + player2Score + \" in total\");\n\n if (player1Score > player2Score) {\n\n if (addToTotal) {\n player1.setScoreRatio(player1.getScoreRatio() + difference);\n player2.setScoreRatio(player2.getScoreRatio() - difference);\n logger.info(player1 + \" +\" + difference + \" = \"\n + player1.getScoreRatio());\n logger.info(player2 + \" -\" + difference + \" = \"\n + player2.getScoreRatio());\n } else {\n logger.info(\"Resetting scores\");\n player2.setScoreRatio(player2.getScoreRatio() + difference);\n player1.setScoreRatio(player1.getScoreRatio() - difference);\n\n logger.info(player2 + \" +\" + difference + \" = \"\n + player2.getScoreRatio());\n logger.info(player1 + \" -\" + difference + \" = \"\n + player1.getScoreRatio());\n }\n\n } else if (player2Score > player1Score) {\n if (addToTotal) {\n player2.setScoreRatio(player2.getScoreRatio() + difference);\n player1.setScoreRatio(player1.getScoreRatio() - difference);\n\n logger.info(player2 + \" +\" + difference + \" = \"\n + player2.getScoreRatio());\n logger.info(player1 + \" -\" + difference + \" = \"\n + player1.getScoreRatio());\n } else {\n logger.info(\"Resetting scores\");\n player1.setScoreRatio(player1.getScoreRatio() + difference);\n player2.setScoreRatio(player2.getScoreRatio() - difference);\n\n logger.info(player1 + \" +\" + difference + \" = \"\n + player1.getScoreRatio());\n logger.info(player2 + \" -\" + difference + \" = \"\n + player2.getScoreRatio());\n }\n }\n }", "public int getScore()\n {\n return score;\n }", "@Override\n public int getScore() {\n return totalScore;\n }", "public int getScore(){return score;}", "public int getScore(){return score;}", "private String calculateScore(DiceModel Player1, DiceModel Player2) {\n\t\tint p1d1 = Player1.getDie1();\n\t\tint p1d2 = Player1.getDie2();\n\t\tint p1d3 = Player1.getDie3();\n\t\t\n\t\tint p2d1 = Player2.getDie1();\n\t\tint p2d2 = Player2.getDie2();\n\t\tint p2d3 = Player2.getDie3();\n\t\t\n\t\tint p1P = Player1.getPoints();\n\t\tint p2P = Player2.getPoints();\n\t\n\t\t// impParts stands for the 'important parts' used when calculating pairs (the pair)\n\t\tint impPartsP1;\n\t\tint impPartsP2;\n\t\t\n\t\t// for when the sum is needed\n\t\tint sumP1 = (p1d1 + p1d2 + p1d3);\n\t\tint sumP2 = (p2d1 + p2d2 + p2d3);\n\t\t\n\t\t// ranks are the first step in determining who won\n\t\tint rankP1 = getRank(Player1);\n\t\tint rankP2 = getRank(Player2);\n\n\t\t// now that ranks have been gotten, calculate winner\n\t\t// if P1 had higher rank, he wins. the end.\n\t\tif (rankP1 > rankP2) {\n\t\t\twinner = \"Player1\";\n\t\t} else if (rankP2 > rankP1) { // if player2 has higher rank\n\t\t\twinner = \"Player2\";\n\t\t} else if (rankP1 == rankP2) { // if ranks are same\n\t\t\tif (rankP1 == 4) {\t\t\t// if player 1 rolled 421\n\t\t\t\tif (winner.equals(\"Player1\")) {\n\t\t\t\t\twinner = \"Player1\";\n\t\t\t\t} else {\n\t\t\t\t\twinner = \"Player2\";\n\t\t\t\t}\n\t\t\t\twinner = \"Player1\";\n\t\t\t} else if (rankP1 == 3) { // if they are triples;\n\t\t\t\tif (sumP1 >= sumP2) { // highest wins\n\t\t\t\t\twinner = \"Player1\";\n\t\t\t\t} else if (sumP2 > sumP1) {\n\t\t\t\t\twinner = \"Player2\";\n\t\t\t\t} else {\n\t\t\t\t\tif (winner.equals(\"Player1\")) {\n\t\t\t\t\t\twinner = \"Player1\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\twinner = \"Player2\";\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (rankP1 == 2) { // if they are doubles\n\t\t\t\tif (p1d1 == p1d2) {\n\t\t\t\t\timpPartsP1 = p1d1; // set the important part to the pair\n\t\t\t\t} else {\n\t\t\t\t\timpPartsP1 = p1d3;\n\t\t\t\t}\n\t\t\t\tif (p2d1 == p2d2) { // do it for player 2 also\n\t\t\t\t\timpPartsP2 = p2d1;\n\t\t\t\t} else {\n\t\t\t\t\timpPartsP2 = p2d3;\n\t\t\t\t}\n\t\t\t\tif (impPartsP1 > impPartsP2) { //if player1 pair is better\n\t\t\t\t\twinner = \"Player1\";\n\t\t\t\t} else if (impPartsP2 > impPartsP1) { // or p2's > p1's\n\t\t\t\t\twinner = \"Player2\";\n\t\t\t\t} else if (impPartsP1 == impPartsP2) { // if same pair\n\t\t\t\t\tif (sumP1 >= sumP2) {\t\t\t\t// add them up\n\t\t\t\t\t\twinner = \"Player1\";\n\t\t\t\t\t} else if (sumP2 > sumP1) {\n\t\t\t\t\t\twinner = \"Player2\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (winner.equals(\"Player1\")) {\n\t\t\t\t\t\t\twinner = \"Player1\";\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\twinner = \"Player2\";\n\t\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} else {\n\t\t\t\tif (sumP1 >= sumP2) { // if no pairs or better, take sums\n\t\t\t\t\twinner = \"Player1\";\n\t\t\t\t} else if (sumP2 > sumP1){\n\t\t\t\t\twinner = \"Player2\";\n\t\t\t\t} else {\n\t\t\t\t\tif (winner.equals(\"Player1\")) {\n\t\t\t\t\t\twinner = \"Player1\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\twinner = \"Player2\";\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} \t\n\t\t\n\t\tif (winner.equals(\"Player1\")) {\n\t\t\tplayer1.setPoints(p1P + 1);\n\t\t} else {\n\t\t\tplayer2.setPoints(p2P + 1);\n\t\t}\n\t\treturn winner;\n\t}", "public int getScore() {\r\n return score;\r\n }", "public int getScore() {\r\n return score;\r\n }", "public int getScore() {\r\n return score;\r\n }", "public int getScore() {\n return currentScore;\n }", "public int calculateScore(int playerID) {\n\t\tif (playerID == 1) {\n\t\t\treturn (player1.getScore() - player2.getScore());\n\t\t} else {\n\t\t\treturn (player2.getScore() - player1.getScore());\n\t\t}\n\t}", "public int getScore() {\n return score;\n }", "public int getScore() {\n return score;\n }", "public int getRating();", "public int getTotalScore(){\r\n return totalScore;\r\n }", "public int getScore ()\r\n {\r\n\treturn score;\r\n }", "public static void incrementScore() {\n\t\tscore++;\n\t}", "public int getScore() {\r\n\t\treturn deck.getScore() + extraVictory;\r\n\t}", "public int getScore(){\r\n\t\treturn score;\r\n\t}", "public int getScore(){\r\n\t\treturn score;\r\n\t}", "public double getScore() {\r\n return mScore;\r\n }", "public int getScore()\n {\n return score; \n }", "public double getBestScore();", "public int getScore()\r\n\t{\r\n\t\treturn score;\r\n\t}", "public int getScore()\r\n\t{\r\n\t\treturn score;\r\n\t}", "public int getScore() {\n return score;\n }", "public double getScore() {\n return score - penalty;\n }", "public int getTotalScore(){\n return totalScore;\n }", "public double getRating(){\n\t\treturn this.user_rating;\n\t}", "public synchronized void updateScore(PlayerHandler playerHandler) {\n\n int points = teams.length * Server.TEAM_SCORE / numMaxPlayers;\n playerHandler.increaseCorrectAnswers();\n\n if(points < 3){\n points = 3;\n }\n\n if (playerHandler.getTeam() == teams[0]) {\n score -= points;\n System.out.println(score);\n return;\n }\n score += points;\n }" ]
[ "0.72962254", "0.72815394", "0.72382206", "0.7168407", "0.71429825", "0.713198", "0.7123696", "0.7123696", "0.7004839", "0.6928285", "0.6891396", "0.68811053", "0.6857999", "0.6818963", "0.68122953", "0.680476", "0.6795715", "0.679465", "0.6753524", "0.67447436", "0.6741653", "0.6719465", "0.6712542", "0.6710749", "0.6702036", "0.6690805", "0.667098", "0.6661641", "0.6660245", "0.66449153", "0.66245794", "0.66239077", "0.66053057", "0.6601914", "0.6543269", "0.6535029", "0.6533852", "0.6519722", "0.65166825", "0.6507198", "0.6496089", "0.6493562", "0.64930475", "0.64812106", "0.64661705", "0.64636236", "0.64636236", "0.6462003", "0.6458056", "0.64548403", "0.64484656", "0.64470816", "0.64399576", "0.64399576", "0.6434865", "0.6426139", "0.6425991", "0.64252347", "0.6425157", "0.642075", "0.6417599", "0.64069444", "0.6405066", "0.6403547", "0.6403547", "0.6403547", "0.6403547", "0.64031965", "0.6403016", "0.6401978", "0.6393955", "0.6386635", "0.6377267", "0.63737303", "0.63737303", "0.6369409", "0.6367882", "0.6367882", "0.6367882", "0.6366541", "0.6361654", "0.6360799", "0.6360799", "0.63573635", "0.6351589", "0.6351081", "0.6348494", "0.6346014", "0.63394356", "0.63394356", "0.6338247", "0.6323153", "0.63220125", "0.6321532", "0.6321532", "0.6320941", "0.63206106", "0.6318951", "0.63087976", "0.630334" ]
0.70692104
8
Displays toast message with player score
void displayMessage(){ Toast toast = Toast.makeText(this, getString(R.string.congratz_message, String.valueOf(playerScore)), Toast.LENGTH_SHORT); toast.show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void showScore()\n {\n showText(\"Score:\" + score,550,50);\n }", "private void showGameScore() {\n System.out.println(messageProvider.provideMessage(\"score\"));\n System.out.println(settings.getPlayers().get(0).getScore()\n + \" vs \" + settings.getPlayers().get(1).getScore());\n }", "private void gameOverDialog() {\n Toast makeText;\n makeText = Toast.makeText(this.getContext(), getResources().getString(R.string.game_over), Toast.LENGTH_LONG);\n makeText.show();\n makeText = Toast.makeText(this.getContext(), getResources().getString(R.string.final_score) + score, Toast.LENGTH_LONG);\n makeText.show();\n }", "private void displayScore(int score) {\n\n String strScore = String.valueOf (score);\n String message = getString (R.string.yourScoreIs) + strScore + getString (R.string.outOf6);\n\n if (score == 0) message += getString (R.string.score_zero);\n\n if (score == 1 || score == 2 || score == 3) message += getString (R.string.score_low);\n\n if (score == 4 || score == 5) message += getString (R.string.score_notBad);\n\n if (score == 6) message += getString (R.string.score_six);\n\n Toast.makeText (getApplicationContext (), message, Toast.LENGTH_LONG).show ();\n\n }", "private void gameWonDialog() {\n Toast makeText;\n makeText = Toast.makeText(this.getContext(), getResources().getString(R.string.game_won), Toast.LENGTH_LONG);\n makeText.show();\n makeText = Toast.makeText(this.getContext(), getResources().getString(R.string.final_score) + score, Toast.LENGTH_LONG);\n makeText.show();\n }", "public void updatePlayerHealthUI() {\n CharSequence text = String.format(\"Score: %d\", getscore());\n scoreLabel.setText(text);\n }", "public void userScore(float score) {\n String message;\n //Finds the appropriate text views in order to set text later\n TextView userScore = findViewById(R.id.yourScore);\n TextView userMessage = findViewById(R.id.messageView);\n //Final score variable derived from displayScore\n int finalScore = (Math.round(displayScore(score)));\n //if statements to determine message to be displayed based on finalScore\n if (finalScore == 100) {\n message = \"Wow!! \\nAre you Stan Lee?\";\n } else if (finalScore == 90) {\n message = \"You're amazing!!\";\n } else if (finalScore == 80) {\n message = \"Impressive!!\";\n } else if (finalScore == 70) {\n message = \"You're a regular \\ncomic book junkie!\";\n } else if (finalScore == 60) {\n message = \"Still a majority!!\";\n } else if (finalScore == 50) {\n message = \"Solid for the \\ncasual reader\";\n } else if (finalScore == 40) {\n message = \"Just a fan of \\nthe movies?\";\n } else if (finalScore == 30) {\n message = \"DC Universe?\";\n } else if (finalScore == 20) {\n message = \"A couple good guesses?\";\n } else if (finalScore == 10) {\n message = \"Did you even try?\";\n } else if (finalScore == 0) {\n message = \"Have you heard of Marvel?\";\n } else {\n message = \"What did you do?\";\n }\n //sets the text for the views\n userScore.setText((finalScore) + \"%\");\n userMessage.setText(message);\n }", "void displayScore(){\n\t\tTextView yourScore = (TextView) findViewById (R.id.yourscore); \n String currentScoreText;\n currentScoreText = Integer.toString(currentScore);\n\t\tyourScore.setText(currentScoreText);\n\t\t\n\t}", "void updateScore () {\n scoreOutput.setText(Integer.toString(score));\n }", "private void showScore() {\r\n View.show(score, this.getSize().width + 15, 0);\r\n }", "private void displayScore(int score) {\n // Set a text view to show the score.\n TextView scoreView = findViewById(R.id.score_text_view);\n scoreView.setText(format(\" %d\", score));\n }", "private void showFinalScore() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(\"Time's up! Your final score is: \" + score + \"\\nHigh score: \" + highScore);\n builder.setOnDismissListener(unused -> finish());\n AlertDialog dialog = builder.create();\n dialog.show();\n }", "public static void score() {\n\t\tSystem.out.println(\"SCORE: \");\n\t\tSystem.out.println(player1 + \": \" + score1);\n\t\tSystem.out.println(player2 + \": \" + score2);\n\t}", "public void displayForPlayerA(int score) {\n scoreViewPlayerA.setText(String.valueOf(score));\n }", "private void gameOverAlert() {\n \tAlert alert = new Alert(AlertType.INFORMATION);\n \t\n \talert.setTitle(\"Game Over!\");\n \talert.setHeaderText(\"You Did Not Get A New High Score!\\nYour High Score: \" + level.animal.getPoints());\n \talert.setContentText(\"Try Again Next Time!\");\n \talert.show();\n\t}", "public void updateScoreboard() {\r\n \tif(parentActivity instanceof GameActivity) {\r\n \t\t((TextView)(((GameActivity)parentActivity).getScoreboard())).setText(\"\"+score);\r\n \t}\r\n }", "public void displayScoreA (int score){\n\n TextView scoreA = (TextView)findViewById(R.id.team_a_score);\n scoreA.setText(String.valueOf(score));\n }", "public void display(int counterMessage) {\n TextView textView = (TextView) findViewById(R.id.pointsValue);\n textView.setText(\"\" + counterMessage);\n }", "public void displayVisitorScore(int score) {\r\n TextView scoreView = (TextView) findViewById(R.id.visitor_score);\r\n scoreView.setText(String.valueOf(score));\r\n }", "private void displayTeamA_score(int score) {\n TextView teamA_scoreView = findViewById(R.id.teamA_score_textView);\n teamA_scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamV(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_v_score);\n scoreView.setText(String.valueOf(score));\n }", "private void printScore() {\r\n View.print(score);\r\n }", "private void showEndMessage()\n {\n showText(\"Time is up - you win!\", 390, 150);\n showText(\"Your final score: \" + healthLevel + \" points\", 390, 170);\n }", "public void displayForTeamK(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_k_score);\n scoreView.setText(String.valueOf(score));\n }", "private void showScores() {\n levelNumber.setText(String.format(\"%s%d\", getResources().getString(R.string.level), level));\n Level l = Level.getLevel(level);\n for (int i = 0; i < Level.MAX_SCORES; i++) {\n Level.Player p = l.getPlayer(i);\n if (p != null) new ScoreTextView(i + 1, p.toString());\n }\n }", "public void showScore(int points) {\n sb.replace(0, sb.length() - 1, \"Score: \" + points);\n score.setText(sb.toString());\n }", "private void displayOnResult(String title, String message, Integer gifImage, int whoWon){\n\n switch (whoWon){\n case 1:{\n TextView textView = (TextView) mScoreGrid.getChildAt(3);\n scorePlayer1++;\n textView.setText(String.valueOf(scorePlayer1));\n break;\n }\n case 2:{\n TextView textView = (TextView) mScoreGrid.getChildAt(4);\n scorePlayer2++;\n textView.setText(String.valueOf(scorePlayer2));\n break;\n }\n case 0:\n default:{\n TextView textView = (TextView) mScoreGrid.getChildAt(5);\n scoreDraw++;\n textView.setText(String.valueOf(scoreDraw));\n break;\n }\n }\n\n new MaterialDialog.Builder(this)\n .setTitle(title)\n .setMessage(message)\n .setCancelable(false)\n .setPositiveButton(\"Okay\", R.drawable.ic_baseline_download_done_24, new MaterialDialog.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int which) {\n dialogInterface.dismiss();\n resetEverything();\n }\n })\n .setNegativeButton(\"Exit\", R.drawable.ic_baseline_cancel_24, new MaterialDialog.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int which) {\n dialogInterface.dismiss();\n finish();\n }\n })\n .setAnimation(gifImage)\n .build().show();\n }", "public void updatescore() {\n scorelabel.setText(\"\" + score + \" points\");\n if (100 - score <= 10) win();\n }", "public void displayForTeamA(int score) {\n TextView scoreView = findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "private void refreshScore(){\n String info = players[0] + \" \"+playerScores[0]+\":\" +playerScores[1]+ \" \"+players[1];\n scoreInfo.setText(info);\n }", "public void displayForRmadrid(int score) {\n TextView scoreView = (TextView) findViewById(R.id.score_for_madrid);\n scoreView.setText(String.valueOf(score));\n\n }", "@SuppressLint(\"SetTextI18n\")\r\n private void displayScore() {\r\n\r\n\r\n mFinalScore.setText(\"Final score: \" + mScore);\r\n mQuestionView.setVisibility(View.GONE);\r\n mOption1.setVisibility(View.GONE);\r\n mOption2.setVisibility(View.GONE);\r\n mOption3.setVisibility(View.GONE);\r\n mNext.setVisibility(View.GONE);\r\n mTimer.setVisibility(View.GONE);\r\n mScoreView.setVisibility(View.GONE);\r\n mTimerLabel.setVisibility(View.GONE);\r\n mBackToStart.setVisibility(View.VISIBLE);\r\n\r\n }", "public void setScore(){\n\t\t//get player's score and change it to the string\n\t\tthis.scoreLabel.setSize(scoreLabel.getPreferredSize().width, \n\t\t\t\tscoreLabel.getPreferredSize().height);\n\t\tthis.scoreLabel.setText(String.valueOf(this.player.getScore()));\n\t}", "public void displayScoreForTeamA(int score) {\r\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\r\n scoreView.setText(String.valueOf(score));\r\n }", "public void display (Player player) {\n player.setScoreboard(this.bukkitScoreboard);\n }", "public void updateScore(int playerScore){\n\t\tscore += playerScore;\n\t\tscoreTotalLabel.setText(\"\" + score);\n\t}", "private void updateResultOnScreen() {\n teamAScoreTv.setText(Integer.toString(teamAScoreInt));\n teamBScoreTv.setText(Integer.toString(teamBScoreInt));\n\n if (teamAFoulScoreInt > 1)\n teamAFoulScoreTv.setText(teamAFoulScoreInt + \" fouls\");\n else\n teamAFoulScoreTv.setText(teamAFoulScoreInt + \" foul\");\n\n if (teamBFoulScoreInt > 1)\n teamBFoulScoreTv.setText(teamBFoulScoreInt + \" fouls\");\n else\n teamBFoulScoreTv.setText(teamBFoulScoreInt + \" foul\");\n }", "public void getScores(){\n String p1 = \"Player 1 has \" + Integer.toString(player1.getWins());\n String p2 = \"Player 2 has \" + Integer.toString(player2.getWins());\n String winner = \"tie\";\n if(player1.getWins()>player2.getWins()){\n winner = player1.getName() + \" wins!!!!\";\n }\n else if(player2.getWins()>player1.getWins()){\n winner = player2.getName() + \" Wins!!!\";\n }\n JOptionPane.showMessageDialog(null, (p1 + \"\\n\" + p2 + \"\\n\" + winner));\n }", "private void updateScore(int point){\n mScoreView.setText(\"\" + mScore);\n }", "private void showScore(Skin skin) {\r\n \tif(PlayerProfileManager.getInstance().getCurrentPlayerProfile().getCurrentLevelProfile().isTutorial()) {\r\n \t\treturn;\r\n \t}\r\n \r\n newScore = gameController.getScoreController().generateEndScore(gameController);\r\n \r\n // define some space between the labels and the values\r\n messageTable.columnDefaults(1).width(50f);\r\n \r\n int gainMoney = 0;\r\n \r\n Score recentBestScore = ScoreManager.getInstance().getCurrentLevelBestScore();\r\n if ((recentBestScore == null && newScore.getTotalScore() > 0) || newScore.getTotalScore() > recentBestScore.getTotalScore()) {\r\n \r\n \tgainMoney = (int)(newScore.getTotalScore() * PlayerProfileManager.getInstance().getCurrentPlayerProfile().getCurrentLevelGroup().getMoneyFactor());\r\n \r\n newScore.setServerScoreId(recentBestScore == null ? -1 : recentBestScore.getServerScoreId());\r\n ScoreManager.getInstance().saveBestScore(newScore);\r\n \r\n messageTable.row();\r\n messageTable.add(new Label(I18n.t(\"newRecord\") + \":\", skin)).right();\r\n messageTable.add();\r\n messageTable.add(new Label(String.valueOf(newScore.getTotalScore()), skin)).left();\r\n }\r\n else {\r\n \tgainMoney = (int)(newScore.getTotalScore() * PlayerProfileManager.getInstance().getCurrentPlayerProfile().getCurrentLevelGroup().getMoneyFactor()*0.25);\r\n \r\n \r\n Label scoreName = new Label(I18n.t(\"newScore\"), skin);\r\n \r\n messageTable.add(scoreName).right();\r\n messageTable.add();\r\n StringBuilder builder = new StringBuilder();\r\n builder.append(newScore.getTotalScore());\r\n builder.append(\", \");\r\n builder.append(I18n.t(\"record\"));\r\n builder.append(\": \");\r\n builder.append(recentBestScore.getTotalScore());\r\n messageTable.add(new Label(builder.toString(), skin)).left();\r\n }\r\n messageTable.row().expand();\r\n \r\n // adds an amount of money to the players profile that equals the score\r\n // he got in this level\r\n PlayerProfileManager.getInstance().getCurrentPlayerProfile().addMoney(gainMoney);\r\n \r\n // gates\r\n ScoreDetail detail = newScore.getScoreDetails().get(0);\r\n messageTable.add(new Label(I18n.t(detail.getDetailName()), skin, \"medium-font\")).right();\r\n messageTable.add();\r\n StringBuilder gatesBuilder = new StringBuilder();\r\n gatesBuilder.append(GameController.getInstance().getScoreController().getGatesPassed());\r\n gatesBuilder.append(\" (\");\r\n gatesBuilder.append(detail.getValue());\r\n gatesBuilder.append(\")\");\r\n \r\n messageTable.add(new Label(gatesBuilder, skin, \"medium-font\")).left();\r\n \r\n // time\r\n messageTable.row().expand();\r\n detail = newScore.getScoreDetails().get(1);\r\n messageTable.add(new Label(I18n.t(detail.getDetailName()), skin, \"medium-font\")).right();\r\n messageTable.add();\r\n StringBuilder timeBuilder = new StringBuilder();\r\n timeBuilder.append(gameController.getTimeController().getIntegerTime());\r\n timeBuilder.append(\" s (\");\r\n timeBuilder.append(detail.getValue());\r\n timeBuilder.append(\")\");\r\n messageTable.add(new Label(timeBuilder, skin, \"medium-font\")).left();\r\n \r\n // bonus points\r\n messageTable.row().expand();\r\n detail = newScore.getScoreDetails().get(2);\r\n messageTable.add(new Label(I18n.t(detail.getDetailName()), skin, \"medium-font\")).right();\r\n messageTable.add();\r\n messageTable.add(new Label(detail.getValue(), skin, \"medium-font\")).left();\r\n messageTable.row();\r\n \r\n //gain money\r\n messageTable.row().expand(); \r\n messageTable.add(new Label(I18n.t(\"gainMoney\") + \":\", skin)).right();\r\n messageTable.add();\r\n messageTable.add(new Label(gainMoney+\"\", skin)).left();\r\n messageTable.row();\r\n \r\n }", "public void displayFoulForLpool(int score) {\n TextView scoreView = (TextView) findViewById(R.id.foul_count_lvp);\n scoreView.setText(String.valueOf(score));\n }", "public void displayTriesForPlayerA(int score) {\n triesViewPlayerA.setText(String.valueOf(score));\n }", "public void displayAnswer(){\r\n String message = \"That is the correct answer!\";\r\n\r\n Toast.makeText(QuizActivity.this,\r\n message, Toast.LENGTH_SHORT).show();\r\n }", "public void displayFoulForRmadrid(int score) {\n TextView scoreView = (TextView) findViewById(R.id.foul_count_rmd);\n scoreView.setText(String.valueOf(score));\n }", "public void setScoreStitok() {\n this.scoreStitok.setText(\"Score \" + this.score);\n }", "public void updateScoreCard(){\n scoreCard.setText(correct+\"/\"+total);\n }", "public void displayScoreB (int score){\n\n TextView scoreA = (TextView)findViewById(R.id.team_b_score);\n scoreA.setText(String.valueOf(score));\n }", "public void displayForLpool(int score) {\n TextView scoreView = (TextView) findViewById(R.id.score_for_lpool);\n scoreView.setText(String.valueOf(score));\n }", "public void updateScoreUI() {\n\t\tMap<Integer, Integer> scoreMap = gameLogic.getScoreboard().getTotalScore();\n\n\t\tlblScoreA.setText(String.valueOf(scoreMap.get(0)));\n lblScoreB.setText(String.valueOf(scoreMap.get(1)));\n lblScoreC.setText(String.valueOf(scoreMap.get(2)));\n lblScoreD.setText(String.valueOf(scoreMap.get(3)));\n\t}", "public void displayYelowCardA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.yelowCardAtext);\n scoreView.setText(String.valueOf(score));\n }", "private void displayTeamAScore(int num)\n {\n TextView scoreTextView = (TextView) findViewById(R.id.teamAScore);\n scoreTextView.setText(num +\"\");\n }", "public void displayCorrect(){\n textPane1.setText(\"\");\r\n generatePlayerName();\r\n textPane1.setText(\"GOOD JOB! That was the correct answer.\\n\"\r\n + atBatPlayer + \" got a hit!\\n\" +\r\n \"Press Next Question, or hit ENTER, to continue.\");\r\n SWINGButton.setText(\"Next Question\");\r\n formattedTextField1.setText(\"\");\r\n formattedTextField1.setText(\"Score: \" + score);\r\n }", "public void displayForPlayerB(int score) {\n scoreViewPlayerB.setText(String.valueOf(score));\n }", "public void displayHomeScore(int score) {\r\n TextView scoreView = (TextView) findViewById(R.id.home_score);\r\n scoreView.setText(String.valueOf(score));\r\n }", "private void setResultsDisplay(double score) {\n TextView resultsTextView = (TextView) findViewById(R.id.results_text_view);\n String letterGrade = getLetterGrade(score);\n resultsTextView.setText(\"Your Grade: \" + letterGrade);\n }", "@Override\n public void onClick(View v) {\n userTurn = 0;\n\n //compScore = compTurn+compScore;\n compTurn=0;\n\n\n\n TextView scores = (TextView) findViewById(R.id.scoreStatement);\n scoreStatementjava = \"User holds. Computer's turn. Your score: \" + userScore + \". Computer score: \" + compScore + \". Your turn score is: \" + userTurn;\n //scoreStatementjava = \"User holds. Computer's turn.\";\n scores.setText(scoreStatementjava);\n\n computerTurn();\n }", "public void displayScore(String username, int score){\n\t\tfloat rating = ((float)score)/2;\n\t\tTextView user = new TextView(this);\n\t\tuser.setText(\"\\n\"+username);\n\t\tRatingBar rb = new RatingBar(this,null,android.R.attr.ratingBarStyleSmall);\n\t\trb.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT));\n\t\trb.setNumStars(5);\n\t\trb.setRating(rating);\n\t\ths.addView(user);\n\t\ths.addView(rb);\n\t}", "private void displayTeamB_score(int score) {\n TextView teamB_scoreView = findViewById(R.id.teamB_score_textView);\n teamB_scoreView.setText(String.valueOf(score));\n }", "public void setMyScoreDisplay(String score) {\n myScoreDisplay.setText(score);\n }", "private void drawScore() {\n\t\tString score = myWorld.getScore() + \"\";\n\n\t\t// Draw shadow first\n\t\tAssetLoader.shadow.draw(batcher, \"\" + myWorld.getScore(), (136 / 2)\n\t\t\t\t- (3 * score.length()), 12);\n\t\t// Draw text\n\t\tAssetLoader.font.draw(batcher, \"\" + myWorld.getScore(), (136 / 2)\n\t\t\t\t- (3 * score.length() - 1), 11);\n\n\t}", "public void displayResult(View view){\n countPoints();\n String quantity;\n String player;\n boolean checked = ((CheckBox) findViewById(R.id.nickname)).isChecked();\n\n if (checked == true) {\n player = \"Anonymous\";\n } else {\n player = ((EditText) findViewById(R.id.name)).getText().toString();\n }\n /*\n method to show toast message with result\n */\n if (points > 1) {\n quantity = \" points!\";\n } else {\n quantity = \" point!\";\n }\n Toast.makeText(FlagQuiz.this, player + \", your score is: \" + points + quantity, Toast.LENGTH_LONG).show();\n }", "public static String printStats() {\n return \"Your Statistics:\" + \"\\n\" +\n \"Total Time in Game (Seconds): \" + timeElapsedSeconds + \"\\n\" +\n \"Total Points: \" + totalScore + \"\\n\" +\n \"Total Number of Taps on Screen: \" + counterClicks + \"\\n\" +\n \"Thanks for Playing!\";\n }", "public void calculateScore(){\n\n score.setText(Integer.toString(80));\n\n\n }", "public void updateHighestScoreDisplay(int score){\n this.score.setText(\"Highest Score: \"+score);\n }", "public void playerSuccess(Player player, String message){\n\t\tplayer.sendMessage(ChatColor.GREEN + message);\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tms.start();\n\t\t\t\tbutton5.setText(R.string.Value5);\n\t\t\t\tif(second){\n\t\t\t\t\tif(prev==6){\n\t\t\t\t\t\ttext = \"Match!\";\n\t\t\t\t\t\tcontext = getApplicationContext(); \n\t\t\t\t\t\ttoast = Toast.makeText(context, text, duration) ;\n\t\t\t\t\t\ttoast.show();\n\t\t\t\t\t\tsecond = false;\n\t\t\t\t\t\tcountScr++;\n\t\t\t\t\t\t//score.setText(\"SCORE: \"+score);\n\t\t\t\t\t\t//if(countScr>countHgh)highscore.setText(\"HIGHSCORE: \"+ countHgh);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tsecond = false;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tsecond = true;\n\t\t\t\t\tprev = 5;\n\t\t\t\t}\n\t\t\t}", "private void updateScore() {\n\t\tscoreString.updateString(Integer.toString(score));\n\t}", "public void display_game_over_text () {\n\n fill(150, 100);\n rect(0, 0, displayW, displayH);\n\n textFont(myFont);\n textAlign(CENTER);\n textSize(displayH/20);\n fill(255);\n text(\"Game Over\", displayW/2, 3*displayH/7);\n\n if (score.winnerName == \"Pacmax\") {\n text(\"Winner is Pacmax! Your score is \" + score.score, displayW/2, 4*displayH/7);\n } else {\n text(\"Winner is Blinky!\", displayW/2, 4*displayH/7);\n }\n\n mySound.play_game_over_song();\n\n isKeyInputAllowed = false;\n }", "public void notifyScoreChange(int score) {\n scoreLabel.setText(String.valueOf(score));\n }", "private void getTargetScore() {\n // stack overflow\n AlertDialog.Builder builder = new AlertDialog.Builder(this, R.style.AlertDialogTheme);\n builder.setTitle(R.string.target_score);\n // Set up the input\n final EditText input = new EditText(this);\n // Specify the type of input expected; this, for example, sets the input as a password, and will mask the text\n input.setInputType(InputType.TYPE_CLASS_NUMBER);\n builder.setView(input);\n // Set up the buttons\n builder.setPositiveButton(R.string.positive_button, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n target_score = Integer.parseInt(input.getText().toString());\n target_score_view.setText(String.valueOf(target_score));\n game = new Game(target_score);\n }\n });\n // builder.show();\n // Set color of alert dialog buttons (from stack overflow)\n AlertDialog alert = builder.create();\n alert.show();\n\n Button pbutton = alert.getButton(DialogInterface.BUTTON_POSITIVE);\n pbutton.setBackgroundColor(getResources().getColor(R.color.yale_blue));\n }", "public void updateScores() {\n\t\tscoreText.setText(\"Score: \" + ultraland.getScore());\n\t}", "private void newHighScoreAlert() {\n\t\tAlert alert = new Alert(AlertType.INFORMATION);\n\t\t\n\t\talert.setTitle(\"New High Score!\");\n \talert.setHeaderText(\"You Got A New High Score!\\nYour High Score: \" + level.animal.getPoints());\n \talert.setContentText(\"Enter Your Name With Alphabet Or Digit Keys.\\nPress 'Enter' To Confirm Your Name Afterwards.\");\n \talert.show();\n\t}", "public void displayForTeamA(int scoredisplay) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(scoredisplay));\n }", "public void displayYcardForLpool(int score) {\n TextView scoreView = (TextView) findViewById(R.id.yellow_card_count_lvp);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA2(int scoredisplay) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score2);\n scoreView.setText(String.valueOf(scoredisplay));\n }", "public String getScore() {\n String scoreMessage;\n if (noWinner() && !(isDeuce())) {\n scoreMessage = (isTie()) ? gameTie() : currentScore();\n }else if (isDeuce()){\n scoreMessage = \"Deuce\";\n }else {\n scoreMessage = advanceGame();\n }\n return scoreMessage;\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tms.start();\n\t\t\t\tbutton6.setText(R.string.Value6);\n\t\t\t\tif(second){\n\t\t\t\t\tif(prev==5){\n\t\t\t\t\t\ttext = \"Match!\";\n\t\t\t\t\t\tcontext = getApplicationContext(); \n\t\t\t\t\t\ttoast = Toast.makeText(context, text, duration) ;\n\t\t\t\t\t\ttoast.show();\n\t\t\t\t\t\tsecond = false;\n\t\t\t\t\t\tcountScr++;\n\t\t\t\t\t\t//score.setText(\"SCORE: \"+score);\n\t\t\t\t\t\t//if(countScr>countHgh)highscore.setText(\"HIGHSCORE: \"+ countHgh);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tsecond = false;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tsecond = true;\n\t\t\t\t\tprev = 6;\n\t\t\t\t}\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tms.start();\n\t\t\t\tbutton4.setText(R.string.Value4);\n\t\t\t\tif(second){\n\t\t\t\t\tif(prev==1){\n\t\t\t\t\t\ttext = \"Match!\";\n\t\t\t\t\t\tcontext = getApplicationContext(); \n\t\t\t\t\t\ttoast = Toast.makeText(context, text, duration) ;\n\t\t\t\t\t\ttoast.show();\n\t\t\t\t\t\tsecond = false;\n\t\t\t\t\t\tcountScr++;\n\t\t\t\t\t\t//score.setText(\"SCORE: \"+score);\n\t\t\t\t\t\t//if(countScr>countHgh)highscore.setText(\"HIGHSCORE: \"+ countHgh);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tsecond = false;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tsecond = true;\n\t\t\t\t\tprev = 4;\n\t\t\t\t}\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tbutton2.setText(R.string.Value2);\n\t\t\t\tms.start();\n\t\t\t\tif(second){\n\t\t\t\t\tif(prev==3){\n\t\t\t\t\t\ttext = \"Match!\";\n\t\t\t\t\t\tcontext = getApplicationContext(); \n\t\t\t\t\t\ttoast = Toast.makeText(context, text, duration) ;\n\t\t\t\t\t\ttoast.show();\n\t\t\t\t\t\tsecond = false;\n\t\t\t\t\t\tcountScr++;\n\t\t\t\t\t\t//score.setText(\"SCORE: \"+score);\n\t\t\t\t\t\t//if(countScr>countHgh)highscore.setText(\"HIGHSCORE: \"+ countHgh);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tsecond = false;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tsecond = true;\n\t\t\t\t\tprev = 2;\n\t\t\t\t}\n\t\t\t}", "public void teamA(int score) {\r\n TextView scoreView = (TextView) findViewById(R.id.teamA);\r\n scoreView.setText(String.valueOf(score));\r\n }", "public static void addScore(int _value){\n scoreCount += _value;\n scoreHUD.setText(String.format(Locale.getDefault(),\"%06d\", scoreCount));\n }", "public void changeLableText(int playerScore,int computerScore);", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tms.start();\n\t\t\t\tbutton3.setText(R.string.Value3);\n\t\t\t\tif(second){\n\t\t\t\t\tif(prev==2){\n\t\t\t\t\t\ttext = \"Match!\";\n\t\t\t\t\t\tcontext = getApplicationContext(); \n\t\t\t\t\t\ttoast = Toast.makeText(context, text, duration) ;\n\t\t\t\t\t\ttoast.show();\n\t\t\t\t\t\tsecond = false;\n\t\t\t\t\t\tcountScr++;\n\t\t\t\t\t\t//score.setText(\"SCORE: \"+score);\n\t\t\t\t\t\t//if(countScr>countHgh)highscore.setText(\"HIGHSCORE: \"+ countHgh);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tsecond = false;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tsecond = true;\n\t\t\t\t\tprev = 3;\n\t\t\t\t}\n\t\t\t}", "public void displayYelowCardB(int score) {\n TextView scoreView = (TextView) findViewById(R.id.yelowcardBtext);\n scoreView.setText(String.valueOf(score));\n }", "public void displayRcardForLpool(int score) {\n TextView scoreView = (TextView) findViewById(R.id.red_card_count_lvp);\n scoreView.setText(String.valueOf(score));\n }", "private void updateScore(int changeScore) {\n score += changeScore;\n scoreText = \"Score: \" + score + \"\\t\\tHigh Score: \" + highScore;\n scoreView.setText(scoreText);\n }", "public void checkScore(View view) {\n displayToast(createToast(getScore()));\n reset();\n }", "private static void updateGame()\n {\n GameView.gameStatus.setText(\"Score: \" + computerScore + \"-\" + playerScore);\n if (computerScore + playerScore == NUM_CARDS_PER_HAND) {\n if (computerScore > playerScore) {\n GameView.gameText.setText(\"Computer Wins!\");\n Timer.stop = true;\n }\n else if (playerScore > computerScore) {\n GameView.gameText.setText(\"You win!\");\n Timer.stop = true;\n }\n else {\n GameView.gameText.setText(\"Tie game!\"); \n Timer.stop = true;\n }\n }\n }", "private void updateScore(int point){\n sScore.setText(\"\" + mScore + \"/\" + mQuizLibrary.getLength());\n\n }", "public void displayY_CardForRmadrid(int score) {\n TextView scoreView = (TextView) findViewById(R.id.yellow_card_count_rmd);\n scoreView.setText(String.valueOf(score));\n }", "public void score(){\r\n\t\tint playerLocation = player.getLocationX();\r\n\t\tint obstacleX = obstacle.getLocationX();\r\n\t\tint obstacleY = obstacle.getLocationY();\r\n\r\n\r\n\t\tstr =\"\" + countCoins;\r\n\r\n\t\t//if you hit a coin, the number of points goes up by one.\r\n\t\tif(obstacleY == 280 && obstacleX==300 && playerLocation == 250){\r\n\t\t\tcountCoins++;\r\n\t\t}\r\n\t\tif(obstacleY== 450 && obstacleX==300 && playerLocation ==450){\r\n\t\t\tcountCoins++;\r\n\t\t}\r\n\r\n\t\t//if you hit the green monster, you lose one point.\r\n\t\tif((obstacleX-50) == 250 && (obstacleY-240) == 250 && playerLocation ==250){\r\n\t\t\tcountCoins--;\r\n\t\t}\r\n\r\n\t\t//if you hit the blue monster, you lose 3 points.\r\n\t\tif((obstacleX+180) == 480 && (obstacleY+180) == 250 && playerLocation ==450){\r\n\t\t\tcountCoins-=3;\r\n\t\t}\r\n\t}", "public void displayForTeamB(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_b_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamB(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_b_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamB(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_b_score);\n scoreView.setText(String.valueOf(score));\n }" ]
[ "0.78066677", "0.7760361", "0.76317316", "0.7386848", "0.7261608", "0.7170019", "0.7102636", "0.70107424", "0.69483614", "0.6923698", "0.68769747", "0.686996", "0.6800432", "0.66976273", "0.66616434", "0.6638702", "0.66324407", "0.662235", "0.6602306", "0.65795404", "0.6578992", "0.65555304", "0.6548067", "0.65447223", "0.6534115", "0.6530634", "0.6523337", "0.65108776", "0.65065956", "0.65065956", "0.6505574", "0.6505574", "0.6505574", "0.6505574", "0.6505574", "0.6488404", "0.648633", "0.64791703", "0.64786506", "0.6454857", "0.6446722", "0.64324296", "0.6429135", "0.64220554", "0.64161646", "0.6405797", "0.63872296", "0.6382738", "0.63725764", "0.6368468", "0.63432735", "0.6335862", "0.63325167", "0.633059", "0.63211167", "0.63167167", "0.6312836", "0.62944216", "0.62912893", "0.62824184", "0.6270465", "0.6259505", "0.62577283", "0.62327105", "0.622715", "0.6226665", "0.62193453", "0.6219111", "0.6216535", "0.62135327", "0.62011075", "0.62005824", "0.61974335", "0.6174404", "0.6168075", "0.6165665", "0.61645246", "0.6159677", "0.6155317", "0.6154553", "0.61534685", "0.6149568", "0.6145794", "0.6141652", "0.61370444", "0.61363333", "0.6131143", "0.61296904", "0.6123245", "0.6122643", "0.6119994", "0.61121684", "0.6109233", "0.6109188", "0.61043984", "0.6103408", "0.60966426", "0.6089328", "0.6089328", "0.6089328" ]
0.82943255
0
Sends to the user an email with the score
void sendMail(){ String mailBody = getString(R.string.congratz_message, String.valueOf(playerScore)); mailBody += " " + playerRating; Intent intent = new Intent(Intent.ACTION_SENDTO); intent.setData(Uri.parse("mailto:")); //only email apps should handle this intent.putExtra(Intent.EXTRA_SUBJECT, "Sports Trivia score for " + getPlayerName()); intent.putExtra(intent.EXTRA_TEXT, mailBody); if(intent.resolveActivity(getPackageManager())!=null){ startActivity(intent); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void emailResult(View view) {\n // Getting username only\n Intent myIntent = getIntent();\n String nameOfUser = myIntent.getStringExtra(\"EditTextValue\");\n\n String result = \"Name: \" + nameOfUser;\n result += \"\\nMy score: \" + score;\n\n // Create a new intent to send information to any mailing app\n Intent myResult = new Intent(Intent.ACTION_SENDTO);\n myResult.setData(Uri.parse(\"mailto:\"));\n myResult.putExtra(Intent.EXTRA_SUBJECT, \"Quiz result for \" + nameOfUser);\n myResult.putExtra(Intent.EXTRA_TEXT, result);\n if (myResult.resolveActivity(getPackageManager()) != null) {\n startActivity(myResult);\n }\n }", "void submitScore(View view){\r\n calculateScore();\r\n calculateRating();\r\n displayMessage();\r\n sendMail();\r\n }", "private String submitAnswersScore(int calculatedScore) {\n String totalMessagePerfect = \"Great Job! You finished with a score of \" + calculatedScore + \" out of 6!\";\n totalMessagePerfect += \"\\nYou really know your Bears history!\";\n totalMessagePerfect += \"\\nThanks for taking my quiz!\";\n\n String totalMessageAlmost = \"Great Try! You finished with a score of \" +calculatedScore + \" out of 6.\";\n totalMessageAlmost += \"\\nThanks for taking my quiz!\";\n\n if (calculatedScore == 6) {\n return totalMessagePerfect;\n }\n else {\n return totalMessageAlmost;\n }\n }", "public void sendMailAction(View view) {\n String name = getPlayerName();\n String message = createShortQuizSummary(finalScore, name);\n String mailto = \"mailto:\" + getPlayerMail() +\n \"?cc=\" + \"\" +\n \"&subject=\" + Uri.encode(name + getResources().getString(R.string.score_in_quiz)) +\n \"&body=\" + Uri.encode(message);\n\n Intent emailIntent = new Intent(Intent.ACTION_SENDTO);\n emailIntent.setData(Uri.parse(mailto));\n\n try {\n startActivity(emailIntent);\n } catch (ActivityNotFoundException e) {\n }\n\n }", "public static void sendScore(int score) {\n\t\tif(Config.scoreCenter == null){\n\t\t\tConfig.scoreCenter = ScoreCenter.getInstance();\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tConfig.scoreCenter.postScore(Config.scoreboard_id, java.lang.String.valueOf(score));\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void userScore(float score) {\n String message;\n //Finds the appropriate text views in order to set text later\n TextView userScore = findViewById(R.id.yourScore);\n TextView userMessage = findViewById(R.id.messageView);\n //Final score variable derived from displayScore\n int finalScore = (Math.round(displayScore(score)));\n //if statements to determine message to be displayed based on finalScore\n if (finalScore == 100) {\n message = \"Wow!! \\nAre you Stan Lee?\";\n } else if (finalScore == 90) {\n message = \"You're amazing!!\";\n } else if (finalScore == 80) {\n message = \"Impressive!!\";\n } else if (finalScore == 70) {\n message = \"You're a regular \\ncomic book junkie!\";\n } else if (finalScore == 60) {\n message = \"Still a majority!!\";\n } else if (finalScore == 50) {\n message = \"Solid for the \\ncasual reader\";\n } else if (finalScore == 40) {\n message = \"Just a fan of \\nthe movies?\";\n } else if (finalScore == 30) {\n message = \"DC Universe?\";\n } else if (finalScore == 20) {\n message = \"A couple good guesses?\";\n } else if (finalScore == 10) {\n message = \"Did you even try?\";\n } else if (finalScore == 0) {\n message = \"Have you heard of Marvel?\";\n } else {\n message = \"What did you do?\";\n }\n //sets the text for the views\n userScore.setText((finalScore) + \"%\");\n userMessage.setText(message);\n }", "public void submitQuiz(View view) {\n String userName = getUserName();\n double quizScore = gradeQuiz();\n String message = generateMessage(userName, quizScore);\n setResultsDisplay(quizScore);\n Toast.makeText(this, message, Toast.LENGTH_LONG).show();\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tArrayList<Double> ttscorelist = new ArrayList<>();\r\n\t\t\t\tSendEmailManager mng = new SendEmailManager(course, section);\r\n\t\t\t\tfor (Student list : StudentArray) {\r\n\t\t\t\t\tttscorelist.add(list.getTotalPoint());\r\n\t\t\t\t}\r\n\t\t\t\tStdDiv cal = new StdDiv(ttscorelist);\r\n\t\t\t\ttry {\r\n\t\t\t\t\tfor (Student list : StudentArray) {\r\n\t\t\t\t\t\tif(mng.sendStatisticFromGMail(list.getEmail(), list.getName(), list.getCode(), list.getTotalPoint(), cal.getMin(), cal.getMax(), cal.getMean(), cal.getDiv())) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tthrow new SendFailedException(\"send failed\");\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Send Successed\");\r\n\t\t\t\t} catch (SendFailedException e1) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"send failed\");\r\n\t\t\t\t}\r\n\t\t\t}", "@Override\n\tpublic void submitScoreGPGS(int score) {\n\t\tgameHelper.getGamesClient().submitScore(\"CgkIp-26x7gZEAIQAA\", score);\n\n\t}", "private String generateMessage(String name, double score) {\n String customMessage;\n if (score >= 90.0) {\n customMessage = getString(R.string.high_score);\n } else if (score >= 70.0) {\n customMessage = getString(R.string.med_score);\n } else {\n customMessage = getString(R.string.low_score);\n }\n return customMessage + name + \":\\n Your score is: \" + score + \"%\";\n }", "@Override\n\tpublic void submitScoreGPGS(float score) {\n\t}", "private void sendEmailToSubscriberForHealthTips() {\n\n\n\n }", "void send(Email email);", "public void sendMail() {\n String sub;\n String message;\n\n sub = \"Welcome\";\n message = \"Thank you for choosing us as your healthcare partners. Here we strive hard to ensure that\\n\"\n + \"you remain in good health. Not only we boast of an exellent team of doctors but also world class operational \\n\"\n + \"infrastructure in place. For any other information or details contact our reg desk. You can access\\n\"\n + \"your account with the Username:\" + txtUserName.getText()+ \"and your password:\" + txtPassword.getPassword().toString()+ \".\\n\\t\\t\\t -Team MVP\";\n\n SendEmail SE = new SendEmail(txtEmail.getText(), sub, message);\n }", "private void sendEmail(String result){\n \t\n \tIntent emailIntent = new Intent(android.content.Intent.ACTION_SEND);\n \temailIntent.setType(\"plain/text\");\n \t\n \t//emailIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\n \t/* Fill it with Data */\n \temailIntent.setType(\"plain/text\");\n \t//emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{\"[email protected]\"});\n \temailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, \"Here's the code from FlipSHA\");\n \temailIntent.putExtra(android.content.Intent.EXTRA_TEXT, \"After the coin is flipped and\" +\n \t\t\t\" you don't believe in your friend, check this hash \"+ result);\n\n \t/* Send it off to the Activity-Chooser */\n \tstartActivity(emailIntent); \n }", "public void showScore()\n {\n showText(\"Score:\" + score,550,50);\n }", "void notifyGameComplete(FinalScore score);", "private void email() throws IOException {\n\t\t/*\n\t\tString emailText = \"This email includes the following Play Types: \" + playSort.getSelectedItem().toString() + \n\t\t\t\t\"\\nFrom the gameplan: \" + gamePlans.getSelectedItem().toString();\n\t\tString subject = playSort.getSelectedItem().toString() + \" from \" + gamePlans.getSelectedItem().toString();\n\t\t\t\t\n\t\t// TODO: save image to file system, and add the file paht to atachment\n\t\tArrayList<String> attachments = DigPlayDB.getInstance(getBaseContext()).getAllPlayNames();\n\t\tArrayList<String> attachmentPath = new ArrayList<String>();\n\t\tfor (int att = 0; att < attachments.size(); att++) \n\t\t{\n\t\t\tFile myFile = new File(\"/sdcard/DCIM/Play/temp.jpeg\");\n\t\t\tmyFile.setWritable(true);\n\t FileOutputStream myOutWriter =new FileOutputStream(myFile);\n\t myOutWriter.write(DigPlayDB.getInstance(getBaseContext()).getImage(attachments.get(att)));\n\t myOutWriter.flush();\n\t myOutWriter.close();\n\t myFile.setReadable(true);\n\t attachmentPath.add(myFile.getAbsolutePath());\n\t\t}\n\n\t\tEmailPlaybook.EmailAttachment(this, \"[email protected]\", subject, emailText, attachmentPath);\n\t\t*/\n\t}", "void send(String emailName, Map model);", "void send(String emailName);", "private void showGameScore() {\n System.out.println(messageProvider.provideMessage(\"score\"));\n System.out.println(settings.getPlayers().get(0).getScore()\n + \" vs \" + settings.getPlayers().get(1).getScore());\n }", "public void postScore (String leaderboardId, long score, GPGScoreReportScoreBlock block) {\n\t\t// create the score instance\n\t\tGPGScore gpgScore = new GPGScore(leaderboardId);\n\t\tgpgScore.setValue(score);\n\n\t\t// post the score\n\t\tgpgScore.submitScoreWithCompletionHandler(block);\n\t}", "public void updateScore(int score){ bot.updateScore(score); }", "@Override\n\tvoid email() {\n\t\tSystem.out.println(\"[email protected]\");\n\t\t\n\t}", "private void setScoresText(Intent intent) {\n double gambleScore = intent.getDoubleExtra(IntentKeys.GAMBLE_SCORE_KEY, 3);\n TextView gambleText = findViewById(R.id.gamble_score);\n gambleText.setText(String.format(Locale.CANADA,\n \"Gamble score: %.3f\", gambleScore));\n\n int expGained = intent.getIntExtra(IntentKeys.EXP_GAINED_KEY, 0);\n TextView expText = findViewById(R.id.shop_exp_text);\n expText.setText(String.format(Locale.CANADA, \"Exp gained: %d\", expGained));\n\n int timeSpent = intent.getIntExtra(IntentKeys.TIME_SPENT_KEY, 0);\n TextView timeSpentText = findViewById(R.id.shop_time_spent_text);\n timeSpentText.setText(String.format(Locale.CANADA,\n \"Time Spent: %d seconds\", timeSpent));\n\n }", "SendEmail() {\t\n\t}", "public void submitOrder(View view){\n int price = quant*5;\n String priceMsg = \"Total: $\" + price +\"\\nThank you!\";\n displayMessage(priceMsg);\n }", "public void sendDiscrepancyEmail() throws Exception;", "private void displayScore(int score) {\n\n String strScore = String.valueOf (score);\n String message = getString (R.string.yourScoreIs) + strScore + getString (R.string.outOf6);\n\n if (score == 0) message += getString (R.string.score_zero);\n\n if (score == 1 || score == 2 || score == 3) message += getString (R.string.score_low);\n\n if (score == 4 || score == 5) message += getString (R.string.score_notBad);\n\n if (score == 6) message += getString (R.string.score_six);\n\n Toast.makeText (getApplicationContext (), message, Toast.LENGTH_LONG).show ();\n\n }", "public void sendAddGameScoreMessage(GameScore g)\r\n\t{\r\n\t\tsendMessageToServer(new MessageGameScore(g));\r\n\t}", "public void sendMail() {\n String email = emailID.getText().toString();\n String subject = \"BlueBucket One-Time OTP\";\n otp=generateOTP();\n String message = \"\"+otp;\n\n //Creating SendMail object\n SendMail sm = new SendMail(this, email, subject, message);\n\n //Executing sendmail to send email\n sm.execute();\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tSendEmailManager mng = new SendEmailManager(course, section);\r\n\t\t\t\ttry {\r\n\t\t\t\tfor (Student student : StudentArray) {\r\n\t\t\t\t\tif(mng.sendFromGMail(student.getEmail(), student.getName(), student.getCode(), student.getGrade())) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}else {\r\n\t\t\t\t\t\tthrow new SendFailedException(\"send failed\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Send Successed\");\r\n\t\t\t\t}catch(SendFailedException ex) {\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Error\");\r\n\t\t\t\t}\r\n\t\t\t}", "public void mailPromo(String fname, String customerEmail, String promo, double discount){\n\t Properties props = makeProps();\r\n\t \r\n\t final String username = \"[email protected]\";\r\n\t final String password = \"movie4050\";\r\n\t \r\n\t try{\r\n\t Session session = Session.getDefaultInstance(props, \r\n\t new Authenticator(){\r\n\t protected PasswordAuthentication getPasswordAuthentication() {\r\n\t return new PasswordAuthentication(username,password);}});\r\n\t // -- Create a new message --\r\n\t Message msg = new MimeMessage(session);\r\n\t \r\n\t /* from */\r\n\t msg.setFrom(new InternetAddress(username));\r\n\t \r\n\t /* to */\r\n\t msg.setRecipients(Message.RecipientType.TO, \r\n\t InternetAddress.parse(customerEmail,false));\r\n\t /* title */\r\n\t msg.setSubject(\"New Promotion!\");\r\n\t \r\n\t /* text field */ \r\n\t String sendThis = \"Hello \"+fname + \"!\\n\\n\"\r\n\t + \"We are emailing you to inform you that there is a new promotion.\\n\"\r\n\t + \"Use code -- \"+promo+\" -- to save $\" + discount + \"0 on your next purchase on CINEMA4050!\\n\"\r\n\t + \"Thank you for using our service!\\n\";\r\n\t msg.setText(sendThis);\r\n\t msg.setSentDate(new Date());\r\n\t Transport.send(msg);\r\n\t \r\n\t System.out.println(\"Message sent.\");\r\n\t }catch (MessagingException e){ \r\n\t System.out.println(\"Error: \" + e);\r\n\t }\r\n\t \r\n\t }", "@Override\n\tpublic void recordVisitAssessment(String matriculation, UoGGrade grade,\n\t\t\tString description) {\n\t\t//Add grade thing\n\t\tSystem.out.println(\"Send an email to \" + matriculation + \" & employer to let them know about the grade\");\n\t}", "public void send(Object score) {\n Socket socket = null;\n ObjectOutputStream outputStream = null;\n try {\n\n System.out.println(\"Sending\");\n //Open Socket\n socket = new Socket(Constant.SERVER_ADDRESS, Constant.APP_SERVER_PORT);\n outputStream = new ObjectOutputStream(socket.getOutputStream());\n outputStream.writeObject(score);\n outputStream.flush();\n outputStream.close();\n } catch (UnknownHostException ex) {\n ex.printStackTrace();\n } catch (IOException ex) {\n ex.printStackTrace();\n } finally {\n try {\n if (socket != null) {\n socket.close();\n }\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n }\n }", "private void setResultsDisplay(double score) {\n TextView resultsTextView = (TextView) findViewById(R.id.results_text_view);\n String letterGrade = getLetterGrade(score);\n resultsTextView.setText(\"Your Grade: \" + letterGrade);\n }", "void send(String emailName, Map model, EmailPreparator emailPreparator);", "public void hitAlienScore() {\r\n //Add 5 to the score\r\n score += 5;\r\n System.out.println(\"Current Score = \"+score);\r\n }", "@Override\r\n\t\t\t\tpublic void run() {\n\t\t\t\t\tString msg = \"score@\";\r\n\t\t\t\t\tmsg += changeRank(duiduipeng);\r\n\t\t\t\t\tmsg += changeRank(ddt);\r\n\t\t\t\t\tmsg += changeRank(tuixiangzi);\r\n\t\t\t\t\tmsg += changeRank(feiji);\r\n\t\t\t\t\t//System.out.println(msg);\r\n\t\t\t\t\tsendToAll(msg);\r\n\t\t\t\t}", "public void sendEmail(Author authorObject);", "private void printScore() {\r\n View.print(score);\r\n }", "public void completedGame()\n\t{\n\t\tJOptionPane.showMessageDialog(this,\"Congratulations, you beat the game!\" + ship.getTotalScore(), \"Beat the Game\", JOptionPane.INFORMATION_MESSAGE);\n\t\tbuttonPanel.endGameButton.setEnabled(false);\n\t\tsendScore();\n\t}", "@Override\n public void sendEmail() {\n return;\n }", "public void sendScore()\n\t{\n\t\tint score = ship.getTotalScore();\n\t\tString name = \"\";\n\n\t\t// Ask for person's initials\n\t\tdo\n\t\t{\n\t\t\t name = JOptionPane.showInputDialog(this,\"Game Over - Final Score: \" + score + \"\\nPlease enter your initials (3)\");\n\t\t}\n\t\twhile( name.length() != 3);\n\n\t\t// Prepare socket/io variables\n\t\tSocket socket = null;\n PrintWriter out = null;\n BufferedReader in = null;\n\n try\n {\n socket = new Socket(\"localhost\", PORT);\n out = new PrintWriter(socket.getOutputStream(), true);\n in = new BufferedReader(new InputStreamReader( socket.getInputStream() ));\n }\n catch (UnknownHostException e)\n {\n System.err.println(\"Don't know about host: localhost.\");\n //System.exit(1);\n }\n catch (IOException e)\n {\n System.err.println(\"Couldn't get I/O for \" + \"the connection to: localhost.\");\n }\n\n\t\t// Write score to output and create arraylist for the top 10 scores\n\t\tString input;\n\t\tout.println(score);\n\t\tboolean winner = false;\n\t\tArrayList<String> topScores = new ArrayList<String>();\n\n\t\t// Keep reading input from server until DONE is read\n\t\ttry\n\t\t{\n\t\t\twhile( !(input = in.readLine()).equals(\"DONE\") )\n\t\t\t{\n\t\t\t\t// If you are winner, the name is sent to server\n\t\t\t\tif( input.equals(\"WINNER\") )\n\t\t\t\t{\n\t\t\t\t\tout.println(name);\n\t\t\t\t\twinner = true;\n\t\t\t\t}\n\t\t\t\telse if( input.equals(\"LOSER\") )\n\t\t\t\t{\n\t\t\t\t\twinner = false;\n\t\t\t\t}\n\t\t\t\t// add string to topScores\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ttopScores.add(input);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(\"Client error: \" + e);\n\t\t}\n\n\t\tString topMessage = \"\";\n\n\t\tif(winner)\n\t\t{\n\t\t\ttopMessage = \"Congrats! You made the top 10.\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\ttopMessage = \"Sorry! You did not make the top 10.\";\n\t\t}\n\n\t\tint i = 1;\n\n\t\t// Create string consisting of the top 10 scores\n\t\tfor(String line : topScores)\n\t\t{\n\t\t\tString[] a = line.split(\" \");\n\t\t\ttopMessage += \"\\n\" + i++ + \". \" + a[0] + \" \" + a[1];\n\t\t}\n\n\t\tJOptionPane.showMessageDialog(this,topMessage, \"Top 10\", JOptionPane.INFORMATION_MESSAGE);\n\n\t\ttry\n\t\t{\n\t\t\tout.close();\n\t\t\tin.close();\n\t\t\tsocket.close();\n\t\t}\n\t\tcatch(Exception e){}\n\t}", "void sendEmail(Job job, String email);", "public void sendMailReport() {\n mailService.sendMail(\"[email protected]\", \"ToDo report\",\n String.format(\"There are '%s' todo entries!\", todoListService.getAllEntries().size()));\n }", "@Override\n\tvoid email() {\n\t\tSystem.out.println(\"email id [email protected]\");\n\t\t\n\t}", "public void sendInterest(View view) {\n Log.i(\"Send email\", \"\");\n String[] TO = {agentEmail};\n String[] CC = {\"\"};\n Intent emailIntent = new Intent(Intent.ACTION_SEND);\n\n emailIntent.setData(Uri.parse(\"mailto:\"));\n emailIntent.setType(\"text/plain\");\n emailIntent.putExtra(Intent.EXTRA_EMAIL, TO);\n emailIntent.putExtra(Intent.EXTRA_CC, CC);\n emailIntent.putExtra(Intent.EXTRA_SUBJECT, \"You have an interested buyer for \" + globals.chosenProp);\n emailIntent.putExtra(Intent.EXTRA_TEXT, \"User: \" + globals.loggedUser + \" has shown interest in \" + globals.chosenProp + \". Respond to them via email to arrange a showing or to exchange information.\");\n\n try {\n startActivity(Intent.createChooser(emailIntent, \"Send mail...\"));\n finish();\n Log.i(\"Finished sending email...\", \"\");\n } catch (android.content.ActivityNotFoundException ex) {\n Toast.makeText(property_view_standard.this, \"There is no email client installed.\", Toast.LENGTH_SHORT).show();\n }\n }", "public void tradeEmail(Trade model, Activity view) {\n String subject = \"SSCTE Trade Completed\" ;\n String body = model.getOwner().getName() + \" has accepted a trade with \" + model.getBorrower().getName() + \".\\n\" +\n \"+=================================+\\n\" +\n \" \" + model.getOwner().getName() + \"'s cards traded:\\n\";\n for (Card card : model.getOwnerList()) {\n body = body + \" [\" + card.getQuantity() + \"] \" + card.getName() + \"\\n\";\n }\n body = body +\n \"+=====================+\\n\" +\n \" \" + model.getBorrower().getName() + \"'s cards traded:\\n\";\n for (Card card : model.getBorrowList()) {\n body = body + \" [\" + card.getQuantity() + \"] \" + card.getName() + \"\\n\";\n }\n body = body +\n \"+=================================+\\n\\n\" +\n \" [Add some comments for continuing trade here]\";\n\n\n Intent emailIntent = new Intent(Intent.ACTION_SENDTO, Uri.fromParts(\n \"mailto\",model.getOwner().getEmail() + \",\"+model.getBorrower().getEmail(), null));\n emailIntent.putExtra(Intent.EXTRA_SUBJECT, subject);\n emailIntent.putExtra(Intent.EXTRA_TEXT, body);\n view.startActivity(Intent.createChooser(emailIntent, \"Send email...\"));\n }", "@Override\n public void onClick(View arg0) {\n Intent email = new Intent(Intent.ACTION_SEND);\n // Put essentials like email address, subject & body text\n email.putExtra(Intent.EXTRA_EMAIL,\n new String[]{\"[email protected]\"});\n email.putExtra(Intent.EXTRA_SUBJECT,\n \"Daily Grades\");\n //email.putExtra(Intent.EXTRA_TEXT, mydb.getDailyGrade().toString());\n // This MIME type indicates email\n email.setType(\"message/rfc822\");\n // createChooser shows user a list of app that can handle\n // this MIME type, which is, email\n startActivity(Intent.createChooser(email,\n \"Choose an Email client :\"));\n\n }", "public void sendVoteNotification() {\n\t\t\t\t\tWorld.sendWorldMessage(\"<img=5>[Vote Feed]: colorhere\" + getDisplayName() + \" </col>voted for\" + \n\t\t\t\t\t\t\t\t\t\t\t\"colorhere \"+ voteDisplayAmount +\" Vote Tickets!</col> \"\n\t\t\t\t\t\t\t\t\t\t\t\t\t+ \"World votes are now at colorhere\"+ WorldVote.getVotes()+\"</col>.\", false);\t\n\t}", "private void sendEmail() {\n\n\n Log.i(TAG, \" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\");\n\n\n Log.i(TAG, \"sendEmail: \"+currentEmail);\n\n Log.i(TAG, \" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\");\n\n\n String email = currentEmail.trim();\n String subject = \"Garbage Report Handeled\";\n\n String message = textViewStreet.getText().toString() + \" \" + \"request has been handeled\" +\" \"+textViewDescription.getText().toString();\n\n// String message = textViewStreet.getText().toString() + \" \" + \"request has been handeled\" + \" \" +time+\" \"+textViewDescription.getText().toString();\n //Creating SendMail object\n SendMail sm = new SendMail(this, email, subject, message);\n\n //Executing sendmail to send email\n sm.execute();\n }", "public void displayVisitorScore(int score) {\r\n TextView scoreView = (TextView) findViewById(R.id.visitor_score);\r\n scoreView.setText(String.valueOf(score));\r\n }", "public void sendInvitations(){\r\n for(int i = 0; i< emails.size(); i++){\r\n System.out.println(\"Inviting: \" + emails.get(i));\r\n }\r\n\r\n }", "private void displayScore(int score) {\n // Set a text view to show the score.\n TextView scoreView = findViewById(R.id.score_text_view);\n scoreView.setText(format(\" %d\", score));\n }", "@Override\n\tpublic void onClick(View v) {\n\t\tIntent sharingIntent = new Intent(android.content.Intent.ACTION_SEND); \n\t\tsharingIntent.setType(\"text/plain\");\n\t\tString shareBody = \"I scored \"+score+\" points!How much can you score?Install the game Space Prowler from the Play Store now!\";\n\t\tsharingIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, \"Subject Here\");\n\t\tsharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, shareBody);\n\t\tstartActivity(Intent.createChooser(sharingIntent, \"Share via\"));\n\t\t\n\t}", "public void sendNotificaitoin(User user) throws MailException, InterruptedException {\n\n\n System.out.println(\"Sending email...\");\n\n SimpleMailMessage mail = new SimpleMailMessage();\n mail.setTo(\"[email protected]\");\n mail.setFrom(\"[email protected]\");\n mail.setSubject(\"notification\");\n mail.setText(\"time is running out\");\n javaMailSender.send(mail);\n\n System.out.println(\"Email Sent!\");\n }", "private void sendProofEmail(String proof){\n \t\n \tIntent emailIntent = new Intent(android.content.Intent.ACTION_SEND);\n \temailIntent.setType(\"plain/text\");\n \t\n \t//emailIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\n \t/* Fill it with Data */\n \temailIntent.setType(\"plain/text\");\n \t//emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{\"[email protected]\"});\n \temailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, \"Here's the code from FlipSHA\");\n \temailIntent.putExtra(android.content.Intent.EXTRA_TEXT, \"Looks like you don't believe your friend,\" +\n \t\t\t\" do a SHA1 of this string to see the proof \"+proof);\n \tstartActivity(emailIntent); \n }", "public void setScore(int score) { this.score = score; }", "public static void score() {\n\t\tSystem.out.println(\"SCORE: \");\n\t\tSystem.out.println(player1 + \": \" + score1);\n\t\tSystem.out.println(player2 + \": \" + score2);\n\t}", "private void displayTeamA_score(int score) {\n TextView teamA_scoreView = findViewById(R.id.teamA_score_textView);\n teamA_scoreView.setText(String.valueOf(score));\n }", "@Override\n\tpublic void send(String email, String code) {\n\t\tSystem.out.println(email + \"\" +code);\n\t\t/*emailSend.sendSimpleMail(email, \"验证码\", code);*/\n\t}", "private void displayTeamB_score(int score) {\n TextView teamB_scoreView = findViewById(R.id.teamB_score_textView);\n teamB_scoreView.setText(String.valueOf(score));\n }", "public void submitAnswers(View view) {\n boolean oneAnswer = oneCorrectAnswer1985.isChecked();\n boolean twoAnswer = twoCorrectAnswerWalterPayton.isChecked();\n boolean threeAnswer = threeCorrectAnswerMike.isChecked();\n boolean fourAnswer = fourCorrectAnswerJay.isChecked();\n String fiveAnswer = fiveCorrectAnswerDecatur.getText().toString().trim();\n boolean sixAnswer = !sixWrongAnswerGeorge.isChecked() && !sixWrongAnswerLovie.isChecked() && sixCorrectAnswerJohn.isChecked() && sixCorrectAnswerMarc.isChecked();\n\n\n score = calculateTotal(oneAnswer, twoAnswer, threeAnswer, fourAnswer, fiveAnswer, sixAnswer);\n String totalMessage = submitAnswersScore(score);\n\n Context context = getApplicationContext();\n CharSequence text = totalMessage;\n int duration = Toast.LENGTH_LONG;\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n }", "private static void mailResults(String experimentID, String content) {\r\n }", "public void sendButtonClick(View v){\n String title = getText(R.string.mail_title).toString();\n String mailto = \"mailto:\" + emailAdress;\n Intent openEmailApp = new Intent(Intent.ACTION_SENDTO);\n openEmailApp.setType(\"plain/text\");\n openEmailApp.setData(Uri.parse(mailto));\n openEmailApp.putExtra(Intent.EXTRA_SUBJECT, userName + title);\n openEmailApp.putExtra(Intent.EXTRA_TEXT, evaluationMessage);\n startActivity(openEmailApp);\n }", "public void sendRouletteBet() {\n\t\tif (rouletteExecutor.getAposta() == null)\n\t\t\tnew Dialeg().setWarningText(\"You must bet!\");\n\t\telse {\n\t\t\tif (bool.compareAndSet(true, false)) {\n\t\t\t\ttry {\n\t\t\t\t\tmanager.getServer().enviarTrama(new Betting(rouletteExecutor.getAposta()));\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t//// e.printStackTrace();\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tnew Dialeg().setWarningText(\"You can't bet to the same number\");\n\t\t\t}\n\t\t}\n\t}", "public String returnMessage () {\n String msg = getString(R.string.result, score);\n if (score > 7) {\n msg += \"\\n\" + getString(R.string.fabulous);\n }\n else if (score >= 5 && score <= 7) {\n msg += \"\\n\" + getString(R.string.good_job);\n }\n else {\n msg += \"\\n\" + getString(R.string.try_again);\n }\n return msg;\n }", "private void drawScore() {\n\t\tString score = myWorld.getScore() + \"\";\n\n\t\t// Draw shadow first\n\t\tAssetLoader.shadow.draw(batcher, \"\" + myWorld.getScore(), (136 / 2)\n\t\t\t\t- (3 * score.length()), 12);\n\t\t// Draw text\n\t\tAssetLoader.font.draw(batcher, \"\" + myWorld.getScore(), (136 / 2)\n\t\t\t\t- (3 * score.length() - 1), 11);\n\n\t}", "@RequestMapping(method = RequestMethod.POST, path = \"/score\")\n\t\tpublic String score(@RequestBody leaderBoard score) {\n\t\t\tlogger.info(\"Entered into Controller\");\n\t\t\tleaderboardrepository.save(score);\n\t\t\tlogger.info(\"Saved:\" + score);\n\t\t\treturn \"successful\";\n\t\t\t//change to post request\n\t\t/**\n\t\t * This is when it will get all scores that have \n\t\t * become the scores on the database.\n\t\t * @return\n\t\t */\n\t\t\n\t\t}", "public void displayForTeamA(int score) {\n TextView scoreView = findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void saveScore(){\n\t\tIntent intent = new Intent();\n\t\tintent.setClass(context, SaveScoreActivity.class);\n\t\tintent.putExtra(\"GameName\", \"Snake\");\n\t\tintent.putExtra(\"Score\", manager.getScore());\n\t\tcontext.startActivity(intent);\n\t}", "public String userSendMessage(){\r\n if( porukeBeanLocal.userSendMessage(userName, email, question)){\r\n return \"Success\";\r\n }\r\n return \"Failure\";\r\n }", "Response<SavedScore> submitScore(String leaderboardId, String uniqueIdentifier, Score score);", "public String getScore() {\n String scoreMessage;\n if (noWinner() && !(isDeuce())) {\n scoreMessage = (isTie()) ? gameTie() : currentScore();\n }else if (isDeuce()){\n scoreMessage = \"Deuce\";\n }else {\n scoreMessage = advanceGame();\n }\n return scoreMessage;\n }", "protected void addScoreToLeaderboard() {\n\n\t\tif (onlineLeaderboard) {\n\t\t jsonFunctions = new JSONFunctions();\n\t\t jsonFunctions.setUploadScore(score);\n\t\t \n\t\t Handler handler = new Handler() {\n\t\t\t @Override\n\t\t\t\tpublic void handleMessage(Message msg) {\n\t\t\t\t @SuppressWarnings(\"unchecked\")\n\t\t\t\t ArrayList<Score> s = (ArrayList<Score>) msg.obj;\n\t\t\t\t globalScores = helper.sortScores(s);\n\t\t\t }\n\t\t };\n\t\t \n\t\t jsonFunctions.setHandler(handler);\n\t\t jsonFunctions\n\t\t\t .execute(\"http://brockcoscbrickbreakerleaderboard.web44.net/\");\n\t\t}\n\t\tsaveHighScore();\n }", "public void sendMessage(View view) {\n EditText etName = findViewById(R.id.etName);\n\n if (etName.getVisibility() == View.VISIBLE) {\n String name = etName.getText().toString();\n highScore.addScore(score, level, name);\n }\n\n Intent intent = new Intent(this, MainActivity.class);\n startActivity(intent);\n finish();\n }", "public void displayForTeamB(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_bb_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamA(int score) {\n TextView scoreView = (TextView) findViewById(R.id.team_a_score);\n scoreView.setText(String.valueOf(score));\n }", "void send(String emailName, Map model, Locale locale);", "@Override\n\tpublic void sendHtmlEmail(MimeMessage mm) {\n\t\t\n\t}", "public void setScore(int score) {\n this.score = score;\n }", "@Override\n public void sendEmail(String emailBody) {\n }", "public void sendReview(\r\n final UserProfile theReviewerProfile,\r\n Paper thePaper,\r\n File review, int score\r\n ) throws IllegalArgumentException {\n \tif (thePaper.getAuthors().contains(theReviewerProfile.getName())) {\r\n \t\tthrow new IllegalArgumentException();\r\n \t} else {\r\n \t\tthePaper.addReview(new Review(review, score));\r\n \t}\r\n\n }", "public void sendFeedback(View view) {\n RatingBar ratingBar = (RatingBar) findViewById(R.id.ratingBar);\n Float feedback = ratingBar.getRating();\n\n EditText remarksText = (EditText) findViewById(R.id.remarks);\n String remarks = remarksText.getText().toString();\n\n // Build the params to be sent on the server.\n // Fill the value of the corresponding Hash map keys with\n // inputs from your own app.\n\n Map<String, String> params = new HashMap<>();\n params.put(\"apk_token\", BuildConfig.FEEDBACK_TOKEN);\n params.put(\"user_id\", user_id);\n params.put(\"doctor_id\", doctor_id);\n params.put(\"data[rating]\", feedback.toString());\n params.put(\"data[comments]\", remarks);\n\n if (user_id.equals(\"\") || doctor_id.equals(\"\")) {\n Toast toast = Toast.makeText(getApplicationContext(), \"No User/Doctor found.\", Toast.LENGTH_SHORT);\n toast.show();\n } else {\n // Previous prepared params will then used by the PostFeedback\n // class to send inputs to the server.\n //\n // For advance features, you can save the feedback inputs in a file/DB in a meantime\n // then use this when an internet connection is already available.\n new PostFeedback(getApplicationContext(), params);\n }\n }", "@Override\r\n\tpublic void sendEmails() {\n\t\tSystem.out.println(\"All e-mails sent from e-mail service!\");\r\n\t}", "public void send(EmailMessage email) {\r\n emailActorRef.tell(email, emailActorRef);\r\n }", "public void displayForTeamB(int score) {\n TextView scoreView = findViewById(R.id.team_b_score);\n scoreView.setText(String.valueOf(score));\n }", "public void displayForTeamB(int score) {\n TextView scoreView = findViewById(R.id.team_b_score);\n scoreView.setText(String.valueOf(score));\n }", "public void setScore(int score)\n {\n this.score = score;\n }", "public void score(){\r\n\t\tint playerLocation = player.getLocationX();\r\n\t\tint obstacleX = obstacle.getLocationX();\r\n\t\tint obstacleY = obstacle.getLocationY();\r\n\r\n\r\n\t\tstr =\"\" + countCoins;\r\n\r\n\t\t//if you hit a coin, the number of points goes up by one.\r\n\t\tif(obstacleY == 280 && obstacleX==300 && playerLocation == 250){\r\n\t\t\tcountCoins++;\r\n\t\t}\r\n\t\tif(obstacleY== 450 && obstacleX==300 && playerLocation ==450){\r\n\t\t\tcountCoins++;\r\n\t\t}\r\n\r\n\t\t//if you hit the green monster, you lose one point.\r\n\t\tif((obstacleX-50) == 250 && (obstacleY-240) == 250 && playerLocation ==250){\r\n\t\t\tcountCoins--;\r\n\t\t}\r\n\r\n\t\t//if you hit the blue monster, you lose 3 points.\r\n\t\tif((obstacleX+180) == 480 && (obstacleY+180) == 250 && playerLocation ==450){\r\n\t\t\tcountCoins-=3;\r\n\t\t}\r\n\t}", "public static void sendEmail(EmailSendable e, String message){\n\t\tSystem.out.println(\"Email-a bidali da: \"+message);\r\n\t}", "public void sendEmailForMatchingReports(Exchange exchange) {\n logger.info(\"matching algorithm reports email started \");\n producerTemplate.sendBodyAndHeader(RecapConstants.EMAIL_Q, getEmailPayLoadForMatching(exchange), RecapConstants.EMAIL_FOR, RecapConstants.MATCHING_REPORTS);\n }", "public void SendEmail(){\n //Dummy Email Bot\n String from = \"[email protected]\";\n String emailPW = \"thisiscz2002\";\n\n try{\n Session session = Session.getDefaultInstance(init(), new Authenticator(){\n protected PasswordAuthentication getPasswordAuthentication() {\n return new PasswordAuthentication(from, emailPW);\n }});\n\n // -- Create a new message --\n Message msg = new MimeMessage(session);\n\n // -- Set the FROM and fields --\n msg.setFrom(new InternetAddress(from));\n msg.setRecipients(Message.RecipientType.TO,\n InternetAddress.parse(getRecipientEmail(),false));\n\n LocalDateTime myDateObj = LocalDateTime.now();\n DateTimeFormatter myFormatObj = DateTimeFormatter.ofPattern(\"dd-MM-yyyy HH:mm:ss\");\n String formattedDate = myDateObj.format(myFormatObj);\n\n msg.setSubject(getEmailSubject());\n msg.setText(getMessage());\n msg.setSentDate(new Date());\n Transport.send(msg);\n\n //System.out.println(formattedDate + \" - Message sent.\");\n }catch (MessagingException e){\n System.out.println(\"Error: \" + e);\n }\n }", "public void displayScoreA (int score){\n\n TextView scoreA = (TextView)findViewById(R.id.team_a_score);\n scoreA.setText(String.valueOf(score));\n }" ]
[ "0.69876236", "0.69192886", "0.67025477", "0.65258145", "0.6455456", "0.64469445", "0.6332501", "0.62518877", "0.61826015", "0.60547334", "0.6011297", "0.5983927", "0.5894572", "0.58681285", "0.57958174", "0.57936114", "0.57903844", "0.5769307", "0.57560766", "0.5744913", "0.5725442", "0.57238483", "0.5710837", "0.5710735", "0.5700529", "0.5683923", "0.5657627", "0.5654719", "0.5651644", "0.5624129", "0.56014514", "0.5583598", "0.5581114", "0.55660623", "0.5560617", "0.55530876", "0.5545877", "0.553811", "0.5535293", "0.55319524", "0.5528782", "0.5520279", "0.5516237", "0.5512389", "0.55080396", "0.5500078", "0.54960734", "0.54959655", "0.5477046", "0.547381", "0.54696536", "0.5467396", "0.54623586", "0.5461571", "0.5455207", "0.54536724", "0.54506415", "0.54427254", "0.54204637", "0.5408337", "0.5394696", "0.5381401", "0.53768635", "0.53762144", "0.5363638", "0.5362087", "0.5349641", "0.53364784", "0.53359604", "0.53318703", "0.53253925", "0.53253925", "0.53212225", "0.5318749", "0.5317054", "0.53112155", "0.53101337", "0.53052855", "0.5303682", "0.53016543", "0.53016543", "0.53016543", "0.53016543", "0.53016543", "0.5299275", "0.5294081", "0.5293655", "0.5288538", "0.5278468", "0.5273832", "0.5271426", "0.5269618", "0.5268256", "0.5268256", "0.52587074", "0.52565044", "0.52557224", "0.525532", "0.5254781", "0.5249523" ]
0.6942195
1
Get method to retrieve player's name
String getPlayerName() { EditText editText = (EditText) findViewById(R.id.name_edit_text_view); return editText.getText().toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getPlayerName();", "String getName(){\n\t\treturn playerName;\n\t}", "String getName() {\n return getStringStat(playerName);\n }", "public String getName(){\r\n\t\treturn playerName;\r\n\t}", "public String getName()\r\n\t{\r\n\t\treturn this.playerName;\r\n\t}", "public String getPlayerName() {\n return name; \n }", "public String getPlayerName() {\n\t\tString name = super.getPlayerName();\n\t\treturn name;\n\t}", "String getPlayer();", "public String getPlayerName() {\n return props.getProperty(\"name\");\n }", "public String getPlayerName(){\n\t\treturn playerName;\n\t}", "abstract public String getNameFor(Player player);", "@Override\n\tpublic String getPlayerName() {\n\t\treturn playerName;\n\t}", "public String getPlayerName() {\n return playerName;\n }", "public String getPlayerName() {\n return playerName;\n }", "public String getPlayerName() {\n return this.playerName;\n }", "public String getName(Player p) {\n\t\treturn name;\n\t}", "public String getPlayerName() {\n\t\treturn name;\n\t}", "public String getPlayerName() {\n return nameLabel.getText().substring(0, nameLabel.getText().indexOf('\\''));\n }", "public String getPlayerName() {\n \treturn playername;\n }", "@Override\n public String getPlayerName()\n {\n if (currentPlayer == 0)\n {\n return playerOneName;\n }\n else\n {\n return playerTwoName;\n }\n }", "public String getName(){\n\t\treturn players.get(0).getName();\n\t}", "public String getPlayerName() {\n\n return m_playerName;\n }", "public String myGetPlayerName(String name) { \n Player caddPlayer = getServer().getPlayerExact(name);\n String pName;\n if(caddPlayer == null) {\n caddPlayer = getServer().getPlayer(name);\n if(caddPlayer == null) {\n pName = name;\n } else {\n pName = caddPlayer.getName();\n }\n } else {\n pName = caddPlayer.getName();\n }\n return pName;\n }", "private String getPlayerName() {\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);\n String storedName = preferences.getString(\"playerName\",\"none\");\n return storedName;\n }", "private String getPlayerName() {\n Bundle inBundle = getIntent().getExtras();\n String name = inBundle.get(USER_NAME).toString();\n return name;\n }", "java.lang.String getGameName();", "java.lang.String getGameName();", "private String getPlayerName() {\n EditText name = (EditText) findViewById(R.id.name_edittext_view);\n return name.getText().toString();\n }", "public String getPlayerName(){\n return this.playerName;\n\n }", "String player1GetName(){\n return player1;\n }", "public String getPlayerName() {\n\t\treturn playerName;\n\t}", "public String getPlayername(Player player) {\n System.out.println(\"――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――\");\n System.out.println(\"Merci de d'indiquer le nom du joueur \"+player.getColor().toString(false)+\" : \");\n String name = readInput.nextLine();\n return name;\n }", "String player2GetName(){\n return player2;\n }", "public java.lang.String getPlayerName() {\n java.lang.Object ref = playerName_;\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 playerName_ = s;\n return s;\n }\n }", "public java.lang.String getPlayerName() {\n java.lang.Object ref = playerName_;\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 playerName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getPlayerListName ( ) {\n\t\treturn handleOptional ( ).map ( Player :: getPlayerListName ).orElse ( name );\n\t}", "String getNewPlayerName();", "public String getDisplayName ( ) {\n\t\treturn handleOptional ( ).map ( Player :: getDisplayName ).orElse ( name );\n\t}", "public String getPlayer() {\r\n return player;\r\n }", "public static String getNameOne() {\n\tString name;\n\tname = playerOneName.getText();\n\treturn name;\n\n }", "public String getLoggedPlayerName() {\r\n return ctrlDomain.getLoggedPlayerName();\r\n }", "private void getPlayertName() {\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}", "String getName() ;", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();", "String getName();" ]
[ "0.90515167", "0.8562612", "0.85044795", "0.8438221", "0.8385187", "0.83554405", "0.83062893", "0.82505846", "0.8175001", "0.81686723", "0.81558955", "0.8147216", "0.8130665", "0.8130665", "0.8096241", "0.809396", "0.80423254", "0.80407405", "0.80392104", "0.8013742", "0.7998768", "0.79839617", "0.7981637", "0.79218745", "0.7874812", "0.7861875", "0.7861875", "0.785946", "0.7836399", "0.7820641", "0.7754729", "0.77438116", "0.76577973", "0.7641121", "0.7585483", "0.7574331", "0.75641334", "0.7551166", "0.7497743", "0.74882305", "0.740045", "0.7398118", "0.72919977", "0.7277319", "0.7277319", "0.7277319", "0.7277319", "0.7277319", "0.7277319", "0.7277319", "0.7277319", "0.7277319", "0.7277319", "0.7277319", "0.7277319", "0.7277319", "0.7277319", "0.7277319", "0.7277319", "0.7277319", "0.7277319", "0.7277319", "0.7277319", "0.7277319", "0.7277319", "0.7277319", "0.7277319", "0.7277319", "0.7277319", "0.7277319", "0.7277319", "0.7277319", "0.7277319", "0.7277319", "0.7277319", "0.7277319", "0.7277319", "0.7277319", "0.7277319", "0.7277319", "0.7277319", "0.7277319", "0.7277319", "0.7277319", "0.7277319", "0.7277319", "0.7277319", "0.7277319", "0.7277319", "0.7277319", "0.7277319", "0.7277319", "0.7277319", "0.7277319", "0.7277319", "0.7277319", "0.7277319", "0.7277319", "0.7277319", "0.7277319" ]
0.7675035
32
Get method to retrieve player's email
String getPlayerMail() { EditText editText = (EditText) findViewById(R.id.mail_edit_text_view); return editText.getText().toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getPlayerEmail () {\n\t\treturn this.playerEmail;\n\t}", "java.lang.String getEmail();", "java.lang.String getEmail();", "java.lang.String getEmail();", "java.lang.String getEmail();", "java.lang.String getEmail();", "java.lang.String getEmail();", "String getEmail();", "String getEmail();", "String getEmail();", "String getEmail();", "String getEmail();", "private String getPlayerMail() {\n EditText mail = (EditText) findViewById(R.id.mail_edittext_view);\n return mail.getText().toString();\n }", "java.lang.String getUserEmail();", "public static String getExistingEmail() throws Exception {\n return executeQuery(\"SELECT * FROM players;\", \"us_email\");\n }", "public String getEmail()\r\n/* 31: */ {\r\n/* 32:46 */ return this.email;\r\n/* 33: */ }", "public String getEmail() {\n return userItem.getEmail();\n }", "String getUserMail();", "public void setPlayerEmail (String email) {\n\t\tthis.playerEmail = email;\n\t}", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getEmail() {\n return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(EMAIL_PROP.get());\n }", "public String getEmail() {return email; }", "public String getEmail()\r\n {\r\n return email;\r\n }", "@Override\r\n\tpublic String getEmail() {\n\t\treturn email;\r\n\t}", "public String getEmail() { return email; }", "public String getEmail()\n {\n return email;\n }", "public String getEmail()\n {\n return email;\n }", "public String getEmail() {return email;}", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getEmail() {\n return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(EMAIL_PROP.get());\n }", "public String getEmail() {\n\n String dataField = null;\n sharedPreference_login = new SharedPreference_Login(activity);\n if (sharedPreference_login.IsSaved()) {\n dataField = sharedPreference_login.email();\n }\n\n\n return dataField;\n }", "@Override\n public String getUsername(){\n return getEmail();\n }", "public java.lang.String getEmail() {\r\n return email;\r\n }", "public String getEmail()\r\n {\r\n return getAttribute(\"email\");\r\n }", "public Email getEmail() {\n return email;\n }", "@java.lang.Override\n public java.lang.String getEmail() {\n java.lang.Object ref = email_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n email_ = s;\n return s;\n }\n }", "@Override\n\tpublic java.lang.String getPersonalEmail() {\n\t\treturn _candidate.getPersonalEmail();\n\t}", "public String getEmail()\n\t{\n\t\treturn getEmail( getSession().getSessionContext() );\n\t}", "public String getEmail()\n\t{\n\t\treturn getEmail( getSession().getSessionContext() );\n\t}", "public String getEmail() {\n return email;\n }", "public String getEmail() {\n return email;\n }", "public String getEmail() {\r\n return email;\r\n }", "public String getEmail() {\r\n return email;\r\n }", "public String getEmail() {\r\n return email;\r\n }", "public String getEmail() {\r\n return email;\r\n }", "public String getEmail() {\r\n return email;\r\n }", "public String getEmail() {\r\n return email;\r\n }", "public String getEmail() {\r\n return email;\r\n }", "public String getEmail() {\r\n return email;\r\n }", "public String getEmail() {\r\n return email;\r\n }", "public String getEmail() {\r\n return email;\r\n }", "public String getEmail() {\r\n return email;\r\n }", "public String getEmail()\n {\n return this.email;\n }", "public java.lang.String getEmail() {\n return email;\n }", "public java.lang.String getEmail() {\n return email;\n }", "public java.lang.String getEmail() {\n return email;\n }", "public java.lang.String getEmail() {\n return email;\n }", "public WebElement getEmail()\n {\n\t\t\n \tWebElement user_emailId = driver.findElement(email);\n \treturn user_emailId;\n \t\n }", "public java.lang.String getEmail () {\n\t\treturn email;\n\t}", "public String getEmail() {\n return email;\n }", "public String getEmail() {\n return email;\n }", "public String getEmail() {\n return email;\n }", "public String getEmail() {\n return email;\n }", "public String getEmail() {\n return email;\n }", "public String getEmail() {\n return email;\n }", "public String getEmail() {\n return email;\n }", "public String getEmail() {\n return email;\n }", "public String getEmail() {\n return email;\n }", "public String getEmail() {\n return email;\n }", "public String getEmail() {\n return email;\n }", "public String getEmail() {\n return email;\n }", "public String getEmail() {\n return email;\n }", "public String getEmail() {\n return email;\n }", "public String getEmail() {\n return email;\n }", "public String getEmail() {\n return email;\n }", "public String getEmail() {\n return email;\n }", "public String getEmail() {\n return email;\n }", "public String getEmail() {\n return email;\n }", "public String getEmail() {\n return email;\n }", "public String getEmail() {\n return email;\n }", "public String getEmail() {\n return email;\n }", "public String getEmail() {\n return email;\n }", "public String getEmail() {\n return email;\n }", "public String getEmail() {\n return email;\n }", "public String getEmail() {\n return email;\n }", "public String getEmail() {\n return email;\n }", "public String getEmail() {\n return email;\n }", "public String getEmail() {\n return email;\n }", "public String getEmail() {\n return email;\n }", "public String getEmail() {\n return email;\n }", "public String getEmail() {\n return email;\n }", "public String getEmail() {\n return email;\n }", "public String getEmail() {\n return email;\n }", "public String getEmail() {\n return email;\n }", "public String getEmail() {\n return email;\n }", "public String getEmail() {\n return email;\n }", "public String getEmail() {\n return email;\n }", "public String getEmail() {\n return email;\n }", "public String getEmail() {\n return email;\n }", "public String getEmail() {\n return email;\n }", "public String getEmail() {\n return email;\n }", "public String getEmail() {\n return email;\n }" ]
[ "0.82309675", "0.7550269", "0.7550269", "0.7550269", "0.7550269", "0.7550269", "0.7550269", "0.7547644", "0.7547644", "0.7547644", "0.7547644", "0.7547644", "0.74212307", "0.714654", "0.7133517", "0.69843835", "0.69614697", "0.6900815", "0.68528354", "0.68489856", "0.68406713", "0.6813877", "0.6789236", "0.6770986", "0.67682254", "0.67682254", "0.6764837", "0.6756715", "0.67540807", "0.6744418", "0.67299646", "0.67175543", "0.66860086", "0.6680801", "0.66797984", "0.6678908", "0.6678908", "0.6671815", "0.6671815", "0.6650215", "0.6650215", "0.6650215", "0.6650215", "0.6650215", "0.6650215", "0.6650215", "0.6650215", "0.6650215", "0.6650215", "0.6650215", "0.6647516", "0.66359454", "0.66359454", "0.66359454", "0.66359454", "0.6621331", "0.6606874", "0.66024977", "0.66024977", "0.66024977", "0.66024977", "0.66024977", "0.66024977", "0.66024977", "0.66024977", "0.66024977", "0.66024977", "0.66024977", "0.66024977", "0.66024977", "0.66024977", "0.66024977", "0.66024977", "0.66024977", "0.66024977", "0.66024977", "0.66024977", "0.66024977", "0.66024977", "0.66024977", "0.66024977", "0.66024977", "0.66024977", "0.66024977", "0.66024977", "0.66024977", "0.66024977", "0.66024977", "0.66024977", "0.66024977", "0.66024977", "0.66024977", "0.66024977", "0.66024977", "0.66024977", "0.66024977", "0.66024977", "0.66024977", "0.66024977", "0.66024977" ]
0.7209055
13
Looks for the element matching this elements name inside one of the messages passed
public Element switchMessages(Collection<? extends Message<?, ?, ?>> messages) { for (Message<?, ?, ?> currentMessage : messages) { // System.out.println("SwitchMessages" + currentMessage.getMessageName()); Element el = currentMessage.getElement(this.getElementPath()); if (el != null && currentMessage.isValidElement(this, el)) { return el; } } return this.getNonMappingElement(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected final WebElement findElementWithAnyMessage(final By by, final List<String> messages) {\n\t\treturn new WebDriverWait(this.webDriver, Environment.TIMEOUT).\n\t\t\t\twithMessage(\"Couldn't find element by \\\"\" + by + \"\\\" with any text from \" + messages).\n\t\t\t\tuntil(ExpectedConditions.refreshed(\n\t\t\t\t\t\t\t\tthis.anyTextToBePresentInElementLocated(by, messages)));\n\t}", "@Override\r\n\tpublic void findElement() {\n\t\t\r\n\t}", "public static Object findElement(List<Object> elements, QName elementName) {\n\t\tif (elements == null) {\n\t\t\treturn null;\n\t\t}\n\t\tfor (Object element : elements) {\n\t\t\tif (elementName.equals(getElementQName(element))) {\n\t\t\t\treturn element;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public abstract OneCampaignAbstract accessToElementSearched(final String key, final String element);", "public Element findByName(String name) {\n for (Element element : this){\n if (element.getName().equals(name)) return element;\n }\n return null;\n }", "public Item detectFindingTypeForMessage (String message)\r\n throws JAXBException\r\n {\r\n Item result = null;\r\n for (final GenericFindingType type : mFindingTypes)\r\n {\r\n result = type.createItem(mSourceFile, message);\r\n if (result != null)\r\n {\r\n if (type.isSourceColumnByCaret())\r\n {\r\n addPositionByCaret(result);\r\n }\r\n break;\r\n }\r\n }\r\n if (logger.isLoggable(Level.FINE))\r\n {\r\n logger.fine(\"For text: '\"\r\n + StringUtil.trimLength(message, MAX_DEBUG_TEXT_CHARS)\r\n + \"' matched finding: \"\r\n + (result == null ? \"null\" : result.getFindingType()\r\n + \"'. End at \" + mSourceFile.getPos()));\r\n }\r\n return result;\r\n }", "public ElementNotFoundException(String msg){\n super(msg);\n }", "@Override\npublic void findElement(String by) {\n\t\n}", "public WebElement findElement(String sElement) {\n\t\treturn findElement(sCurrentPage,sElement);\n\t}", "void infoElementAction(String elementType, String elementName, String messageKey, Object... args);", "@Override\n protected void checkElementNameUnique(Element element)\n {\n }", "String getElementName(Object element);", "public boolean hasElement(String name) {\n return elements.has(name);\n }", "public boolean containsElement(String elementName) {\r\n for (int i = 0; i < eventFields.size(); i++) {\r\n EventDataEntry currentEntry = eventFields.get(i);\r\n if (currentEntry.getColumnName().equalsIgnoreCase(elementName)) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n }", "public void onMessageNotFound(Message message) throws MessagingException;", "public abstract boolean doesElementExist(final String key, final String element);", "static String getElementLabel(IJavaElement[] elements) {\n switch(elements.length) {\n case 0:\n Assert.isTrue(false);\n return null;\n case 1:\n return Messages.format(TypeHierarchyMessages.HistoryAction_inputElements_1, new String[] { getShortLabel(elements[0]) });\n case 2:\n return Messages.format(TypeHierarchyMessages.HistoryAction_inputElements_2, new String[] { getShortLabel(elements[0]), getShortLabel(elements[1]) });\n default:\n return Messages.format(TypeHierarchyMessages.HistoryAction_inputElements_more, new String[] { getShortLabel(elements[0]), getShortLabel(elements[1]), getShortLabel(elements[2]) });\n }\n }", "public List<String> fetchMatchingMessage(String messageName) {\n \n String deviceClass = getClass().getSimpleName();\n String deviceInstance = getInstanceName();\n \n return distributor.fetchMatchingEvent(\n deviceClass, \n deviceInstance, \n messageName);\n }", "public Element getElement(String name) {\r\n return (Element)elements.get(name);\r\n }", "private boolean isMessageNameMatching(TreeWalkerAuditEvent event) {\n return messageRegexp == null || messageRegexp.matcher(event.getMessage()).find();\n }", "protected ActionMessage lookupJobInfo(String id, List<ActionMessage> messages){\n\t\tfor (ActionMessage message: messages){\n\t\t\tif (message.getMessageID().equals(id)){\n\t\t\t\treturn message;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "private Target getMatchingTarget(Element targetElement)\n {\n String targetName = targetElement.getAttribute(\"name\").getValue();\n\n for (Target target : targets)\n {\n String label = target.getName();\n\n if (label.equals(targetName))\n {\n return target;\n }\n }\n\n return null;\n }", "public boolean find(String sElement){\n\t\tboolean bReturn = false;\n\t\ttry{\n\t\t\tbReturn = findElement(sElement).isDisplayed();\n\t\t}catch(Exception e){\n\t\t\tlogger.error(\"Exception occured in finding the WebElement: \"+e.getMessage());\n\t\t}\n\t\t\n\t\treturn bReturn;\n\t}", "public static WSDLMessage getMatchingWSDLMessage(QName wsdlMessageQName, WSDLElement element) {\n\t\tif(wsdlMessageQName == null) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tWSDLDocument document = (WSDLDocument) element.getOwnerDocument();\n\t\t\n\t\tif (document == null) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tWSDLDefinitions wsdlDefinition = document.getDocumentDefinitions();\n\t\t\t\t\n\t\tif (wsdlDefinition == null) {\n\t\t\treturn null;\n\t\t}\n \n\t\tWSDLMessage wsdlMessage = null;\n\t\t\n\t\twsdlMessage = wsdlDefinition.getMessage(wsdlMessageQName);\n\t\treturn wsdlMessage;\n\t\t\n\t}", "protected void verifyNestedElem(IJavaElem javaElem) {\n for(Class c: cls.getClasses()){\n \n String name1 = c.getName();\n String name2 = javaElem.getFullName();\n \n System.out.println(\"[nested] \\\"\" + name1 +\"\\\"\");\n System.out.println(\" \\\"\" + name2 + \"\\\"\");\n \n if(name1.equals(name2)){\n return;\n }\n }\n \n appendMessage(\"Nested class not found: \" + javaElem.getFullName());\n \n }", "@Override\r\n public Element findElement()\r\n {\n return null;\r\n }", "public Element getElement(String id, String valueType, boolean checkMultipleElements) throws Exception { \r\n \r\n // Try the SOAP Body next \r\n Element bodyElement = SecUtil.findBodyElement(doc); \r\n if (bodyElement != null) { \r\n \r\n String cId = bodyElement.getAttributeNS(SecConstants.WSU_NS, \"Id\"); \r\n if (cId.equals(id)) { \r\n return bodyElement; \r\n } \r\n \r\n } \r\n \r\n // Otherwise do a general search \r\n return SecUtil.findElementById(doc.getDocumentElement(), id, checkMultipleElements); \r\n \r\n }", "String getNameElement();", "public String getElement(final String element) {\n\t\tif (Arrays.asList(Commands.firealiases).contains(element) || Arrays.asList(Commands.firecomboaliases).contains(element)) {\n\t\t\treturn \"fire\";\n\t\t} else if (Arrays.asList(Commands.combustionaliases).contains(element)) {\n\t\t\treturn \"combustion\";\n\t\t} else if (Arrays.asList(Commands.lightningaliases).contains(element)) {\n\t\t\treturn \"lightning\";\n\t\t} else if (Arrays.asList(Commands.earthaliases).contains(element) || Arrays.asList(Commands.earthcomboaliases).contains(element)) {\n\t\t\treturn \"earth\";\n\t\t} else if (Arrays.asList(Commands.metalbendingaliases).contains(element)) {\n\t\t\treturn \"metal\";\n\t\t} else if (Arrays.asList(Commands.sandbendingaliases).contains(element)) {\n\t\t\treturn \"sand\";\n\t\t} else if (Arrays.asList(Commands.lavabendingaliases).contains(element)) {\n\t\t\treturn \"lava\";\n\t\t} else if (Arrays.asList(Commands.airaliases).contains(element) || Arrays.asList(Commands.aircomboaliases).contains(element)) {\n\t\t\treturn \"air\";\n\t\t} else if (Arrays.asList(Commands.spiritualprojectionaliases).contains(element)) {\n\t\t\treturn \"spiritual\";\n\t\t} else if (Arrays.asList(Commands.flightaliases).contains(element)) {\n\t\t\treturn \"flight\";\n\t\t} else if (Arrays.asList(Commands.wateraliases).contains(element) || Arrays.asList(Commands.watercomboaliases).contains(element)) {\n\t\t\treturn \"water\";\n\t\t} else if (Arrays.asList(Commands.healingaliases).contains(element)) {\n\t\t\treturn \"healing\";\n\t\t} else if (Arrays.asList(Commands.bloodaliases).contains(element)) {\n\t\t\treturn \"blood\";\n\t\t} else if (Arrays.asList(Commands.icealiases).contains(element)) {\n\t\t\treturn \"ice\";\n\t\t} else if (Arrays.asList(Commands.plantaliases).contains(element)) {\n\t\t\treturn \"plant\";\n\t\t} else if (Arrays.asList(Commands.chialiases).contains(element) || Arrays.asList(Commands.chicomboaliases).contains(element)) {\n\t\t\treturn \"chi\";\n\t\t}\n\t\treturn null;\n\t}", "public boolean isElementPresent(final String elementLocator);", "public ChildMessage getChild(String t){\t\t\t\t\t\t\t\t// get the specific header\n\t\tfor(ChildMessage c : cMessages){\t\t\t\t\t\t\t\t// for all cMessages\n\t\t\tif(c.text.equals(t))\t\t\t\t\t\t\t\t\t\t// if the texts equals t\n\t\t\t\treturn c;\t\t\t\t\t\t\t\t\t\t\t\t// return it\n\t\t}\n\t\treturn null;\t\t\t\t\t\t\t\t\t\t\t\t\t// else return null\n\t}", "@Override\r\n public void searchMessage(Search<SolutionType> search, String message) {\n }", "Message getCurrentMessage();", "public void clickMessagesTabInSocialPanel() throws UIAutomationException{\r\n\t\r\n\t\telementController.requireElementSmart(fileName,\"Messages In Social Panel\",GlobalVariables.configuration.getAttrSearchList(), \"Messages In Social Panel\");\r\n\t\tUIActions.click(fileName,\"Messages In Social Panel\",GlobalVariables.configuration.getAttrSearchList(), \"Messages In Social Panel\");\r\n\t\telementController.requireElementSmart(fileName,\"Messages In Social Panel\",GlobalVariables.configuration.getAttrSearchList(), \"Messages In Social Panel\");\r\n\t\tString tabTextInPage=UIActions.getText(fileName,\"Messages In Social Panel\",GlobalVariables.configuration.getAttrSearchList(), \"Messages In Social Panel\");\r\n\t\tString tabTextInXML=dataController.getPageDataElements(fileName,\"Messages Tab Text\" , \"Name\");\r\n\t\tif(!tabTextInPage.contains(tabTextInXML)){\r\n\t\t\tthrow new UIAutomationException( \"'\"+tabTextInXML +\"' not found\");\r\n\t\t}\r\n\t\tUIActions.getText(fileName, \"Messages Tab Text\", GlobalVariables.configuration.getAttrSearchList(), \"Messages Tab Text\");\r\n\t\r\n\t}", "String getElement();", "String getElem();", "public String isElementPresent(String object, String data) {\n\t\tlogger.debug(\"Entered into isElementPresent()\");\n\t\ttry {\n\t\t\tboolean element = false;\n\t\t\tint size = explictWaitForElementSize(object);\n\n\t\t\tif (size >= 1) {\n\n\t\t\t\telement =explictWaitForElementUsingFluent(object).isDisplayed();\n\t\t\t\tlogger.debug(\"element \" + element);\n\t\t\t\tif (element == true) {\n\t\t\t\t\tlogger.debug(\"element present..\" + element);\n\t\t\t\t\treturn Constants.KEYWORD_FAIL + \" -- element present which is not expected \";\n\t\t\t\t} else\n\t\t\t\t\treturn Constants.KEYWORD_PASS + \" -- element not present \";\n\n\t\t\t} else\n\t\t\t\treturn Constants.KEYWORD_PASS + \"--element not present\";\n\t\t}catch(TimeoutException ex)\n\t\t\n\t\t{\n\t\t\treturn Constants.KEYWORD_FAIL +\"Cause: \"+ ex.getCause();\n\t\t} catch (Exception e) {\n\t\t\n\t\t\treturn Constants.KEYWORD_FAIL + \" --object not found\" + e.getMessage();\n\t\t}\n\t}", "public void validateHoverMessagePresent(String message) {\n\t\tString hoverMsgXpath = \"//*[@id='mwe-popups-svg']/following-sibling::div[contains(@class, 'mwe-popups')]\";\n\t\tWebElement albumElement = wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(hoverMsgXpath)));\n\t\tassertTrue(albumElement.isDisplayed());\n\t\tSystem.out.println(albumElement.getText());\n\t\tassertTrue(albumElement.getText().contains(message));\n\t}", "public static WebElement check_msgSubsToThisMagExists(Read_XLS xls, String sheetName, int rowNum,\r\n \t\tList<Boolean> testFail) throws Exception{\r\n \ttry{\r\n \t//\tBoolean isBtnExists = driver.findElement(By.xpath(\"//*[@id='EMagSubButton']/a\")).isDisplayed();\r\n \t\tBoolean isMsgExists = driver.findElement(\r\n \t\t\t\tBy.xpath(\"//*[@id='EMagSubButton']//*[text()='You are subscribed to this magazine']\")).isDisplayed();\r\n \t\t\r\n \t//\tAdd_Log.info(\"Is Subscribed button exists ::\" + isBtnExists);\r\n \t\tAdd_Log.info(\"Is message 'You are subscribed to this magazine' available ::\" + isMsgExists);\r\n \t\t\r\n \t\tif (isMsgExists == true){\r\n \t\t\tSuiteUtility.WriteResultUtility(\r\n \t\t\t\t\txls, sheetName, Constant.COL_MSG_SUBS_TO_EMAG_EXISTS, rowNum, Constant.KEYWORD_PASS);\r\n \t\t}else{\r\n \t\t\tSuiteUtility.WriteResultUtility(\r\n \t\t\t\t\txls, sheetName, Constant.COL_MSG_SUBS_TO_EMAG_EXISTS, rowNum, Constant.KEYWORD_FAIL);\r\n \t\t\ttestFail.set(0, true);\r\n \t\t}\r\n \t}catch(Exception e){\r\n \t\tAdd_Log.info(\"'You are subscribed to this magazine' message is NOT found on the page.\");\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }", "private boolean isMessageNameMatching(AuditEvent event) {\n return messageRegexp == null || messageRegexp.matcher(event.getMessage()).find();\n }", "public void clickSendButtonInMessagesTab(String message) throws UIAutomationException{\t\r\n\t\telementController.requireElementSmart(fileName,\"Send Button In Messages Tab\",GlobalVariables.configuration.getAttrSearchList(), \"Send Button In Messages Tab\");\r\n\t\tUIActions.click(fileName,\"Send Button In Messages Tab\",GlobalVariables.configuration.getAttrSearchList(), \"Send Button In Messages Tab\");\r\n\t\ttry\r\n\t\t{\r\n\t\t\tThread.sleep(4000);\r\n\t\t}\r\n\t\tcatch(Exception e){}\r\n\t\t\r\n\t\t//If the message is blank , check whether \"Message not sent\" notification appears\r\n\t\tif(message.equals(\" \"))\r\n\t\t{\r\n\t\t// Check by clicking on 'Send' notification appears\r\n\t\telementController.requireElementSmart(fileName,\"Message Not Sent Notification\",GlobalVariables.configuration.getAttrSearchList(), \"Message Not Sent Notification\");\r\n\t\tString linkTextInPage=UIActions.getText(fileName,\"Message Not Sent Notification\",GlobalVariables.configuration.getAttrSearchList(), \"Message Not Sent Notification\");\r\n\t\tString linkTextInXML=dataController.getPageDataElements(fileName,\"Message Not Sent Notification Name\" , \"Name\");\r\n\t\tif(!linkTextInPage.contains(linkTextInXML)){\r\n\t\tthrow new UIAutomationException( \"'\"+linkTextInXML +\"' not found\");\r\n\t\t}\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t// Check by clicking on 'Send' notification appears\r\n\t\telementController.requireElementSmart(fileName,\"Message Sent Notification\",GlobalVariables.configuration.getAttrSearchList(), \"Message Sent Notification\");\r\n\t\tString linkTextInPage=UIActions.getText(fileName,\"Message Sent Notification\",GlobalVariables.configuration.getAttrSearchList(), \"Message Sent Notification\");\r\n\t\tString linkTextInXML=dataController.getPageDataElements(fileName,\"Message Sent Notification Name\" , \"Name\");\r\n\t\tif(!linkTextInPage.contains(linkTextInXML)){\r\n\t\tthrow new UIAutomationException( \"'\"+linkTextInXML +\"' not found\");\r\n\t\t\t}\r\n\t\t}\t\r\n\t\t}", "public static void validateTextMessage(WebElement obj, String expectedTextMsg, String objName) throws IOException {\r\n\t\tif (obj.isDisplayed()){\t\t\t\r\n\t\t\tString actualTextMsg = obj.getText().trim();\r\n\t\t\tif( actualTextMsg.equals(expectedTextMsg )){\r\n\t\t\t\t//\t\tSystem.out.println(expectedTextMsg+\" = \"+actualTextMsg);\r\n\t\t\t\tUpdate_Report( \"Pass\", \"validateTextMessage\",\"Expected message : '\" +expectedTextMsg+ \"' matched with actual message : '\" + actualTextMsg +\"'\");\r\n\t\t\t}else{\r\n\t\t\t\tUpdate_Report( \"Fail\", \"validateTextMessage\", \"Expected message '\" + expectedTextMsg + \"' did not match with actual message '\" + actualTextMsg +\"'\");\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tUpdate_Report( \"Fail\", \"validateTextMessage\", objName +\" is not displayed please check your application \");\r\n\t\t}\r\n\t}", "private String getDisplayNameI18N() throws JspException {\n Object args[] = new Object[5];\n args[0] = arg0;\n args[1] = arg1;\n args[2] = arg2;\n args[3] = arg3;\n args[4] = arg4;\n\n\n if (getKey() == null) {\n\n Object o = null;\n\n if (getScope().equals(\"session\")) {\n\n o = pageContext.getAttribute(getName(), pageContext.SESSION_SCOPE);\n\n } else if (getScope().equals(\"request\")) {\n\n o = pageContext.getAttribute(getName(), pageContext.REQUEST_SCOPE);\n\n } else if (getScope().equals(\"page\")) {\n\n o = pageContext.getAttribute(getName(), pageContext.PAGE_SCOPE);\n\n }\n\n if (o != null) {\n\n try {\n\n String _property = getProperty();\n String innerPropertyName, innerGetterName;\n Method _method;\n\n while (_property.indexOf(\".\") > 0) {\n\n innerPropertyName = _property.substring(0, _property.indexOf(\".\"));\n innerGetterName = \"get\" + innerPropertyName.substring(0,1).toUpperCase() + innerPropertyName.substring(1);\n\n _method = o.getClass().getMethod(innerGetterName, null);\n\n o = _method.invoke(o, null);\n\n _property = _property.substring(_property.indexOf(\".\") +1);\n }\n\n String getterName = \"get\" + _property.substring(0,1).toUpperCase() + _property.substring(1);\n\n Method method = o.getClass().getMethod(getterName, null);\n\n if (method.getReturnType() == String.class) {\n String messageKey = (String)method.invoke(o, null);\n\n setKey(messageKey);\n }\n\n } catch (NoSuchMethodException e) {\n e.printStackTrace();\n } catch (SecurityException e) {\n e.printStackTrace();\n } catch (IllegalAccessException e) {\n e.printStackTrace();\n } catch (InvocationTargetException e) {\n e.printStackTrace();\n }\n }\n }\n\n // Retrieve the message string we are looking for\n String message = RequestUtils.message(pageContext, this.bundle,\n this.localeKey, this.key, args);\n if (message == null) {\n message = key;\n }\n\n return message;\n }", "protected void findWebElementAndType (By webElementSelector, String text){\n\t\tWebElement inputBox = findWebElement(webElementSelector);\n\t\ttry {\n\t\t\tinputBox.sendKeys(text);\n\t\t} catch (ElementNotVisibleException e){\n\t\t\tthrow new AssertionError(\"Found the web element, but it's not visible to send keys. \" + webElementSelector.toString());\n\t\t}\n\t}", "public TLProperty getElement(String elementName);", "public String getTextToVerify(){\n Reporter.log(\" verify message \"+ getMessage+\"<br>\");\n return getTextFromElement(getMessage);\n }", "private void checkLoginMessage(int message){\n checkIfIdIsDisplayedWithText(R.id.login_alt_message_textView,\n message);\n }", "public String getElement(String name) {\n\t\t\n\t\tField elementField = allElements.get(name);\n\t\tif (elementField == null) {\n\t\t\tthrow new ScenarioException(String.format(\"Element '%s' cannot be found among all classes. It may not have been defined\", name));\n\t\t}\n\t\t\n\t\tClass<?> pageClass = elementField.getDeclaringClass(); \n\t\t\n\t\t// create new page if we are not on it\n\t\tif (currentPage.get() == null || pageClass != currentPage.get().getClass()) {\n\t\t\ttry {\n\t\t\t\tcurrentPage.set((PageObject)pageClass.newInstance());\n\t\t\t} catch (InstantiationException | IllegalAccessException e) {\n\t\t\t\tthrow new ScenarioException(String.format(\"Page '%s' don't have default constructor, add it to avoid this error\", pageClass.getSimpleName()));\n\t\t\t}\n\t\t\tlogger.info(\"switching to page \" + pageClass.getSimpleName());\n\t\t}\n\t\t\n\t\tif (name.split(\"\\\\.\").length == 1) {\n\t\t\treturn name;\n\t\t} else {\n\t\t\treturn name.split(\"\\\\.\")[1];\n\t\t}\n\t}", "public static Element getElement(Element elem, String name) {\n if (elem != null) {\n NodeList list = elem.getChildNodes();\n for (int i = list.getLength() - 1; i >= 0; i--) {\n Node node = list.item(i);\n if (node.getNodeType() == Node.ELEMENT_NODE\n && node.getNodeName().equals(name)) {\n return (Element) node;\n }\n }\n\n // Search without namespace prefix\n int p = name.indexOf(':');\n if (p != -1) {\n return getElement(elem, name.substring(p + 1));\n }\n }\n return null;\n }", "public MessageField getCorrespondingField();", "Object getElementID(String elementName) throws Exception;", "public void contains(@Nullable Object element) {\n if (!Iterables.contains(getSubject(), element)) {\n failWithRawMessage(\"%s should have contained <%s>\", getDisplaySubject(), element);\n }\n }", "String getElementQName(Object element);", "public Element getOperationCustom(String _lookingfor) {\n Optional<Element> p = cCollection.stream()\n .filter(e -> ((NamedElement) e).getName().equals(_lookingfor))\n .findFirst();//.get();\n if (p.hashCode() != 0) {\n return p.get();\n }\n else {\n return null;\n }\n }", "public WebElement findElementByName(String NameValue) {\n\t\ttry {\n\t\t\tElement = driver.findElement(By.name(NameValue));\n\n\t\t} catch (Exception e) {\n\n\t\t\te.printStackTrace();\n\n\t\t}\n\t\treturn Element;\n\n\t}", "GetMessagesType(Message message) {\n super(message);\n }", "public static WebElement usernamereq(WebDriver driver) {\n\t\telement = driver.findElement(By.xpath(\"//div[contains(text(),' Valid first name is required. ')]\"));\n\t\treturn element;\n\t}", "public static WebElement informationUpdatedDialog_txt(WebDriver driver){\t\t\t\t\t\t\t\n\t\telement = driver.findElement(By.id(\"divMessageOK\"));\t\t\t\t\t\t\n\t\treturn element;\t\t\t\t\t\t\n\t}", "public void userShouldGetMessage() {\n assertTextMessage(getTextFromElement(_emailResult), expected, \"Your message has been sent\");\n\n }", "public SC getElementName() { return _elementName; }", "public static void isPupupPreasent(WebElement ele ,String objectName) {\n if (ele.isDisplayed())\n\t{System.out.println(ele +\"Is displayed in he screen\");}\n else \n\t{System.out.println(ele+\"not found in the Screen\");}\n\n\n}", "@Override\n\tpublic T find(T targetElement) {\n\t\tif(contains(targetElement))\n\t\t return targetElement;\n\t\telse \n\t\t\treturn null;\n\t\t\n\t}", "public WebElement getElement(String locatorKey){\r\n\t\tWebElement e=null;\r\n\t\ttry{\r\n\t\tif(locatorKey.endsWith(\"_id\"))\r\n\t\t\te = driver.findElement(By.id(prop.getProperty(locatorKey)));\r\n\t\telse if(locatorKey.endsWith(\"_name\"))\r\n\t\t\te = driver.findElement(By.name(prop.getProperty(locatorKey)));\r\n\t\telse if(locatorKey.endsWith(\"_xpath\"))\r\n\t\t\te = driver.findElement(By.xpath(prop.getProperty(locatorKey)));\r\n\t\telse if(locatorKey.endsWith(\"_class\"))\r\n\t\t\te = driver.findElement(By.className(prop.getProperty(locatorKey)));\r\n\t\telse{\r\n\t\t\treportFailure(\"Locator not correct - \" + locatorKey);\r\n\t\t\tAssert.fail(\"Locator not correct - \" + locatorKey);\r\n\t\t}\r\n\t\t\r\n\t\t}catch(Exception ex){\r\n\t\t\t// fail the test and report the error\r\n\t\t\treportFailure(ex.getMessage());\r\n\t\t\tex.printStackTrace();\r\n\t\t\tAssert.fail(\"Failed the test - \"+ex.getMessage());\r\n\t\t}\r\n\t\treturn e;\r\n\t}", "public <T> T getElement(String name) {\n return elements.get(name);\n }", "public Text getByName(String name){\r\n\t\tfor (int i=0;i<thisDialog.size();i++){\r\n\t\t\tif (thisDialog.get(i).getName().equals(name)){\r\n\t\t\t\treturn thisDialog.get(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "boolean hasMessage();", "boolean hasMessage();", "boolean hasMessage();", "boolean hasMessage();", "boolean hasMessage();", "boolean hasMessage();", "boolean hasMessage();", "boolean hasMessage();", "public TransportMessage findMessage(String id) {\n try{\n return (TransportMessage)storage(Q_STORENAME).getRecordForValue(\"cache-id\", id);\n }\n catch(NoSuchElementException e) {\n //Not there. Not a big deal.\n }\n\n try{\n return (TransportMessage)storage(RECENTLY_SENT_STORENAME).getRecordForValue(\"cache-id\", id);\n }\n catch(NoSuchElementException e) {\n //Not there. Not a big deal.\n }\n\n //Couldn't find it!\n return null;\n }", "@Override\n\tpublic Message find(int id) {\n\t\treturn null;\n\t}", "public void checkElementsToHaveWord(By by, String word){\n List<WebElement> rows = driver.findElements(by);\n\n Iterator<WebElement> iter = rows.iterator();\n\n while (iter.hasNext()) {\n // Iterate one by one\n WebElement item = iter.next();\n // get the text\n String label = item.getText().toLowerCase();\n //check if title contains \"Word\"\n Assert.assertThat(label, containsString(word.toLowerCase()));\n\n }\n }", "private Macrodef getMatchingMacrodef(Element targetElement)\n {\n String targetName = targetElement.getAttribute(\"name\").getValue();\n\n for (Macrodef macrodef : localMacrodefs)\n {\n String label = macrodef.getName();\n\n if (label.equals(targetName))\n {\n return macrodef;\n }\n }\n\n return null;\n }", "public static boolean isElement(String qName, String expectedElement) {\n return qName.equals(expectedElement);\n }", "String getElementStringValue(Object element);", "Res.Msg getMsg(int index);", "public void assertElementPresent(final String elementLocator);", "public boolean clickMatchingelementByText(By elementList, String itemName) {\n\t\tboolean res = false;\n\t\ttry {\n\t\t\tThread.sleep(implicitWaitTimeout*1000);\n\t\t\tList<WebElement> matchelements = getListOfMatchingElements(elementList);\n\t\t\tif (matchelements.size() > 0) {\n\t\t\t\tfor (int elecount = 0; elecount < matchelements.size(); elecount++) { // to get index of element\n\t\t\t\t\tSystem.out.println(matchelements.get(elecount).getText());\n\t\t\t\t\tif (matchelements.get(elecount).getText().equalsIgnoreCase(itemName)) {\n\t\t\t\t\t\t// reqindex = elecount;\n\t\t\t\t\t\tclickUsingJavaScript(matchelements.get(elecount));\n\t\t\t\t\t\tres = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif (itemName.equalsIgnoreCase(\"anyitem\")) { // click first item\n\t\t\t\t\t\tclickUsingJavaScript(matchelements.get(elecount));\n\t\t\t\t\t\tres = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Exception Caught To click on Element Identifier :\" + elementList + \" With String name:\"\n\t\t\t\t\t+ itemName);\n\t\t}\n\n\t\treturn res;\n\n\t}", "java.lang.String getTheMessage();", "@Then(\"^assert that the text \\\"([^\\\"]*)\\\" element has \\\"([^\\\"]*)\\\"$\")\n\tpublic void assert_that_the_text_element_has(String arg1, String arg2) throws Throwable {\n\t\tString[] parts = arg1.split(\"=\");\n\t\tString selector=parts[1];\n\t\tString result = driver.findElement(By.cssSelector(selector)).getText();\n\t\tAssert.assertTrue(\"Text is not included\", result.contains(arg2));\n\t\tSystem.out.println(\"Assert \"+ result +\" contain the text : \"+arg2 );\n\t}", "private WebElement checkElementWithGivenText(String givenTextPar) {\n\t\tfinal WebElement table = SearchTest.driver.findElement(By.tagName(\"table\"));\n\t\tfinal List<WebElement> rows = table.findElements(By.tagName(\"tr\"));\n\t\tfinal Iterator<WebElement> i = rows.iterator();\n\t\twhile (i.hasNext()) {\n\t\t\tfinal WebElement row = i.next();\n\t\t\tfinal List<WebElement> columns = row.findElements(By.tagName(\"td\"));\n\t\t\tfinal Iterator<WebElement> j = columns.iterator();\n\t\t\twhile (j.hasNext()) {\n\t\t\t\tfinal WebElement column = j.next();\n\t\t\t\t// System.out.print(column.getText());\n\t\t\t\tif (column.getText().equalsIgnoreCase(givenTextPar)) {\n\t\t\t\t\treturn column;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\n\t}", "public static WebElement check_msgRecomEmagSubsToThisMagExists(Read_XLS xls, String sheetName, int rowNum, \r\n \t\tList<Boolean> testFail) throws Exception{\r\n \ttry{\r\n \t\tBoolean isMsgExists = driver.findElement(By.xpath(\"//*[@id='RecomEMagSubButton']\"\r\n \t\t\t\t+ \"//*[text()='You are subscribed to this magazine']\")).isDisplayed();\r\n \t\tAdd_Log.info(\"Is message 'You are subscribed to this magazine' available ::\" + isMsgExists);\r\n \t\t\r\n \t\tif(isMsgExists == true){\r\n \t\t\tSuiteUtility.WriteResultUtility(\r\n \t\t\t\t\txls, sheetName, Constant.COL_MSG_SUBS_TO_EMAG_EXISTS, rowNum, Constant.KEYWORD_PASS);\r\n \t\t}else{\r\n \t\t\tSuiteUtility.WriteResultUtility(\r\n \t\t\t\t\txls, sheetName, Constant.COL_MSG_SUBS_TO_EMAG_EXISTS, rowNum, Constant.KEYWORD_FAIL);\r\n \t\t\ttestFail.set(0, true);\r\n \t\t} \t\t\t\t\r\n \t}catch(Exception e){\r\n \t\tAdd_Log.error(\"\");\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }", "public T find(T element);", "protected Element getBodyElement(SoapMessage message) {\n try {\n XMLStreamReader xmlReader = message\n .getContent(XMLStreamReader.class);\n XMLStreamReader filteredReader = new PartialXMLStreamReader(\n xmlReader, message.getVersion().getBody());\n //ensure the whitespace is passed\n StaxUtils.toNextElement((DepthXMLStreamReader) filteredReader);\n Document doc = DOMUtils.createDocument();\n StaxUtils.readDocElements(doc, filteredReader, true);\n return doc.getDocumentElement();\n } catch (XMLStreamException e) {\n throw new Fault(e);\n }\n }", "public static MessageStatus getByName(String name) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tMessageStatus result = VALUES_ARRAY[i];\n\t\t\tif (result.getName().equals(name)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public Utente containUsername(String username) {\r\n \t\r\n \tfor(Utente ut: utenti) {\r\n \t\tString us=ut.getUsername();\r\n \t\tif(us.equals(username)) {\r\n \t\t\treturn ut;\r\n \t\t}\r\n \t}\r\n \t\r\n \treturn null;\r\n \t\r\n }", "public Node searchElement(Object el) {\n\t\n\t\tfor (Node elemento : this.set) {\n\t\t\tif(elemento.getElemento().equals(el)) {\n\t\t\t\treturn elemento;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "Element getElement(String id);", "public static void findElementById() {\n\t\tStartEvent startEvent = modelInstance.getModelElementById(\"startEvent\");\n\t\tSystem.out.println(startEvent.getName());\n\t}", "public interface SecurityMessages extends org.openelis.ui.messages.UIMessages {\n \n /**\n * Translated \"Description\".\n * \n * @return translated \"Description\"\n */\n @DefaultMessage(\"Description\")\n @Key(\"application.description\")\n String application_description();\n\n /**\n * Translated \"The system module {0} cannot be deleted as it has been added to one or more users\".\n * \n * @return translated \"The system module {0} cannot be deleted as it has been added to one or more users\"\n */\n @DefaultMessage(\"The system module {0} cannot be deleted as it has been added to one or more users\")\n @Key(\"application.moduleAssignedToUserException\")\n String application_moduleAssignedToUserException(String arg0);\n\n /**\n * Translated \"Name\".\n * \n * @return translated \"Name\"\n */\n @DefaultMessage(\"Name\")\n @Key(\"application.name\")\n String application_name();\n\n /**\n * Translated \"The section {0} cannot be deleted as it has been added to one or more users \".\n * \n * @return translated \"The section {0} cannot be deleted as it has been added to one or more users \"\n */\n @DefaultMessage(\"The section {0} cannot be deleted as it has been added to one or more users \")\n @Key(\"application.sectionAssignedToUserException\")\n String application_sectionAssignedToUserException(String arg0);\n\n /**\n * Translated \"Abort\".\n * \n * @return translated \"Abort\"\n */\n @DefaultMessage(\"Abort\")\n @Key(\"btn.abort\")\n String btn_abort();\n\n /**\n * Translated \"Add\".\n * \n * @return translated \"Add\"\n */\n @DefaultMessage(\"Add\")\n @Key(\"btn.add\")\n String btn_add();\n\n /**\n * Translated \"Cancel\".\n * \n * @return translated \"Cancel\"\n */\n @DefaultMessage(\"Cancel\")\n @Key(\"btn.cancel\")\n String btn_cancel();\n\n /**\n * Translated \"Commit\".\n * \n * @return translated \"Commit\"\n */\n @DefaultMessage(\"Commit\")\n @Key(\"btn.commit\")\n String btn_commit();\n\n /**\n * Translated \"Delete\".\n * \n * @return translated \"Delete\"\n */\n @DefaultMessage(\"Delete\")\n @Key(\"btn.delete\")\n String btn_delete();\n\n /**\n * Translated \"Duplicate\".\n * \n * @return translated \"Duplicate\"\n */\n @DefaultMessage(\"Duplicate\")\n @Key(\"btn.duplicateRecord\")\n String btn_duplicateRecord();\n\n /**\n * Translated \"Duplicate the current record\".\n * \n * @return translated \"Duplicate the current record\"\n */\n @DefaultMessage(\"Duplicate the current record\")\n @Key(\"btn.duplicateRecordDescription\")\n String btn_duplicateRecordDescription();\n\n /**\n * Translated \"Next\".\n * \n * @return translated \"Next\"\n */\n @DefaultMessage(\"Next\")\n @Key(\"btn.next\")\n String btn_next();\n\n /**\n * Translated \"OK\".\n * \n * @return translated \"OK\"\n */\n @DefaultMessage(\"OK\")\n @Key(\"btn.ok\")\n String btn_ok();\n\n /**\n * Translated \"Options\".\n * \n * @return translated \"Options\"\n */\n @DefaultMessage(\"Options\")\n @Key(\"btn.options\")\n String btn_options();\n\n /**\n * Translated \"Previous\".\n * \n * @return translated \"Previous\"\n */\n @DefaultMessage(\"Previous\")\n @Key(\"btn.previous\")\n String btn_previous();\n\n /**\n * Translated \"Query\".\n * \n * @return translated \"Query\"\n */\n @DefaultMessage(\"Query\")\n @Key(\"btn.query\")\n String btn_query();\n\n /**\n * Translated \"Update\".\n * \n * @return translated \"Update\"\n */\n @DefaultMessage(\"Update\")\n @Key(\"btn.update\")\n String btn_update();\n\n /**\n * Translated \"Applications\".\n * \n * @return translated \"Applications\"\n */\n @DefaultMessage(\"Applications\")\n @Key(\"ge.applications\")\n String ge_applications();\n\n /**\n * Translated \"Active\".\n * \n * @return translated \"Active\"\n */\n @DefaultMessage(\"Active\")\n @Key(\"gen.active\")\n String gen_active();\n\n /**\n * Translated \"Add aborted\".\n * \n * @return translated \"Add aborted\"\n */\n @DefaultMessage(\"Add aborted\")\n @Key(\"gen.addAborted\")\n String gen_addAborted();\n\n /**\n * Translated \"Add\".\n * \n * @return translated \"Add\"\n */\n @DefaultMessage(\"Add\")\n @Key(\"gen.addPerm\")\n String gen_addPerm();\n\n /**\n * Translated \"Add Row\".\n * \n * @return translated \"Add Row\"\n */\n @DefaultMessage(\"Add Row\")\n @Key(\"gen.addRow\")\n String gen_addRow();\n\n /**\n * Translated \"Adding...\".\n * \n * @return translated \"Adding...\"\n */\n @DefaultMessage(\"Adding...\")\n @Key(\"gen.adding\")\n String gen_adding();\n\n /**\n * Translated \"Adding...Complete\".\n * \n * @return translated \"Adding...Complete\"\n */\n @DefaultMessage(\"Adding...Complete\")\n @Key(\"gen.addingComplete\")\n String gen_addingComplete();\n\n /**\n * Translated \"Application\".\n * \n * @return translated \"Application\"\n */\n @DefaultMessage(\"Application\")\n @Key(\"gen.application\")\n String gen_application();\n\n /**\n * Translated \"Asn\".\n * \n * @return translated \"Asn\"\n */\n @DefaultMessage(\"Asn\")\n @Key(\"gen.assignPerm\")\n String gen_assignPerm();\n\n /**\n * Translated \"Authentication Failure\".\n * \n * @return translated \"Authentication Failure\"\n */\n @DefaultMessage(\"Authentication Failure\")\n @Key(\"gen.authFailure\")\n String gen_authFailure();\n\n /**\n * Translated \"Canceling changes ...\".\n * \n * @return translated \"Canceling changes ...\"\n */\n @DefaultMessage(\"Canceling changes ...\")\n @Key(\"gen.cancelChanges\")\n String gen_cancelChanges();\n\n /**\n * Translated \"Cncl\".\n * \n * @return translated \"Cncl\"\n */\n @DefaultMessage(\"Cncl\")\n @Key(\"gen.cancelPerm\")\n String gen_cancelPerm();\n\n /**\n * Translated \"Clause\".\n * \n * @return translated \"Clause\"\n */\n @DefaultMessage(\"Clause\")\n @Key(\"gen.clause\")\n String gen_clause();\n\n /**\n * Translated \"Cmp\".\n * \n * @return translated \"Cmp\"\n */\n @DefaultMessage(\"Cmp\")\n @Key(\"gen.completePerm\")\n String gen_completePerm();\n\n /**\n * Translated \"Please correct the errors indicated, then press Commit\".\n * \n * @return translated \"Please correct the errors indicated, then press Commit\"\n */\n @DefaultMessage(\"Please correct the errors indicated, then press Commit\")\n @Key(\"gen.correctErrors\")\n String gen_correctErrors();\n\n /**\n * Translated \"Delete Aborted\".\n * \n * @return translated \"Delete Aborted\"\n */\n @DefaultMessage(\"Delete Aborted\")\n @Key(\"gen.deleteAborted\")\n String gen_deleteAborted();\n\n /**\n * Translated \"Delete...Complete\".\n * \n * @return translated \"Delete...Complete\"\n */\n @DefaultMessage(\"Delete...Complete\")\n @Key(\"gen.deleteComplete\")\n String gen_deleteComplete();\n\n /**\n * Translated \"Pressing commit will delete the current record from the database\".\n * \n * @return translated \"Pressing commit will delete the current record from the database\"\n */\n @DefaultMessage(\"Pressing commit will delete the current record from the database\")\n @Key(\"gen.deleteMessage\")\n String gen_deleteMessage();\n\n /**\n * Translated \"Del\".\n * \n * @return translated \"Del\"\n */\n @DefaultMessage(\"Del\")\n @Key(\"gen.deletePerm\")\n String gen_deletePerm();\n\n /**\n * Translated \"Deleting...\".\n * \n * @return translated \"Deleting...\"\n */\n @DefaultMessage(\"Deleting...\")\n @Key(\"gen.deleting\")\n String gen_deleting();\n\n /**\n * Translated \"Description\".\n * \n * @return translated \"Description\"\n */\n @DefaultMessage(\"Description\")\n @Key(\"gen.description\")\n String gen_description();\n\n /**\n * Translated \"Enter fields to query by then press Commit\".\n * \n * @return translated \"Enter fields to query by then press Commit\"\n */\n @DefaultMessage(\"Enter fields to query by then press Commit\")\n @Key(\"gen.enterFieldsToQuery\")\n String gen_enterFieldsToQuery();\n\n /**\n * Translated \"Enter information in the fields, then press Commit.\".\n * \n * @return translated \"Enter information in the fields, then press Commit.\"\n */\n @DefaultMessage(\"Enter information in the fields, then press Commit.\")\n @Key(\"gen.enterInformationPressCommit\")\n String gen_enterInformationPressCommit();\n\n /**\n * Translated \"This record is locked by {0} until {1}\".\n * \n * @return translated \"This record is locked by {0} until {1}\"\n */\n @DefaultMessage(\"This record is locked by {0} until {1}\")\n @Key(\"gen.entityLockException\")\n String gen_entityLockException(String arg0, String arg1);\n\n /**\n * Translated \"Your Lock on this record has expired; Please abort and try again\".\n * \n * @return translated \"Your Lock on this record has expired; Please abort and try again\"\n */\n @DefaultMessage(\"Your Lock on this record has expired; Please abort and try again\")\n @Key(\"gen.expiredLockException\")\n String gen_expiredLockException();\n\n /**\n * Translated \"Error: Could not retrieve the record\".\n * \n * @return translated \"Error: Could not retrieve the record\"\n */\n @DefaultMessage(\"Error: Could not retrieve the record\")\n @Key(\"gen.fetchFailed\")\n String gen_fetchFailed();\n\n /**\n * Translated \"Fetching ...\".\n * \n * @return translated \"Fetching ...\"\n */\n @DefaultMessage(\"Fetching ...\")\n @Key(\"gen.fetching\")\n String gen_fetching();\n\n /**\n * Translated \"Field is required\".\n * \n * @return translated \"Field is required\"\n */\n @DefaultMessage(\"Field is required\")\n @Key(\"gen.fieldRequiredException\")\n String gen_fieldRequiredException();\n\n /**\n * Translated \"A record with this value already exists. Please enter a unique value for this field\".\n * \n * @return translated \"A record with this value already exists. Please enter a unique value for this field\"\n */\n @DefaultMessage(\"A record with this value already exists. Please enter a unique value for this field\")\n @Key(\"gen.fieldUniqueException\")\n String gen_fieldUniqueException();\n\n /**\n * Translated \"Please enter a unique value for this field\".\n * \n * @return translated \"Please enter a unique value for this field\"\n */\n @DefaultMessage(\"Please enter a unique value for this field\")\n @Key(\"gen.fieldUniqueOnlyException\")\n String gen_fieldUniqueOnlyException();\n\n /**\n * Translated \"Id:\".\n * \n * @return translated \"Id:\"\n */\n @DefaultMessage(\"Id:\")\n @Key(\"gen.id\")\n String gen_id();\n\n /**\n * Translated \"Locking record for Update...\".\n * \n * @return translated \"Locking record for Update...\"\n */\n @DefaultMessage(\"Locking record for Update...\")\n @Key(\"gen.lockForUpdate\")\n String gen_lockForUpdate();\n\n /**\n * Translated \"Login Name\".\n * \n * @return translated \"Login Name\"\n */\n @DefaultMessage(\"Login Name\")\n @Key(\"gen.loginName\")\n String gen_loginName();\n\n /**\n * Translated \"You do not have {0} permission in {1,number}\".\n * \n * @return translated \"You do not have {0} permission in {1,number}\"\n */\n @DefaultMessage(\"You do not have {0} permission in {1,number}\")\n @Key(\"gen.modulePermException\")\n String gen_modulePermException(String arg0, Integer arg1);\n\n /**\n * Translated \"Modules\".\n * \n * @return translated \"Modules\"\n */\n @DefaultMessage(\"Modules\")\n @Key(\"gen.modules\")\n String gen_modules();\n\n /**\n * Translated \"You must Commit or Abort changes first\".\n * \n * @return translated \"You must Commit or Abort changes first\"\n */\n @DefaultMessage(\"You must Commit or Abort changes first\")\n @Key(\"gen.mustCommitOrAbort\")\n String gen_mustCommitOrAbort();\n\n /**\n * Translated \"Name\".\n * \n * @return translated \"Name\"\n */\n @DefaultMessage(\"Name\")\n @Key(\"gen.name\")\n String gen_name();\n\n /**\n * Translated \"No more records in this direction\".\n * \n * @return translated \"No more records in this direction\"\n */\n @DefaultMessage(\"No more records in this direction\")\n @Key(\"gen.noMoreRecordInDir\")\n String gen_noMoreRecordInDir();\n\n /**\n * Translated \"No records found\".\n * \n * @return translated \"No records found\"\n */\n @DefaultMessage(\"No records found\")\n @Key(\"gen.noRecordsFound\")\n String gen_noRecordsFound();\n\n /**\n * Translated \"Password\".\n * \n * @return translated \"Password\"\n */\n @DefaultMessage(\"Password\")\n @Key(\"gen.password\")\n String gen_password();\n\n /**\n * Translated \"Query aborted\".\n * \n * @return translated \"Query aborted\"\n */\n @DefaultMessage(\"Query aborted\")\n @Key(\"gen.queryAborted\")\n String gen_queryAborted();\n\n /**\n * Translated \"Querying....\".\n * \n * @return translated \"Querying....\"\n */\n @DefaultMessage(\"Querying....\")\n @Key(\"gen.querying\")\n String gen_querying();\n\n /**\n * Translated \"Querying...Complete\".\n * \n * @return translated \"Querying...Complete\"\n */\n @DefaultMessage(\"Querying...Complete\")\n @Key(\"gen.queryingComplete\")\n String gen_queryingComplete();\n\n /**\n * Translated \"Rls\".\n * \n * @return translated \"Rls\"\n */\n @DefaultMessage(\"Rls\")\n @Key(\"gen.releasePerm\")\n String gen_releasePerm();\n\n /**\n * Translated \"Remove Row\".\n * \n * @return translated \"Remove Row\"\n */\n @DefaultMessage(\"Remove Row\")\n @Key(\"gen.removeRow\")\n String gen_removeRow();\n\n /**\n * Translated \"Section\".\n * \n * @return translated \"Section\"\n */\n @DefaultMessage(\"Section\")\n @Key(\"gen.section\")\n String gen_section();\n\n /**\n * Translated \"You do not have permission to {0} for section {1}\".\n * \n * @return translated \"You do not have permission to {0} for section {1}\"\n */\n @DefaultMessage(\"You do not have permission to {0} for section {1}\")\n @Key(\"gen.sectionPermException\")\n String gen_sectionPermException(String arg0, String arg1);\n\n /**\n * Translated \"Sections\".\n * \n * @return translated \"Sections\"\n */\n @DefaultMessage(\"Sections\")\n @Key(\"gen.sections\")\n String gen_sections();\n\n /**\n * Translated \"Select Application\".\n * \n * @return translated \"Select Application\"\n */\n @DefaultMessage(\"Select Application\")\n @Key(\"gen.selectApplication\")\n String gen_selectApplication();\n\n /**\n * Translated \"Sel\".\n * \n * @return translated \"Sel\"\n */\n @DefaultMessage(\"Sel\")\n @Key(\"gen.selectPerm\")\n String gen_selectPerm();\n\n /**\n * Translated \"\\\"Select\\\" permission must not be unchecked for a module\".\n * \n * @return translated \"\\\"Select\\\" permission must not be unchecked for a module\"\n */\n @DefaultMessage(\"\\\"Select\\\" permission must not be unchecked for a module\")\n @Key(\"gen.selectPermRequiredException\")\n String gen_selectPermRequiredException();\n\n /**\n * Translated \"Show Clause\".\n * \n * @return translated \"Show Clause\"\n */\n @DefaultMessage(\"Show Clause\")\n @Key(\"gen.showClause\")\n String gen_showClause();\n\n /**\n * Translated \"Sign In\".\n * \n * @return translated \"Sign In\"\n */\n @DefaultMessage(\"Sign In\")\n @Key(\"gen.signin\")\n String gen_signin();\n\n /**\n * Translated \"System User\".\n * \n * @return translated \"System User\"\n */\n @DefaultMessage(\"System User\")\n @Key(\"gen.systemUser\")\n String gen_systemUser();\n\n /**\n * Translated \"Template\".\n * \n * @return translated \"Template\"\n */\n @DefaultMessage(\"Template\")\n @Key(\"gen.template\")\n String gen_template();\n\n /**\n * Translated \"Templates\".\n * \n * @return translated \"Templates\"\n */\n @DefaultMessage(\"Templates\")\n @Key(\"gen.templates\")\n String gen_templates();\n\n /**\n * Translated \"Extend Time\".\n * \n * @return translated \"Extend Time\"\n */\n @DefaultMessage(\"Extend Time\")\n @Key(\"gen.timeoutExtendTime\")\n String gen_timeoutExtendTime();\n\n /**\n * Translated \"Timeout Warning\".\n * \n * @return translated \"Timeout Warning\"\n */\n @DefaultMessage(\"Timeout Warning\")\n @Key(\"gen.timeoutHeader\")\n String gen_timeoutHeader();\n\n /**\n * Translated \"Logout\".\n * \n * @return translated \"Logout\"\n */\n @DefaultMessage(\"Logout\")\n @Key(\"gen.timeoutLogout\")\n String gen_timeoutLogout();\n\n /**\n * Translated \"Your session is about to expire, do you want to\\nlogout or extend your session\".\n * \n * @return translated \"Your session is about to expire, do you want to\\nlogout or extend your session\"\n */\n @DefaultMessage(\"Your session is about to expire, do you want to\\nlogout or extend your session\")\n @Key(\"gen.timeoutWarning\")\n String gen_timeoutWarning();\n\n /**\n * Translated \"Update aborted\".\n * \n * @return translated \"Update aborted\"\n */\n @DefaultMessage(\"Update aborted\")\n @Key(\"gen.updateAborted\")\n String gen_updateAborted();\n\n /**\n * Translated \"Upd\".\n * \n * @return translated \"Upd\"\n */\n @DefaultMessage(\"Upd\")\n @Key(\"gen.updatePerm\")\n String gen_updatePerm();\n\n /**\n * Translated \"Updating...\".\n * \n * @return translated \"Updating...\"\n */\n @DefaultMessage(\"Updating...\")\n @Key(\"gen.updating\")\n String gen_updating();\n\n /**\n * Translated \"Updating...Complete\".\n * \n * @return translated \"Updating...Complete\"\n */\n @DefaultMessage(\"Updating...Complete\")\n @Key(\"gen.updatingComplete\")\n String gen_updatingComplete();\n\n /**\n * Translated \"Username\".\n * \n * @return translated \"Username\"\n */\n @DefaultMessage(\"Username\")\n @Key(\"gen.username\")\n String gen_username();\n\n /**\n * Translated \"Users\".\n * \n * @return translated \"Users\"\n */\n @DefaultMessage(\"Users\")\n @Key(\"gen.users\")\n String gen_users();\n\n /**\n * Translated \"View\".\n * \n * @return translated \"View\"\n */\n @DefaultMessage(\"View\")\n @Key(\"gen.viewPerm\")\n String gen_viewPerm();\n\n /**\n * Translated \"\\\"View\\\" permission must not be unchecked for a section\".\n * \n * @return translated \"\\\"View\\\" permission must not be unchecked for a section\"\n */\n @DefaultMessage(\"\\\"View\\\" permission must not be unchecked for a section\")\n @Key(\"gen.viewPermRequiredException\")\n String gen_viewPermRequiredException();\n\n /**\n * Translated \"Logout\".\n * \n * @return translated \"Logout\"\n */\n @DefaultMessage(\"Logout\")\n @Key(\"menu.logout\")\n String menu_logout();\n\n /**\n * Translated \"Exit the application.\".\n * \n * @return translated \"Exit the application.\"\n */\n @DefaultMessage(\"Exit the application.\")\n @Key(\"menu.logoutDescription\")\n String menu_logoutDescription();\n\n /**\n * Translated \"Permissions\".\n * \n * @return translated \"Permissions\"\n */\n @DefaultMessage(\"Permissions\")\n @Key(\"menu.permissions\")\n String menu_permissions();\n\n /**\n * Translated \"System\".\n * \n * @return translated \"System\"\n */\n @DefaultMessage(\"System\")\n @Key(\"menu.system\")\n String menu_system();\n\n /**\n * Translated \"Utilities\".\n * \n * @return translated \"Utilities\"\n */\n @DefaultMessage(\"Utilities\")\n @Key(\"menu.utilities\")\n String menu_utilities();\n\n /**\n * Translated \"Active\".\n * \n * @return translated \"Active\"\n */\n @DefaultMessage(\"Active\")\n @Key(\"systemUser.active\")\n String systemUser_active();\n\n /**\n * Translated \"This action will remove all the permissions for this user and make it inactive. The user itself will not be removed.\".\n * \n * @return translated \"This action will remove all the permissions for this user and make it inactive. The user itself will not be removed.\"\n */\n @DefaultMessage(\"This action will remove all the permissions for this user and make it inactive. The user itself will not be removed.\")\n @Key(\"systemUser.deleteUserMessage\")\n String systemUser_deleteUserMessage();\n\n /**\n * Translated \"Employee\".\n * \n * @return translated \"Employee\"\n */\n @DefaultMessage(\"Employee\")\n @Key(\"systemUser.employee\")\n String systemUser_employee();\n\n /**\n * Translated \"External ID\".\n * \n * @return translated \"External ID\"\n */\n @DefaultMessage(\"External ID\")\n @Key(\"systemUser.externalId\")\n String systemUser_externalId();\n\n /**\n * Translated \"First Name\".\n * \n * @return translated \"First Name\"\n */\n @DefaultMessage(\"First Name\")\n @Key(\"systemUser.firstName\")\n String systemUser_firstName();\n\n /**\n * Translated \"Initials\".\n * \n * @return translated \"Initials\"\n */\n @DefaultMessage(\"Initials\")\n @Key(\"systemUser.initials\")\n String systemUser_initials();\n\n /**\n * Translated \"Last Name\".\n * \n * @return translated \"Last Name\"\n */\n @DefaultMessage(\"Last Name\")\n @Key(\"systemUser.lastName\")\n String systemUser_lastName();\n\n /**\n * Translated \"System Module already added to the user\".\n * \n * @return translated \"System Module already added to the user\"\n */\n @DefaultMessage(\"System Module already added to the user\")\n @Key(\"systemUser.moduleAddedToUser\")\n String systemUser_moduleAddedToUser();\n\n /**\n * Translated \"Section already added to the user\".\n * \n * @return translated \"Section already added to the user\"\n */\n @DefaultMessage(\"Section already added to the user\")\n @Key(\"systemUser.sectionAddedToUser\")\n String systemUser_sectionAddedToUser();\n\n /**\n * Translated \"Since this user has no permissions and is inactive, deletion is invalid\".\n * \n * @return translated \"Since this user has no permissions and is inactive, deletion is invalid\"\n */\n @DefaultMessage(\"Since this user has no permissions and is inactive, deletion is invalid\")\n @Key(\"systemUser.userDeleteInvalid\")\n String systemUser_userDeleteInvalid();\n\n /**\n * Translated \"Since this user has no permissions, duplication is invalid\".\n * \n * @return translated \"Since this user has no permissions, duplication is invalid\"\n */\n @DefaultMessage(\"Since this user has no permissions, duplication is invalid\")\n @Key(\"systemUser.userDuplicateInvalid\")\n String systemUser_userDuplicateInvalid();\n\n /**\n * Translated \"System Module already added to the template\".\n * \n * @return translated \"System Module already added to the template\"\n */\n @DefaultMessage(\"System Module already added to the template\")\n @Key(\"template.moduleAddedToTemplate\")\n String template_moduleAddedToTemplate();\n\n /**\n * Translated \"Template Name\".\n * \n * @return translated \"Template Name\"\n */\n @DefaultMessage(\"Template Name\")\n @Key(\"template.name\")\n String template_name();\n\n /**\n * Translated \"Section already added to the template\".\n * \n * @return translated \"Section already added to the template\"\n */\n @DefaultMessage(\"Section already added to the template\")\n @Key(\"template.sectionAddedToTemplate\")\n String template_sectionAddedToTemplate();\n}", "Elem getQualifiedElem();", "private Item getIncludedItem(Element itemElement, ArrayList<Item> items) {\n Item include = null;\n for (int i = 0; i <= items.size() - 1; i++) {\n if (items.get(i).getName()\n .equals(itemElement.getElementsByTagName(\"name\").item(0).getTextContent())) {\n include = items.get(i);\n }\n }\n return include;\n }", "public WebElement findElement(By locator) {\n try {\n WebElement element = getDriver().findElement(locator);\n return element;\n } catch (NoSuchElementException e) {\n error(\"Exception Occurred in while finding element with definition :: \" + locator);\n error(Throwables.getStackTraceAsString(e));\n throw new NoSuchElementException(e.getMessage());\n }\n }", "public boolean isElementPresent(WebElement elementName, int timeout){\n //https://github.com/appium/java-client/issues/617\n\t/*try{\n\t WebDriverWait wait = new WebDriverWait(getDriver(), timeout);\n\t wait.until(ExpectedConditions.visibilityOf(elementName));\n\t return true;\n\t}catch(Exception e){\n\t return false;\n\t}*/\n try{\n int counter = 0;\n while(counter < timeout){\n Thread.sleep(1000);\n counter++;\n try{\n if(elementName.isDisplayed()){\n //if(ExpectedConditions.visibilityOf(elementName) !=null ){\n return true;\n }else{\n continue;\n }\n }catch(Exception e){\n continue;\n }\n }\n System.out.println(\"ELEMENT NOT FOUND - \" + elementName + \" AFTER \" + timeout );\n return false;\n }catch(Exception e){\n return false;\n }\n }", "@org.junit.Test\n public void compElemBadName1() {\n final XQuery query = new XQuery(\n \"element {\\\"xmlns:error\\\"} {}\",\n ctx);\n try {\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n error(\"XQDY0096\")\n );\n }", "@Then(\"User validates if {string} exists in response\")\n\tpublic void user_validates_if_exists_in_response(String element) {\n\t\tassertTrue(stringResponse.contains(element));\n\t\n\t}" ]
[ "0.5976603", "0.5681527", "0.5665498", "0.55974513", "0.54216254", "0.5348988", "0.5339362", "0.5324635", "0.53098714", "0.52564305", "0.52548736", "0.5241162", "0.5223718", "0.5218053", "0.517179", "0.5169295", "0.5163711", "0.5154455", "0.5102572", "0.5091957", "0.50840783", "0.5049874", "0.50483376", "0.50396115", "0.5022245", "0.5014014", "0.49995777", "0.4977348", "0.49734196", "0.49715856", "0.49643156", "0.49454713", "0.49401945", "0.4930906", "0.4921577", "0.49108118", "0.49036792", "0.49028742", "0.48972702", "0.48914576", "0.48891383", "0.48831987", "0.48823372", "0.48786262", "0.48773682", "0.48766357", "0.48759764", "0.48745474", "0.48686203", "0.485286", "0.48508137", "0.48292586", "0.48236245", "0.48117673", "0.48045486", "0.480051", "0.4794234", "0.47941267", "0.47934708", "0.47926658", "0.47891644", "0.47871268", "0.4782553", "0.47823158", "0.47682843", "0.47641426", "0.47641426", "0.47641426", "0.47641426", "0.47641426", "0.47641426", "0.47641426", "0.47641426", "0.47629917", "0.47618577", "0.4761282", "0.47604814", "0.4757003", "0.47569078", "0.4756104", "0.47541144", "0.4750015", "0.47466606", "0.47460175", "0.47417706", "0.47343665", "0.4732748", "0.47326702", "0.47165057", "0.47093686", "0.47038597", "0.47003296", "0.46927527", "0.4691551", "0.4690437", "0.4687908", "0.46746215", "0.46732605", "0.4671371", "0.46630073" ]
0.5872384
1
This method returns a properly formatted string that describes the range and inclusive/exclusive properties of each end of the range.
protected static String expectedRangeString(Object minValue, boolean minInclusive, Object maxValue, boolean maxInclusive) { // A means for a return value String retVal; // Start with the proper symbol for the lower bound if (minInclusive) { retVal = "["; } else { retVal = "("; } // Add in the minimum and maximum values retVal += minValue + " .. " + maxValue; // End with the proper symbol for the upper bound if (maxInclusive) { retVal += "]"; } else { retVal += ")"; } // Return the formatted string return retVal; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public String toString() {\r\n return \"Range [\" + \"min=\" + min + \", max=\" + max + \"]\";\r\n }", "public String toString() {\n/* 387 */ if (this.toString == null) {\n/* 388 */ StrBuilder buf = new StrBuilder(32);\n/* 389 */ buf.append(\"Range[\");\n/* 390 */ buf.append(this.min);\n/* 391 */ buf.append(',');\n/* 392 */ buf.append(this.max);\n/* 393 */ buf.append(']');\n/* 394 */ this.toString = buf.toString();\n/* */ } \n/* 396 */ return this.toString;\n/* */ }", "@Override\r\n\tpublic String toString()\r\n\t{\r\n\t\treturn this.getIndentation() + \"(in-subrange \" + this.getPosition1().getCoordX() + \", \" + this.getPosition1().getCoordY() + \", \"\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t + this.getPosition2().getCoordX() + \", \" + this.getPosition2().getCoordY() + \")\";\r\n\t}", "private String useRangeFormat(Unit units, int lowerBound, int upperBound) {\n return lowerBound + \" to \" + upperBound + getUnits(units, upperBound);\n }", "String getEndRange();", "public String getRange() {\n return this.range;\n }", "@Override\r\n public String toString() \r\n {\n return \"[\" + getStart() + \", \" + getEnd() + \"]\";\r\n }", "public java.lang.String getRange() {\n\t\treturn _range;\n\t}", "@Override\n\t\tpublic String toString() {\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tif (existStart)\n\t\t\t\tsb.append(getAbsStart());\n\t\t\tsb.append('-');\n\t\t\tif (existEnd)\n\t\t\t\tsb.append(getAbsEnd());\n\t\t\treturn sb.toString();\n\t\t}", "java.lang.String getDestRange();", "String getBeginRange();", "String getRoleRangeRaw();", "public StringBuffer rangeToString(Key low, Key high)\n {\n \t\n \tStringBuffer str=new StringBuffer();\n \t\n \tint l=(int) low;\n \tint h=(int) high;\n \tfor(int ch=l;ch<=h;ch++)\n \tstr.append(ch);\n \treturn str;\n \t \t\n }", "public String toShEx() {\n return String.format(\"<%s> .{%s, %s} ,\", properties.get(0), minBound, maxBound);\n }", "private String getChargeRangeAsString() {\r\n\r\n String charges = \"\";\r\n\r\n for (int i = minCharge; i <= maxCharge; i++) {\r\n\r\n if (!charges.isEmpty()) {\r\n charges += \",\";\r\n }\r\n\r\n charges += i + \"+\";\r\n\r\n }\r\n\r\n return charges;\r\n }", "public String toString() {\n\t\tString result = \"\";\n\t\t\n\t\tif (_minimum == _maximum) {\n\t\t\tresult = Integer.toString(_maximum);\n\t\t} else {\n\t\t\tresult = \"(\" + Integer.toString(_minimum) + \"-\" + Integer.toString(_maximum) + \")\";\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "public abstract String format(double lowerBound, double upperBound);", "public String getRange() {\n if (predictionAmount < 0.1)\n return \"little to none\";\n\n String description = convertFeetToInches(alert.getDescription());\n\n // Get the bounds\n List<Integer> range = getClosestRange(getRanges(description), predictionAmount);\n double margin = getMargin(range);\n int lowerBound = (int) Math.round(predictionAmount - margin);\n int upperBound = (int) Math.round(predictionAmount + margin);\n\n // Determine the unit\n Unit units = Unit.INCHES;\n if (shouldUseFeet(lowerBound, upperBound)) {\n // Convert inches to feet\n lowerBound = toFeet(lowerBound);\n upperBound = toFeet(upperBound);\n units = Unit.FEET;\n }\n\n return getFinalText(units, lowerBound, upperBound);\n }", "@Override\n\tpublic int getRange() {\n\t\treturn range;\n\t}", "private String getRange(SimpleSetting simpleSetting) {\r\n\t\tString visibleRange = NOT_AVAILABLE;\r\n\t\tTYPE settingType = simpleSetting.getType();\r\n\r\n\t\tif (TYPE.INT.equals(settingType)) {\r\n\t\t\tMinInclusive minInclusive = simpleSetting.getMinInclusive();\r\n\t\t\tMaxInclusive maxInclusive = simpleSetting.getMaxInclusive();\r\n\t\t\tMinExclusive minExclusive = simpleSetting.getMinExclusive();\r\n\t\t\tMaxExclusive maxExclusive = simpleSetting.getMaxExclusive();\r\n\r\n\t\t\tBigDecimal min = new BigDecimal(Integer.MIN_VALUE);\r\n\t\t\tBigDecimal max = new BigDecimal(Integer.MAX_VALUE);\r\n\t\t\tString minMark = EMPTY;\r\n\t\t\tString maxMark = EMPTY;\r\n\r\n\t\t\tif (minExclusive != null) {\r\n\t\t\t\tmin = (BigDecimal) minExclusive.getValue();\r\n\t\t\t\tminMark = \"(\";\r\n\t\t\t}\r\n\r\n\t\t\tif (minInclusive != null) {\r\n\t\t\t\tmin = (BigDecimal) minInclusive.getValue();\r\n\t\t\t\tif (minMark.contains(\"(\"))\r\n\t\t\t\t\tminMark.replace(\"(\", \"[\");\r\n\t\t\t\telse\r\n\t\t\t\t\tminMark = \"[\";\r\n\t\t\t}\r\n\r\n\t\t\tif (maxExclusive != null) {\r\n\t\t\t\tmax = (BigDecimal) maxExclusive.getValue();\r\n\t\t\t\tmaxMark = \")\";\r\n\t\t\t}\r\n\r\n\t\t\tif (maxInclusive != null) {\r\n\t\t\t\tmax = (BigDecimal) maxInclusive.getValue();\r\n\t\t\t\tif (maxMark.contains(\")\"))\r\n\t\t\t\t\tmaxMark.replace(\")\", \"]\");\r\n\t\t\t\telse\r\n\t\t\t\t\tmaxMark = \"]\";\r\n\t\t\t}\r\n\r\n\t\t\tif (!EMPTY.equals(minMark) || !EMPTY.equals(maxMark)) {\r\n\t\t\t\tif (Integer.MIN_VALUE == min.intValue()\r\n\t\t\t\t\t\t&& Integer.MAX_VALUE != max.intValue())\r\n\t\t\t\t\tvisibleRange = \"(-\" + INFINITY + \"; \" + max + maxMark;\r\n\r\n\t\t\t\tif (Integer.MIN_VALUE != min.intValue()\r\n\t\t\t\t\t\t&& Integer.MAX_VALUE == max.intValue())\r\n\t\t\t\t\tvisibleRange = minMark + min + \"; \" + INFINITY + \")\";\r\n\r\n\t\t\t\tif (Integer.MIN_VALUE != min.intValue()\r\n\t\t\t\t\t\t&& Integer.MAX_VALUE != max.intValue())\r\n\t\t\t\t\tvisibleRange = minMark + min + \"; \" + max + maxMark;\r\n\t\t\t}\r\n\r\n\t\t\treturn visibleRange;\r\n\t\t}\r\n\r\n\t\tif (TYPE.REAL.equals(settingType)) {\r\n\t\t\tMinInclusive minInclusive = simpleSetting.getMinInclusive();\r\n\t\t\tMaxInclusive maxInclusive = simpleSetting.getMaxInclusive();\r\n\t\t\tMinExclusive minExclusive = simpleSetting.getMinExclusive();\r\n\t\t\tMaxExclusive maxExclusive = simpleSetting.getMaxExclusive();\r\n\r\n\t\t\tBigDecimal min = new BigDecimal(Long.MIN_VALUE);\r\n\t\t\tBigDecimal max = new BigDecimal(Long.MAX_VALUE);\r\n\t\t\tString minMark = EMPTY;\r\n\t\t\tString maxMark = EMPTY;\r\n\r\n\t\t\tif (minExclusive != null) {\r\n\t\t\t\tmin = (BigDecimal) minExclusive.getValue();\r\n\t\t\t\tminMark = \"(\";\r\n\t\t\t}\r\n\r\n\t\t\tif (minInclusive != null) {\r\n\t\t\t\tmin = (BigDecimal) minInclusive.getValue();\r\n\t\t\t\tif (minMark.contains(\"(\"))\r\n\t\t\t\t\tminMark.replace(\"(\", \"[\");\r\n\t\t\t\telse\r\n\t\t\t\t\tminMark = \"[\";\r\n\t\t\t}\r\n\r\n\t\t\tif (maxExclusive != null) {\r\n\t\t\t\tmax = (BigDecimal) maxExclusive.getValue();\r\n\t\t\t\tmaxMark = \")\";\r\n\t\t\t}\r\n\r\n\t\t\tif (maxInclusive != null) {\r\n\t\t\t\tmax = (BigDecimal) maxInclusive.getValue();\r\n\t\t\t\tif (maxMark.contains(\")\"))\r\n\t\t\t\t\tmaxMark.replace(\")\", \"]\");\r\n\t\t\t\telse\r\n\t\t\t\t\tmaxMark = \"]\";\r\n\t\t\t}\r\n\r\n\t\t\tif (!EMPTY.equals(minMark) || !EMPTY.equals(maxMark)) {\r\n\t\t\t\tif (Long.MIN_VALUE == min.longValue()\r\n\t\t\t\t\t\t&& Long.MAX_VALUE != max.longValue())\r\n\t\t\t\t\tvisibleRange = \"(-\" + INFINITY + \"; \" + max + maxMark;\r\n\r\n\t\t\t\tif (Long.MIN_VALUE != min.longValue()\r\n\t\t\t\t\t\t&& Long.MAX_VALUE == max.longValue())\r\n\t\t\t\t\tvisibleRange = minMark + min + \"; \" + INFINITY + \")\";\r\n\r\n\t\t\t\tif (Long.MIN_VALUE != min.longValue()\r\n\t\t\t\t\t\t&& Long.MAX_VALUE != max.longValue())\r\n\t\t\t\t\tvisibleRange = minMark + min + \"; \" + max + maxMark;\r\n\t\t\t}\r\n\r\n\t\t\treturn visibleRange;\r\n\t\t}\r\n\r\n\t\tif (TYPE.DATE.equals(settingType) || TYPE.DATE_TIME.equals(settingType)\r\n\t\t\t\t|| TYPE.TIME.equals(settingType)) {\r\n\t\t\tMinInclusive minInclusive = simpleSetting.getMinInclusive();\r\n\t\t\tMaxInclusive maxInclusive = simpleSetting.getMaxInclusive();\r\n\t\t\tMinExclusive minExclusive = simpleSetting.getMinExclusive();\r\n\t\t\tMaxExclusive maxExclusive = simpleSetting.getMaxExclusive();\r\n\t\t\tXMLCalendar min = null;\r\n\t\t\tXMLCalendar max = null;\r\n\r\n\t\t\tif (TYPE.DATE.equals(settingType)) {\r\n\t\t\t\tmin = new XMLCalendar(\"1970-01-01\", XMLCalendar.DATE);\r\n\t\t\t\tmax = new XMLCalendar(\"2099-12-31\", XMLCalendar.DATE);\r\n\t\t\t} else if (TYPE.DATE_TIME.equals(settingType)) {\r\n\t\t\t\tmin = new XMLCalendar(\"1970-01-01T00:00:00Z\",\r\n\t\t\t\t\t\tXMLCalendar.DATETIME);\r\n\t\t\t\tmax = new XMLCalendar(\"2099-12-31T23:59:59Z\",\r\n\t\t\t\t\t\tXMLCalendar.DATETIME);\r\n\t\t\t} else if (TYPE.TIME.equals(settingType)) {\r\n\t\t\t\tmin = new XMLCalendar(\"00:00:00+00:00\", XMLCalendar.TIME);\r\n\t\t\t\tmax = new XMLCalendar(\"23:59:59+00:00\", XMLCalendar.TIME);\r\n\t\t\t}\r\n\r\n\t\t\tXMLCalendar minValue = min;\r\n\t\t\tXMLCalendar maxValue = max;\r\n\r\n\t\t\tString minMark = EMPTY;\r\n\t\t\tString maxMark = EMPTY;\r\n\r\n\t\t\tif (minExclusive != null) {\r\n\t\t\t\tmin = (XMLCalendar) minExclusive.getValue();\r\n\t\t\t\tminMark = \"(\";\r\n\t\t\t}\r\n\r\n\t\t\tif (minInclusive != null) {\r\n\t\t\t\tmin = (XMLCalendar) minInclusive.getValue();\r\n\t\t\t\tif (minMark.contains(\"(\"))\r\n\t\t\t\t\tminMark.replace(\"(\", \"[\");\r\n\t\t\t\telse\r\n\t\t\t\t\tminMark = \"[\";\r\n\t\t\t}\r\n\r\n\t\t\tif (maxExclusive != null) {\r\n\t\t\t\tmax = (XMLCalendar) maxExclusive.getValue();\r\n\t\t\t\tmaxMark = \")\";\r\n\t\t\t}\r\n\r\n\t\t\tif (maxInclusive != null) {\r\n\t\t\t\tmax = (XMLCalendar) maxInclusive.getValue();\r\n\t\t\t\tif (maxMark.contains(\")\"))\r\n\t\t\t\t\tmaxMark.replace(\")\", \"]\");\r\n\t\t\t\telse\r\n\t\t\t\t\tmaxMark = \"]\";\r\n\t\t\t}\r\n\r\n\t\t\tif (!EMPTY.equals(minMark) || !EMPTY.equals(maxMark)) {\r\n\t\t\t\tif (minValue.equals(min) && !maxValue.equals(max))\r\n\t\t\t\t\tvisibleRange = \"(-\" + INFINITY + \"; \" + max + maxMark;\r\n\r\n\t\t\t\tif (!minValue.equals(min) && maxValue.equals(max))\r\n\t\t\t\t\tvisibleRange = minMark + min + \"; \" + INFINITY + \")\";\r\n\r\n\t\t\t\tif (!minValue.equals(min) && !maxValue.equals(max))\r\n\t\t\t\t\tvisibleRange = minMark + min + \"; \" + max + maxMark;\r\n\t\t\t}\r\n\r\n\t\t\treturn visibleRange;\r\n\t\t}\r\n\r\n\t\tif (TYPE.DURATION.equals(settingType)) {\r\n\t\t\tMinInclusive minInclusive = simpleSetting.getMinInclusive();\r\n\t\t\tMaxInclusive maxInclusive = simpleSetting.getMaxInclusive();\r\n\t\t\tMinExclusive minExclusive = simpleSetting.getMinExclusive();\r\n\t\t\tMaxExclusive maxExclusive = simpleSetting.getMaxExclusive();\r\n\t\t\tXMLDuration min = null;\r\n\t\t\tXMLDuration max = null;\r\n\r\n\t\t\tXMLDuration minValue = min;\r\n\t\t\tXMLDuration maxValue = max;\r\n\r\n\t\t\tString minMark = EMPTY;\r\n\t\t\tString maxMark = EMPTY;\r\n\r\n\t\t\tif (minExclusive != null) {\r\n\t\t\t\tmin = (XMLDuration) minExclusive.getValue();\r\n\t\t\t\tminMark = \"(\";\r\n\t\t\t}\r\n\r\n\t\t\tif (minInclusive != null) {\r\n\t\t\t\tmin = (XMLDuration) minInclusive.getValue();\r\n\t\t\t\tif (minMark.contains(\"(\"))\r\n\t\t\t\t\tminMark.replace(\"(\", \"[\");\r\n\t\t\t\telse\r\n\t\t\t\t\tminMark = \"[\";\r\n\t\t\t}\r\n\r\n\t\t\tif (maxExclusive != null) {\r\n\t\t\t\tmax = (XMLDuration) maxExclusive.getValue();\r\n\t\t\t\tmaxMark = \")\";\r\n\t\t\t}\r\n\r\n\t\t\tif (maxInclusive != null) {\r\n\t\t\t\tmax = (XMLDuration) maxInclusive.getValue();\r\n\t\t\t\tif (maxMark.contains(\")\"))\r\n\t\t\t\t\tmaxMark.replace(\")\", \"]\");\r\n\t\t\t\telse\r\n\t\t\t\t\tmaxMark = \"]\";\r\n\t\t\t}\r\n\r\n\t\t\tif (!EMPTY.equals(minMark) || !EMPTY.equals(maxMark)) {\r\n\t\t\t\tif (minValue == min && maxValue != max)\r\n\r\n\t\t\t\t\tvisibleRange = \"max \" + getParsedString(max);\r\n\t\t\t\t// visibleRange = \"(-\" + INFINITY + \"; \" + max + maxMark;\r\n\r\n\t\t\t\tif (minValue != min && maxValue == max)\r\n\t\t\t\t\tvisibleRange = \"min \" + getParsedString(min);\r\n\r\n\t\t\t\t// visibleRange = minMark + min + \"; \" + INFINITY + \")\";\r\n\r\n\t\t\t\tif (minValue != min && maxValue != max)\r\n\t\t\t\t\tvisibleRange = \"from \" + getParsedString(min) + \"\\nto \"\r\n\t\t\t\t\t\t\t+ getParsedString(max);\r\n\t\t\t\t// visibleRange = minMark + min + \"; \" + max + maxMark;\r\n\t\t\t}\r\n\r\n\t\t\treturn visibleRange;\r\n\t\t}\r\n\r\n\t\treturn visibleRange;\r\n\t}", "@Override\r\n\tpublic String getActivity_range() {\n\t\treturn super.getActivity_range();\r\n\t}", "public String toString()\n\t{\n\t\tString result = \"Highlighted region \"+getMinIndex()+\"-\"+getMaxIndex();\n\t\treturn result;\n\t}", "@Override\n public String toString() {\n StringBuilder builder = new StringBuilder();\n builder.append(super.toString());\n builder.append(\",end=\" + end.toString());\n\n return builder.toString();\n }", "public AddressInfo getRange() {\r\n return range;\r\n }", "public String toString() {\n\t\treturn getRange() + \" \" + getBaseClass() + \" WHERE \" + super.toString();\n\t}", "private String range(double and_load_factor) {\n\t\tStringBuilder s = new StringBuilder();\n\n\t\t// begin query construction (range query is always an OR)\n\t\ts.append(\"[r,|,\");\n\n\t\t// choose number of attributes to involve in the query (use zipf(num_attribute))\n\t\tint attr_id = this.zipf_rng_att.next();\n\n\t\t//a range query from [bin_0, ..., bin_high]\n\t\tint first_bin = -1;\n\t\tint second_bin = -1;\n\t\twhile (first_bin == second_bin) {\n\t\t\tfirst_bin = this.rank_bin_map[attr_id][zipf_rng_bin.next()];\n\t\t\tsecond_bin = this.rank_bin_map[attr_id][zipf_rng_bin.next()];;\n\t\t}\n\t\tfirst_bin += (attr_id) * this.cardinality;\n\t\tsecond_bin += (attr_id) * this.cardinality;\n\n\t\tif (first_bin > second_bin) {\n\t\t\ts.append(second_bin + \",\" + first_bin + \"]\");\n\t\t}\n\t\telse {\n\t\t\ts.append(first_bin + \",\" + second_bin + \"]\");\n\t\t}\n\n\n\n\t\t//update stats\n\t\tthis.num_bins += (second_bin - first_bin + 1);\n\t\tthis.num_or_ops += (second_bin - first_bin);\n\n\t\t//update stats\n\t\tthis.num_range_queries++;\n\t\tthis.num_attributes++;\n\t\treturn s.toString();\n\t}", "VocNoun getRange();", "private String getFinalText(Unit units, int lowerBound, int upperBound) {\n if (shouldUseUpToFormat(lowerBound)) return useUpToFormat(units, upperBound);\n return useRangeFormat(units, lowerBound, upperBound);\n }", "public double getRange(){\n\t\treturn range;\n\t}", "public int getRange()\n\t{\n\t\treturn Range;\n\t}", "@Override public String toString() {\n return String.format(\n \"Rectangle with bottom left corner at (%d, %d) and top \" +\n \"right corner at (%d, %d)\", this.x1, this.y1, this.x2, this.y2);\n }", "public String toString() {\n\t\tif (label1 == null) return \"(\" + end + \")\";\n\t\tif (label2 == null) return \"(\" + label1 + \",\" + end + \")\";\n\t\treturn \"(\" + label1 + \",\" + label2 + \",\" + end + \")\";\n\t}", "public String toString()\n {\n StringBuffer sb = new StringBuffer(\"DoubleBoundedRangeModel[value=\"); //$NON-NLS-1$\n sb.append(\n Double.valueOf((double) getValue() / (double) multiplier).toString());\n sb.append(\", extent=\"); //$NON-NLS-1$\n sb.append(Double.valueOf(dblExtent).toString());\n sb.append(\", minimum=\"); //$NON-NLS-1$\n sb.append(Double.valueOf(dblMinimum).toString());\n sb.append(\", maximum=\"); //$NON-NLS-1$\n sb.append(Double.valueOf(dblMaximum).toString());\n sb.append(\", precision=\"); //$NON-NLS-1$\n sb.append(Integer.valueOf(precision).toString());\n sb.append(\", multiplier=\"); //$NON-NLS-1$\n sb.append(Integer.valueOf(multiplier).toString());\n sb.append(\", adj=\"); //$NON-NLS-1$\n sb.append(Boolean.valueOf(getValueIsAdjusting()).toString());\n sb.append(\"]\"); //$NON-NLS-1$\n\n return sb.toString();\n }", "void calculateRange() {\n //TODO: See Rules\n }", "private static String _formatDateRange(final Range<Date> dateRange,\r\n \t\t\t\t\t\t\t\t\t final String dateFormat) {\r\n \tString dateRangeFormatted = null;\r\n \tLocalDate startLocalDate = new LocalDate(dateRange.getLowerBound());\r\n \tLocalDate endLocalDate = new LocalDate(dateRange.getUpperBound());\r\n \tif (startLocalDate.isEqual(endLocalDate)) {\r\n \t\tdateRangeFormatted = Strings.customized(\"{}\",\r\n\t \t\t\t\t\t\t\t \t\t\t\tDates.format(dateRange.getLowerBound(),dateFormat));\r\n \t} else {\r\n\t \tdateRangeFormatted = Strings.customized(\"{} - {}\",\r\n\t \t\t\t\t\t\t\t \t\t\t\tDates.format(dateRange.getLowerBound(),dateFormat),Dates.format(dateRange.getUpperBound(),dateFormat));\r\n \t}\r\n \treturn dateRangeFormatted;\r\n }", "private void addRangeIntegers() {\r\n ent_2_i.put(\"< 0\", -1); ent_2_i.put(\"== 0\", 0); ent_2_i.put(\"== 1\", 1); ent_2_i.put(\"< 10\", 10);\r\n ent_2_i.put(\"< 100\", 100); ent_2_i.put(\"< 1K\", 1000); ent_2_i.put(\"< 10K\", 10000); ent_2_i.put(\"< 100K\", 100000);\r\n ent_2_i.put(\"> 100K\", 1000000);\r\n }", "@Override\n public void visitRange( int start, int end )\n {\n if ( end <= Character.MAX_VALUE )\n {\n codePoint( output, start );\n output.append( '-' );\n codePoint( output, end );\n }\n else if ( start <= Character.MAX_VALUE )\n {\n codePoint( output, start );\n output.append( '-' );\n // truncate the range\n codePoint( output, Character.MAX_VALUE );\n }\n // just skip larger values\n }", "public String toString() {\n return \"(\" + From + \",\" + To + \")\";\n }", "public boolean overlapsRange(Range range) {\n/* 334 */ if (range == null) {\n/* 335 */ return false;\n/* */ }\n/* 337 */ return (range.containsLong(this.min) || range.containsLong(this.max) || containsLong(range.getMinimumLong()));\n/* */ }", "String toStringEndValues();", "int getRange();", "public List<String> summaryRanges(int[] nums) {\n List<String> ret = new ArrayList<>();\n int n = nums.length;\n for (int i = 1, j = 0; i <= n; i++) {\n if (i == n || nums[i - 1] != nums[i] - 1) {\n ret.add(j == i - 1 ? nums[j] + \"\" : nums[j] + \"->\" + nums[i - 1]);\n j = i;\n }\n }\n return ret;\n }", "private String generateRangeURL(Integer instanceID, Integer startRange, Integer endRange) {\n\t\treturn \"http://\" + databaseInstances[instanceID] + \"/range?start_range=\"\n\t\t\t\t+ Integer.toString(startRange) + \"&end_range=\" + Integer.toString(endRange);\n\t}", "public int getRange() {\n return mRange;\n }", "public String getGradeRange() {\n\t\treturn this.gradeRange;\n\t}", "String getPortRange();", "public final CQLParser.rangeFunction_return rangeFunction() throws RecognitionException {\n CQLParser.rangeFunction_return retval = new CQLParser.rangeFunction_return();\n retval.start = input.LT(1);\n\n Object root_0 = null;\n\n Token openType=null;\n Token closeType=null;\n Token RANGE148=null;\n Token char_literal149=null;\n CQLParser.expression_return e = null;\n\n CQLParser.expression_return rangeStart = null;\n\n CQLParser.expression_return rangeEnd = null;\n\n\n Object openType_tree=null;\n Object closeType_tree=null;\n Object RANGE148_tree=null;\n Object char_literal149_tree=null;\n RewriteRuleTokenStream stream_116=new RewriteRuleTokenStream(adaptor,\"token 116\");\n RewriteRuleTokenStream stream_117=new RewriteRuleTokenStream(adaptor,\"token 117\");\n RewriteRuleTokenStream stream_114=new RewriteRuleTokenStream(adaptor,\"token 114\");\n RewriteRuleTokenStream stream_RANGE=new RewriteRuleTokenStream(adaptor,\"token RANGE\");\n RewriteRuleTokenStream stream_115=new RewriteRuleTokenStream(adaptor,\"token 115\");\n RewriteRuleTokenStream stream_118=new RewriteRuleTokenStream(adaptor,\"token 118\");\n RewriteRuleSubtreeStream stream_expression=new RewriteRuleSubtreeStream(adaptor,\"rule expression\");\n errorMessageStack.push(\"RANGE definition\"); \n try {\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:504:2: ( RANGE e= expression ( (openType= '[' ) | (openType= '(' ) ) rangeStart= expression ',' rangeEnd= expression (closeType= ')' | closeType= ']' ) -> ^( RANGE $e $openType $closeType $rangeStart $rangeEnd) )\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:504:4: RANGE e= expression ( (openType= '[' ) | (openType= '(' ) ) rangeStart= expression ',' rangeEnd= expression (closeType= ')' | closeType= ']' )\n {\n RANGE148=(Token)match(input,RANGE,FOLLOW_RANGE_in_rangeFunction2480); \n stream_RANGE.add(RANGE148);\n\n pushFollow(FOLLOW_expression_in_rangeFunction2484);\n e=expression();\n\n state._fsp--;\n\n stream_expression.add(e.getTree());\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:504:23: ( (openType= '[' ) | (openType= '(' ) )\n int alt41=2;\n int LA41_0 = input.LA(1);\n\n if ( (LA41_0==117) ) {\n alt41=1;\n }\n else if ( (LA41_0==114) ) {\n alt41=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 41, 0, input);\n\n throw nvae;\n }\n switch (alt41) {\n case 1 :\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:504:24: (openType= '[' )\n {\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:504:24: (openType= '[' )\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:504:25: openType= '['\n {\n openType=(Token)match(input,117,FOLLOW_117_in_rangeFunction2490); \n stream_117.add(openType);\n\n\n }\n\n\n }\n break;\n case 2 :\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:504:41: (openType= '(' )\n {\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:504:41: (openType= '(' )\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:504:42: openType= '('\n {\n openType=(Token)match(input,114,FOLLOW_114_in_rangeFunction2498); \n stream_114.add(openType);\n\n\n }\n\n\n }\n break;\n\n }\n\n pushFollow(FOLLOW_expression_in_rangeFunction2504);\n rangeStart=expression();\n\n state._fsp--;\n\n stream_expression.add(rangeStart.getTree());\n char_literal149=(Token)match(input,115,FOLLOW_115_in_rangeFunction2506); \n stream_115.add(char_literal149);\n\n pushFollow(FOLLOW_expression_in_rangeFunction2510);\n rangeEnd=expression();\n\n state._fsp--;\n\n stream_expression.add(rangeEnd.getTree());\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:504:103: (closeType= ')' | closeType= ']' )\n int alt42=2;\n int LA42_0 = input.LA(1);\n\n if ( (LA42_0==116) ) {\n alt42=1;\n }\n else if ( (LA42_0==118) ) {\n alt42=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 42, 0, input);\n\n throw nvae;\n }\n switch (alt42) {\n case 1 :\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:504:104: closeType= ')'\n {\n closeType=(Token)match(input,116,FOLLOW_116_in_rangeFunction2515); \n stream_116.add(closeType);\n\n\n }\n break;\n case 2 :\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:504:119: closeType= ']'\n {\n closeType=(Token)match(input,118,FOLLOW_118_in_rangeFunction2520); \n stream_118.add(closeType);\n\n\n }\n break;\n\n }\n\n\n\n // AST REWRITE\n // elements: openType, e, rangeEnd, rangeStart, closeType, RANGE\n // token labels: closeType, openType\n // rule labels: retval, e, rangeStart, rangeEnd\n // token list labels: \n // rule list labels: \n // wildcard labels: \n retval.tree = root_0;\n RewriteRuleTokenStream stream_closeType=new RewriteRuleTokenStream(adaptor,\"token closeType\",closeType);\n RewriteRuleTokenStream stream_openType=new RewriteRuleTokenStream(adaptor,\"token openType\",openType);\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n RewriteRuleSubtreeStream stream_e=new RewriteRuleSubtreeStream(adaptor,\"rule e\",e!=null?e.tree:null);\n RewriteRuleSubtreeStream stream_rangeStart=new RewriteRuleSubtreeStream(adaptor,\"rule rangeStart\",rangeStart!=null?rangeStart.tree:null);\n RewriteRuleSubtreeStream stream_rangeEnd=new RewriteRuleSubtreeStream(adaptor,\"rule rangeEnd\",rangeEnd!=null?rangeEnd.tree:null);\n\n root_0 = (Object)adaptor.nil();\n // 505:3: -> ^( RANGE $e $openType $closeType $rangeStart $rangeEnd)\n {\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:505:6: ^( RANGE $e $openType $closeType $rangeStart $rangeEnd)\n {\n Object root_1 = (Object)adaptor.nil();\n root_1 = (Object)adaptor.becomeRoot(stream_RANGE.nextNode(), root_1);\n\n adaptor.addChild(root_1, stream_e.nextTree());\n adaptor.addChild(root_1, stream_openType.nextNode());\n adaptor.addChild(root_1, stream_closeType.nextNode());\n adaptor.addChild(root_1, stream_rangeStart.nextTree());\n adaptor.addChild(root_1, stream_rangeEnd.nextTree());\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n errorMessageStack.pop(); \n }\n \t\n \tcatch(RecognitionException re)\n \t{\t\n \t\treportError(re);\n \t\tthrow re;\n \t}\n finally {\n }\n return retval;\n }", "public String toString() {\n\t//if (this.color == IntervalNode.RED)\n\t// return(\"\" + this.low + \"\\t\" + this.high + \"\\tp:\" + p.low +\n\t// \"\\tl:\" + this.left.low + \"\\tr:\" +\n\t// this.right.low + \"\\tmx:\" + this.max + \"\\tmn:\" + this.min);\n\t//return(\"(\" + this.low + \")\" + \"\\t\" + this.high + \"\\tp:\" + p.low +\n\t// \"\\tl:\" + this.left.low + \"\\tr:\" +\n\t// this.right.low + \"\\tm:\" + this.max + \"\\tmn:\" + this.min);\n\treturn(low + \" \" + high + \" \" + proxyObj);\n }", "@Override\n public String toString()\n {\n return \"[\" + getLowerLeftX() + \",\" + getLowerLeftY() + \",\" +\n getUpperRightX() + \",\" + getUpperRightY() +\"]\";\n }", "@Override\n\tpublic List<IRange> getRangeList() {\n\t\treturn null;\n\t}", "public String getAssessRange() {\r\n return assessRange;\r\n }", "public boolean isRange() {\r\n return range;\r\n }", "Range createRange();", "@Override\n\tpublic String toString(){\n\t\treturn \"START=\"+startDate+\", END=\"+endDate+\",\"+label+\",\"+notes+\",\"+locationAddress+\",\"+startPlaceAddress+\",\"+actStatus.name();\n\t}", "public String toString()\n {\n String str = \"\";\n switch (align)\n {\n case LEFT :\n str = \",align=left\";\n break;\n case CENTER :\n str = \",align=center\";\n break;\n case RIGHT :\n str = \",align=right\";\n break;\n }\n return getClass().getName() + \"[hgap=\" + hgap + \",vgap=\" + vgap + str + \"]\";\n }", "public final ANTLRv3Parser.range_return range() throws RecognitionException {\r\n ANTLRv3Parser.range_return retval = new ANTLRv3Parser.range_return();\r\n retval.start = input.LT(1);\r\n\r\n\r\n CommonTree root_0 = null;\r\n\r\n Token c1=null;\r\n Token c2=null;\r\n Token RANGE133=null;\r\n ANTLRv3Parser.elementOptions_return elementOptions134 =null;\r\n\r\n\r\n CommonTree c1_tree=null;\r\n CommonTree c2_tree=null;\r\n CommonTree RANGE133_tree=null;\r\n RewriteRuleTokenStream stream_RANGE=new RewriteRuleTokenStream(adaptor,\"token RANGE\");\r\n RewriteRuleTokenStream stream_CHAR_LITERAL=new RewriteRuleTokenStream(adaptor,\"token CHAR_LITERAL\");\r\n RewriteRuleSubtreeStream stream_elementOptions=new RewriteRuleSubtreeStream(adaptor,\"rule elementOptions\");\r\n try {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:297:2: (c1= CHAR_LITERAL RANGE c2= CHAR_LITERAL ( elementOptions )? -> ^( CHAR_RANGE[$c1,\\\"..\\\"] $c1 $c2 ( elementOptions )? ) )\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:297:4: c1= CHAR_LITERAL RANGE c2= CHAR_LITERAL ( elementOptions )?\r\n {\r\n c1=(Token)match(input,CHAR_LITERAL,FOLLOW_CHAR_LITERAL_in_range2159); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_CHAR_LITERAL.add(c1);\r\n\r\n\r\n RANGE133=(Token)match(input,RANGE,FOLLOW_RANGE_in_range2161); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_RANGE.add(RANGE133);\r\n\r\n\r\n c2=(Token)match(input,CHAR_LITERAL,FOLLOW_CHAR_LITERAL_in_range2165); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_CHAR_LITERAL.add(c2);\r\n\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:297:42: ( elementOptions )?\r\n int alt61=2;\r\n int LA61_0 = input.LA(1);\r\n\r\n if ( (LA61_0==77) ) {\r\n alt61=1;\r\n }\r\n switch (alt61) {\r\n case 1 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:297:42: elementOptions\r\n {\r\n pushFollow(FOLLOW_elementOptions_in_range2167);\r\n elementOptions134=elementOptions();\r\n\r\n state._fsp--;\r\n if (state.failed) return retval;\r\n if ( state.backtracking==0 ) stream_elementOptions.add(elementOptions134.getTree());\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n // AST REWRITE\r\n // elements: c2, c1, elementOptions\r\n // token labels: c1, c2\r\n // rule labels: retval\r\n // token list labels: \r\n // rule list labels: \r\n // wildcard labels: \r\n if ( state.backtracking==0 ) {\r\n\r\n retval.tree = root_0;\r\n RewriteRuleTokenStream stream_c1=new RewriteRuleTokenStream(adaptor,\"token c1\",c1);\r\n RewriteRuleTokenStream stream_c2=new RewriteRuleTokenStream(adaptor,\"token c2\",c2);\r\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\r\n\r\n root_0 = (CommonTree)adaptor.nil();\r\n // 298:3: -> ^( CHAR_RANGE[$c1,\\\"..\\\"] $c1 $c2 ( elementOptions )? )\r\n {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:298:6: ^( CHAR_RANGE[$c1,\\\"..\\\"] $c1 $c2 ( elementOptions )? )\r\n {\r\n CommonTree root_1 = (CommonTree)adaptor.nil();\r\n root_1 = (CommonTree)adaptor.becomeRoot(\r\n (CommonTree)adaptor.create(CHAR_RANGE, c1, \"..\")\r\n , root_1);\r\n\r\n adaptor.addChild(root_1, stream_c1.nextNode());\r\n\r\n adaptor.addChild(root_1, stream_c2.nextNode());\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:298:37: ( elementOptions )?\r\n if ( stream_elementOptions.hasNext() ) {\r\n adaptor.addChild(root_1, stream_elementOptions.nextTree());\r\n\r\n }\r\n stream_elementOptions.reset();\r\n\r\n adaptor.addChild(root_0, root_1);\r\n }\r\n\r\n }\r\n\r\n\r\n retval.tree = root_0;\r\n }\r\n\r\n }\r\n\r\n retval.stop = input.LT(-1);\r\n\r\n\r\n if ( state.backtracking==0 ) {\r\n\r\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r\n }\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r\n\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n return retval;\r\n }", "void setEndRange( String endRange );", "public void getRange()\n\t{\n\t\tint start = randInt(0, 9);\n\t\tint end = randInt(0, 9);\t\t\n\t\tint startNode = start<=end?start:end;\n\t\tint endNode = start>end?start:end;\n\t\tSystem.out.println(\"Start : \"+startNode+\" End : \"+endNode);\n\t}", "public void setRanges(List<Range> ranges) {\n this.ranges = ranges;\n }", "private Filter rangeFilter(String start, String end, Object minValue, Object maxValue) {\n Filter f1 = FF.lessOrEqual(FF.property(start), FF.literal(maxValue));\n Filter f2 = FF.greaterOrEqual(FF.property(end), FF.literal(minValue));\n return FF.and(Arrays.asList(f1, f2));\n\n// Filter f1 = FF.greaterOrEqual(FF.property(start), FF.literal(minValue));\n// Filter f2 = FF.lessOrEqual(FF.property(end), FF.literal(maxValue));\n// return FF.and(Arrays.asList(f1, f2));\n }", "@Override\r\n\tpublic String toString() {\n\t\tString change = \"\";\r\n\t\tString min_change = \"\";\r\n\t\tString max_change = \"\";\r\n\r\n\t\tif (this.runaway_change != null) {\r\n\t\t\tchange += Unit.getDescriptionByCode(runaway_change);\r\n\t\t}\r\n\r\n\t\tif (this.containsV) {\r\n\t\t\tif (this.min_range_change != null) {\r\n\t\t\t\tmin_change += Unit.getDescriptionByCode(min_range_change);\r\n\t\t\t}\r\n\t\t\tif (this.max_range_change != null) {\r\n\t\t\t\tmax_change += Unit.getDescriptionByCode(max_range_change);\r\n\t\t\t}\r\n\t\t\treturn this.runaway_number + runaway_LCR==null?Unit.getDescriptionByCode(runaway_LCR):\"\" + \"跑道,最小跑道视程\" + this.min_range + \"米,\"\r\n\t\t\t\t\t+ min_change + \",最大跑道视程\" + this.max_range + \"米,\" + max_change + \",\";\r\n\r\n\t\t} else {\r\n\r\n\t\t\treturn this.runaway_number + Unit.getDescriptionByCode(runaway_LCR) + \"跑道,跑道视程\" + this.viusal_range + \"米,\"+change;\r\n\t\t}\r\n\t}", "public String getInDateTimeRangeToString(LocalDateTime start, LocalDateTime end) {\n List<FoodEntry> entriesInRange = FoodListManager.filterListByDate(foodEntries, start, end);\n return FoodListManager.convertListToString(entriesInRange);\n }", "private static String dateRangeRestriction(String startDate, String endDate){\r\n String restriction = \"\";\r\n String[] startDateParts = startDate.split(\"/\");\r\n String[] endDateParts = endDate.split(\"/\");\r\n int prevYear = Integer.parseInt(endDateParts[0]) - 1; //year previus to End year\r\n int nextYear = Integer.parseInt(startDateParts[0]) + 1; //year next to End year\r\n if(prevYear-nextYear > 1){ // For intermediate years we may not care about days and months\r\n restriction += \" PubDate-Year:[\" + nextYear + \" TO \" + prevYear + \"] OR \";\r\n }\r\n if(endDateParts[0].equals(startDateParts[0])){ // Year of start and end is the same\r\n restriction += \"( +PubDate-Year:\" + endDateParts[0] \r\n + \" +PubDate-Month:[\" + startDateParts[1] + \" TO \" + endDateParts[1] \r\n + \"] +PubDate-Day:[\" + startDateParts[2] + \" TO \" + endDateParts[2] + \"])\";\r\n } else {\r\n restriction += \"( +PubDate-Year:\" + endDateParts[0] \r\n + \" +PubDate-Month:[ 01 TO \" + endDateParts[1] \r\n + \"] +PubDate-Day:[ 01 TO \" + endDateParts[2] + \"]) OR \"\r\n + \"( +PubDate-Year:\" + startDateParts[0] \r\n + \" +PubDate-Month:[ \" + startDateParts[1] + \" TO 12\" \r\n + \"] +PubDate-Day:[ \" + startDateParts[2] + \" TO 31 ])\";\r\n }\r\n restriction = \"(\" + restriction + \")\";\r\n return restriction;\r\n }", "String toStringStartValues();", "@Test\n\tpublic void seperateRangeTest() {\n\n\t\tsetup();\n\t\tSystem.out.println(\"seperate range test\");\n\t\tZipCodeRange z1 = new ZipCodeRange(new ZipCode(94133), new ZipCode(94133));\n\t\tZipCodeRange z2 = new ZipCodeRange(new ZipCode(94200), new ZipCode(94299));\n\t\tZipCodeRange z3 = new ZipCodeRange(new ZipCode(94600), new ZipCode(94699));\n\n\t\t// Testing\n\t\tZipRangeControl zrc = new ZipRangeControl();\n\t\tzrc.processNewRange(z1);\n\t\tzrc.processNewRange(z2);\n\t\tzrc.processNewRange(z3);\n\n\t\tZipCodeRange z4 = new ZipCodeRange(new ZipCode(94200), new ZipCode(94399));\n\t\trequiredList.add(z1);\n\t\trequiredList.add(z2);\n\t\trequiredList.add(z3);\n\n\t\tZipCodeRange[] ziparray = new ZipCodeRange[requiredList.size()];\n\t\tList<ZipCodeRange> zlist = zrc.getFinalZipRanges();\n\n\t\tfor (int i = 0; i < requiredList.size(); i++) {\n\t\t\tAssert.assertThat(\"Lower Limit match failed at entry\" + i, requiredList.get(i).lower.zipcode,\n\t\t\t\t\torg.hamcrest.CoreMatchers.equalTo(zlist.get(i).lower.zipcode));\n\t\t\tAssert.assertThat(\"Upper Limit match failed at entry\" + i, requiredList.get(i).upper.zipcode,\n\t\t\t\t\torg.hamcrest.CoreMatchers.equalTo(zlist.get(i).upper.zipcode));\n\t\t}\n\t\tclimax();\n\n\t}", "public void setRange(Range range) { setRange(range, true, true); }", "public String toString() {\n\t\tString newString = \"{ \" + first + \" to \" + last + \" by \" + step + \" }\";\n\t\treturn newString;\n\t}", "public String toString()\n {\n return _xstr.subSequence(_start, _end).toString();\n }", "@Override\r\n\tpublic String getNotationExample()\r\n\t{\r\n\t\treturn \"(in-subrange 'X1-number', 'Y1-number', 'X2-number', 'Y2-number')\";\r\n\t}", "public String toString() {\n\t\treturn _lesserTerm.toString() + \" <= \" + _greaterTerm.toString();\n\t}", "public Range getTextPortsRange();", "protected String getJPARangeClause(long lowerBound, long upperBound, Map<String, Object> params) {\n params.put(\"lowerBound\", lowerBound);\n params.put(\"upperBound\", upperBound);\n return \"log.id > :lowerBound and log.id <= :upperBound\";\n }", "public List<String> summaryRanges(int[] nums) {\n List<String> res = new ArrayList<>();\n if (nums == null || nums.length == 0) {\n return res;\n }\n res.add(\"\" + nums[0]);\n for (int i = 1; i < nums.length; i++) {\n if (nums[i] - nums[i - 1] == 1) {\n String str = res.get(res.size() - 1);\n if (str.length() == 0) {\n str += nums[i];\n res.set(res.size() - 1, str);\n } else {\n String sub = str.substring(0, str.contains(\"->\") ? str.indexOf(\"-\") : str.length());\n res.set(res.size() - 1, sub + \"->\" + nums[i]);\n }\n } else {\n res.add(\"\" + nums[i]);\n }\n }\n return res;\n }", "@Nullable public abstract String portRange();", "public SummaryRanges() {\n S.add(new MyPair(-INF, -INF)); S.add(new MyPair(INF, INF));\n }", "public String getItemRange() {\n\t\tint start = (currentPage - 1) * OrderHistoryActionForm.RESULTS_PER_PAGE\n\t\t\t\t+ 1;\n\t\tString startStr = String.valueOf(start);\n\t\tint end = start + OrderHistoryActionForm.RESULTS_PER_PAGE - 1;\n\t\tif (end > this.totalItems) {\n\t\t\tend = this.totalItems;\n\t\t}\n\t\tString endStr = String.valueOf(end);\n\t\treturn startStr + \"-\" + endStr;\n\t}", "abstract public Range createRange();", "public HashMap displayRangeValues(Context context, String[] args) throws Exception {\n HashMap rangeMap = new HashMap();\n try {\n String strLanguage = context.getSession().getLanguage();\n HashMap programMap = (HashMap) JPO.unpackArgs(args);\n HashMap columnMap = (HashMap) programMap.get(\"columnMap\");\n HashMap settings = (HashMap) columnMap.get(\"settings\");\n String strAdminType = (String) settings.get(\"Attribute Name\");\n StringList strRangeValues = FrameworkUtil.getRanges(context, strAdminType);\n\n StringList listChoices = new StringList();\n StringList listDispChoices = new StringList();\n\n String attrValue = \"\";\n String dispValue = \"\";\n\n for (int i = 0; i < strRangeValues.size(); i++) {\n attrValue = (String) strRangeValues.get(i);\n if (UIUtil.isNotNullAndNotEmpty(attrValue) && !attrValue.equals(\"None\")) {\n dispValue = i18nNow.getRangeI18NString(strAdminType, attrValue, strLanguage);\n listDispChoices.add(dispValue);\n listChoices.add(attrValue);\n }\n }\n\n rangeMap.put(\"field_choices\", listChoices);\n rangeMap.put(\"field_display_choices\", listDispChoices);\n } catch (Exception e) {\n logger.error(\"Error in pss.slc.ui.SLCUIUtil:displayRangeValues: \", e);\n throw e;\n }\n\n return rangeMap;\n }", "public String getStatistics() {\n return \"Bounds = (\" + x1 + \", \" + y1 + \"), (\" + x2 + \", \" + y2 + \")\\n\" +\n \"Number of Nodes = \" + numNodes + \"\\n\";\n }", "public JsonArray getRangeInfo() {\r\n\t\t\r\n\t\tif (restClient == null)\r\n\t\t\treturn null;\r\n\t\t\r\n\t\t\r\n\t\tJsonArray arrayIPv4 = null;\r\n\t\tJsonArray arrayIPv6 = null;\r\n\t\t\r\n\t\t// IPv4 Range\r\n\t\t{\r\n\t\t\tStringBuilder sb = new StringBuilder();\r\n\t\t\t\r\n\t\t\tsb.append(\"/wapi/v1.0/range\");\r\n\t\t\tsb.append(\"?_return_type=json\");\r\n\t\t\tsb.append(\"&_return_fields=network,network_view,start_addr,end_addr,comment,disable\");\r\n\t\t\t\r\n\t\t\tString value = restClient.Get(sb.toString(), null);\r\n\t\t\t\r\n\t\t\tif (value == null)\r\n\t\t\t\treturn null;\r\n\t\t\t\r\n\t\t\t// Change unescape-unicode\r\n\t\t\tvalue = StringUtils.unescapeUnicodeString(value);\r\n\t\t\t\r\n\t\t\tif (value != null) {\r\n\t\t\t\tvalue = StringUtils.unescapeUnicodeString(value);\r\n\t\t\t\tarrayIPv4 = JsonUtils.parseJsonArray(value);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// IPv6 Range\r\n\t\t{\r\n\t\t\tStringBuilder sb = new StringBuilder();\r\n\t\t\t\r\n\t\t\tsb.append(\"/wapi/v1.0/ipv6range\");\r\n\t\t\tsb.append(\"?_return_type=json\");\r\n\t\t\tsb.append(\"&_return_fields=network,network_view,start_addr,end_addr,comment,disable\");\r\n\t\t\t\r\n\t\t\tString value = restClient.Get(sb.toString(), null);\r\n\t\t\t\r\n\t\t\tif (value == null)\r\n\t\t\t\treturn null;\r\n\t\t\t\r\n\t\t\t// Change unescape-unicode\r\n\t\t\tvalue = StringUtils.unescapeUnicodeString(value);\r\n\t\t\t\r\n\t\t\tif (value != null) {\r\n\t\t\t\tvalue = StringUtils.unescapeUnicodeString(value);\r\n\t\t\t\tarrayIPv6 = JsonUtils.parseJsonArray(value);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Merge\r\n\t\tJsonArray array = new JsonArray();\r\n\t\t\r\n\t\tif (arrayIPv4 != null)\r\n\t\t\tarray.addAll(arrayIPv4);\r\n\t\t\r\n\t\tif (arrayIPv6 != null)\r\n\t\t\tarray.addAll(arrayIPv6);\r\n\t\t\r\n\t\treturn array;\r\n\t}", "public double[] getRange(){\n\treturn RANGE;\n }", "boolean HasRange() {\r\n\t\treturn hasRange;\r\n\t}", "@Override\n\tpublic List<IRange> getSectionRanges() {\n\t\treturn null;\n\t}", "@Override\n\tpublic String toString(){\n\t\treturn this.from+\"----\"+this.to; \n\t}", "public java.lang.String toString(){\n DecimalFormat df = new DecimalFormat(\"0.0\");\n return \"< \" + df.format(this.x) + \", \" + df.format(this.y) + \" >\";\n }", "@AutoEscape\n public String getModelIndexRangeMessage();", "public Set<T> getRanges();", "@Override\r\n\tpublic String getApp_activity_range() {\n\t\treturn super.getApp_activity_range();\r\n\t}", "public String toString() {\r\n String modelString =\r\n \"value=\"\r\n + getValue()\r\n + \", \"\r\n + \"extent=\"\r\n + getExtent()\r\n + \", \"\r\n + \"min=\"\r\n + getMinimum()\r\n + \", \"\r\n + \"max=\"\r\n + getMaximum()\r\n + \", \"\r\n + \"adj=\"\r\n + getValueIsAdjusting();\r\n\r\n return getClass().getName() + \"[\" + modelString + \"]\";\r\n }", "public String toString() {\n\t\tString str = \"(\";\n\t\tif (this.title != null)\n\t\t\tstr += this.title;\n\t\telse if (this.varName != null)\n\t\t\tstr += this.varName;\n\t\tif (this.minVal != null)\n\t\t\tstr += \",\" + this.minVal;\n\t\tif (this.curVal != null)\n\t\t\tstr += \",\" + this.curVal;\n\t\tif (this.maxVal != null)\n\t\t\tstr += \",\" + this.maxVal;\n\t\tstr += \")\";\n\t\treturn str;\n\t}", "public String toString() {\r\n\t\treturn getIntervalAsString();\r\n\t}", "@Override\n\tpublic String toString () {\n\t\treturn \"[\" + phonstringCondition + \" (\" + minProb + \", \" + maxProb + \")\" + \"]\";\n\t}", "@Override\n public boolean isRange() {\n return false;\n }", "public String toString() {\n\t\treturn \"[\" + this.type + \n\t\t\t\t\" | rate:\" + this.rate + \n\t\t\t\t\" | err:\" + this.error + \n\t\t\t\t\" | loc:\" + this.localisation.x + \",\" + this.localisation.y + \"]\" + \n\t\t\t\t\" | range:\" + this.range + \"\\n\";\n\t}", "public DateRange getDateRange();", "public String toString(){\n\t\treturn leftValue + \":\" +rightValue;\t\t\t\r\n\t}", "public StringView toStringView(QueryLocationRange range) {\n int start = offsetToIndex(range.getStartByteOffset());\n int end = offsetToIndex(range.getEndByteOffset());\n return StringView.of(query, start, end);\n }", "@Override\n public String toString() {\n return String.format(\"(%d,%d)\", x, y);\n }", "public String formatTags() {\n String toPrint = \" \";\n for (String tag : tags) {\n toPrint += (\"#\" + tag + \" \");\n }\n return toPrint;\n }", "@Override\n\tpublic String toString() {\n\t\treturn String.format(\"(%d, %d)\", x, y);\n\t}" ]
[ "0.7664766", "0.72698426", "0.7088121", "0.68540996", "0.67664695", "0.67334455", "0.6688355", "0.6634123", "0.6577633", "0.65614617", "0.654762", "0.6536205", "0.65159225", "0.6456573", "0.6452096", "0.64350295", "0.62426776", "0.62124383", "0.61903226", "0.6188934", "0.6165874", "0.6160779", "0.61081535", "0.6002285", "0.5989603", "0.5956976", "0.5952781", "0.5869555", "0.58592373", "0.5843376", "0.58246183", "0.5814391", "0.5813056", "0.58128905", "0.58128315", "0.58013064", "0.5757091", "0.5740583", "0.57392734", "0.5711325", "0.57079875", "0.56955373", "0.5679312", "0.5678264", "0.56664854", "0.5665211", "0.56587064", "0.56496286", "0.5648073", "0.56417316", "0.5631033", "0.56300807", "0.56176114", "0.5606085", "0.56030416", "0.560041", "0.5590417", "0.5583028", "0.5567006", "0.55661094", "0.5561891", "0.55558604", "0.5533855", "0.5520664", "0.55189526", "0.55157906", "0.54964226", "0.54943794", "0.5489521", "0.54885775", "0.54877067", "0.5483033", "0.54816103", "0.5478991", "0.5477803", "0.546098", "0.54568464", "0.54473937", "0.5445985", "0.54432464", "0.54295266", "0.5421785", "0.54213506", "0.54117256", "0.540614", "0.5399766", "0.5396895", "0.5394344", "0.53926367", "0.53925097", "0.53877985", "0.5386379", "0.53792197", "0.5367537", "0.5365705", "0.53608495", "0.5359585", "0.535924", "0.5358034", "0.5357863" ]
0.7426886
1
leftchild and rightchild of each node Constructor for a BST node.
public BSTNode(K key) { this.key = key; this.left = null; this.right = null; this.height = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BST() {\n // DO NOT IMPLEMENT THIS CONSTRUCTOR!\n }", "public BST() {\n }", "public BST() {\n\n }", "public BST(){\n\t\tthis.root = null;\n\t}", "public BST() {\n this.root = null;\n }", "public BinaryTree()\n {\n //this is the constructor for the BinaryTree object\n data = null;\n left = null;\n right = null;\n }", "public BinarySearchTree() {\r\n\t\troot = null;\r\n\t\tleftChild = null;\r\n\t\trightChild = null;\r\n\t}", "public BST() {\r\n root = null;\r\n }", "public BinarySearchTree(KeyedItem rootItem, BinarySearchTree leftTree, BinarySearchTree rightTree) {\r\n\t\troot = rootItem;\r\n\t\tleftChild = leftTree;\r\n\t\trightChild = rightTree;\r\n\t}", "public BST()\r\n\t{\r\n\t\troot = null;\r\n\t}", "public BST() {\n\t\troot = null;\n\t}", "public void createTree() {\n Node<String> nodeB = new Node<String>(\"B\", null, null);\n Node<String> nodeC = new Node<String>(\"C\", null, null);\n Node<String> nodeD = new Node<String>(\"D\", null, null);\n Node<String> nodeE = new Node<String>(\"E\", null, null);\n Node<String> nodeF = new Node<String>(\"F\", null, null);\n Node<String> nodeG = new Node<String>(\"G\", null, null);\n root.leftChild = nodeB;\n root.rightChild = nodeC;\n nodeB.leftChild = nodeD;\n nodeB.rightChild = nodeE;\n nodeC.leftChild = nodeF;\n nodeC.rightChild = nodeG;\n\n }", "public void createBinaryTree()\r\n\t{\n\t\t\r\n\t\tNode node = new Node(1);\r\n\t\tnode.left = new Node(2);\r\n\t\tnode.right = new Node(3);\r\n\t\tnode.left.left = new Node(4);\r\n\t\tnode.left.right = new Node(5);\r\n\t\tnode.left.right.right = new Node(10);\r\n\t\tnode.left.left.left = new Node(8);\r\n\t\tnode.left.left.left.right = new Node(15);\r\n\t\tnode.left.left.left.right.left = new Node(17);\r\n\t\tnode.left.left.left.right.left.left = new Node(18);\r\n\t\tnode.left.left.left.right.right = new Node(16);\r\n\t\tnode.left.left.right = new Node(9);\r\n\t\tnode.right.left = new Node(6);\r\n\t\tnode.right.left.left = new Node(13);\r\n\t\tnode.right.left.left.left = new Node(14);\r\n\t\tnode.right.right = new Node(7);\r\n\t\tnode.right.right.right = new Node(11);\r\n\t\tnode.right.right.right.right = new Node(12);\r\n\t\troot = node;\r\n\t\t\r\n\t}", "Node(int weight, Node leftChild, Node rightChild) {\n this.weight = weight;\n this.leftChild = leftChild;\n this.rightChild = rightChild;\n value = null;\n }", "public BST_Recursive() {\n\t\tthis.root = null;\n\t\tnumOfElements = 0; \n\t}", "public BinaryTree(){}", "public TreeNode(Object initValue, TreeNode initLeft, TreeNode initRight)\r\n {\r\n value = initValue;\r\n left = initLeft;\r\n right = initRight;\r\n }", "public static Treenode createBinaryTree() {\n\t\tTreenode rootnode = new Treenode(40);\r\n\t\tTreenode r40 = new Treenode(50);\r\n\t\tTreenode l40 = new Treenode(20);\r\n\t\tTreenode r50 = new Treenode(60);\r\n\t\tTreenode l50 = new Treenode(45);\r\n\t\tTreenode r20 = new Treenode(30);\r\n\t\tTreenode l20 = new Treenode(10);\r\n\t\trootnode.right = r40;\r\n\t\trootnode.left = l40;\r\n\t\tr40.right=r50;\r\n\t\tr40.left = l50;\r\n\t\tl40.right=r20;\r\n\t\tl40.left=l20;\r\n\t\t r40.parent=rootnode; l40.parent= rootnode;\r\n\t\t r50.parent=r40;\r\n\t\tl50.parent=r40 ;\r\n\t\t r20.parent=l40;\r\n\t\t l20.parent=l40 ;\r\n\t\treturn rootnode;\r\n\t\t\r\n\t}", "public BinarySearchTree() {}", "public BinaryTree()\n {\n this.root = null;\n this.actualNode = null;\n this.altMode = false;\n this.deepestRight = null;\n }", "public BinaryTree()\r\n\t{\r\n\t\t// Initialize field values\r\n\t\tthis.counter = 0;\r\n\t\tthis.arrayCounter = 0;\r\n\t\tthis.root = null;\r\n\t}", "public TreeNode(){ this(null, null, 0);}", "Node(int d) {\n data = d;\n left = null;\n right = null;\n }", "public BinarySearchTree()\n\t{\n\t\tsuper();\n\t}", "public TreeNode(int ID) {\n this.ID = ID;\n right = null;\n left = null;\n }", "public BinarySearchTree(KeyedItem root) {\r\n\t\tthis.root = root;\r\n\t\tleftChild = null;\r\n\t\trightChild = null;\r\n\t\t\r\n\t}", "public BinaryTree(T data, BinaryTree<T> childTree, boolean isLeftTree) {\r\n\t\tthis.root = data;\r\n\t\tif (isLeftTree) {\r\n\t\t\tthis.left = childTree;\r\n\t\t\tthis.left.setParent(this);\r\n\t\t} else {\r\n\t\t\tthis.right = childTree;\r\n\t\t\tthis.right.setParent(this);\r\n\t\t}\r\n\t}", "public BinarySearchTree() {\n\n\t}", "public BTNode(int value){ \r\n node = value; \r\n leftleaf = null;\r\n rightleaf = null;\r\n }", "public BinaryTree() {\n\t}", "public TreeNode(Object e) {\n element = e;\n //this.parent = null;\n left = null;\n right = null;\n }", "TreeNode(){\n this.elem = null;\n this.left = null;\n this.right = null;\n }", "public BinaryTree() {\n count = 0;\n root = null;\n }", "public TreeNode(T nodeData){\n data = nodeData;\n leftNode = rightNode = null;\n }", "Node<X> make(Node<X> left, Node<X> right);", "public BinTree( BiNode root )\n {\n _root = root;\n }", "public Node(Word d) {\n data = d;\n left = null;\n right = null;\n }", "public BinNode (E data)\n {\n this.data = data;\n left = null;\n right = null;\n }", "public static Node constructTree() {\n\n Node node2 = new Node(2, null, null);\n Node node8 = new Node(8, null, null);\n Node node12 = new Node(12, null, null);\n Node node17 = new Node(17, null, null);\n\n Node node6 = new Node(6, node2, node8);\n Node node15 = new Node(15, node12, node17);\n\n //Root Node\n Node node10 = new Node(10, node6, node15);\n\n return node10;\n }", "public BinaryTreeNode(T _data) {\n\t\t\t// Invoke the 2-parameter constructor with null parent\n\t\t\tthis(_data, null);\n\t\t}", "public BinaryTree()\n\t{\n\t\troot = null;\n\t}", "private TreeNode(int x) {\n val = x;\n left = null;\n right = null;\n }", "public BinaryTree() {\n root = null;\n }", "public BinaryTree() {\n root = null;\n }", "public LinkedBinaryTree() { // constructs an empty binary tree\n\n }", "private BinaryTree() {\n root = new Node(0);\n }", "public Node(T data, Node<T> parent, Node<T> left, Node<T> right) {\n this.data = data;\n this.parent = parent;\n this.left = left;\n this.right = right;\n }", "public TreeNode(TreeNode left, TreeNode right, char operand){\n\t\tthis.left = left;\n\t\tthis.right = right;\n\t\tthis.operand = operand;\n\t\tthis.type = \"op\";\n\n\t}", "public BSTree2(){\n root = null;\n }", "public BinaryTree() {\r\n\t\troot = null;\r\n\t\tcount = 0;\r\n\t}", "public BinarySearchTree(){\n\t\tthis.root = null;\n\t}", "public BinarySearchTree(T data, Node<T> left, Node<T> right) {\n\n root = new Node<>(data, null, left, right);\n size = 1;\n\n if (left != null) {\n root.setLeft(left);\n size++;\n }\n if (right != null) {\n root.setRight(right);\n size++;\n }\n }", "public BinaryTreeByLinkedList() {\n\t\tthis.root = null;\n\t}", "public LinkedBinaryTree(T element, LinkedBinaryTree<T> left,\n\t\t\t \t\tLinkedBinaryTree<T> right){\n\t\t root = new BinaryTreeNode<T>(element);\n\t\t root.setLeft(left.root);\n\t\t root.setRight(right.root);\n\t }", "public BinaryTree(E item, BinaryTree<E> leftTree, BinaryTree<E> rightTree) {\n\t\troot = new TreeNode<E>(item);\n\t\tattachLeftSubtree(leftTree);\n\t\tattachRightSubtree(rightTree);\n\t}", "public TreeNode(char data, TreeNode left, TreeNode right) {\r\n\t\t\tthis.data = data;\r\n\t\t\tthis.left = left;\r\n\t\t\tthis.right = right;\r\n\t\t}", "public BinaryTree(){\r\n root = null;\r\n }", "public\nstatic\nvoid\nmain(String args[]) \n\n{ \n\nBinaryTree tree = \nnew\nBinaryTree(); \n\ntree.root = \nnew\nNode(\n20\n); \n\ntree.root.left = \nnew\nNode(\n8\n); \n\ntree.root.left.left = \nnew\nNode(\n4\n); \n\ntree.root.left.right = \nnew\nNode(\n12\n); \n\ntree.root.left.right.left = \nnew\nNode(\n10\n); \n\ntree.root.left.right.right = \nnew\nNode(\n14\n); \n\ntree.root.right = \nnew\nNode(\n22\n); \n\ntree.root.right.right = \nnew\nNode(\n25\n); \n\ntree.printBoundary(tree.root); \n\n}", "public BinaryNode() {\n\t\tthis(null);\t\t\t// Call next constructor\n\t}", "public TreeNode getLeft(){ return leftChild;}", "public BSTTreeBlueJTest()\n {\n }", "public BinarySearchTree(Object root){\r\n\t\tthis.root = (KeyedItem)root;\r\n\t\tleftChild = null;\r\n\t\trightChild = null;\r\n\t}", "public TreeNode(String text) {\n this.text = text;\n this.leftChild = null;\n this.rightChild = null;\n }", "public Node()\n\t{\n\t\ttitle = \" \";\n\t\tavail = 0;\n\t\trented = 0;\n\t\tleft = null;\n\t\tright = null;\n\t\t\n\t}", "TreeNode(String str) {\n // Constructor. Make a node containing the specified string.\n // Note that left and right pointers are initially null.\n item = str;\n }", "public Node(E e, Node<E> above, Node<E> leftChild, Node<E> rightChild) {\n element = e;\n parent = above;\n left = leftChild;\n right = rightChild;\n }", "public static TreeNode generateBinaryTree1() {\n // Nodes\n TreeNode root = new TreeNode(5);\n TreeNode rootLeft = new TreeNode(2);\n TreeNode rootRight = new TreeNode(4);\n TreeNode rootLeftLeft = new TreeNode(20);\n TreeNode rootLeftRight = new TreeNode(1);\n // Edges\n root.left = rootLeft;\n root.right = rootRight;\n rootLeft.left = rootLeftLeft;\n rootLeft.right = rootLeftRight;\n\n // Return root\n return root;\n }", "public BinaryNode(AnyType element,BinaryNode<AnyType> left,BinaryNode<AnyType> right) {\n this.element=element;\n this.left=left;\n this.right=right;\n }", "public RBTree() {\r\n\t\t// well its supposed just create a new Red Black Tree\r\n\t\t// Maybe create a new one that does a array of Objects\r\n\t}", "public void createNode()\r\n\t{\r\n\t\tTreeNode first=new TreeNode(1);\r\n\t\tTreeNode second=new TreeNode(2);\r\n\t\tTreeNode third=new TreeNode(3);\r\n\t\tTreeNode fourth=new TreeNode(4);\r\n\t\tTreeNode fifth=new TreeNode(5);\r\n\t\tTreeNode sixth=new TreeNode(6);\r\n\t\tTreeNode seventh=new TreeNode(7);\r\n\t\tTreeNode eight=new TreeNode(8);\r\n\t\tTreeNode nine=new TreeNode(9);\r\n\t\troot=first;\r\n\t\tfirst.left=second;\r\n\t\tfirst.right=third;\r\n\t\tsecond.left=fourth;\r\n\t\tthird.left=fifth;\r\n\t\tthird.right=sixth;\r\n\t\tfifth.left=seventh;\r\n\t\tseventh.right=eight;\r\n\t\teight.left=nine;\r\n\t\t\r\n\t}", "void createBST(Node rootnode){ \n \n //Insert data into new bst, and then pass next nodes so they can be inserted. \n tree.insertNode(tree.ROOT, rootnode.data);\n \n if(rootnode.left != null){\n createBST(rootnode.left);\n }\n \n if(rootnode.right != null){\n createBST(rootnode.right);\n } \n }", "public static TreeNode generateBinaryTree2() {\n // Nodes\n TreeNode root = new TreeNode(12);\n TreeNode rootLeft = new TreeNode(4);\n TreeNode rootLeftLeft = new TreeNode(3);\n TreeNode rootLeftLeftLeft = new TreeNode(1);\n TreeNode rootLeftLeftLeftLeft = new TreeNode(20);\n TreeNode rootRight = new TreeNode(5);\n // Edges\n root.left = rootLeft;\n rootLeft.left = rootLeftLeft;\n rootLeftLeft.left = rootLeftLeftLeft;\n rootLeftLeftLeft.left = rootLeftLeftLeftLeft;\n root.right = rootRight;\n\n // Return root\n return root;\n }", "protected SegmentTreeNode (int left, int right) {\n\t\tcheckInterval (left, right);\n\t\t\n\t\tthis.left = left;\n\t\tthis.right = right;\n\t\tthis.count = 0;\n\t}", "bst()\n\t{\n\t\troot = null;\n\t\tnodecount = 0;\n\t}", "public TreeNode(TreeNode left, TreeNode right, int freq){\n\t\tleftChild = left;\n\t\trightChild = right;\n\t\tfrequency = freq;\n\t\tkey = '\\0';\n\t}", "private static TreeNode<Character> buildTree () {\n // build left half\n TreeNode<Character> s = new TreeNode<Character>('S', \n new TreeNode<Character>('H'),\n new TreeNode<Character>('V'));\n\n TreeNode<Character> u = new TreeNode<Character>('U', \n new TreeNode<Character>('F'),\n null);\n \n TreeNode<Character> i = new TreeNode<Character>('I', s, u);\n\n TreeNode<Character> r = new TreeNode<Character>('R', \n new TreeNode<Character>('L'), \n null);\n\n TreeNode<Character> w = new TreeNode<Character>('W', \n new TreeNode<Character>('P'),\n new TreeNode<Character>('J'));\n\n TreeNode<Character> a = new TreeNode<Character>('A', r, w);\n\n TreeNode<Character> e = new TreeNode<Character>('E', i, a);\n\n // build right half\n TreeNode<Character> d = new TreeNode<Character>('D', \n new TreeNode<Character>('B'),\n new TreeNode<Character>('X'));\n\n TreeNode<Character> k = new TreeNode<Character>('K', \n new TreeNode<Character>('C'),\n new TreeNode<Character>('Y'));\n\n TreeNode<Character> n = new TreeNode<Character>('N', d, k);\n\n\n TreeNode<Character> g = new TreeNode<Character>('G', \n new TreeNode<Character>('Z'),\n new TreeNode<Character>('Q'));\n\n TreeNode<Character> o = new TreeNode<Character>('O');\n\n TreeNode<Character> m = new TreeNode<Character>('M', g, o);\n\n TreeNode<Character> t = new TreeNode<Character>('T', n, m);\n\n // build the root\n TreeNode<Character> root = new TreeNode<Character>(null, e, t);\n return root;\n }", "BinaryTree()\n\t{\n\t\troot = null;\t\t\t\t\t\t// at starting root is equals to null\n\t}", "public BinaryTree(E item) {\n\t\troot = new TreeNode<E>(item);\n\t}", "public BinaryTreeNode(T _data, BinaryTreeNode _parent) {\n\t\t\tdata = _data;\n\t\t\tleft = null;\n\t\t\tright = null;\n\t\t\tparent = _parent;\n\t\t}", "public RedBlackNode(int element, RedBlackNode leftChild, RedBlackNode rightChild) \n { \n this.element = element; \n this.leftChild = leftChild; \n this.rightChild = rightChild; \n color = 1; \n }", "public static TreeNode buildTree() {\n\t\t\n\t\tTreeNode root = new TreeNode(1);\n\t\t\n\t\tTreeNode left = new TreeNode(2);\n\t\tleft.left = new TreeNode(4);\n\t\tleft.right = new TreeNode(5);\n\t\tleft.right.right = new TreeNode(8);\n\t\t\n\t\tTreeNode right = new TreeNode(3);\n\t\tright.left = new TreeNode(6);\n\t\tright.right = new TreeNode(7);\n\t\tright.right.left = new TreeNode(9);\n\t\t\n\t\troot.left = left;\n\t\troot.right = right;\n\t\t\n\t\treturn root;\n\t}", "public ObjectBinaryTree() {\n root = null;\n }", "public Tree(int x[]){\n\t\tint n = x.length;\n\t\tif(n == 0)\n\t\t\treturn;\n\t\tTreeNode nodes[] = new TreeNode[n];\n\t\tfor(int i=0; i < n; i++)\n\t\t\tnodes[i] = x[i] != -10 ? (new TreeNode(x[i])) : null;\n\t\troot = nodes[0];\n\t\tfor(int i=0; i < n; i++){\n\t\t\tTreeNode curr = nodes[i];\n\t\t\tif(curr == null)\n\t\t\t\tcontinue;\n\t\t\tint lc = 2*i+1;\n\t\t\tint rc = 2*i+2;\n\t\t\tif(lc < n)\n\t\t\t\tcurr.left = nodes[lc];\n\t\t\tif(rc < n)\n\t\t\t\tcurr.right = nodes[rc];\n\t\t}\n\t}", "public TreeNode(T v, TreeNode l, TreeNode r) {\n value = v; left = l; right = r;\n }", "public BinarySearchTree() {\n root = null;\n size = 0;\n }", "public BalancedBinarySearchTree() {\r\n\t\tRoot = null;\r\n\t}", "private void constructBSTree(Node<T> u, int n, String lr) {\n\t\tn++;\n\t\taddToPT(n, lr + \" \" + u.x.toString());\n\t\telements.add(u.x);\n\t\tif (u.left != nil)\n\t\t\tconstructBSTree(u.left, n, lr + \"L\");\n\t\tif (u.right != nil)\n\t\t\tconstructBSTree(u.right, n, lr + \"R\");\n\t}", "public DLB(){\r\n\t\t//generate the root node with a terminating value\r\n\t\tnodes = new DLBNode('/');\r\n\t}", "private static TreeNode getNode() {\n TreeNode treeNode = new TreeNode(1);\n TreeNode left = new TreeNode(2);\n TreeNode right = new TreeNode(3);\n treeNode.left = left;\n treeNode.right = right;\n\n left.left = new TreeNode(4);\n right.left = new TreeNode(5);\n right.right = new TreeNode(6);\n return treeNode;\n }", "public TwoFourTree()\r\n\t{\r\n\t\troot = new TreeNode(); //assign the root to a new tree node\r\n\t}", "public LinkedBinaryTree() {\n\t\t root = null;\n\t}", "TreeNode (T data, TreeNode<T> left, TreeNode<T> middle, TreeNode<T> right, TreeNode<T> parent) {\n\t\tthis.data = data;\n\t\tthis.left = left;\n\t\tthis.middle = middle;\n\t\tthis.right = right;\n\t\tthis.parent = parent;\n\t}", "private void constructTree() {\r\n\t\tsortLeaves();\r\n\t\tNode currentNode;\r\n\t\tint index = 0;\r\n\t\t\tdo{\r\n\t\t\t\t// Create a new node with the next two least frequent nodes as its children\r\n\t\t\t\tcurrentNode = new Node(this.treeNodes[0], this.treeNodes[1]); \r\n\t\t\t\taddNewNode(currentNode);\r\n\t\t\t}\r\n\t\t\twhile (this.treeNodes.length > 1); // Until there is only one root node\r\n\t\t\tthis.rootNode = currentNode;\r\n\t\t\tindex++;\r\n\t}", "public TreeNode() {\n }", "public TreeNode() { \n this.name = \"\"; \n this.rule = new ArrayList<String>(); \n this.child = new ArrayList<TreeNode>(); \n this.datas = null; \n this.candAttr = null; \n }", "public BinaryNode(String dataPortion, BinaryNode newLeftChild, BinaryNode newRightChild) {\n\t\tdata = dataPortion;\n\t\tleftChild = newLeftChild;\n\t\trightChild = newRightChild;\n\t}", "public BinaryTreeNode(int data) {\n\t\tleft = null;\n\t\tright = null;\n\t\tthis.data = data;\n\t}", "private void CreateTree()\r\n\t{\r\n\r\n\t\t//sample nodes which are not identical\r\n\t\ta = new Node(1);\r\n\t\ta.left = new Node(3);\r\n\t\ta.left.left = new Node(5);\r\n\t\ta.right = new Node(2);\r\n\r\n\r\n\t\tb = new Node(2);\r\n\t\tb.left = new Node(1);\r\n\t\tb.right = new Node(3);\r\n\t\tb.right.right = new Node(7);\r\n\t\tb.left.right = new Node(4);\r\n\r\n\t\t//sample nodes which are identical\r\n\t\ta1 = new Node(1);\r\n\t\ta1.left = new Node(3);\r\n\t\ta1.left.left = new Node(5);\r\n\t\ta1.right = new Node(2);\r\n\r\n\r\n\t\tb1 = new Node(1);\r\n\t\tb1.left = new Node(3);\r\n\t\tb1.right = new Node(2);\r\n\t\tb1.left.left = new Node(5); \r\n\t}", "public RBTree() {\r\n\t\troot = null;\r\n\t}", "public DoubleNode(){\r\n this( null, '\\0', null );\r\n }" ]
[ "0.727203", "0.7028261", "0.69819146", "0.68267286", "0.6796751", "0.677132", "0.6743007", "0.6713276", "0.66624033", "0.6622121", "0.6605595", "0.65442574", "0.64565396", "0.64208245", "0.6411176", "0.6402214", "0.6392068", "0.63665605", "0.636576", "0.63369155", "0.6332813", "0.6322391", "0.6322371", "0.6316652", "0.6305982", "0.6275403", "0.62594163", "0.6250985", "0.6249503", "0.6246699", "0.6228058", "0.62242657", "0.6220493", "0.6193946", "0.6181844", "0.6164572", "0.6159961", "0.61524516", "0.6151495", "0.6136894", "0.6133638", "0.61239976", "0.61198616", "0.61198616", "0.61111915", "0.6101296", "0.6101259", "0.6093459", "0.60838753", "0.60801244", "0.606342", "0.6063264", "0.60585123", "0.60561997", "0.604643", "0.6046381", "0.6046328", "0.60387164", "0.60315716", "0.6022644", "0.6009006", "0.600869", "0.6005187", "0.5993086", "0.5968465", "0.59654146", "0.5963686", "0.59625894", "0.5949596", "0.594243", "0.594217", "0.59361184", "0.5930747", "0.59292215", "0.5920375", "0.5918782", "0.5915292", "0.59110475", "0.59102607", "0.5898206", "0.58853114", "0.5874751", "0.58677673", "0.5865461", "0.5856167", "0.58532387", "0.58457595", "0.58437866", "0.5838438", "0.58354264", "0.5823779", "0.58199155", "0.5817051", "0.58169985", "0.58164203", "0.58159035", "0.58124524", "0.5805911", "0.5786028", "0.57722086" ]
0.63156766
24
height is counted from root to leafs, as from 0 to n
public int getHeight() { return this.height; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int height() { return height(root); }", "private static int height(TreeNode n){\n\t\tif(n==null)\n\t\t\treturn 0;\n\t\treturn 1+Math.max(height(n.left), height(n.right));\n\t}", "@Override\n\tpublic int height() {\n\t\tif (this.valCount == 0) { // if empty leaf\n\t\t\treturn 0;\n\t\t}\n\t\tint max = 1; \n\t\tfor (int i = 0; i < childCount; ++i) { // finds longest route among children\n\t\t\tmax = Math.max(max, children[i].height() + 1);\n\t\t}\n\t\treturn max;\n\t}", "int height(Node root) { return (root != null) ? Math.max(height(root.left), height(root.right)) + 1 : 0;}", "public int height(Node tree){\n\t\tif(tree == null){\n\t\t\treturn 0;\n\t\t}\n\t\telse{\n\t\t\tint lheight = height(tree.getLeft());\n\t\t\tint rheight = height(tree.getRight());\n\t\t\t\n\t\t\t//take the branch which is longer\n\t\t\tif(lheight>rheight){\n\t\t\t\treturn (lheight+1);\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn(rheight+1);\n\t\t\t}\n\t\t}\n\t}", "public int height(){\n return height(root);\n }", "int computeHeight() {\n Node<Integer>[] nodes = new Node[parent.length];\n for (int i = 0; i < parent.length; i++) {\n nodes[i] = new Node<Integer>();\n }\n int rootIndex = 0;\n for (int childIndex = 0; childIndex < parent.length; childIndex++) {\n if (parent[childIndex] == -1) {\n rootIndex = childIndex;\n } else {\n nodes[parent[childIndex]].addChild(nodes[childIndex]);\n }\n }\n return getDepth(nodes[rootIndex]);\n }", "public int height(){\r\n \r\n // call the recursive method with the root\r\n return height(root);\r\n }", "public int height() \n\t{\n\t\treturn height(root); //call recursive height method, starting at root\n\t}", "public int height(Node<T> n) \n\t { \n\t if (n == null) \n\t return 0; \n\t else \n\t { \n\t int lheight = height(n.left); \n\t int rheight = height(n.right); \n\t if (lheight > rheight) \n\t return (lheight + 1); \n\t else \n\t return (rheight + 1); \n\t } \n\t }", "int height(TreeNode root) \n { \n if (root == null) \n return 0; \n else\n { \n /* compute height of each subtree */\n int lheight = height(root.left); \n int rheight = height(root.right); \n \n /* use the larger one */\n if (lheight > rheight) \n return(lheight+1); \n else return(rheight+1); \n } \n }", "int height(Node root)\n {\n if (root == null)\n return 0;\n else\n {\n /* compute height of each subtree */\n int lheight = height(root.left);\n int rheight = height(root.right);\n\n /* use the larger one */\n if (lheight > rheight)\n return(lheight+1);\n else return(rheight+1);\n }\n }", "public int height()\r\n {\r\n if(this.isLeaf())\r\n {\r\n return 0;\r\n }\r\n else if (this.getLeft()!=null&&this.getRight()==null)\r\n {\r\n return this.getLeft().height()+1;\r\n }\r\n else if(this.getLeft()==null&&this.getRight()!=null)\r\n {\r\n return this.getRight().height()+1;\r\n }\r\n else\r\n {\r\n return Math.max(this.getLeft().height(),this.getRight().height())+1;\r\n }\r\n }", "@Override\r\n\tpublic int height() {\r\n\t\tif (this.root == null) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\t// TODO Auto-generated method stub\r\n\t\treturn height_sub(this.root);\r\n\t}", "int height(Node root) {\n\t\tif (root == null)\n\t\t\treturn 0;\n\t\telse {\n\t\t\t/* compute height of each subtree */\n\t\t\tint lheight = height(root.left);\n\n\t\t\tint rheight = height(root.right);\n\n\t\t\t/* use the larger one */\n\t\t\tif (lheight > rheight) {\n\t\t\t\t//System.out.println(\"lheight : \" + lheight + \" rheight : \" + rheight + \" root data : \" + root.data);\n\t\t\t\treturn (lheight + 1);\n\t\t\t} else {\n\t\t\t\t//System.out.println(\"lheight : \" + lheight + \" rheight : \" + rheight + \" root data : \" + root.data);\n\t\t\t\treturn (rheight + 1);\n\t\t\t}\n\t\t}\n\t}", "int height(Node root) {\n\t\tif (root == null)\n\t\t\treturn 0;\n\t\telse {\n\t\t\t //compute height of each subtree \n\t\t\tint lheight = height(root.left);\n\t\t\tint rheight = height(root.right);\n\n\t\t\t// use the larger one \n\t\t\tif (lheight > rheight)\n\t\t\t\treturn (lheight + 1);\n\t\t\telse\n\t\t\t\treturn (rheight + 1);\n\t\t}\n\t}", "@Override\n public int height() {\n \treturn height(root);\n }", "private static int heightOfTree(Tree tree) {\n\n if(tree == null){\n return 0;\n }\n int leftHeight = 0;\n if(tree.left!=null){\n leftHeight = heightOfTree(tree.left);\n }\n int rightHeight = 0;\n if(tree.right!=null){\n rightHeight = heightOfTree(tree.right);\n }\n return (Math.max(leftHeight, rightHeight))+1;\n\n }", "public static int height(Node root){\r\n int ht = -1;\r\n for(Node child : root.children){\r\n ht = Math.max(ht, height(child));\r\n }\r\n return ht + 1;\r\n }", "public int getHeight(){\n\t\tint h=maxDepth(root);\n\t\treturn h;\n\t}", "private int heightBST(Node tree) {\n if (tree == null) {\n return 0;\n }\n return tree.height;\n }", "public int height() {\r\n\t\t\tif (this.leaf) \t\r\n\t\t\t\treturn 0;\r\n\t\t\telse {\r\n\t\t\t\treturn 1 + Math.max( this.lowChild.height(), this.highChild.height());\r\n\t\t\t}\r\n\t\t}", "private int height(BinaryNode<AnyType> t) {\r\n\t\tif (t == null)\r\n\t\t\treturn -1;\r\n\t\telse\r\n\t\t\treturn 1 + Math.max(height(t.left), height(t.right));\r\n\t}", "private int height( BinaryNode<AnyType> t )\r\n\t{\r\n\t\tif( t == null )\r\n\t\t\treturn -1;\r\n\t\telse\r\n\t\t\treturn 1 + Math.max( height( t.left ), height( t.right ) ); \r\n\t}", "public int height() {\n\t\t// TODO\n return height(root);\n\t}", "private int calcNodeHeight(Node t) {\n\t\t\tif(t == null) return 0; //Base case of an empty tree. Has a height of zero. T is the root!\n\n\t\t\treturn (Math.max(calcNodeHeight(t.left), calcNodeHeight(t.right)) + 1); //The height of a binary tree is the height of the root's largest subtree + 1 for the root\n\t\t}", "private int height(Node<T> node){\n if(node == null)\n return 0;\n // get height of left and right side\n int left = height(node.left);\n int right = height(node.right);\n\n // height will be Max of height of left and right + 1 (Own level)\n return 1 + Math.max(left, right );\n\n }", "@Override\n public int getHeight() {\n int height = 0;\n\n if (!isEmpty()) {\n height = root.getHeight();\n }\n\n return height;\n }", "public int heightNodes(Node N) {\n if(N == null) return 0;\n if((N.getRight() == null) && (N.getLeft() == null)) return 0;\n int left = heightNodes(N.getLeft());\n int right = heightNodes(N.getRight());\n\n if(left > right) return 1 + left;\n else return 1 + right;\n\n }", "private int height(AvlTreeNode<?, ?> n) {\n if (n == null) return -1;\n return n.height;\n }", "public int getHeight(){\n\tif (root == null) {\n\t return 0;\n\t}\n\treturn root.height();\n }", "int height(TreeNode root) {\n return root == null ? -1 : 1 + height(root.left);\n }", "public int computeHeight(Node root){\n\t if(root == null)\n\t return 0;\n\t /* Calculate recursively */\n\t return Math.max(computeHeight(root.leftChild), computeHeight(root.rightChild)) + 1;\n\t }", "public int my_leaf_count();", "public int height() { return root == null ? 0 : root.height(); }", "int height(Node n)\n\t{\n\t\tif(n==null)\n\t\t\treturn 0;\n\t\telse\n\t\t\treturn n.height;\n\t}", "@Override\n\tpublic int height() {\n\t\tif(root == null) {\n\t\t\treturn -1;\n\t\t} else {\n\t\t\tNode tempRoot = root;\n\t\t\treturn heightHelper(tempRoot);\n\t\t}\n\t}", "public int getHeight() {\r\n\t\treturn getHeight(rootNode);\r\n\t}", "public int height() {\n return heightNodes(root);\n }", "@Test\n public void getHeight() {\n Node node = new Node(150);\n node.setLeft(new Node(120));\n node.setRight(new Node(40));\n Node root = new Node(110);\n root.setLeft(new Node(80));\n root.setRight(node);\n assertEquals(2, BinarySearchTree.getHeight(root));\n }", "private int heightAux(Iterator<Node> it) {\n\t\tNodeType nType = it.nodeType();\n\t\t\n\t\tint leftH = 0;\n\t\tint rightH = 0;\n\t\t\n\t\tif (nType == NodeType.LEAF) {\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\tif (nType == NodeType.DOUBLE) {\n\t\t\tit.goLeft();\n\t\t\tleftH = heightAux(it);\n\t\t\tit.goUp(); it.goRight();\n\t\t\trightH = heightAux(it);\n\t\t\tit.goUp();\n\t\t}\n\n\t\treturn Math.max( (leftH + 1), (rightH + 1) );\n\t}", "public int treeHeight() {\n return height(root);\n }", "public int height() {\n return height(root);\n }", "public int height() {\n return height(root);\n }", "public int height() {\n return height(root);\n }", "public static int height(BinaryTreeNode<Integer> root) {\n if(root == null){\n return 0;\n }\n int sum = 0;\n if(root.leftChild != null){\n sum = Math.max(sum, height(root.leftChild));\n }\n if(root.rightChild != null){\n sum = Math.max(sum, height(root.rightChild));\n }\n return sum+1;\n }", "int get_height(Node node) {\n\t\tif (node == null) \n\t\t\treturn 0;\n\t\telse if (node.leftChild == null && node.rightChild == null)\n\t\t\treturn 0;\t\t\n\t\telse return 1 + max(get_height(node.leftChild), get_height(node.rightChild));\n\t}", "public int countLeaves(){\n return countLeaves(root);\n }", "int height(Node N) { \n if (N == null) \n return 0; \n return N.height; \n }", "private int getHeight(Node n) {\n\t\tif (n==null)\n\t\t\treturn 0;\n\t\tint heightLeft = getHeight(n.left);\n\t\tif (heightLeft==-1)\n\t\t\treturn -1;\n\t\t\n\t\tint heightRight = getHeight(n.right);\n\t\tif (heightRight==-1) \n\t\t\treturn -1;\n\t\t\n\t\tif(Math.abs(heightRight-heightLeft) > 1)\n\t\t\treturn -1;\n\t\telse\n\t\t\treturn 1+Math.max(getHeight(n.left), getHeight(n.right));\n\t}", "public int getHeight() {\n return nodeHeight(overallRoot);\n }", "public static int height(Node root){\n if(root == null){\n return 0;\n }\n int leftHeight = height(root.left);\n int rightHeight = height(root.right);\n\n return Math.max(1+ leftHeight, 1+rightHeight);\n }", "public int height() {\n return getHeight(root);\n }", "public int numberOfLeaves() {\r\n\t\tif (root == null) {\r\n\t\t\treturn 0;\r\n\t\t} // if\r\n\t\treturn numberOfLeaves(root.left) + numberOfLeaves(root.right);\r\n\t}", "private int height(TreeNode<E> node) {\n\t\tif(isEmpty()) //if tree is empty\n\t\t\treturn 0; //height is 0 for empty tree\n\t\tif(node.right == null && node.left == null) //current node has no children\n\t\t\treturn 1; //return 1\n\t\tif(node.left == null) //current node has only a right child\n\t\t\treturn 1 + height(node.right); //return 1 + height of right subtree\n\t\tif(node.right == null) //current node has only a left child\n\t\t\treturn 1 + height(node.left); //return 1 + height of left subtree\n\t\t//The below cases are for when the current node has two children\n\t\tif(height(node.left) > height(node.right)) //if left height is greater than right height\n\t\t\treturn 1 + height(node.left); //return 1 + height of left subtree\n\t\telse //if right height is greater than left height\n\t\t\treturn 1 + height(node.right); //return 1 + height of right subtree\n\t}", "public int calcHeight(){\n\t\t\t\treturn calcNodeHeight(this.root);\n\t\t}", "int height(Node N) \n { \n if (N == null) \n return 0; \n return N.height; \n }", "public int height(){\n int level=0;\n \n //if is empty, we finish\n if(this.isEmpty()){\n return level;\n \n \n }else{\n //count this level and check the level under its childs recursively\n int levelSubTree1,levelSubTree2;\n \n levelSubTree1=1 + this.right.height();\n levelSubTree2=1 + this.left.height();\n \n //get the higher height\n if(levelSubTree1> levelSubTree2){\n level=levelSubTree1;\n }else{\n level=levelSubTree2;\n }\n }\n return level;\n }", "public int height()\n {\n return _root.height();\n }", "@Test\r\n public void testHeightCompleteTree(){\r\n \ttree.add(\"deer\");\r\n \ttree.add(\"bar\"); //adding as child to left\r\n \ttree.add(\"jar\"); //add as child to right \r\n \ttree.add(\"apple\"); //adding to right side of right node\r\n \tassertEquals(tree.height(), 2); \r\n }", "default int calcHeight() throws NotATreeException {\n\n int[] roots = getSources();\n\n if (roots.length == 0) {\n throw new NotATreeException();\n }\n\n class WrappedCalcLongestPath {\n private int calcLongestPath(int node, TIntList path) throws CycleDetectedException {\n\n if (!containsNode(node)) {\n throw new IllegalArgumentException(\"node \"+ node + \" was not found\");\n }\n\n if (isSink(node)) {\n return path.size()-1;\n }\n\n TIntList lengths = new TIntArrayList();\n for (int edge : getOutEdges(node)) {\n\n int nextNode = getHeadNode(edge);\n\n TIntList newPath = new TIntArrayList(path);\n newPath.add(nextNode);\n\n if (path.contains(nextNode)) {\n throw new CycleDetectedException(newPath);\n }\n\n lengths.add(calcLongestPath(nextNode, newPath));\n }\n\n return lengths.max();\n }\n }\n\n // it is ok if there are multiple roots (see example of enzyme-classification-cv where it misses the root that\n // connect children EC 1.-.-.-, EC 2.-.-.-, ..., EC 6.-.-.-)\n /*if (roots.length > 1) {\n throw new NotATreeMultipleRootsException(roots);\n }*/\n\n return new WrappedCalcLongestPath().calcLongestPath(roots[0], new TIntArrayList(new int[] {roots[0]}));\n }", "private int height(Node<T> node){\n if(node == null){\n return 0;\n }else{\n int leftHight = height(node.left) + 1;\n int rightHight = height(node.right) + 1;\n if(leftHight > rightHight){\n return leftHight;\n }else{\n return rightHight;\n }\n }\n }", "private int height(BSTNode root) {\r\n \r\n // if the root is null, return 0\r\n if (null == root) {\r\n \r\n return 0;\r\n }\r\n \r\n // find the height of the left subtree\r\n int heightLeftSub = height(root.left);\r\n \r\n // find the height of the right subtree\r\n int heightRightSub = height(root.right);\r\n \r\n // return the greatest subtree value plus 1 for the height\r\n return Math.max(heightLeftSub, heightRightSub) + 1; \r\n }", "public int height(Node root){\n\t\tif(root==nil)return 0;\n\t\treturn Math.max(height(root.left),height(root.right))+1;\n\t}", "public int height() {\n if (root == null) {\n return -1;\n }\n else return height(root);\n }", "public int getTreeHeight(int i) {\n\t\treturn this.treeHeight[i];\n\t}", "public int numLeaves() {\n return numLeaves(root);//invokes helper method\n }", "public int height(Node n)\r\n\t{\r\n\t\tif(n==null)\r\n\t\t{\r\n\t\t\treturn -1;//empy node height is -1\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn n.height;\r\n\t\t}\r\n\t}", "private static int height(TreeNode node) {\n\t\t\n\t\tif(node == null)\n\t\t\treturn 0;\n\n\t\treturn (Math.max(height(node.left) , height(node.right)) + 1);\n\t}", "public int height(Node root) {\n if(root!=null) {\n if(root.left == null && root.right ==null) {\n return 0;\n }\n return maxDepth(height(root.left), height(root.right)) + 1;\n } else {\n return 0;\n }\n }", "int height(Node node) {\r\n\t\tif (node == null) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tint left = height(node.left);\r\n\t\tint right = height(node.right);\r\n\t\tint max = Integer.max(left, right);\r\n\t\treturn max + 1;\r\n\t}", "int height(Node node){\r\n\t\tif( node == null ) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\treturn Math.max( height(node.left), height(node.right) ) + 1 ;\r\n\t}", "@Test\r\n public void testHeightFullTree(){\r\n \t\r\n \tBinarySearchTree<Integer> treeInt = new BinarySearchTree<Integer>();\r\n \t\r\n \ttreeInt.add(31);\r\n \ttreeInt.add(5);\r\n \ttreeInt.add(44);\r\n \t\r\n \tassertEquals(treeInt.height(), 1);\r\n \t\r\n \ttree.add(\"deer\");\r\n \ttree.add(\"bar\"); //adding as child to left\r\n \ttree.add(\"jar\"); //add as child to right \r\n \tassertEquals(tree.height(), 1); //height is now 1\r\n }", "public int height() {\n if (root == null) {\n return -1;\n } else {\n return getHeight(root, 0);\n }\n }", "private static int numTrees(int n) {\n int[] counts = new int[n + 2];\n counts[0] = 1;\n counts[1] = 1;\n for (int i = 2; i <= n; i++) {\n for (int j = 0; j < i; j++) {\n counts[i] += counts[j] * counts[i - j - 1];\n }\n }\n return counts[n];\n }", "int height(Node N) {\n if (N == null) {\n return 0;\n }\n return N.height;\n }", "private int height(BSTNode<K, V> node) {\r\n if (node == null) {\r\n return 0;\r\n } else {\r\n if (height(node.left) >= height(node.right)) {\r\n return 1 + height(node.left);\r\n } else {\r\n return 1 + height(node.right);\r\n }\r\n }\r\n }", "public int height() {\n\t\tif (root == null) {\n\t\t\treturn 0;\n\t\t} else {\n\t\t\tBSTNode<K,V> temp = root;\n\t\t\treturn getHeight(temp);\n\t\t}\n\t}", "public int getHeight() {\n return huffTree.getHeight(huffTree.root, 0); \n }", "private int getHeight(BSTNode<T> current, int i) {\n int right = i;\n int left = i;\n if (current.getRight() != null) {\n right = getHeight(current.getRight(), i + 1);\n }\n if (current.getLeft() != null) {\n left = getHeight(current.getLeft(), i + 1);\n }\n if (right > left) {\n return right;\n } else {\n return left;\n }\n }", "public static int height(treenode root)\n {\n return root==null ? -1 : Math.max(height(root.left) , height(root.right)) +1;\n }", "private static int getHeight(Node current) {\n if(current == null) {\n return 0;\n }\n //Return the greater of the height of either the left subtree or the right, then add 1 for every node that it finds\n else {\n return Math.max(getHeight(current.getLeftChild()), getHeight(current.getRightChild())) + 1;\n }\n }", "private int height(AvlNode<E> node){\n if(node == null){\n return 0;\n } else {\n return max(height(node.left), height(node.right)) + 1;\n }\n }", "int sumRootToLeafNumbers();", "public int checkHeight(Node root){\n\t\tif(root == null)\n\t\t\treturn 0;\n\t\tif(root.left == null && root.right == null)\n\t\t\treturn 1;\n\t\tint leftH = checkHeight(root.left);\n\t\tif(leftH == Integer.MIN_VALUE) //left subtree not balanced\n\t\t\treturn Integer.MIN_VALUE;\n\t\tint rightH = checkHeight(root.right); \n\t\tif(rightH == Integer.MIN_VALUE) //right subtree not balanced\n\t\t\treturn Integer.MIN_VALUE;\n\n\t\tint diff = Math.abs(rightH - leftH);\n\t\t//this tree is not balanced, if heights differs more than 1\n\t\tif(diff > 1) \n\t\t\treturn Integer.MIN_VALUE;\n\t\telse {\n\t\t//return the height if balanced, which is maxHeight subtree + 1\n\t\t\tSystem.out.println(Math.max(rightH, leftH) + 1);\n\t\t\treturn Math.max(rightH, leftH) + 1;\n\t\t}\n\t}", "public int height(Node node) \n {\n \t if (node == null) return 0;\n \t return 1 + max(height(node.left), height(node.right));\n }", "int getChildCount();", "public static int getHeight(Node2 root) {\n\t\t// Write your code here\n\t\tif (root.right != null || root.left != null) {\n\t\t\treturn 1 + Math.max(getHeight(root), getHeight(root));\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "public abstract int getNumChildren();", "public int getHeight (BinaryTreeNode<T> treeNode) {\n if (treeNode == null) {\n return 0;\n }\n return 1 + Math.max(getHeight(treeNode.left), getHeight(treeNode.right));\n }", "public static int size(Node root){\r\n int count = 0;\r\n for(int i=0; i<root.children.size(); i++){\r\n Node child = root.children.get(i);\r\n count += size(child);\r\n }\r\n return count + 1;\r\n }", "public int numTrees(int n) {\n long now = 1;\n for (int i = 0; i < n; i++) {\n now *= 2*n-i;\n now /= i+1;\n }\n return (int)(now/(n+1));\n }", "private void updateHeight(AvlTreeNode<?, ?> n) {\n n.height = 1 + Math.max(height(n.left), height(n.right));\n }", "public int getChildCount()\n/* */ {\n/* 500 */ return this.children.size();\n/* */ }", "private int getHeight(Node current) throws IOException {\n Node left = new Node(current.left);\r\n Node right = new Node(current.right);\r\n if (current.left == 0 && current.right == 0) {\r\n return 0;\r\n }\r\n if (current.left == 0) {\r\n return 1 + right.height;\r\n }\r\n if (current.right == 0) {\r\n return 1 + left.height;\r\n }\r\n return 1 + Math.max(left.height, right.height);\r\n }", "public int countNodes(TreeNode root) {\n int leftHeight = getLeftHeight(root);\n int rightHeight = getRightHeight(root);\n if (leftHeight == rightHeight) {\n return (1 << leftHeight) - 1;\n }\n return countNodes(root.left) + countNodes(root.right) + 1;\n }", "public int height()\r\n {\r\n return head.height; //Should return log base 2 of n or the height of our head node. \r\n }", "private int getHeightofNode(TreeNode node){\n if (node == null) return 0;\n if (getColor(node) == RED) {\n return Math.max(getHeightofNode(node.left), getHeightofNode(node.right));\n } else {\n return Math.max(getHeightofNode(node.left), getHeightofNode(node.right))+1;\n }\n }", "int childrenSize();", "private static int utopianTree( int n )\n\t{\n\t\tint height = 1;\n\t\twhile( n > 0 )\n\t\t{\n\t\t\tif( n > 0 )\n\t\t\t{\n\t\t\t\theight *= 2;\n\t\t\t\tn--;\n\t\t\t}\n\t\t\tif( n > 0 )\n\t\t\t{\n\t\t\t\theight++;\n\t\t\t\tn--;\n\t\t\t}\n\t\t}\n\t\treturn height;\n\t}", "public int depth(){\n if(root!=null){ // มี node ใน tree\n return height(root);\n }\n else {return -1;}\n }" ]
[ "0.7525726", "0.74520606", "0.7431352", "0.7426645", "0.7394544", "0.7391345", "0.73817813", "0.7335594", "0.73254395", "0.7320978", "0.72216785", "0.72193825", "0.7213121", "0.7212342", "0.7211385", "0.720773", "0.72052747", "0.7138011", "0.71229994", "0.7116797", "0.7102494", "0.7100625", "0.70772207", "0.7077009", "0.70186275", "0.69770026", "0.6961561", "0.69548905", "0.6952195", "0.69341546", "0.6932371", "0.6930777", "0.6915885", "0.69125724", "0.6904506", "0.68953145", "0.6891258", "0.68746656", "0.6867365", "0.68643486", "0.68536544", "0.6842064", "0.6841214", "0.6841214", "0.6841214", "0.68376756", "0.6836282", "0.6834733", "0.6834552", "0.68095076", "0.6806623", "0.68004286", "0.67936605", "0.67646575", "0.676181", "0.67471117", "0.6745895", "0.67413116", "0.67159027", "0.6706782", "0.66850275", "0.667679", "0.66655207", "0.6664634", "0.6659414", "0.66584444", "0.66581076", "0.66337866", "0.6627852", "0.66234946", "0.6622861", "0.6622251", "0.6615327", "0.66101474", "0.6598493", "0.6586792", "0.6578001", "0.65412796", "0.6529829", "0.6514018", "0.65139383", "0.6507832", "0.650171", "0.6498089", "0.6497637", "0.6491508", "0.64687216", "0.6467932", "0.6458552", "0.6454024", "0.64431256", "0.64419776", "0.640911", "0.64078337", "0.64068776", "0.6387339", "0.63843375", "0.63820976", "0.6377814", "0.6375708", "0.6375506" ]
0.0
-1